April 2011
1 post
Dreamhost: failed to import extension... →
Edit your .hgrc file and under the [extensions] category, add hgext.imerge=!, like this [extensions] hgext.imerge = ! (via pixelastic)
Apr 8th
March 2011
2 posts
Changing user httpd DocumentRoot in OS X
While testing a locally running web application in OS X 10.6.6, I discovered that DocumentRoot appears to be set incorrectly. I wasn’t able to refer to a file like /Users/username/Sites/style.css as /style.css in the web app source. If you have Web Sharing turned on, each user’s httpd DocumentRoot is not automatically set to /Users/username/Sites, as I expected. But each user does...
Mar 17th
Deploying non-rails apps with Capistrano,...
Capistrano makes deploying Ruby on Rails applications easy. Having experienced how easy, I was eager to use Capistrano to make deploying non-Rails applications just as easy. I wasn’t able to find comprehensive info on actually making this work from start to finish. Here’s how to do it. Assumptions Your version control system of choice is Mercurial, stored at Bitbucket. You want to...
Mar 15th
July 2010
1 post
Jul 6th
June 2010
1 post
Push from Mercurial to ClearCase
I sometimes like do my development work in a local Mercurial repo even though I’m stuck checking into ClearCase in the end. I create a fresh snapshot view in ClearCase, create a Mercurial repo on the view, then do my work in a clone of that Mercurial repo. It isn’t ideal, but it allows me to delay all the file checkin/checkout work required when dealing with ClearCase. The main...
Jun 21st
May 2010
1 post
Lazy initialization in Ruby using lambda
If you want to use lazy initialization in Ruby the ||= trick is an easy and readable way to do it. class Tree def estimated_yield @estimated_yield ||= get_estimated_yield end private def get_estimated_yield n = 0 branches.each { |branch| n += branch.fruits + branch.berries } n end end Rather than bury the actual “get fruit” logic inside of another function...
May 5th
March 2010
1 post
PasswordBookmarklet source code →
I pushed the Mercurial repository containing my PasswordBookmarklet source code to bitbucket.
Mar 29th
November 2009
1 post
Nov 6th
October 2009
1 post
JsToBookmark →
Oct 14th
September 2009
1 post
Sep 29th