We're busy adding support for Internet Explorer 6, but if you've been considering an upgrade you can upgrade Internet Explorer, or download Firefox for free.

Our site is best viewed on standards-compliant browsers: Firefox, Safari, Internet Explorer 7.0+, etc.

Stephanie Sharp Buck Sharp Kim Landrum Travis Roberts Colin Jones Natalie Glenn Andrew Reifman Charlie Maffitt Kelly C. Jones Juli Tredwell
Profile

Adam's Blog

RSS

How to Remove External Rails Plugins from your Application

Posted on 01/24/2008
1 Comment

There isn't a single command in subversion to remove external plugins from your application so I figured I would post this to help the next person save 10 minutes of reading docs.

Make sure you are in the root of your app and do:
svn propedit svn:externals vendor/plugins

Just delete the line(s) of the plugins you no longer want.

If you get the following error then you need to set your environment variable.
svn: None of the environment variables SVN_EDITOR, VISUAL or EDITOR is set, and no 'editor-cmd' run-time configuration option was found

You can set your SVN_EDITOR to use TextMate like so:
export SVN_EDITOR='mate -w'

Tagged:  rails, svn, subversion, editor

Back to top

My Christmas Wishlist

Posted on 12/13/2007
1 Comment

With Christmas around the corner I have started looking at all the things I don't need but really, really want. A couple of months ago I bought an HD TV and armed it with an HD TiVo. I promised myself (and my wife) that I would stop there but secretly knew that a regular SD DVD player was an embarrassing item to have in my entertainment center. In my search for more HD goodness, I started looking at HD DVD players and Blu-Ray players. I have always hated the idea of using a format created by Sony because of the cost to the consumer (ie, PlayStation Memory Cards) so my searching was more HD DVD oriented. Today I found the one feature that beats Blu-Ray one million times to one.

Season One Star Trek Original Series HD DVD

That's right. Season One of the Original Star Trek in HD. Only available in HD DVD format. What more could you possibly need to convince you that HD DVD is the format to have?

Tagged:  Christmas, HD, DVD

Back to top

Mac OSX Open Terminals from Location in Finder

Posted on 09/10/2007
0 Comments

When working on projects I normally have multiple terminals open in the project directory. I found it quite annoying to type cd /path/to/project in every terminal so I wrote this script that can be used in Automator to open my terminals and change to the directory for me.

on run {input, parameters}
 set topleft to {5, 25}
 set topright to {860, 25}
 set bottomleft to {5, 520}
 set bottomright to {860, 520}
 set locations to {topleft, topright, bottomleft, bottomright}
 repeat with loc in locations
  tell application "Terminal"
   activate
   with timeout of 1800 seconds
    set firstpath to item 1 of input
    do script with command "cd " & (quoted form of POSIX path of firstpath)
    tell window 1
     set position to loc
     set number of columns to 130
     set number of rows to 32
    end tell
   end timeout
  end tell
 end repeat
end run

Tagged:  osx

Back to top

Rails Caching non HTML Files in a Different Cache Location

Posted on 05/08/2007
1 Comment

We use page caching in Rails to speed up sites and improve performance. This is a great feature of Rails but can get cumbersome when trying to keep up with which pages to sweep and when. To make life easier we use a separate directory to house the cache. This solution is great for files that end in a .html extension but for other file types you need a new rewrite rule for mod_rewrite. The example below is for caching dynamic images.

RewriteRule ^([^"cache"].+)\.(png)$ cache/$1.png

I am rewriting any request for a .png to have the cache/ added to the beginning of the url. I am also checking to make sure the url hasn't already been rewritten otherwise Apache gets stuck in a loop rewriting the url. Depending on the application, you may need to add a slash in front of cache like so:

RewriteRule ^([^"cache"].+)\.(png)$ /cache/$1.png

Tagged:  ruby, on, rails, caching, server, performance

Back to top

Snippets and OpenID Fun

Posted on 04/10/2007
0 Comments

While playing around at lunch today I stumbled across Parsed.org. It is a code geek snippet repository that uses OpenID as a method of authentication for it's users. I found Random Rows from SQL interesting since I recently did something very similar.

Back to top