Category Archives: public service announcement

Ontario 2011 Election results, consolidated

If you don’t want to download and parse 107 pages of Elections Ontario data, I’ve gathered it for you:

7198299 Canada Limited

7198299 Canada Limited is Red Chili Thai, 1266 Danforth Avenue in Toronto. [for Google]

HOWTO count words in JavaScript

Here is a handy JavaScript function for counting words: String.prototype.countWords = function(value) { // remove html tags var cleanedText = this.replace(/< .[^]*?>/g, ' ') // remove numbers and punctuation .replace(/[–—.(),;:!?%#$‘’“”'"_+=\/\-]*/g, '') // remove/coalesce space chars .replace(/(&nbsp;|&#160;|[ ])+/gi, ' '); // … Continue reading

HOWTO set up IMAP email for Yahoo

A few weeks ago, I was helping my cousins set up their new iMac. Once everything was up and running, she inquired about adding their Yahoo account to Mail. The conventional wisdom says you can’t do this. Yahoo charges for … Continue reading

HOWTO setup multistage deployment with Capistrano

When I wrote about deploying PHP sites with Capistrano, step 6 was a bit of a throwaway — hey, here's a quick hack for handling multistage deployment. I'd been using variants of that technique for quite some time but figured … Continue reading

Fixing iChat Google Talk login failures

I was helping a friend set up her new iBook MacBook yesterday, and we were unable to get iChat to log in to her Google Talk account. We kept seeing this error: iChat can’t log in to talk.google.com because your … Continue reading

WordPress batch upgrade

If you run a web server and have multiple installations of WordPress, upgrading them all is a pain. Wouldn’t it be nice if you could update a dozen WP installs at once? Wouldn’t it be even better if you could … Continue reading

How to solve the “undefined method `deep_symbolize_keys’ for nil:NilClass” error in Rails

I was trying to migrate a table in my Rails app and got this error: undefined method `deep_symbolize_keys’ for nil:NilClass It’s a strange error, and there weren’t very many hits on Google. A lighthouse ticket provided a clue. The problem … Continue reading

FedEx location in Burlington, Ontario Canada

This was a bit hard to find: FedEx Burlngton 4243 North Service Road Burlington ON L7L 4X6 Canada (905) 332-4647

HOWTO install the rjb gem on Ubuntu and Mac OS X

Here’s how to install the Ruby Java Bridge (rjb) gem on Ubuntu Linux and Mac OS X: Ubuntu Linux (10.10) # aptitude install openjdk-6-jre-headless openjdk-6-jdk # JAVA_HOME=/usr/lib/jvm/java-6-openjdk gem install rjb Mac OS X 10.6.4 # JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home gem install rjb Note: … Continue reading