Recent uploads from my Flickr photostream...

Author Archive for bigpresh

Where my photos end up…

I tried out DuckDuckGo today, and of course one of the things you’ll often use to test a search engine is to search for your own name / online nick for a little bit of egosurfing, and I was surprised just how widely some of my photos from Flickr are used. Most of my images on Flickr are available for use under a Creative Commons attribution licence.

A few of my photos I found widely spread were:

I found this one at:

This image of my laptop turned up at, among other places:

The above image of my old Blackberry was used in a presentation someone gave on teaching keyboard skills to children, too.

This image of the pier in Rossport, Co Mayo (which I also uploaded to the excellent Geograph project) is currently used on the Wikipedia article on Rossport, along with the related Kilcommon and Sruwaddacon Bay entries.

Interesting to see how widely humble pictures can spread :)

Domestic appliance repairs in Stevenage & Herts

Just a quick plug for my future brother-in-law, who has gone self-employed doing domestic appliance repairs in/around Stevenage, repairing cookers, washing machine, tumble dryers etc.

I knocked up a basic site for him, and figured linking to it from here would help Google find & rank it :)

Edit: I’ve also registered stevenage-appliance-repair.co.uk and pointed it to his site, to see if that helps. Maybe it’s time to practice SEO crap.

pQuery – jQuery-like fun in Perl

I discovered pQuery the other day, and had been meaning to try it out.

I got the chance to use it today, and I have to say, I’m impressed. I am, however, rather wary that the last release was nearly two years ago; I’m not sure I’d want to use it in production code unless it’s being actively maintained – I might use it for non-important things before making that call.

Anyway, a brief example:

Let’s say you want to capture the content of a paragraph/div with the class “bar” from a page somewhere.. it can be as simple as:

pQuery('http://www.example.com/foo.html')->find('.bar')->html;

Let’s say you want to extract all H1 headings instead:

pQuery($url)
    ->find('h1')
    ->each(
        sub { say "Heading: " . pQuery($_)->text; }
    );

I’d love to see this continue in active development – there’s several features it could really use, but what’s already there is handy stuff!

Atlas Direct will weasel out of travel insurance claims due to volcanic ash

In light of the recent flight disruptions caused by volcanic ash, I decided to enquire as to whether my travel insurance provider, Atlas Direct, would attempt to weasel out of claims should we be hit by problems (we don’t travel until August, so should be safe, fingers crossed, but wanted to check…).

10 working days later, I finally received the following response:

We do not consider volcanic ash to be “adverse weather” therefore there is no cover under the “Travel Delay and Abandonment” and the “Missed Departure” sections.

Additionally it is not a stated reason to cancel or curtail a trip and therefore there is no cover under the “Cancellation, Curtailment and Trip Interruption” section.

If the Insured is stranded abroad their policy will be automatically extended for the period the Insured is abroad provided you return on the earliest possible flight to the UK. The Insured is only covered for “Medical Emergency and Repatriation” and “Luggage”.

Additional accommodation and travel costs due to volcanic ash incident are not covered under this extension.

So, if you’re using Atlas Direct, do be aware that, if you are affected by flight cancellations from volcanic ash, they will not help you. Hopefully your airline/tour operator will, but they will not. I previously held Atlas Direct in fairly high regard and was happy to be insured with them, now I’m not so sure. (I know they’re not alone in wanting to weasel out of any claims due to the ash,though!)

Perl dead? Not by a long shot…

With 1162 distributions uploaded to CPAN last month the highest ever – modern Perl is still going strong!

(See also isperldead.com for another opinion…. ;) )

Traditionally, the Perl community has been fairly quiet – probably because we’re all busy getting on and doing things rather than feeling the need to shout about how great our language is, but the Planet Perl Ironman project aims to help change that.

Dancer::Plugin::Database – easy DB connections for Dancer apps

Last night I finished and released the first version of Dancer::Plugin::Database, a plugin for the Dancer web framework to provide easy database connections using the venerable DBI.

It takes the database connection details from the app config file, and provides a database keyword which will return you a connected database handle (taking care of ensuring that the DB connection is still alive, etc).

So, usage can be as simple as:

my $books = database->selectall_arrayref(
    'select * from books where author = ?', 
    { Slice => {}}, $author
);

(Calling database() simply returns a DBI database handle, so you can obviously do anything you can do with DBI).

Also, at the moment, if a database connection could not be established for any reason, database() will just return undef, so you will need to handle errors appropriately. After considering whether it’s wise, I may tweak it to die, so that Dancer will handle the failure with a pretty 500 error for you (in which case, I’ll make it possible to disable that via the config).

Resizing ext2/3 filesystem in loop file

Quick post, mostly for my own future reference, as I couldn’t quite remember how to resize an ext3 filesystem contained in a file.

dd if=/dev/zero of=disk.img bs=1M count=1024 oflag=append conv=notrunc
e2fsck -f disk.img
resize2fs disk.img

The above will append 1GB to the end of the file, then resize the ext2/3 filesystem to take up that newly-added space.

Facebook – become a fan

via theweaselking

Several Perl scripts released to Github

I’ve been playing with Github lately, and rather liking it.

I did briefly try it about a year ago, and was impressed, but wasn’t driven enough to consider moving away from Subversion.

I tried it out more when I started contributing to the Dancer Perl framework, and got to like it; since then, I’ve moved several of my modules over to Github already.

I finally got round to moving some miscellanous Perl scripts too, ones which I’ve been meaning to release as open-source in case they’re of use to anyone, but didn’t get round to doing.

They’re now online at: http://github.com/bigpresh/misc-scripts.

Github made sharing my code easy – Github++;

Now, that’s enough geekery for one evening.

Dancer 1.150 released – a flexible, lightweight web framework for Perl

Version 1.150 of the Dancer web framework has just been released, so this seemed like a good time to write up this post.

Recently, I’ve been wanting to find a Perl web framework that I really got on with. I’ve used Catalyst, which is very powerful and popular, but it’s quite heavy (a lot of dependencies, and reasonably high memory usage and startup time), and I felt as though it forced me to code “the Catalyst way”, rather than staying out of my way and getting on with writing my code.

I took a look around at the current Perl web frameworks (e.g. CGI-Application, Jifty, Catalyst, Mojo…) – all good in their own ways, but for various reasons, none of them really struck me as something I’d be particularly happy to work with.

I did briefly consider trying to write my own, but that’s a wheel I do not want to re-invent – there’s enough odd-shaped wheels out there already.

When I found Dancer (a port of Ruby’s Sinatra framework), I immediately liked the fact it looked simple and stays out of the way as much as possible, so I gave it a try – and, I must say, I’m impressed.
Continue reading ‘Dancer 1.150 released – a flexible, lightweight web framework for Perl’


Random photos from my Flickr photostream...