Nick Hammond

Software Developer, Cyclist, & Traveler.

Provisioning Vagrant with librarian-chef and your Chef repository

In devops

librarian-chef is a gem that makes installing and managing Chef cookbooks locally much easier. It's Bundler for Chef basically. You have a Cheffile that specifies your cookbook dependencies and then you just run librarian-chef install to install those cookbooks. You can install cookbooks via refs, paths, urls, github, etc. The interface and setup is identical to Bundler.

Deploying your chef infrastructure with capistrano

In devops

Chef and Capistrano are the perfect pair when it comes to managing and deploying your web application to the cloud.

Chef is strictly responsible for managing the server, items like installing Ubuntu packages, configuring Nginx, Varnish, etc. Capistrano is strictly responsible for deploying new application code and running migrations. We're also using capistrano-ext so that we can deploy to multiple stages which is nice and works really well with the Chef environment's we've configured.

Authentication with 37Signals' OAuth and omniauth-37signals for your Rails application

In rails

First you'll need to register your application so that you can obtain your 37Signals client credentials. I recommend setting the redirect URI to http://127.0.0.1/users/auth/37signals/callback so that you can test it locally if you need to. If you're using pow.cx you can specify that symlink as the default and easily test your OAuth integration. Even better if you're using the powder gem you can just run "powder default" from the app root and it'll link that up as the default app which will then respond at 127.0.0.1.

It's all about the execution

In product

Once a week I sit down with my notebook and jot down 10-20 ideas. The ideas can be anything from business ideas to ideas on being more efficient throughout the day, whatever comes to mind when I start basically.

One of the brief ideas I had a few weeks ago was a group email service. A service for club sport groups, groups of friends, planning a trip, SXSW RSVP lists, etc. Basically an easy way to keep everyone up to date around some common thread.

Authlogic and automatic logouts

In rails

I recently added in a timed automatic logout to an application that pays attention to user interaction as well as Authlogic's lastrequestat magic field. If you just need the user to be automatically logged out after 15 minutes and it's ok to have them kicked out on the next request then the native functionality within Authlogic will work great, take a look at the Authlogic::Session::Timeout section in the documentation.