Category: Tech

MoinMoin wiki with Lighttpd 1.5

This took me a little while to figure out, so I’ll blog here to help others (and me, next time I need to do it and can’t remember how).

I use the MoinMoin wiki software to run a couple of wikis and they run under the Lighttpd web server. With the current stable Lighttpd (1.4) you configure it to use the MoinMoin fastcgi service a bit like this:


  $HTTP["url"] =~ "^/wiki" {
    fastcgi.server =  ("/wiki" => ( "mywiki" =>
      ( "host" => "127.0.0.1",
        "port" => 22000,
        "check-local" => "disable",
        "broken-scriptfilename" => "enable" )
      ))
  }

The new Lighttpd (currently in development, but to be version 1.5) has reworked the way you define fastcgi backends, and has lost the “broken-scriptfilename” option in the process. Without it, MoinMoin doesn’t see what wiki page you’re trying to visit, and can’t build new links properly. Luckily you can reproduce this feature with some proxy-core rewrites:


  $HTTP["url"] =~ "^/wiki" {
    proxy-core.protocol = "fastcgi"
    proxy-core.backends = ( "127.0.0.1:22000" )
    proxy-core.rewrite-request = (
      "_pathinfo" => ( "^/wiki(/.*)" => "$1" ),
      "_scriptname" => ( "^(/wiki)" => "$1" )
    )
  }

And your MoinMoin lives to be spammed another day.

The chronicles of Lug Radio Live 2007

Me doing a lightbulb gong talk thingLUG Radio Live 2007 was great fun.  There was a real community vibe thing going on.  A quick random chronicle of the weekend from our point of view:

Arrived Friday evening, dropped things off at the hotel and went straight to the Hog’s Head pub to meet all the other early arrivers, of which there were many.  Met quite a few random and not so random people: Patrick Finch from Sun, who is just the nicest tech guy in the world.  We met him last year too.

Alan Pope, Neuro – both ELER fans and purchasers of many Geekz tshirts.  Johan and Sebastian from Sweden, who noticed my Knuth t-shirt and said his friend had one too and was surprised to learn we make them.  He took a photo of me wearing it and sent it to his friend back in Sweden :).

Andy Davidson, he’s from Sheffield and was surprised to learn there is a WYLUG planet and wanted to know how he could get listed on it.  Louisa recognised his name and he was then further surprised to learn that he is already listed on it.

Glyn Wintle from the Open Rights Group, who comes in a close second in the nicest tech guy in the world competition.  We hung out with Glyn for most of the rest of the weekend, especially since his stall was next to ours (we were selling our geeky tshirts and stickers and badges and crap).  He convinced me that I need to do a whole lot more with regard to defending our freedoms (like *actually* writing to my MP! Shock! Horror!)  We’re also going to switch our EFF donations to them.

(more…)

LUG Radio Live 2007 this weekend!

Remember, it’s LUG Radio Live 2007 this weekend in Wolverhampton, UK.  As you can see from the schedule here, there are some cool talks by some cool people (and also a talk by me :) and a big party Saturday night.

You can pay in on the door (a measly £5).  Details of local hotels to stay in here.

Hope to see you there.

CIA Freedom of Information – Publish Your Own

CIA sealThe CIA Freedom of Information website had the dumbest security hole in it.  With all the recent hoo har about the “Family Jewels” documents, you’d expect they’d do a quick once over on this stuff.  All the textual content on the document view pages is generated directly from variables passed in the url – with no input validation.

This opens them up to cross site scripting attacks (XSS) and really is just stupid.  Lucky they aren’t the GUARDIANS OF THE LARGEST CACHE OF SENSITIVE INFORMATION IN THE WORLD or anything – *phew*.

Anyway, using this bug, I made a website where you can write your own documents and publish them on the CIA FOIA website:

http://geekz.co.uk/cia-foia/

I guess that from tomorrow, any mail for me should be addressed to Guantanamo Bay.

Actually, technically you’re the ones doing the exploiting by using the links my site provides – so, you know, at your own risk and all that.

An example here.

local and remote subversion repositories with Capistrano 2

Peeking at the code of the upcoming Capistrano 2, I noticed you can define different scm variables for remote and local use, which is something I need (I was looking at the code in the hope it could do this :)

So, say I have my code stored in a subversion repository on my local disk, say file:///project/trunk. That’s fine for when Capistrano is querying the latest revision, but the remote servers need to use the repository url svn+ssh://mymachine/project/trunk.

Without modifying the code, this was impossible with Capistrano v1. With Capistrano v2, you can prefix any scm configuration variable with local_ and it will be used for local operations:

set :repository, "svn+ssh://mymachine/project/trunk" 
set :local_repository, "file:///project/trunk"

Leeds Ruby on Rails Talk

Ruby on Rails logoI’m talking about Ruby on Rails at the West Yorkshire Linux User Group on Monday 11th June 2007. I’ll be covering what Rail is, how it works, and how you use it. Starts at 1900hrs at the E.C Stoner (snigger) Building at the University of Leeds. There follows a talk about Sun’s ZFS file system by Tom Hall, then we retire to The Victoria Hotel pub for some real ale and whatnot.

I’ll be the tall one with the curly hair… stood at the front… talking about Ruby on Rails.

Directions and stuff to be found on the WYLUG website.

Schneier Spelled Safely

The t-shirts with our new designs finally arrived the other week from the printers – Che Stallman and Bruce Schneier.

This marks the end of many an hour wasted double checking that we did actually spell Schneier correctly (and we did spell it correctly, hurrar!). Hundreds of these shirts are now in the hands of some reportedly very happy geeks around the world. You can get your own (and other shirts and stickers) at the online shop.

A photo of the Tedesco brothers sporting the Che Stallman shirt follows (face of one Tedesco brother removed at his incessant vanity request).

The Tedesco brothers wearing the Che Stallman t-shirt

HD DVD cracked

The High Definition DVD encryption got cracked a couple of months back, but recently the AACS licensing authority have been threatening people who discuss it. At the core of this is the processing key, which can be used to decrypt all HD DVDs. The key is just a big number. The AACS assert that the number is illegal to disclose.

If you were counting a large number of something, you’d have to skip this particular number (or whisper it) because the AACS believe they control it.

Anyway, we don’t quite have the DMCA here in the UK, so I can write that number here:

09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0

Without this work, you could not play legally bought HD DVDs with free software applications.  You could not play legally bought HD DVDs that were from another country.  You could not transfer legally bought HD DVDs to your hard disk for easy access, or to your portable movie player.

One might argue that you shouldn’t be purchasing goods from a company that is at war with you. Whilst I agree, it’s not that easy to find companies that aren’t at war with you and I support work like this to take back our freedoms.

News Sniffer, Ferret and Rails

I’ve been working on my News Sniffer project for the last few days, finishing up a two month experiment with using the Ruby Lucene implementation, Ferret, to index news articles and comments.  More info on the News Sniffer blog.  The project spanned two months due to some instability in the newer versions of Ferret, but the author responded to the bug reports and managed to fix all the problems so I decided to deploy.

Ferret offers huge improvements over the original MySQL full-text search method, and I’m looking forward to adding some fancy keyword statistics graphs in the future – perhaps showing censorship patterns in bbc comments with certain keywords.

Because News Sniffer is distributed across a number of servers, I used DRb (distributed Ruby) to allow them all to update one central Ferret index.  DRb seems to work very well generally, and is amazingly simple to use, but I ran into a few problems with recycled objects and invalid references whilst using Ferret across it, apparently due to the garbage collector on the service side collecting things still in use on the client side.  I think I eliminated most of them but they still crop up once in a while – I’ll be looking into this further.

(more…)

Daemontools and Ruby on Rails

Dan J Bernstein’s (djb) daemontools is a set of programs to help you manage unix services. It provides a flexible, secure and convenient way of starting, stopping and sending signals to background processes. Combined with his ucspi-tcp tools, it can be used as an awesome replacement to inetd (it’s most often used in this way to run qmail, a secure and high-performance mta). It can be fiddly to set up and has a bit of a steep learning curve but I already use daemontools for various other stuff, so it was just natural for me to use it for Ruby on Rails deployment.

(more…)

IT techie – available for hire

I’m now full time self-employed. If you’d like to hire me as an IT consultant then drop me a line. I’m well experienced with all kinds of free and open source software with a specific focus on web and database services, security and networking. Some things I’ve been working with lately:

  • Apache and Lighttpd web services
  • Ruby on Rails and PHP deployment
  • MySQL database services
  • Netfilter firewalling
  • OpenVPN and OpenS/WAN VPNs

Over the years I’ve worked with many companies with diverse networks and services, including recently: one of the largest NHS software suppliers, an international travel company and an online pharmacy.

I’m local to the Leeds area in the UK but I often do things remotely so can work with any company in the world. Hourly rates are dependent on the type and length of the job.

I’m doing this work under the business name ifup. There is website over at www.ifup.co.uk but it’s a little scant on details at the moment. More to come.

Top ten quick FOSS games

Louisa wrote about her top ten favourite quick FOSS games.  All available in Ubuntu universe.  They’re all very addictive though, so beware.  My favourite is Frozen Bubble, but Neverball looks awesome so I’ll have to give that a go.  Tetrinet is great if you have some friends to play against too.