Archive for the ‘Geekery’ Category

The Holy Grail of .muttrc Colors

Well, folks, it’s taken me a bazillion and eleventy years to finally decide my “killer” Mutt colour scheme, but here it is. Stick this in your .muttrc and bask in the glory.

color hdrdefault yellow black
color quoted brightred black
color signature magenta black
color indicator brightwhite red
color attachment black green
color error red black
color message white black
color search brightwhite magenta
color status brightyellow blue
color tree red black
color normal white black
color tilde green black
color bold brightyellow black
color markers red black
color header yellow black “.*:”
color header brightwhite black “^(From|Subject):”
mono header bold “^(From|Subject):”
color index brightblue black ~N
color index red black ~F
color index black green ~T
color index brightwhite black ~D
mono index bold ~N
mono index bold ~F
mono index bold ~T
mono index bold ~D

# Various smilies and the like
color body brightgreen black “<[Ee]?[Bb]?[Gg]>”
color body brightgreen black “<[Bb][Gg]>”
color body brightgreen black ” [;:]-*[)>(<|]”

# URLs
color body brightblue black “(http|ftp|news|telnet|finger)://[^ \"\t\r\n]*”
color body brightblue black “mailto:[-a-z_0-9.]+@[-a-z_0-9.]+”
mono body bold “(http|ftp|news|telnet|finger)://[^ \"\t\r\n]*”
mono body bold “mailto:[-a-z_0-9.]+@[-a-z_0-9.]+”

# email addresses
color body brightblue black “[-a-z_0-9.%$]+@[-a-z_0-9.]+\\.[-a-z][-a-z]+”
mono body bold “[-a-z_0-9.%$]+@[-a-z_0-9.]+\\.[-a-z][-a-z]+”

A conversation with JD

j.daniels: 15 minute job to move disks and filesystems? That’s impressive. What’s your secret?
j.dow: no, fifteen minute job to shut down box, add disks, and bring box back up
j.daniels: Ahh.
j.dow: the rest of it can be done hot. This is the cunning nature of sysadmins.
j.daniels: Sadly, not cunning enough to dodge your bed?
j.dow: it’s the exhaustion brought on by having such a highly powered intellect.
j.daniels: Or the crash after eating too much sugar.
j.dow: both are possible.

Syncing ratings from iPod back to iTunes

It doesn’t do this, by default, unless you’re syncing your whole music collection automatically. Which is a bit rubbish if, like me, you have an 8Gb iPod Touch and a 60Gb music library.

See, what I tend to do, to make sure I actually rotate my music and listen to more than one album (:-)) is have a smart playlist which contains 25 unrated songs selected randomly. But what I want to do is rate them on the ipod as they play and have their rating in iTunes updated on my next sync. Well, I’ve worked out it CAN be done, albeit in a slightly roundabout way.

  1. Create your smart playlist: Mine matches the rule Rating is: (no stars), limit to 25 items, match only checked items, live updating.
  2. I have another smart playlist which is my highest rated songs (this is one of the defaults you get) and another that I just drop random stuff I want to listen to in.
  3. Connect your iPod. In the summary screen, make sure “Sync only checked songs and videos” is checked. In the Music tab you want to check “Sync Music” and “Selected playlists”.
  4. Now select your playlists – I have me “Random Stuff” playlist, my “Top Rated” one and, of course, my “Unrated Songs” one.
  5. Sync your ipod. Listen to songs. Rate them. Sync it again and POOF! iTunes updates!

This all sounds horribly obvious, you cry – why bother writing about it? It’s the “Summary” tab that’s the stumbling point. By default, you wouldn’t check “Sync on checked…” because that would be silly. But if you don’t, it doesn’t sync back. Go figure.

The Strange Case of the Unexpected Fruit

Ok, so there I was standing in my kitchen and gazing with a little horror and a touch of disgust at my fruit bowl. It had, as memory serves, contained a couple of bananas, a chinese pear, and a solitary wizened looking apple.

Imagine my shock to discover a small colony of unexpected grapes lying on the top!

