Removing MBR (including the partition table):
# dd if=/dev/null of=/dev/sdX bs=512 count=1Removing MBR (excluding the partition table):
# dd if=/dev/null of=/dev/sdX bs=446 count=1sdX is the device you want to remove the MBR of (like a USB-stick).
Removing MBR (including the partition table):
# dd if=/dev/null of=/dev/sdX bs=512 count=1Removing MBR (excluding the partition table):
# dd if=/dev/null of=/dev/sdX bs=446 count=1sdX is the device you want to remove the MBR of (like a USB-stick).
A oneliner with Perl does the trick:
$ perl -le 'print crypt("password", "salt")'
Your htpasswd-file should then look like so:
UserName:EncryptedPassword:YourComment
25th of May 2008 I wrote a post about how you could join multiple files that looked something like movie.avi.001, movie.avi.002 and so on. I found a new tool that does the job a bit easier, lxsplit. The syntax of lxsplit is like so:
[jorge@ashitaka ~]$ lxsplit LXSplit v0.2.4 by Richard Stellingwerff, O. Sezer. Home page: http://lxsplit.sourceforge.net/ Usage: lxsplit [OPTION] [FILE] [SPLITSIZE] Available options: -j : join the files beginning with the given name -s : split the given file. requires a valid size Splitsize examples: 15M, 100m, 5000k, 30000000b Examples: lxsplit -s hugefile.bin 15M lxsplit -j hugefile.bin.001
So to join all our files, we execute:
$ lxsplit -j movie.avi.001And it will join all files named movie.avi.00{1,2,3} and so on. :)
This is a oneliner to convert an avi-file to the correct dimensions of a Nokia E71. The screen is small, but sure beats to buy an iTouch if your cell already can play movies for you. :)
$ ffmpeg -y -i input.avi -acodec libfaac -ab 72k -s 320x176 -aspect 16:9 -vcodec libx264 -b 300k -qcomp 0.6 -r 25 -qmin 16 -qmax 51 -qdiff 4 -flags +loop -cmp +chroma -subq 7 -refs 6 -g 250 -keyint_min 25 -rc_eq 'blurCplx^(1-qComp)' -sc_threshold 40 -me_range 12 -i_qfactor 0.71 -directpred 3 output.mp4
A co-worker of mine made a nice little script to make reloading of the default VCL that Varnish uses a bit easier. Not wanting to telnet or use varnishadm manually, this script does the trick. This was taken from http://kristian.blog.linpro.no/2009/02/18/easy-reloading-of-varnish-vcl/:
#!/bin/bash # Reload a varnish config # Author: Kristian Lyngstol FILE="/etc/varnish/default.vcl" # Hostname and management port # (defined in /etc/default/varnish or on startup) HOSTPORT="localhost:6082" NOW=`date +%s` error() { echo 1>&2 "Failed to reload $FILE." exit 1 } varnishadm -T $HOSTPORT vcl.load reload$NOW $FILE || error varnishadm -T $HOSTPORT vcl.use reload$NOW || error echo Current configs: varnishadm -T $HOSTPORT vcl.list
Powered by WordPress