Showing posts with label suddenlee. Show all posts
Showing posts with label suddenlee. Show all posts

Monday, January 08, 2007

Adding dino description signature on thunderbird

Here's something I've wanted for a long time now, and was too lazy to write one - a script that adds random dinosaur descriptions as your signature to thunderbird mail.

Before you go on to accuse me of blasphemy for not using perl, here's the reason - I didn't want to. Why perl when you can bash :D

1. Get the list of dinosaurs from wikipedia.
bash $ wget -o /tmp/dinolist.txt http://en.wikipedia.org/wiki/List_of_dinosaurs;

2. Strip off html tags
bash $ cat /tmp/dinolist/.txt | grep "<li> < i> < a href="%5C%22/wiki/%22" | cut -d"\"" -f 2 | cut -d"/" -f 3 | tee dinosaurlist.txt

3. Generate the signature

bash $ vim gen_signature.sh
#!/bin/bash
count=`cat dinosaurlist.txt | wc -l`
random=$RANDOM
let dinonum=$RANDOM%count
xyz=(`cat dinosaurlist.txt`)
dinoname=${xyz[$dinonum]}
echo $dinoname
lynx --dump http://en.wikipedia.org/wiki/${dinoname} | egrep -A 20 "\[[0-9]*\]Binomial name" | sed 's/\[[0-9]*\]//g' > "/home/ishwar/.thunderbird/signature.txt"

text=`cat /home/ishwar/.thunderbird/signature.txt`

if [ -z "$text" ]
then
lynx --dump http://en.wikipedia.org/wiki/${dinoname} | egrep -A 20 "\[[0-9]*\]Species" | sed 's/\[[0-9]*\]//g' > "/home/ishwar/.thunderbird/signature.txt"
fi


4. Change the signature once every five minutes.
bash $ cat /etc/crontab
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/

# run-parts
*/5 * * * * ishwar /home/ishwar/.thunderbird/gen_signature.sh

Accepted, this is not the most elegant script. But it makes me happy.



Tuesday, November 07, 2006

Dravidian dino to kick aryan arse

My fellow repressed brothers,

They can take away your land,
But not your souls,
Shove their language
Up your arse holes.

Fear not, dear separatists
for the mighty dravidian dino
is all set to rip aryan arse.

May I present Dravidosaurus.

Dravidosaurus (meaning "Dravidanadu lizard", Dravidanadu being a region in the southern part of India where the remains were discovered) is a genus of prehistoric reptile which was once thought to be the last surviving member of the Stegosaur or "plated dinosaurs". With an estimated length of 3 metres (10 ft), it would have also been the smallest member of the group.



P.S: Obviously written in jest

Monday, November 06, 2006

The Buffet Intellectuals

We'll all be called by a name now - you and me, and the nerdy little girl with mushroom glasses, the bearded man with bleary eyes in koshy's, pushing aside his carefully unkempt hair. We, the nation, shall henceforth be called - Buffet Intellectuals .


A Buffet Intellectual is a less disparaging term than the more cynical pseudo intellectual, which has seen far more use than required. The term does not make any kicks about the actual intellectual's ability, but in the dilettante attitude of the individual. The random samplings of life that such a person goes through leaves him (or her) a veritable gold mine of random conversations but very little to seek them out for.

To identify a buffet intellectual is very easy - just start talking about something in the abstract and watch the classical allusions roll by. But the easiest way is, of course, to peek into the bookshelf. In the midst of all the professional books, you'll find books about Evolution and Dinosaurs. Or half a shelf of books about Quantum Physics and the Universe. Look more closely and you'll even find books about Economics and Social orders. Heck, you may even find a couple of books about Human Psychology.

A nibble here, a nibble there and not a mouthful anywhere. Such intellectual butterflys are curiousities who rarely achieve anything by such half-hearted dabbling. What is needed is focus and perseverance - not two days' worth of everything.


Sunday, November 05, 2006

foobar and SNAFU

Unlike what the american army wants you to believe, foobar and SNAFU aren't derived from american military slang. Here's the true etymology, as true as they come

1. FOOBAR
Comes from the Dead Sea Scrolls[1] that starts
"Phu, Bar, Mitzvah...".


2. SNAFU

This is a difficult one. Comes for the Zoroastrian exclamation, who, as you know, are a pious lot.

" Snahr-ah(f)ura "

that loosely translates to "What, by the scat of the divine beings is this?", or roughly, "Holy shit"
The american army picked it up from the second world war refugees.