exo : blah

content

Mon, 31 Aug 2009

bad test data

use Test::More tests => 1;

my $discount = 50;
my $cost = 10;

my $discounted_cost = $cost * ( $discount / 100 );

is( $discounted_cost, 5, "discount correctly applied" );

posted at: 21:57 #

Wed, 15 Jul 2009

dear car drivers

if, when overtaking a cyclist, you think they might be able to touch your car then you are too close. If you are forced to be this close when passing a cyclist due to oncoming traffic then you may wish to consider waiting until you have more room to pass.

Thank you for you attention in this matter.

posted at: 22:18 #

Sun, 14 Jun 2009

a holiday: in bullet points

  • location: Mull
  • weeks: one
  • weather: good
  • eagles: golden
  • goats: feral
  • munro: steep
  • roads: narrow
  • ferries: four

posted at: 22:28 #

Mon, 06 Apr 2009

a small request

Dear bicycle manufacturers of the world,
it'd be lovely if you could see fit to provide bikes with wee patches to protect the frame from rubbing cables. I always forget to do so until too late.

posted at: 22:27 #

Fri, 03 Apr 2009

Ask not what it is...

Surely the question should be "What do we want it to be to be British?"

All the debate you hear about in the media and from politicians about defining Britishness, and lets ignore the inherent narrow mindedness of this question, talks about what it is to be British. This seems to be a fundamentally flawed approach being as it is all about, at best, the present. I am much more interested in what we want to be; in looking forward to how a society should be and working out how to move towards that. Change as the nice man across the pond is wont to say.

posted at: 22:41 #

Mon, 02 Mar 2009

back your damn computer up

You'll be wanting to follow this advice. Especially the bit about every night.

Although you may wish to cargo cult this incantation:

#!/bin/bash

# change $yourusername and name of drive accordingly
sudo rsync -axSE --delete \
--exclude-from /Users/$yourusername/backup_excludes.txt \
/ /Volumes/backup/

# required for the bootability apparently
# as it turns out this isn't at all required for booting. 
# the partition type in the jwz thing above are though.
# sudo bless -folder /Volumes/backup/System/Library/CoreServices

Where /Users/$yourusername/backup_excludes.txt looks a little something like this:

/tmp/*
/Network/*
/cores/*
*/.Trash
/afs/*
/automount/*
/private/tmp/*
/private/var/run/*
/private/var/spool/postfix/*
/private/var/vm/*
/Previous Systems.localized
.Spotlight-*/

One other tip is to exclude your backup drive from spotlight indexing otherwise you'll find when you want to eject it you can't as spotlight has its grubby little hands all over the damn thing. You can do this in System Preferences -> Spotlight -> Privacy.

When you smack your laptop down a bit hard and the death rattle starts emanating from your hard disk you will be mighty glad.

And really, every damn night or you will loose something you can't replace.

posted at: 22:37 #

Wed, 18 Feb 2009

abusing the windows desktop for profit

Or rather the feature of XP, and possibly other versions, that allows you to place a web page on your desktop. Many people, including me, poured scorn on the feature when it first emerged but it turns out be quite handy if you point it at a page with all those little details you need to refer to frequently. And because it's a normal web page you can use cut and paste.

In my case I use it to list, among other things, IP addresses of various servers, assorted useful vi key combinations that I don't use often enough to memorise, some magic mysql incantations and various details that are often required when writing ad-hoc database queries.

To ease the process I've got a shortcut key to open the web page in an editor so I can add stuff to it quickly.

To set it up you want to use the following sequence:

  • right click on desktop
  • select Properties
  • select Desktop tab
  • click Customise Desktop...
  • select Web tab
  • click New..
  • stick in path to web page
  • click OK a lot

Sadly I have yet to find a way to do the same on a Mac or Linux. I imagine there is a way on the latter though.

posted at: 19:42 #

all the usual copyright stuff... [ copyright struan donald 2002 - present ], plus license