Skip to content

Instantly share code, notes, and snippets.

@nick
nick / scrape_stat
Created August 14, 2008 23:08
Save a stat to an active record database
#!/usr/bin/ruby
require 'rubygems'
require 'open-uri'
require 'hpricot'
require 'active_record'
ActiveRecord::Base.establish_connection(
:adapter => "mysql", :host => "127.0.0.1", :database => "db", :username => "user", :password => "pass"
)