I have several theories about how this came to be, described (in no particular order) below.

  1. Spontaneous manifestation. In all fairness, I only considered this possibility for the briefest of moments. I believe spontaneous manifestation is tied either to a particularly strong will to live or to a strong sense of will to return originating from a hive mind. As I am not part of a hive mind, and as fruit (to the best of my knowledge) are not sentient, this possibility was dismissed brusquely, with a sound swat on the bottom.
  2. Quantum Superpositioning. This is a very real possibility. I had spent rather a long time in the fruit section in Asda during the morning and, while I didn’t actually buy any grapes (that I can remember), spent a significant amount of time eyeing up the juicy goodies. My hypothesis here is that the intensity of my gaze, coupled with a healthy dose of Heisenberg’s uncertainty principle,  generated enough high-energy activity at a quantum level to cause the fruit in question to immediately superposition, resulting in it existing simultaneously in Asda and in my fruit bowl. When the inevitable shiny distraction caused me to change the focus of my attention, the field was broken and the grapes were left stranded. This is a sound theory. I feel further research is needed; in particular using women’s undergarments as the experimental media.
  3. Pixies. The Swamp Pixie, who has been spending an increasing amount of time stalking around my living room in the dead of night, posits that I may have a colony of wild male pixies living in my back garden. It may well be that the grapes have been left by one or other of these annoying little people as some form of primitive gift. Either way, tough luck! They’ve already been nommed.

It has been suggested to me that I may simply have bought the grapes and then forgotten about it and then forgotten that I’d forgotten. Not true. I’d remember if I’d forgotten I’d forgotten about something I’d boughten. I’m clearly perfect, and I don’t take kindly to people casting aspersions on my heroic intellect.

A conversation with Dave

(15:19:21) j.dow/Home: Matey – can I schedule a two hour outage some evening to take a cold backup of live?
(15:19:41) Dave: aye
(15:19:54) j.dow/Home: or morning would work just as well (and be quieter)
(15:20:01) Dave: get a date in mind and then i’ll pass to Simon to notify the clients
(15:20:13) Dave: Morning may indeed be better if you can handle it
(15:20:16) j.dow/Home: wednesday, 5am?
(15:20:25) j.dow/Home: I’ll script it :)
(15:20:31) j.dow/Home: then get up to check it’s back up :)
(15:21:08) Dave: I think what you mean is you’ll “fandazzle it”
(15:21:30) Dave: that way the schnoozing should be positivly Christmaster
(15:21:31) j.dow/Home: exactly :)
(15:21:56) j.dow/Home: and I can ping you a spofnigator to congogulate the reticulated splines.
(15:22:22) Dave: absolcisely

Happy Birthday Nelefa.org!

So, set the way-back machine to June 1996. A hairy, bearded, UNIX nerd sits in the back office of Cyberia Cafe on Hanover Street in Edinburgh. He’s been writing these games and, as he hosts web sites for a living, he reckons he should actually have somewhere to distribute them from.

So he sits and ponders. A year or so previously, he’d been absorbed into the Yoyo Collective Consciousness – that mystical circle of ill-repute which attracts the lonely, lost, broken and damned sysadmins of the world and rolls them into a single glittering gestalt. So, web space was there, all that was needed was a domain to point at it.

Hence ‘nelefa.org’ was chosen, and to this day people struggle to pronounce it. It’s “nelly-fah”. It’s how someone who can’t say “Elephant” might pronounce it if they were being cute.

At the time, Nominet (can’t quite remember if they were actually called Nominet at the time – I think that came later) were charging £100 + VAT for an org.uk domain, so I went straight to InterNIC (while they were still selling domains on their own) and got the .org for a third of the cost and a fraction of the paperwork.

And so nelefa.org was born. It was originally hosted on the first incarnation of the Yoyo hardware then moved onto my own Sun ELC (which went by the name of Little Nelly) – a beautiful little machine consisting of a 33MHz sparc v7 on a single board with 16Mb of system RAM and an external SCSI drive. The O/S used was NetBSD as it was tiny and fast and didn’t object to having bugger all memory.

