Importing a Pivotal Tracker project into Trello

I’m currently in the middle of migrating a project from Pivotal Tracker to Trello, and couldn’t find any easy method of importing the data, so I spent this morning putting together a gem to do exactly that. ...

January 13, 2014 · 4 min · Dave Perrett

Messing around with ruby-processing, take 5

I’ve been spending quite a bit of time playing with ruby-processing (and processing in general) recently. It’s also been my first exposure to JRuby which has been a bit of an eye-opener, in terms of the sheer number of Java libraries that it makes available in Ruby. All the fun stuff in processing seems to be OpenGL-related, and after a lot of research the easiest way to dig in ended up being the GLGraphics Java library, which was made specifically for use in processing. ...

May 31, 2012 · 2 min · Dave Perrett

Hiding ruby gem 'is deprecated with no replacement' messages

I recently installed ruby 1.9.2 via rvm, and suddenly every command started spitting out hundreds of line of deprecation messages : ...

May 21, 2011 · 2 min · Dave Perrett

Time Out In NZ

I’ve been flat out with a couple of contracting projects recently - apologies for the four-month blogging hiatus! One of these projects (albeit a quickie) was a weekend spent making a rails site for a couple of New Zealand organizations to help the victims of the Japanese quakes and tsunami relocate themselves and/or their children to New Zealand temporarily. ...

May 4, 2011 · 2 min · Dave Perrett

Jekyll plugins for categories, projects and sitemaps

2013-03-28 Update : These plugins are now hosted on GitHub I’ve finally gotten around to cleaning up and releasing the source for a couple of the Jekyll plugins used to build this site. You can find them all on the Jekyll Plugins project page, or browse the source. As always, if you come across any problems please create a ticket and we’ll try to get it fixed as soon as possible. Enjoy! ...

December 8, 2010 · 2 min · Dave Perrett

A weekend project - fromthecache.com

I was playing around on the weekend screen-scraping and analyzing word-frequencies for various sites (don’t ask), and was getting some slow responses (and accidentally got my IP blocked from one site when I hit them a few too many times). Eventually I hit upon the idea of hitting Google Cache for each URL (the pages I was scraping had sequential ?id=xxx URLs so it was easy to automate), with the aim of speeding things up a bit and taking some load off the target sites. With this in mind, I spent a few hours Saturday and Sunday developing fromthecache.com - it’s built on rails, and designed to provide transparent access to the Google cache, while fetching the original page as a fallback if necessary. ...

November 3, 2010 · 2 min · Dave Perrett

Introducing Rails Kitchen Sink

2013-03-28 Update : This project is very dated, and I don’t recommend it’s use. It’s now hosted on GitHub. I’m happy to announce the release of Rails Kitchen Sink a rails-project-starter, which I’ll be building all future Rails apps off of. ...

October 21, 2010 · 1 min · Dave Perrett

Static blogging the Jekyll way

In building the new site, I decided to take the opportunity to try out something new. I’ve been using WordPress to power my blog for about 5 years, and while it has served me well, I wanted to try out something different. The main criteria for choosing a new blogging platform were : It should serve true static pages, with no need for server-side processing. It should be easy to store the entire site in Git. It should support the concept of layouts - I wanted to have a single ’template’ file that blog posts could easily inherit from. It should support MarkDown or Textile for formatting posts, since I want to keep away from posting raw HTML as much as possible. It should support comments. I should be able to deploy updates to the site with a single command. By patching together a few different open-source technologies, I’ve been able to achieve the above and more. ...

October 12, 2010 · 9 min · Dave Perrett

Excluding fields from rails json and xml output

Rails has a very handy ‘respond_to’ feature to render your pages in different formats : respond_to do |format| format.json { render :json => @user } format.xml { render :xml => @user } format.html end However, by default it outputs every field in the model, which exposes some data (encrypted-password and password-salt) that I’d rather keep to myself : ...

October 3, 2010 · 1 min · Dave Perrett

HABTM before_filter in rails models

I’ve been playing about with Devise and CanCan for rails authentication and authorization recently - this great pair of posts from Tony Amoyal have helped a great deal. I have a User model and a Role model, and wanted to automatically add the :user role to each user whenever roles are assigned. The roles were set in the controller as follows: ...

October 3, 2010 · 2 min · Dave Perrett