Copy changed files from CVS repository

While converting my cvs repositories to git I needed to copy all the changed files from my working directory into a temp directory and then into my git working dir. This was the solution that I came up with:

cvs -qn update -d 2>/dev/null | grep '^[M|\?|P] ' | awk '{print $2}' > files.list
while read file; do cp -r -f --parents "$file" /tmp/dest/; done < files.list

Basically, cvs -qn update -d does a mock update (doesn’t change files), piped to grep to only list the changed files, use awk to exclude the M, P, ? etc, output to a file.

Loop over the lines in the new file using the cp –parents to preserve directory structure

apr-utils 1.4.1 rpmbuild error (seg fault)

When trying to build an rpm for apr-utils on my CentOS 6.2 box I got a nasty error when the rpm was running test:

testmemcache : |/bin/sh: line 2: 14322 Segmentation fault LD_LIBRARY_PATH=”`echo “../crypto/.libs:../dbm/.lib s:../dbd/.libs:../ldap/.libs:$LD_LIBRARY_PATH” | sed -e ‘s/::*$//’`” ./$prog
Programs failed: testall
make: *** [check] Error 139
+ exit 1
error: Bad exit status from /var/tmp/rpm-tmp.OQddG8 (%check)

This relates to this bug:

Thanks to Peter Poeml for releasing a patch for this, which I’ve put into an updated apr-util.spec

CVS error

I recently changed to using the unix command line for cvs and changed all my cvs roots to :ext: instead of :ssh: (tortoise prefers ssh).

When I made the change, anytime I updated cvs I got this error:

/CVSROOTccess /cvsroot
No such file or directory

This makes no sense. Luckily, after searching around I found this is a problem with DOS line breaks screwing with unix cvs. Running the following fixes the problem:

dos2unix `find . -name Root`
dos2unix `find . -name Entries`
dos2unix `find . -name Repository`

Network Solutions and DNSSEC

It’s interesting that not only does netsol not list any information what-so-ever on their knowledge base about DNSSEC, their support staff have no idea what it is either.

Come on network solutions, sort it out otherwise I may have to move my domains to a registrar that does support DNSSEC.

VLC Airplay on Airport Express

There is a way to stream music to your airport express from VLC (means you don’t have to install iTunes).

Under preferences > all > stream output enter this in the “Default stream output chain”:

#transcode{acodec=alac,channels=2,samplerate=44100}:raop{host=<ip address of aiport express>,volume=175}

Browser Wars (sunspider edition)

It seems that most browsers are focused on speeding up javascript execution now as most websites are heavy with ajax and complex js.

With Firefox releasing their pre-beta “dev” version Aurora this morning I decided to run all the current browsers through sunspider to see if any progress has been made.

Chrome-dev: 294ms
Aurora (FF dev): 324ms
Firefox 4: 348ms
IE9: 251ms
IE10 preview 1: 254ms

So it would seem that Firefox has sped up their js engine, but has a little way to go to catch up to the other browsers.

Remove site from Google

We found that Google had indexed a site that shouldn’t be indexed so I setup a robots.txt file to deny all crawlers and locked down the site with http auth. I also put in a request to have the urls removed from the index and cache.

When I did this Google returned ~2,400 results when doing a “”. A few days later it was returning ~54,000. Today it is returning ~133,000.

I’m not sure how Google managed to mix up “remove my site” with “index it more”. Maybe this is just part of the removal process?

Update: Google is now up to 217,000 results for this site. Maybe removing your site from the index is good for SEO?

Deny access to website, but allow robots.txt

I had a problem where Googlebot was indexing a development site, so we locked it down using apache basic http auth. Now Googlebot was being served with a 401 when accessing the site, but because it had no stored robots.txt it was persistently trying to crawl the site.

Using the following allows anyone to access robots.txt but denies access to the rest of the site:
<Directory “/home/username/www”>
AuthUserFile /home/username/.htpasswd
AuthName “Client Access”
AuthType Basic
require valid-use

<Files “robots.txt”>
AuthType Basic
satisfy any

Eventually Googlebot will get the hint and stop indexing the site and we can remove existing content using webmaster tools.

Online Banking

Why is it that in this day and age it takes a day to transfer money from one bank to another? And if it’s a weekend or public holiday it takes even longer. Do computers not work weekends now?

