April 2012
2 posts
7 tags
Hello service_disruption gem
Well over the past few weeks I’ve been working on a little gem that makes it easy to get notifications when the Tube status changes. As a byproduct it also gives easy access to the tube data as ruby objects too :)
Previously you’d have to actively check the TFL website, or sign up for the TFL Alerts programme, which sends you text alerts.
However service_disruption polls the TFL Data...
Hash extensions for dealing with CamelCase XML...
I’m looking at you Microsoft web services!
Anyway, a quick extension to the Hash class to add the rubyfy_keys! method and it’s recursive partners.
February 2012
1 post
5 tags
Heroku Airbrake post deploy hook
After a lot of trawling around the internet I couldn’t find any reference as to how to set up a post deploy hook for heroku. Even the airbrake:heroku:add_post_deploy_hook rake task didn’t seem to work, so I have managed to piece together my own custom post deploy hook
I hope this can help someone!
Heroku post deploy hook docs
Airbrake post deploy hook docs
January 2012
1 post
5 tags
Queuing Sunspot indexing jobs with Resque
I’m currently working on a social networking platform(very beta!) for London, and we use Resque to handle all of our background jobs, sending outbound mail, image processing etc.
We recently implemented Sunspot and Solr for indexing our models to allow rapid full text searching. Now Sunspot is awesome, has a great DSL and makes indexing and searching super easy, it also has great built in...
November 2011
1 post
If I could turn back TIME
Time, we can all agree, is an incredibly useful concept, unfortunately the recent decision to drop <time> from the HTML5 spec is not useful.
After all every website that I’ve recently developed has made use of the <time> element, inside <article>, making publish dates something that hold semantic meaning in relation to the <article> in question.
The decision to...
October 2011
1 post
5 tags
Meta programming, serialization
Oh wow, has it been that long already, I need to force myself to post something at least once a week, even if it’s just posting pictures of cats!
So I’m currently working on a social media platform for London, with it’s main purpose being to promote a wellbeing lifestyle in a hectic city. I wrote this handy little utility module for creating methods from serialized data.
Say,...
July 2011
1 post
June 2011
2 posts
5 tags
The Cliché-o-matic →
This is a little something I made up for my good friend Alex Goy and the @Podisode boys. If you’re ever stuck for clichés to use in your writing never fear, the cliché-o-matic is here.
For those that are interested it’s a simple Sinatra app, pulling quotes from a YAML file
5 tags
Wow, It's been a while
It’s been a while since I posted last, I really need to post at least once a week. Not a lot has happened really. I’m still unemployed, even though I think I’m pretty good at what I do it’s starting to grate on my confidence. I guess I’ll just keep slogging on.
I’m keeping myself afloat with some freelance jobs, however chasing invoices is not something I enjoy...
April 2011
4 posts
Back to the UK
So after four months in Canada I’ve finally made it home and I’m settling back in to work after having so much time off. I’ve been all over the country in the past week attending interviews for various positions.
I attended an interview in Manchester to work as a volunteer for the London 2012 Olympics, I probably talked far too much, but it was great fun to talk to a bunch of...
4 tags
Developers, you MUST sanitise DB input →
Thousands of sites have been hit over the weekend with a series of SQL injection attacks. This may well be a flaw in MSSQL but it’s still a poignant reminder to ensure that you sanitise all user input, as malicious users can still try to exploit your database
March 2011
10 posts
5 tags
Beautiful British Columbia
I’m writing this sat in the International Departures lounge at Vancouver International Airport (YVR). All I can hear is the sound of running water, and the occasional passenger announcement. Out of the window I can see the snow covered tops of the nearby Coastal Mountains glistening in the spring sunshine. The sky is clear and the winds calm, It really is a perfect day.
Part of me is very...
7 tags
What goes up must come down
As winter slowly turns into spring it’s time to end my Canadian adventure. For those of you that don’t know, I’ve been living in Whistler, BC for the last four months. These have been some of the best four months of my life. I have met so many great people, and hung out with some of my best friends while I’ve been here.
Whistler is one of those places that everyone who...
BBC Article Regarding Nuclear Power →
The BBC have published an article that echoes what I was discussing in my previous entry, its the lack of knowledge regarding nuclear power and radiation that’s leading people to believe that it is lethal, however the BBC have tried to explain that the empirical evidence would suggest that it isn’t as dangerous as people are lead to believe.
It’s a shame that this article...
5 tags
Nuclear power is still the best option for a non...
I’m as shocked as anyone else regarding the devastation in Japan, the scale of the human tragedy is inconceivable, however the main story that seems to be circling the news, especially in Canada, is that of this supposed “Meltdown”
Now first of all, Meltdown conjures up images of Chernobyl and the abandoned town of Pripyat. To use the same term and toss it around so loosely...
Computers are like Old Testament gods: lots of rules and no mercy
– Joseph Campbell
8 tags
Rendering sane markup with Rails helpers
If you, like me, have tried to use helpers to generate complex chunks of HTML programmaticly, then you will have noticed that content_tag doesn’t really cut it for large chunks of HTML
content_tag will render the HTML inline unless you manually insert line breaks and tabs in order to make it readable, not to mention you end up with a horribly nested set of methods wrapping around the...
3 tags
Windows cloud advert is bogus
“Yay cloud”, exclaims the happy girlfriend.
For those of you that haven’t seen it, the advert is set in a busy airport departure lounge, with a bored couple who have just been informed that the flight is delayed for another hour. Enter Windows 7 cloud services! The boyfriend connects to his home machine, looks at the media library and decides on a show to watch.
This show is...
6 tags
Phusion Passenger 3
I have recently upgraded my slicehost box to Ubuntu 10.04 LTS, and upgraded the Passenger version to 3, the difference in performance is incredible, at least a 20% decrease in response times.
However the big great news is the inclusion of a new Apache directive,
PassengerMinInstances
Previously passenger would spool down all of the running instances of an app if it was idle for too long, you...
February 2011
3 posts
4 tags
Gravatar helper for Ruby on Rails
So, I was working on a project a while ago with user comments, and wanted each person to have their own avatar, however, the Gravatar plugins that existed for Rails seemed a bit too much overkill for my needs.
So I wrote this simple helper method. Either copy the method into your application_helper.rb, or alternatively drop it into your lib directory and include it.
Usage is as simple as just...
2 tags
Well I finally started my tumblr account, stay tuned for updates about my Canadian Adventure, along with some hardcore web stuff!