The one and only Snowgiraffe is Blythe

October 17, 2011

I am Blythe and I am the only snowgiraffe. I am co-founder & architect at, and I am not looking for new gigs right now.

This morning a couple of recruiters contacted me to let me know that my resume had been posted on dice under the names Daniel Keith and Dan Samson.

I’ve heard of identity fraud, but stealing someones resume? Huh? Doesn’t working at small startups make that difficult to fake, and wouldn’t being one of like eleventy women working on ruby on rails make me stand out a little? Is someone just playing me to waste my time?

Apparently evil recruiters post fake resumes to steal others leads. This is not cool and quite illegal. Daniel Keith if karma doesn’t find you first, I will.

Thanks to those who did their homework and were kind enough to let me know about this.


Analyze This!: Now with Zombies

June 7, 2010

I’m headed to Baltimore today to speak at Railsconf and this year I come with a new sweet house, a new job (back to freelance yay!) and a new knee made of dead people. Well ok, only the exploded ski knee replacement ACL part is made of zombies because I think they cleared most of them out of the new house before I moved in.

I’m actually pretty excited to talk this year because after all the aforementioned ski accident surgery business, I didn’t think I could make it to the left coast let alone walk(ish) and get to present a really awesome story. Huh? you say. Aren’t you talking about, ah hem, analytics? Why yes, and its Ms. Analyze This! to you, actually. I’m going to take this presentation back through time to the early days of digital page view counters (come on, you never hit refresh 6 times so you could be visitor number 1,000… nirvana was playing on radio?) through a couple of  BIG SCALED rails analytics implementations and all the way to today’s brave new world of actionable analytics where we care about retweets and bounce rate instead of how many (not guest, don’t count the guests!) users you had last Thursday. Oh yeah and of course there is code, glorious wonderful code! Here’s a preview and/or challenge. What are 6 reasons you want to avoid this:

after_filter do |controller|
    :ip_address => request.ip_address,
    :headers    => request.headers

Hope to see you at the function! Thursday 10:45am 6/10/2010 Ballroom IV


Rails Application Health Monitor

December 13, 2009

Most rails applications have many additional moving parts of which the health cannot be assessed with simply pinging the (hopefully page cached) homepage

For example,

  • Is Email is sent successfully?
  • Is the SMS gateway alive and you bought sufficient credits?
  • All database connections are alive? Backgroundrb down again?
  • The cloud computing setup jacked the imagemagick? Again?
  • You are running out of disk space and there are no more file descriptors for your
  • The git SHA and version is correct
  • Screen shot 2009-12-06 at 12.29.53 AM

Health Monitor adds a single controller action to generate an html, js, or xml report with details of all your custom defined health checks. An error response code (500 server error) indicates failure when any monitored feature fails or exceeds the custom timeout definition. Health monitor is easier to setup than custom server side cron tasks and adds the advantage of exercising more code since everything from your load balancer to nginx to mongrels must be happily shoving rubies around to get that 200 oh boy success message. So ping away, grab a beer and know that hey, you might be too drunk but at least you will know your application is sick before your clients do.


sudo gem install health_monitor --source=

config.gem :health_monitor, :source =>

Create a the health monitor controller

script/generate health_monitor

Add your customizations

  class HealthMonitorController < ApplicationController

    #More examples available at
    #Built in checks
    monitor_health :schema_check, :database_check, :ey_agent_check

    #monitor specified process
    monitor_process :monit 

    # Custom monitor task
    monitor_health :email, :description => 'send an email' do |controller|


Routes are automatically generated:



Monitor specific tasks or skip tasks with the parameters skip and only




Hey is that you database crying?

October 5, 2009

Download  crying databases from Aloha Rails Conf.


Hey… is that your surfboard crying?

August 25, 2009

I Am Speaking At Aloha On Rails, The Hawaii Ruby on Rails ConferenceMy snowboard is jealous. I am going to Hawaii to ride surfboards, dive with sharks, jump off cliffs and present Hey…. is that your database crying? at the alohaonrails conference. There are some really great talks lined up about Map Reduce/Pig/Hadoop, Rails 3 and general ruby shoving. And seriously, who doesn’t want to be in Waikiki.

Hawaii 10-5 O (M G)!


Delectable plugin treats for the ruby shovers

August 25, 2009
Candy raver plugin funtime!

Delicatable treats for the rubies.

Been a long time. shouldn’t of left ya without a dope plugin to step to. meh. But for reals, I’ve been working way too much. Here’s a tasty sampler of some new and revived github projects:

ActiveRecord Dumper

script/plugin install

Dumper. I barely know her! I wrote this ages ago back in the Rails 1 dot 0h(mg) daze, but still works like a charm.

Easily export records to csv, yaml, or xml using the :find options, or (new) specify an array of activerecords with the :records option. AR Dumper dumps to strings or files with a paginated option, and it supports full customization of displayed headers and content with options such as  :o nly, :export, :procs, :methods

Book.dumper :yml, :find => {:conditions => ['author_name like ?', 'snowgiraffe'] }

Book.dumper :csv,  :o nly => [:author_name, :title], :records => @my_books

Asset Tag Extensions

script/plugin install git://

nuts_samplerYour high performance web site client loading slowly? In addition to combining asset files, one of the best ways to improve client load speed is to move the javascript files and inline script tags to the bottom of the page. Even better, execute inline javascript after the document loads.  To load files at the bottom of the page use the

include_javascript_tag 'myjsfile', :defer => true

