28 October 2006

converting a wma file to mp3

mplayer -ao pcm:file="dub_be_good_to_me.wav" dub_be_good_to_me.wma

lame -V 2 --vbr-new dub_be_good_to_me.wav -o dub_be_good_to_me.mp3




remember to ensure that mplayer isnt configured for looping in /etc/mplayer/mplayer.conf

06 October 2006

Sending mail with attachments from the command line

echo "The body of the email" | mutt -s "The subject" -a file.txt somebody@somewhere.com

You can use multiple -a flags to and many attachments, mutt checks the file extension to determine the mime type

05 October 2006

Adding an ssh public key to another account

cat .ssh/id_rsa.pub | ssh username@otherhost 'cat >> .ssh/authorized_keys'