Skip to content

Instantly share code, notes, and snippets.

View sob's full-sized avatar

Sean O'Brien sob

View GitHub Profile
@sob
sob / lead.rb
Created January 27, 2009 15:07
class Lead < ActiveRecord::Base
include Splam
has_force :oid => '<insert oid>'
validates_presence_of :first_name, :last_name
state_machine :state, :initial => 'pending' do
event :submit do
transition :to => 'spam', :from => 'pending', :if => :splam?
@sob
sob / gist:39524
Created December 24, 2008 00:15
undefined
<%
begin
eth0ip = Resolv::DNS.new.getaddress("@facts['fqdn']")
rescue
raise "Resolv::ResolvError: DNS result has no information for #{@facts['fqdn']}"
end
%>
DEVICE=eth0
ONBOOT=yes
TYPE=ethernet
@sob
sob / gist:6829
Created August 22, 2008 18:07 — forked from defunkt/gist:6443
# Video: http://rubyhoedown2008.confreaks.com/08-chris-wanstrath-keynote.html
Hi everyone, I'm Chris Wanstrath.
When Jeremy asked me to come talk, I said yes. Hell yes. Immediately. But
then I took a few moments and thought, Wait, why? Why me? What am I supposed
to say that's interesting? Something about Ruby, perhaps. Maybe the
future of it. The future of something, at least. That sounds
keynote-y.