Today in History

With unix-based systems it’s almost too easy to add little extras like my new Today in History feature. Based on a tip I found at a mac enthusiast site, I put together a new sidebar feature that randomly displays one of the “today in history” entries from the system calendar; it’s over on the right, above the blog calendar.

$qc=system(“grep -h `date +%m/%d` /usr/share/calendar/calendar.* | cut -f 2| /usr/local/bin/rand | head -1”)

Of course, if this was a high-traffic site, some caching might be in order, but then that’s true of most of the dynamic content (random images and quotes) on the site. 🙂