Lighttpd, FastCGI and Basic Auth problem

Posted by robbiebow on 31 May, 2009 under geek | Be the First to Comment

I had a strange problem: If I started Lighty with basic auth and a static FastCGI server (running a Catalyst application) I could get to the site first time, but subsequent attempts (from a different browser or after restarting the same browser) timed out.

Fixed this by upgrading from lighty 1.4.19 to 1.4.22. Looks like it was a race condition to me, but I don’t know for sure. As I upgraded by manually installing (as Debian’s apt package is still at 1.4.19) I had to edit /etc/init.d/lighttpd to point at the new binary in /usr/local/sbin/ after installation.

Looping through an array, two elements at a time

Posted by robbiebow on 18 May, 2009 under perl | Be the First to Comment

This is interesting, if you ever need to loop through an array selecting two elements at a time:

http://flodhest.net/files/perl/benchmark/loop-two-elements.txt?embed=1

A for loop is much faster than abusing each to achieve the same end on a mutliple core machine, but the balance is about even on a single core box.
 

SVN: Create a new branch from a working copy

Posted by robbiebow on 8 May, 2009 under geek | Be the First to Comment

svn copy . http://example.com/branches/new.branch.name -m 'Created branch for ...'
svn switch http://example.com/branches/new.branch.name