command line history – me too

I’ve seen this on a couple of blogs recently so I thought I’d give it a go on the VPS this site is hosted on:

steve@decaf:~$ history | awk '{a[$2]++} END {for(i in a)print a[i] " " i}' | sort -rn | head -10                                                                
190 ls                                                                          
80 cd                                                                           
24 cp                                                                           
22 sudo                                                                         
19 rm                                                                           
14 svn                                                                          
12 history                                                                      
11 tar                                                                          
10 wget                                                                         
10 vi

And as root:

172 ls                                                                          
59 vi                                                                           
56 cd                                                                           
22 apt-get                                                                      
20 less                                                                         
20 apache2ctl                                                                   
17 apt-cache                                                                    
15 cp                                                                           
10 pwd                                                                          
10 ps

I’m kinda suprised that ls comes out on top each time ;)

I wonder which commands Matt, Aidan and Philip have been using most?

$BIG_CORP rides the snake – my first Python script

In between support tasks at $BIG_CORP I’ve been slowly reading through O’Reilly’s Learning Python and trying a few things out with the command-line interpreter.

The first script I’ve written that actually does something useful is

#!/usr/bin/env python
# countdown to 5pm
# 2008 SJW
import datetime
now =
home = datetime.datetime(now.year, now.month,, 17, 0, 0, 0)
total_secs = (home - now).seconds
hours = total_secs / (60 * 60)
minutes = (total_secs - (hours * 60 * 60)) / 60
print hours, " hours and ", minutes, " minutes until 5pm"

Very simple I know but I just had to share it ;)

Thanks to Clinton for the GeSHi WordPress plugin.

Trigger happy without broadband

For 2 days now the “ready” light on my cable modem has failed to light up and hence I’ve had no internet access at home :( I’ve tried power-cycling the modem, leaving it unplugged overnight and even disconnecting and reconnecting the cable input. No Joy.

I checked the Virgin Media service status page and can see that there was maintenance scheduled for Belfast this morning, maybe this will remedy the problem…

My morning routine has evolved to consist of catching up on RSS while eating breakfast and guzzling coffee, so this ritual has been disrupted and as an alternative to plugging in to my feed reader I had a look through my home folder for one of the many eBooks I’ve downloaded and not finished reading.

The lucky contestant turned out to be the freely downloadable
Trigger Happy by Steven Poole and what a dose of nostalgia it’s been!

I haven’t seriously played any computer games in about a decade now but this book lists many of the titles I invested many hours into when I was younger. I was brought back to the days of sitting hunched over machines like the Atari 2600, Commodore 64, Amiga 600 and NES and I’ve even considered investing in a new console although my need to save for my future is overriding my want for something new and shiny which I might not even make much use of.

Saying that though I’ll probably end up grabbing an Amiga Emulator or MAME at some point over the weekend, Virgin Media willing, and catch up on a few childhood memories.

Game on!

I made this

I can’t believe it, but I actually took the time out yesterday to make this. Here’s what it’s meant to look like:

Paper Wallet - Original
..and here’s my effort:

Paper Wallet - My Effort

It is safe to say I drank too much coffee yesterday ;)

Wikipedia HiJinks

I was reading this article on Wikipedia this morning and something didn’t seem quite right. See if you can spot it in this screenshot:

Wikipedia Screenshot

I had been up from early morning and thought my eyes were playing tricks on me. I read it and re-read it and still the words remained, I can’t say I was shocked but I certainly was surprised. My next thought was “hehe, who can I show this to?” quickly followed up by the more altruistic “how do I report this?” I then took a screenshot for posterity.

I didn’t have a Wikipedia account, so I quickly registered one and when I was returned to the offending article there was no mention of cream of any kind whatsoever. I was left wondering about the source of said text but decided whatever the source, it was beyond my bailiwick and just went back to what I was doing beforehand, which did actually involve the use of the plural of virus…

Barely Legal

Richard just drew my attention to this news item describing Banksy’s latest escapade, an exhibition which includes a “37-year old Indian elephant [...] painted, from head to tail, in a floral pattern reminiscent of an old fashioned living room or a British pub,” genius!

Banksy - Pink Elephant

I hadn’t heard of Banksy before until I read about him replacing 500 copies of Paris Hilton’s album in record shops with CDs containing music by Danger Mouse and featuring doctored artwork. I immediately thought “I like the way this guy thinks!”

Looks like I’ve just got myself a new IM avatar!

Pink Is The Colour

I was reading a discussion on Lifehacker this morning about listening to music while studying, whcih mentioned an earlier post about pink noise. Between the guy on the radio and one of my coworkers I knew I had to take action or suffer the consequences. I felt a MacGyver moment coming on.

One of the comments on the pink noise post led me to download a little app which generates a wave file containing 12 seconds of the stuff. A hop, skip and a jump over to SourceForce enriched me with a copy of Audacity which enabled me to copy-and-paste to my wee hearts delight and voila, 50 minutes of pink noise in an mp3 sandwich which I swiftly transfered to my iPod. Powerful.

I’m listening to it now while I’m writing this post. It reminds me of Lou Reed’s Metal Machine Music and like MMM, I don’t know if I like it and I may well either be sick or go mad.

Now if I only had some duct tape

Wee Me

I was sorting through my bookmarks in Firefox and I found a link to this site which allows you to create a miniature clone of yourself (in colour!) Here’s what I (mostly) look like today:

Mini-SteveMini-Steve in Y-Fronts and a Trenchcoat Pretty much a Regular John, huh?

I should really get back to some “proper” work, instead of creating things like this:

Google Maps here I come…