Skip to content

Instantly share code, notes, and snippets.

View donovanbray's full-sized avatar

Donovan Bray donovanbray

  • homerun.com
  • San Francisco
View GitHub Profile
@donovanbray
donovanbray / Add subscriptions
Created January 6, 2012 00:54
The users in staging test database need to be subscribed to a national deal.
def testme
p = User.where("email like '%offerify.net'" )
p.each_with_index {|user,i|
puts 'so far - ' + i.to_s + Time.now.to_s if i % 500 == 0
@params = {:user_id=>user.id, :region=>Region.national.first, :partner=>$current_partner, :is_midday_subscribed=>false, :is_pr_subscribed=>false}
Subscription.create(@params)
}
end
#!/usr/bin/ruby
# Pingdom_http_custom_check
# DFF - 2011
# put this in {Apache Files}/cgi-bin/
# make sure to chmod +x the file
# Your ruby interpreter might not be where mine is. Check the above.
#
require 'cgi'
too_old=360