Author Archive

Smack a Ho.st

2010/03/04
By Tim Pope

Tired of having no choice but to add aliases for localhost to /etc/hosts every time you work on a site that uses subdomains? Me too. That’s why I grabbed smackaho.st and made it a localhost wildcard, pointing *.smackaho.st at 127.0.0.1. If you’re a Rails developer, try visiting http://dontmakeme.smackaho.st:3000/.

...
Read more »

Posted in Hashrocket, Publishers | View Comments

Episode IV: A New Pope

2010/02/28
By Tim Pope

I’ve moved my blog to Jekyll. I think this is the post where I’m supposed to apologize for falling off the blog wagon and promise to post more in the future, though truth be told I have few regrets and make no promises. My aged Drupal install had gotten to the point where I...
Read more »

Posted in Hashrocket, Publishers | View Comments

A Note About Git Commit Messages

2008/04/19
By Tim Pope

I want to take a moment to elaborate on what makes a well formed commit message. I think the best practices for commit message formatting is one of the little details that makes Git great. Understandably, some of the first commits to rails.git have messages of the really-long-line variety, and I want to expand...
Read more »

Posted in Hashrocket, Publishers | View Comments

Easy Ruby Examples

2007/05/03
By Tim Pope

Today I devised a little script to generate Ruby examples showing code and output.

% rubydemo '.inject {|m,o|m+o}'
.inject {|m,o|m+o} #=> 6
% rubydemo 1/0
1/0 #=> #<ZeroDivisionError: divided by 0>

Here’s the script I used for generation. (It could have been one line if I didn’t care so much about exception formatting.)

#!/usr/bin/env ruby print ARGVRead more »

Posted in Hashrocket, Publishers | View Comments

Auto-loading Ruby Code

2007/02/11
By Tim Pope

An incredibly useful technique when using Ruby is to auto-load at start-up a custom library written for exactly that purpose. This is easy to accomplish with a couple of environment variables, but I see very little discussion on the subject. Thus, I’ve written a nice summary of how to go about setting this up.

The...
Read more »

Posted in Hashrocket, Publishers | View Comments