Bash scripts I've found usefull

To convert avi files to mp3s (used this page as reference)

This script converts all the avi files in a folder to mp3s.
for file in .; do for filename in *.avi; do mplayer -dumpaudio "$filename" -dumpfile "$filename".mp3; done; done

Tried the above script, and I kept getting core dumps. Modified it to use ffmpeg instead of mplayer.

for file in .; do for filename in *.avi; do ffmpeg -i "$filename" -ab 128k -vn "${filename%.avi}.mp3"; done; done

To convert mp4 files, I found this at this site. It uses some pretty advanced techniques (at least to me) to pass the output of one program (faad) to another (lame).
I added the -V9 (V9=lowest VBR quality), since I wanted a small file size.

#!/bin/bash
for i in *.m4a; do
echo "Converting: ${i%.m4a}.mp3"
faad -o - "$i" | lame -V9 - "${i%.m4a}.mp3"
done

rtorrent is great

I’ve been using TorrentFlux for a while on a headless server with great success for the past few years. Recently I’ve had some issues with it, mainly due to the fact that on some larger torrents, it seems to hang, seeding many torrents seems to eat a ton of memory, and CPU load.

So after some looking around, I found rtorrent. A full text based torrent client. Continue reading

Setting up new Xen machine on OpenSuse 11.1 using SuSe Studio

I am liking SuSe Studio quite a bit.

I’ve made a Xen server barebones OS on top of which to run xen virtual machines, and built it in SuSe Studio. Very painless process, which produces a very small download, which requires zero installation. Well not zero installation, since on initial run there needs to be some unassisted setup done by the system. Continue reading