Treatme Lite: Part One - the Backend

The Backend This article first is in a series of three blog posts documenting how I created TreatMe Lite, an HTMl5 web app using Zepto.js, Coffeescript, and a range of other frameworks and tools, all backed by an Express JS web service. See my previous post for more information about the application. Last post (the intro), I left off explaining...

Treatme Lite: Adventures in Javascript

For a long time, I’ve been looking to move into the NodeJS trend that’s been taking the development community by storm. The problem is that coming from a Rails development background, and my inability to follow callbacks through more than 2 levels, has lead to my previous efforts to end in broken code and frustration. Happily, however, I took another...

Upcoming: RateMyCourses

Tonight I’d like to talk about a project I’ve been working on in my spare time for the last few months. I’m super excited to see it coming together, and it’s nearly ready to go live. The application is called RateMyCourses - put simply, it’s a way for University students to explore, rate, and comment on courses they’ve done to...

Add jQuery to Any Page Really, Really Easily

When I’m working on a site, or analysing somebody else’s, I often wish that jQuery was loaded into that page - it’s an unbeatable tool for really digging into the site’s source to debug something or work out how something has been done. To help out with this, I’ve put together a quick bookmarket, similar to the more fun one...

Generating 'Gem Install' Commands From 'Gem List'

Here at 3Months, we have a couple of monolithic projects that have been around for yonks - because of this, they don’t have bundler set up, and many of them have incomplete or out-of-date gem requirements. Yesterday I needed to get one of these projects set up locally for the first time, so I was kindly lent the output of...

A Fun Little Bookmarklet

I’m sure this has been done before, but after noticing 1-day’s ‘Look Busy’ feature, I just had to write a bookmarklet to load this up on any site! If you just want to try it out, here’s the link Look Busy Bookmarklet - either right-click on the link and ‘Copy URL’ and paste into a new bookmark, or drag to...

Safely Start and Stop VirtualBox VMs with init.d

Recently I’ve rolled out a virtual machine host box to run headless VMs (headless means that there is no display, keyboard etc plugged into it), as these make great test and experiment machines for trying new things out. As part of this rollout, I mashed a couple of blogs and some documentation together and came up with this script: #!/bin/sh...

Action Mailer Interceptors

ActionMailer Interceptors are a great way to test the full stack of your mailing in Rails from the generation from data through to receiving the email in your client. They are similar to ActiveRecord’s before_x-type callbacks, and let you change something about the message being sent right before it’s actually dispatched. The most common purpose I use these for is...

Overriding Action Caches

Recently, I have been working on a web application that is quite media rich, and is expected to run into quite a bit of traffic. I’ve been working on building an API for a front end system, using JSON to handle passing this data back and forth. Obviously with this amount of traffic, and the size of some of the...

Howto: Database Backup and Restore

An inherent part of developing web applications is managing your datastores - typically, a relational database such as MySQL or PostgreSQL. Today, I’m going to quickly cover off how to backup and restore for both of these databases. What you’ll need Either PostgreSQL or MySQL Access to a database (preferably one with data in it) Why this is useful to...