Can someone please invent a protocol or process to allow bank transfers to be instant? Surely it can’t be that hard, it’s just numbers/data being shifted around. I can transfer entire DVDs of information from one side of the world to the other in a short period of time, why can’t a bank process things in real time?

Auckland Frost Dates

I had been searching for approximate frost dates for Auckland to help schedule veggie plantings. Luckily the people at NIWA are nice and respond very quickly to emails. I was told that ground frosts are days where grass minimum temperature are less than -1.0 degree C. Screen frosts are when the air temperature dips below 0.0 degrees C.

Using NIWA’s free data explorer tool “Cliflo” and the closest weather station to me I came up with the following data:

First Frost: 2009-04-10
Last Frost: 2009-09-09

First Frost: 2008-04-21
Last Frost: 2008-09-07

First Frost: 2007-05-29
Last Frost: 2007-10-04

First Frost: 2006-05-31
Last Frost: 2006-09-19

First Frost: 2005-04-22
Last Frost: 2005-09-03

First Frost: 2004-05-21
Last Frost: 2004-09-30

First Frost: 2003-04-26
Last Frost: 2003-10-27

First Frost: 2002-07-14
Last Frost: 2002-10-24

First Frost: 2001-05-29
Last Frost: 2001-09-29

First Frost: 2000-06-14
Last Frost: 2000-09-29

This averages out to:

First Frost: May 19
Last Frost: September 27

Hopefully this helps the local gardeners. Join me on Folia

Creating Access ODBC datasource under Windows 7 (64bit)

I had to create an ODBC datasource for an access database on my Windows 7 machine and for some reason the *.mdb driver doesn’t show up in the control panel ODBC administrator.

After much swearing and google-ing I found the solution.

In C:\windows\sysWOW64 there is an executable called odbcad32.exe. You need to run this exe as administrator to gain access to all the ODBC drivers that come with Microsoft Office, etc.

Thanks Microsoft for another fine product!

Google DNS and OpenDNS vs CDNs

With more and more people moving towards using a global DNS system (like Google DNS and OpenDNS) the speed advantages of a CDN may be cancelled out.

Most of the major CDNs use geotargeting based on where the DNS is being resolved from. For example Facebook’s CDN solution (using Akamai) resolves to 210.55.501.200, a 5ms response time. Using Google’s public DNS server ( the same domain resolves to,, a 200ms response time.

So while using Google’s DNS/OpenDNS may save a few ms while resolving a domain, it may slow down a site by putting the CDN pops further away from end users. Until CDN’s can work with these public DNS providers the internet may become slower for those using these services.

Windows XP 32bit drivers for Dell Studio XPS 435MT

We just recieved a couple of new computers today, shiny new Dell Studio XPS 435MT boxes. As everyone here still runs XP 32bit I decided to reinstall the new computers with the same OS, so we didn’t run into any compatability problems. The problem is Dell doesn’t support any other operating systems on these computers other than Vista 64bit!

After searching around the internet for a couple of hours I found the drivers needed, they are as follows:

Network (Intel 82567):*%20XP%20Professional&lang=eng

Chipset (Intel X58):*+XP+Professional&lang=eng&strOSs=44&submit=Go!

Graphics (ATI Radeon 4850):

Audio (Realtek HD Audio):

I hope this helps anyone with a similar problem

Webby Awards

The Webby Awards are upon us again for the 13th year. It’s ironic though that awards that celebrate the best on the internet have one of the worst designed sites. The Webby People’s Voice site ( is hard to register on and vote. This has discouraged a lot of people from voting for their favourite websites.

iMob Friend Codes

Add your imob friend code to the comments and I’ll add you

My code is 100 631 009 (also for iKnights)

If you haven’t installed iMob yet, search for it on the itunes store and install it on your iPhone for free.

Update: Comments are now closed, there are over 1200 people posting here and it takes ages to page through them all. If you want your code added to this post (at the top) please donate $2 via paypal:

Add your code into the comments of the payment and I’ll add it. Limited to 100 places. This is highly ranked page for imob codes and gets a ton of traffic, you’ll get added by hundreds of users (I’ve been added by 2300 people).

Other codes to add: