Matthew Hutchinson

about

Matt is a web developer from N. Ireland. He currently runs Hiddenloop and works in Dublin. Want to find out just a little bit more ?

An audio feed is available for the latest articles at matthewhutchinson.net, find it here.

Denial of Service Attacks

posted 11 months ago in

Spending some time at home over Christmas I found my old dissertation on DOS attacks from way back in 2003 – Realising that it’s not online anymore, I’ve decided to post it up again – maybe some Googlin’ Telecomms student will find it useful.

I couple of months ago I looked at writing a little packet capture program in Ruby with pCap – If I can dig out the code for that I’ll post it up too.

Typo Flickr sidebar problems (2)

posted 11 months ago in , ,

The recent downtime here had me stumped – the site was throwing a rather vague ‘controller stack out of kilter’ Rails error from Typo. Looking further at the Rails production.log it seems that the problem stemmed from the Flickr sidebar model. A little googl’in brought up this discussion – It seems that Typo’s default Flickr sidebar implementation is ropey at best.

If you look in /app/models/aggregations/flickr.rb you’ll see that the model relies on a string scan (regex) to match the image url from Flickr’s description field text (in their RSS feed) like so;

1
2
3
def image
    description.scan(/(http:\/\/(static|photos).*?\.jpg)/ ).first.first
 end

So basically if Flickr change the URL they serve images from – this will break. And that was exactly the problem – Flickr’s URL was now http://farm1.static.. blah blah etc. I modified the regex a little to quickly fix it;

1
2
3
def image
  description.scan(/(http:\/\/(farm|static|photos).*?\.jpg)/ ).first.first
 end

This was supposed to be a quick post, but I’ll go on;

Why Typo doesn’t switch to using the Flickr API – I don’t know. You could argue it is more flexible and versatile if the data source is a simple RSS feed- (no need for API keys or security issues) – But the sidebar could at least parse the xml better and avoid this scan altogether. Its got me thinking what else could be ropey in Typo…

For one, a broken sidebar takes down the entire public-facing site with this ‘controller kilter’ error – which is a bit crazy if you ask me. If I have some time I might look into helping Typo fail a bit more gracefully in the future.

2 comments

Basecamp > ActiveCollab Importer

posted 11 months ago in , ,

For some time now I have been trying out ActiveCollab, a free project management tool, to see if it could be a decent competitor to Basecamp

As far as I know, ActiveCollab started out as a free alternative to (and almost straight copy of) Basecamp – It is open source, written in PHP, and version 0.7 was released just a few weeks ago. After installing and setting up an example project I really needed to see how the thing would run with some real data, y’know some real life stuff.

After playing around with the (very useful) Basecamp API I had created a little Ruby class that allowed me to import projects, users, messages, comments and categories into ActiveCollab from Basecamp.

Run from the command line, the class outputs SQL (to the screen or a file) – which you can run against your ActiveCollab database after a default install. Read on if you’re interested in how it works.

read the rest of this entry ...

Ho Ho Ho Flickr

posted 11 months ago in

Flickr have some festive hidden easter eggs, try adding a note to any photo as ‘ho ho ho hat’ or ‘ho ho ho beard’ to ‘Santa Up!’ any photo, this bearded fellow did just that. Here’s a tune to put you in the mood;

Pigeon Mashup

posted 11 months ago in , , ,

Question: what do you get when you cross, AJAX Google Maps, GPS, Air Quality Sensors and a bunch of Pigeons ?

Answer: The Pigeon Blog of course!