Archive for August, 2009

Firefox blank start page

August 26, 2009

Nowadays I mostly use chrome, but when I use firefox (and IE), I like it to start on a blank page.

To do this, you put “about:blank” into your home page.

Recent firefoxes have a separate option for “blank page”, but “about:blank” works in pretty much all browsers that I’ve met.


cygwin nslookup/dig problem

August 26, 2009

Cygwin’s nslookup and dig didn’t work for me. Annoying problem:

;; communications error: connection reset
$ nslookup
;; communications error: connection reset

It turns out the answer is to make an /etc/resolv.conf file. Unfortunately it looks like you have to keep it up to date manually as you change networks – it can’t figure out windows’ nameservers by itself. But such is life. An empty /etc/resolv.conf file doesn’t help.

But at least nslookup now actually works on cygwin.

Driving – wanting a new(ish) car

August 10, 2009

Something I find weird listening to americans is how they buy cars – they seem to buy cars new. I’ve never really got this – what sort of crazy nutjob buys a car brand new???

I live in the UK. Cars are expensive. Not as expensive as they are in surrounding countries, but still pretty darn expensive. New cars especially so. I don’t get this buying a new car thing. I did it once. It was expensive. Never again.

That said, I go through phases of craving various cars. I’ve (thankfully) come out of a period of really, really wanting a Nissan Pathfinder. (I know – what was I thinking???) Currently, a Volvo XC70 or V70 seems really desirable (provided it has seven seats, and the regular back seats have fold-up bum cushions for wee folk.)

I seem to spend a lot of time in the car these days. Over an hour a day maybe. And an inevitable consequence of this is that I find myself looking at other cars thinking “Yeah, that’s a sensible car – I should get one of those.” (If I had infinite money, etc)

Hopefully my financial ability to actually buy another car to replace my current one (a 1.4 petrol Fiat Stilo, since you ask) will coincide with a period of lust for a not-totally-fucking-dipshit-stupid car. In particular, I really, really hope I don’t at some point go through a phase of wanting a vw touareg or (god help me) an audi q7 at the same time as actually being able to afford one of them.

If I can get a nice sensible v70 or toyota verso, that’ll be just grand.

coding standards – function name in column 0

August 10, 2009

My life seems to be a study in coding standards. I love coding standards. I like to try new ones every few days. (That sounds facetious, but seriously – the less I have to think about formatting, the more brainpower I have to think about algorithms. And coffee.)

One I’m particularly fond of is (in C mostly, but C++ kinda) making the function name start in column zero:

function_name(void *arg1, char arg2)
return 42;

It just allows for easy grep’ping if you’re consistent.

vi/vim tips – # and * (hash and star)

August 10, 2009

I find # and * (hash and star) very useful commands in vi. They mean “find the next instance of the word under the cursor” (respectively “previous”). Coupled with ‘n’ and ‘N’ (do it again – respectively forwards and backwards), they’re a good way to find references to a function name.

The Sandbaggers

August 10, 2009

I’ve been watching The Sandbaggers recently – it’s an old TV show (nearly as old as me) about MI6. It’s flippin’ wonderful tv; like Smiley, only possibly better. (Aye, I know!!!)

I’m watching a torrent, but I’m likely going to actually buy it.

Nomadic programmers

August 6, 2009

Beautiful blog entry about nomadic, restless programmers vs settled, nation-state programmers:

Setting up a bridge in vmware…

August 4, 2009

If you want to set up a virtual machine to be a bridge in vmware… that is, if you want to be able to configure that virtual machine as a bridge, you’ll need:

  • two NICs on the VM (obviously)
  • not to plug into the same switch or virtual switch
  • probably to create a new virtual switch and plug one of them into it
  • to enable promiscuous mode and mac spoofing

Key takeaway #1: if you plug both ports a bridging vm into a network, you’ll probably kill that network. You can even kill your work LAN. Seriously.

Key takeaway #2: if you don’t enable both promiscuous mode and mac spoofing, your bridge won’t be able to bridge. Promiscuous mode allows it to see traffic that isn’t for itself and mac spoofing allows it to send out packets that it didn’t originate.