Sunday, July 26, 2009

random status in Pidgin :- fortune

There is a nice utility called 'fortune' for linux. Basically a database of funny/witty quotes accumulated over decades which can be read either directly from flat files or using the 'fortune' front-end.

What can you use it for? Display random quotes in your mail signature (with due references/credits), on your home page or IM status :P

#!/bin/bash
while true :;

do
MSG=`fortune -ae`
zenity --question --text="$MSG" && (purple-remote "setstatus?message=$MSG" && sleep 1800);
done;
Make sure you have zenity and fortune packages installed.

Start pidgin and then this script. It will get a new random status every 1800 seconds and ask whether you want it as status, the process repeats immediately if you press cancel, and status is set otherwise.

'fortune' is used for name sake here. You can pull in random statuses from some web page (and probably scrape them), or some RSS feed if available, or from your own compiled database of statuses, reading one at random.

This is what you do when you are bored to core sitting in an office on Monday afternoon waiting for the benchmarks to complete.

Sunday, July 05, 2009

raided

Bought a new Seagate 500GB internal disc drive last week. One of the obvious things I'd try out was to RAID my old drive with this one. Though asymmetric in both sizes and performance, I wanted to give it a try. Without very high expectations of speedups, I went ahead.

RAID on windows turned out to be a disappointment. The so called Windows Dynamic Discs must span an entire physical disk, which means I could not install linux on any of these drives. Pfft; what a nice way to cut out competition! Moreover, from what I read, dynamic discs are not reliably readable in linux.
Someone has posted an article that tells how to dual boot RAID windows with linux installed. Though I have not tried it, it is worth trying out in a VM first.

RAID-ing on Linux was like a breeze. This time I decided to trust the anaconda installer GUI for partitioning and not doing it the usual command line way. With two raid partitions of same size on each drive, the setup created /dev/md0 comfortably for me. Then I created a PV out of raid and added it to LVM. Partitioned the lvm group in the usual way and my system was up flawlessly. Though not exaggeratingly massive, I can sense some speedup in my day to day activities. Not to mention, boot times are affected. Disc I/O bound programs are ones most boosted. One of my projects where data is read from a 15G file at random runs at 1.5x now :D.