May 2008 Archives

31-05-2008 23:14

A crazy day!

Ever have one of those days that's like something out of a movie ? Well I did. Needing to remove some furniture at late notice I called upon a mate to help as he had access to a van and/or truck. That unfortunately didn't eventuate, but he was still willing to lend a hand. So I rang around and managed to get a box trailer from another mate. He rang back to warn me it just ran out of rego, so it was my call if I wanted to take it I really had no chose at this point. Just knew I had a tow ball on the back on my Mothers 4 wheel drive vehicle I agreed to it and then relaxed knowing its all sorted. Well I was shocked to find this vehicle did not have a tow ball. So next I ring the mate that's willing to help me to see if he did, but he did not. We tried to find one to buy, by me ringing around stores and he dropping into his local auto parts dealer. Both of us failed in this. So next I call around and find yet another mate who would lend me his vehicle that had the tow ball. During this time, my mate with the trailer had to go out, so told me where to find the key and how to free the trailer.

So off to his place I go. Get there and swap vehicles. Next I head off to get the trailer. I arrive there and found the key they left for it didn't turn the padlock. Meanwhile it started to rain. I tried and tried and no luck. So I rang him to see if I was using the right key etc. Finally it springs free using the key I was already using. So now to mount this trailer, that's not mine, onto a car that's not mine, with the car down hill from the trailer and in the rain. Fearing it would push me into the back of the vehicle and damage it or/and I slip over in the wet, I managed to get it hooked on with only a near miss! So now to head to where I needed to move the furniture from. On the way I notice the fuel gauge was getting very low in my mates car I was driving. So I pull into a petrol station only to realise I left my wallet in my car! So I had no option but to try my luck.

I manage to get to the destination. The amount of furniture I had to remove was far in excess to what I was expecting and it was not going to fit into the box trailer in 1 load or even 2 loads. Plus by now the waste disposal place I was planning on using had closed. What to do? I considered I could make 2 trips back to my place, but my place was 50mins one from here, so that's 3hours 20mins of travelling, plus the loading and unloading and it was 5pm Sunday evening right now. My mate who was willing to lend a hand turns up and also agree's this is going to be hard. So standing around wasn't going to get it done, so we start breaking up this old furniture with our hands and a tomahawk my mate had in his car. We manage to stuff allot into the box trailer and actually come very close to getting it all in. Amazing! We left the best furniture for last and left it out on the road in a hope someone would pick it up. Next to get rid of this, now, rubbish. There was a few options, but my mate come through with the best. His parents knew a guy who owns his own rubbish removal place, and so he organised with them to drop everything off on their front lawn for this guy to pick up in the morning. I was very appreciative of this gesture. He gave me their address and spotted me some money for petrol. I put the addres into my N95 to navigate me there and off we go.

I realise now that my wallet wasn't all I left in my car. I also left my glasses and becoming night time, driving was concerning me. I remember to bring my phone charger though as I knew I would be using the GPS allot. So I head to my mates parents place, in the rain, with an unregistered trailer, fully loaded, not in my car, without my wallet and licence, without my glasses and following a GPS. As we start driving there, I lose him on the way as I have to go slow with the trailer. Then, as if it couldn't get more challenging, my N95 started beeping at me it was running low on battery! Somehow the power from the car wasn't working and charging my phone even though it was plugged in. So on top of everything else, if my phone went flat, I wouldn't have the address to look up where I was going and I wouldn't be able to call my mate, or he call me! But why worry, I ask!

Of course my phone just makes it, I don't crash, I don't run out of petrol and Police don't pull me over. We unload the trailer with help of his parents. I thank them profusely and then he invites me back to his place for a late dinner. I eat there and during my time there my mate who I borrowed the trailer off asks where I am. I then get the trailer back to him while my other mate rings to see where I am with his car. I get there, we swap cars and I head home to arrive home at 1am and work the next day.

All in all, a fun night! :)

Posted by DaveQB | Permanent Link | Categories: Personal

31-05-2008 22:30

Learn 10 good UNIX usage habits

Handy tips for the command line. Click here.

Posted by DaveQB | Permanent Link | Categories: IT

16-05-2008 12:51

Volatile Project

I run Debian stable on my server, no need for the latest and greatest packages, just need it to be stable. Works very well. I run spamassassin and clamav and found in my logs that clamav is out of date. In trying to update it, I stumbled upon this project

Debian Volatile

So added to my sources list and updated clamav and spamassassin. Now its only been under 24 hours, but I have not gone a single spam email yet, and I normally get 80-100 dumped into my spam folder per day and about 5-10 slipping through. Check it out if you run Debian on the server.

Posted by DaveQB | Permanent Link | Categories: IT

07-05-2008 14:29

Navigating in VIM

I love VIM but have always been frustrated that you cantjump into the middle of a multi-line spanned sentence. VIM users will know what I mean. Well the way to go straight down or up, disregarding if its the same line or not is to preceed the up and down by pressing the letter g. So in normal mode, press g + <up arrow>

Posted by DaveQB | Permanent Link | Categories: IT

07-05-2008 12:35

Removing duplicate emails with Procmail

I find postfix, especially using mailing lists with the /etc/alias file, will send duplicate emails. Postfix has no way of stopping this, for technical reasons (its argued that its fast because it sends emails concurrently blah blah).

Procmail to the rescue!!! Emjoy!!

Posted by DaveQB | Permanent Link | Categories: IT

06-05-2008 17:13

Services command like Red Hat

I liked using the service command in my Red Hat days, have always missed it on my Debian systems. Thought it would be possible to add it myself but never did look into it. well here it is also with an auto completion ability for the service name.

Create a script /usr/sbin/service


set -e

/etc/init.d/$1 $2 $3
And make it executable
chmod 755 /usr/sbin/service

Then to add auto completion to this, create: /etc/bash_completion.d/service with this inside

# a function for the autocompletion of the service command.

  # set some local variables
  local cur prev


  #if only one completion or a option is being requested
  #then complete against various options
  if [ $COMP_CWORD -eq 1 ]; then
    COMPREPLY=( $( compgen -W "$(ls /etc/init.d)" $cur ))
  elif [ $COMP_CWORD -eq 2 ]; then
    COMPREPLY=( $( compgen -W "start stop restart pause zap status ineed iuse needsme usesme broken" $cur ))
    COMPREPLY=( $( compgen -f $cur ))

  return 0

#setup the completion
complete -F _service_fn service

PS I have created a script to automate this process. Its located here:

Posted by DaveQB | Permanent Link | Categories: IT