Nowadays, nelefa.org lives on a virtual machine hosted by Xeriom Networks, who I am happy to unashamedly pimp as they provide an awesome service, but the links to yoyo still run deep – the only reason it’s been moved to its own machine is because I don’t want to hog the yoyo bandwidth with the ridiculous amount of traffic I get.

So, over the years there’s been many iterations of the site and a lot of the earliest content has been lost in the mists of time. For the past few years it’s been running wordpress and there is content from as far back as 1998, so please feel free to join in the birthday celebrations and have a dig through the post archive just for the lols :)

The Beginning of the End

So, it’s Monday morning on the week of The Grand Architecture Migration. Frankly, I’m shitting myself about it. We’ve covered everything as comprehensively as possible, but there’s always that little niggle of doubt.

Thing is, we have a limited time window in which to operate – a matter of a couple of days. If the migration fails to happen in this time, we have to roll back an continue with the old, unreliable, risky platform.

Back up a couple of paces. Basically, we’re taking a HUGE oracle web app and porting it from knackered old Sun boxes in London to shiny little Linux boxes in Edinburgh. So there’s endian issues to begin with. There’s also the problem of having to run an older version of Oracle as the whole webapp relies on mod_plsql. There’s a 40 Gb database which needs to be exported, compressed, scp’d over the net, uncompressed and imported. This all takes a lot of time and has us hard against our time limits. (By the way – thanks, Oracle – we didn’t actually NEED an incremental export facility (girr!)).

So, in theory, because it’s been tested to destruction, scripted to the eyeballs, and then tested again, it should all go according to plan.

Enter Orange Stupid. Unless we have someone running interference during the migration, his interference is almost guaranteed to cause delays. Which will result in us having to abort the whole exercise or risk going bust.

Like I said: shitting bricks.

Grr!

Mini ScreenshotOne of the FAILpods in my office has just suggested it may be time for me to “update my Desktop Environment”. I may have to stab him to death using a broken Vista install disk….

Orange Ditches Phorm

Well, there’s a turn up for the books! It appears that Phorm are being dropped by Orange. Hopefully more ISPs will follow suit. In an interview with the Financial Times, a representative from Orange said:

“Privacy is in our DNA, so we need to be honest and clear about what we are doing. We have decided not to be in Phorm because of that… The way it was proposed, the privacy issue was too strong.”

It’s nice that it’s not just us geeks who see that Honesty and Phorm are not good bedfellows.

El Reg has a nice article about it here.

SSL with Oracle

Ok, so we all know there’s The Oracle Way and The Wrong Way (at least according to Oracle DBAs who aren’t me). Well, today I had to renew the SSL cert for an iAS installation. This isn’t something that would make me think twice – I’ve been dealing with SSL setups since 1996, or thereabouts, and iAS is just the 1.3 branch of Apache with a couple of directives overridden. So nothing to worry about.

Ah. Except it doesn’t use an SSL key or certificate in any way you’d consider normal. Instead, it uses a wallet. Stored on the server. Managed from a java gui. On a headless machine which doesn’t have a graphics board and lives 400 miles from me (hence headless).

So, I guess the preferred practice is to copy the wallet locally and work with it there, but that’s just plain silly – I have no desire to clutter up my machine with 4 gig of oracle client crap when I have SQLplus on the server. So – two ssh tunnels and a bit of X forwarding later and I have Oracle Wallet Manager running on my macbook.

There’s the expired certificate – I’ll export it to the filesystem to get a backup of it. Ok, not I’ll export the CSR and just use it to request a new cert. Off to the vendor, hand over a couple of hundred quid and BINGO! Nice shiny new certificate.

Right – I’ll remove the old one…done. Import the new one. Invalid. Hmmm. Does a double check. Import as Trusted Cert (just for elimination). Works fine. Hrm – is it self signing? No idea. I’ll just reload the old cert for now while I work it out. Read in the old cert and……what? It’s turned into a new one? Is there some kind of autosigning happening somewhere?

I am Jacks sense of complete bewilderment.

Return top

Random Fact

Two wrongs don't make a right, but two Wrights did once make an aeroplane. Unless you're talking integer maths where two wrongs DO actually make a right. Also, three lefts make a right.