Monthly Archives: April 2010

Randomized .signature file

Here’s a quicky. I like to have a random quote in my signature, but most mail clients only read a static file, and trying to fool them with a command pipe socket is tricky, and often has other issues. So I wrote this little bit of magic:

my $fortune = '';
do {
	$fortune = `fortune -e -s -n 480 bofh-excuses calvin chalkboard chucknorris computers cookie definitions discworld dune firefly fortunes hitchhiker homer kids law linux magic mormon paradoxum perl pets riddles science scriptures smac startrek starwars taow work`;
} while ($fortune =~ /filter|these|words|out/);
print "Matthew Walker                      h: (xxx) xxx-xxxx\n";
print "Software Architect                  m: (xxx) xxx-xxxx\n";
print "Marketecture                        e: fake_email\\n\n";
print $fortune;

Replace the ‘filter|these|words|out’ bit with a | seperated list of words you don’t want to show up in your fortunes, and adjust the fortune command however you want to tune the type of quotes you get. Then install it as a cron job like this:

* * * * * perl ~/ > ~/.signature

There you go! Your .signature file will get regenerated once a minute with a new random quote. Enjoy.

CakePHP Twitter and Bitly Components

I promised more programming related posts, and here’s one for you.

As part of developing, I needed to interface with Twitter and to post tweets and the links back to the public profiles on TweeterDiet. I searched around for a while, and didn’t immediately run across any good components for what I needed, so I wrote my own, and now I’d like to share them.
Read more »

My Weight Loss Journey

I know I haven’t posted much about programming recently, and I’ll try to correct that soon. I have some interesting new Cake Components to show off. But I felt that today I needed to talk about my weight loss. As many of you are aware, I’ve been working on losing weight this year. When I started, I wasn’t sure how it would go, since I’ve tried before and never done terribly well. This time is different. Read more »