Skip to content

{ Monthly Archives } April 2008

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 [...]

$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 countdown.py:
#!/usr/bin/env python
# countdown to 5pm
# 2008 SJW
import datetime
now = datetime.datetime.now()
home = datetime.datetime(now.year, now.month, now.day, 17, 0, 0, 0)
total_secs = (home - [...]

Updating WordPress via Subversion: it works!

The last time a new version was released I decided to update my WordPress installation with Subversion with the idea being that this would make future updates easier.
Well, the good news is that this technique works
All it took was 3 simple steps:

$ cd /var/www/sickbiscuit.com/blog
$ svn switch http://svn.automattic.com/wordpress/tags/2.5/ .
launch wp-admin/upgrade.php via web-browser

To be [...]