Similarly, replacing calls to javascript_tag with Asset Tag Extension’s inline_javascript renders the script at the bottom of the page. Use the :o n_load => true functionality use JQuery OnLoad functionality.

  <%  inline_javascript  :o n_load => true do %>
    alert("I love grapes");
  <% end %>

Ruby Prof Request Filters

script/plugin install

Need to instantly profile a page? Output ruby prof results to your browser by adding the following params to the url: ruby_prof=true Flat graphs, html graph, whatever you need, this little tool comes in handy when your solving big problems.

Google Base: Base4r

I did some work on Dan Dukeson’s Google Base API For Ruby. Add, modify and delete items from Google Base (formerly Froogle) with Ruby.


Logging with Rake

July 8, 2009

I’ve gotten a little tired of failing rake tasks that don’t give me enough diagnostic information with just the –trace option. Here’s a little snippet to redirect the ActiveRecord (and SQL in debug mode) output to stdout. Then pipe it into a file for safe keeping.

rake mytask LOG=DEBUG > mytask.out

def set_logger
  #configure ActiveRecord to log to Stdout
  if (log = (ENV['LOG']||ENV['log'])) && log.to_s.downcase != 'false'
    ActiveRecord::Base.logger =
    ActiveRecord::Base.logger.level = begin
      log =~ /^\d*$/ ? log.to_i : Logger.const_get(log.upcase)
    puts "ActiveRecord to STDOUT level #{ActiveRecord::Base.logger.level}"
    ActiveRecord::Base.connection.instance_variable_set('@logger', ActiveRecord::Base.logger)
    Paperclip.options[:log] = true

ar_test_runner: Run the ActiveRecord unit test suite with your modifications

May 12, 2009

Run ActiveRecord regression tests with your code loadedIf you write plugins or code to enhance ActiveRecord functionality, its a really good idea to run the ActiveRecord core test suite with your cool additions loaded. After working on ar-extensions, I liked the idea of running the core tests along with the plugin specific tests.  However, I soon grew tired of coding the same Rakefile for each of my eleventy billion AR plugins. Not DRY. Not fun. Not a unicorn party.

Thus was born, ar_test_runner, a convenient plugin with a rake task to run the ActiveRecord test suites with your  code/gem/plugin load. You even can choose the ActiveRecord version and database.


  gem sources -a
  sudo gem install blythedunham-ar_test_runner

Run ar_test_runner

Run all plugins and lib files against sqlite for app version

ar_test_runner DB=sqlite

Test 2.2.2 with rails_devs_for_data_integrity plugin loaded on mysql

ar_test_runner PLUGIN=rails_devs_for_data_integrity AR_DIR=/Library/Ruby/Gems/1.8/gems/activerecord-2.2.2

Rake Tasks

ar_test_runner works as a rake task, if installed as a plugin or by adding require “ar_test_runner” to the application’s Rakefile. The following example tests the applications default version of ActiveRecord with the files RAILS_ROOT/lib/my_file.rb and RAILS_ROOT/lib/my_other_file.rb loaded

rake test:activerecord:mysql FILE=lib/my_file.rb,lib/my_other_file.rb


To specify (or skip)  gems, files, dirs, and plugins ot load or build custom runs see the documentation at ar_test_runner .


RailsConf 2009: powered by OMG UNICORNS!!!!

May 11, 2009
OMG Unicorns at RailsConf!

OMG Unicorns at RailsConf!

The over all theme of this years RailsConf was: UNICORNS (click me!) I mean, yeah Rails 3 is rad, racks and clouds are great and we are scaling better now, but now with the power of OMG UNICORNS! The Phusion guys even made a Unicorn edition of Rubystein to prove how fast ruby can go. Wow! I really enjoyed Chris Wanstrath’s  keynote on how you could blog your to your way rockstarness (but its better to be a good coder), but Chris, you forgot to mention that adding unicorns makes a blog at least 83.45% more successful.

Back when I was a little girl, I dreamed of a future with flying Jetson like hovercraft and space travel. Yet this quite frankly, this future sucks. Instead of awesome, everyone just argues over the best way to round button corners. But now…. OMG UNICORNS!I don’t feel so sad anymore. As I mentioned in my SMS talk, I even upgraded my database to run on flowers so the unicorns will come and play! Thanks RailsConf!

There is no need to argue about the best way to add unicorns to your rails app. Simply cornify it up with the new acts_as_unicorn plugin. Acts_as_unicorn gives you control to decide which actions are unicorn worthy.

script/plugin install git://

Add unicorns to your pages!

class UnicornController < ApplicationController
  acts_as_unicorn 'OMG UNICORNS!', :except => :stupid_not_unicorn_action



RailsConf 2009: Integrating SMS with your Rails Application

May 7, 2009

Some ppt slides for you. Slide share soon to come.


SMS On Rails rdoc

script/plugin install git://

At the end of the snowgiraffe SMS show, I demoed the sms on rails engine plugin. I’ll build it into a gem soon, but by using the generator there shouldn’t be any collisions, and the plugin should be version safe as everything is namespaced and modularized. Anyhow, here’s the script:

> rails dog --database=mysql
> mysqladmin -uroot create dog_development
> cd dog
> script/plugin install git://
> script/generate sms_on_rails setup --default-service-provider=clickatell
> rake db:migrate
> mate config/environment.rb

Sign up for clickatell and update the environment.rb with your credentials. Alternatively, use the email gateway (specify no default service provider) and setup your mail settings.

The Generator does the following:

  1. copy images and stylesheets to your public directory
  2. generates 3 database migrations (the 2nd and 3rd have a 2 and 3 appended)
  3. installs clickatell gem and static_record_cache plugin (for email carriers caching)
  4. insert configuration into environment.rb