Automatically start rails server with upstart

The following is how to set up an Upstart file so you can have a rails application autostart upon the startup of a server. Modify the “USERNAME” and “TAG_FOR_THIS_PROCESS_IN_SYSLOG” fields to something that you want. It will run the server as the user you declare, so that the server isn’t run as the root user […]

Docker and Torquebox

My OVH box went down a few weeks ago and refused to get back up. I couldn’t even ssh in. No clue why. On the bright side, I got to use this as an opportunity to learn more about keeping things fail-safe. I’d say “more fail-safe”, but apart from github for my source-code, nothing was […]

Update to JParallel

I began the JParallel library a little while ago (Right after the post about not doing my own parallel programming (It doesn’t make a lot of sense)), and nearly immediately got a response from Mohamed Hafez on the issue tracker recommending I add a bunch of features. And a week later he implemented things in […]

Do not do raw parallel programming

I previously had a blog post on thread-safe programming, where I said I wanted to do it, and that I know how mutexes work and I should start from there. That post has been wiped off the face of my blog. I’m not going to do low-level parallel programming for the foreseeable future. I came […]

Ruby: Select random element from array

This is a cool little trick I picked up from StackOverflow. Select random element of an array [:foo, :bar].sample Its the Array#sample instance method. Good to know.

Package file is invalid

I’ve finally gotten a smartphone. Figured I could use a portable connector to the internet. Its running android, and on the second day of use I got a ‘package file is invalid’ issue with everything I tried to download from the Google play store. Googling this issue resulted in 2 solutions. One is to clear […]

commandlinefu.com

A few weeks ago I was introduced to commandlinefu.com by Josh Teneycke. Its a great website about neat little commands on the (Mostly unix) command-line. Anyone who wants to be a coding ninja should randomly read these before bedtime.

Moneris payments from wordpress

I had a wordpress subcontract the other day for a site thats mostly built up. My job was to make sure payments were going through the Moneris payment host. I’d never done anything like that before. Fun stuff. The first problem I ran into was that Moneris didn’t have publicly accessible documentation for their API. […]

Web scraping in unix

I don’t recall why I was looking into web scraping a few weeks ago, but I felt the need for it. I always wondered how this works, and its basically a lot of regexps. Fun stuff. It gives me a great opportunity to brush up on my regexp-knowledge. Tools Curl For unix systems, just use […]

WordCamp Toronto: Developers

I attended WordCamp Toronto for developers last weekend. It was a lot of fun. We were hosted by George Brown College again, and I’m grateful for their contribution. The venue was great. Below are my notes from the presentations that I attended. Git, Capistrano, and WordPress nathanielks on github Highly recommends using git sub-modules Highly […]