This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'logger' | |
begin | |
require 'protected_attributes' | |
rescue LoadError | |
end | |
require 'delayed_job_active_record' | |
Delayed::Worker.logger = Logger.new('/tmp/dj.log') | |
ENV['RAILS_ENV'] = 'test' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env ruby | |
puts "asdf" | |
.split('') | |
.map(&:upcase) | |
.join('') | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# HandleWithCare | |
# ============== | |
# | |
# HandleWithCare allows classes to specify | |
# certain methods as DANGEROUS! | |
# when you decorate a class with | |
# handle_with_care :toss_nuclear_rods, :lazer_pubes, :delete_the_database | |
# | |
# when you try to call these methods, they raise an error unless you prefix params | |
# with {force: true} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
rails_root = File.expand_path('..', File.dirname(__FILE__) ) | |
config_dir = File.join rails_root, 'config' | |
ENV['NRCONFIG'] ||= File.join(config_dir, 'newrelic.yml') | |
ENV['NEW_RELIC_LOG'] ||= File.join(rails_root, 'log', 'newrelic_agent.log') | |
require File.join(config_dir, 'environment') | |
require 'delayed/command' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{N:{a:{l:{a:{n:{d:{a:{ :{(:{I:{n:{d:{i:{a:{):0}}}}}}}}}}}},p:{l:{e:{s:0}}},n:{t:{e:{s:0}},c:{y:0}},t:{i:{o:{n:{a:{l:{ :{U:{n:{i:{v:{e:{r:{s:{i:{t:{y:{ :{o:{f:{ :{M:{e:{x:{i:{c:{o:0}}}}},S:{a:{n:{ :{M:{a:{r:{c:{o:{s:{ :{d:{e:{ :{L:{i:{m:{a:0}}}}}}}}}}}}}}}}},B:{o:{g:{o:{t:{a:{ :{(:{C:{o:{l:{u:{m:{b:{i:{a:{):0}}}}}}}}}}}}}},l:{i:{v:{i:{a:0}}}}}},C:{o:{r:{d:{o:{b:{a:{ :{(:{A:{r:{g:{e:{n:{t:{i:{n:{a:{):0}}}}}}}}}}}}}}}}}},N:{i:{c:{a:{r:{a:{g:{u:{a:0}}}}}}}},t:{h:{e:{ :{R:{e:{p:{u:{b:{l:{i:{c:{ :{(:{M:{o:{n:{t:{e:{v:{i:{d:{e:{o:{):0}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},o:{r:{w:{i:{c:{h:{ :{U:{n:{i:{v:{e:{r:{s:{i:{t:{y:0}}}}}}}}}}}}}}}},e:{w:{ :{Y:{o:{r:{k:{ :{U:{n:{i:{v:{e:{r:{s:{i:{t:{y:0}}}}}}}}}}}}}}}}}},S:{a:{l:{e:{r:{n:{o:0}}},a:{m:{a:{n:{c:{a:{$:0}}}}}},z:{b:{u:{r:{g:0}}}}},n:{ :{C:{a:{r:{l:{o:{s:{ :{U:{n:{i:{v:{e:{r:{s:{i:{t:{y:{ :{o:{f:{ :{G:{u:{a:{t:{e:{m:{a:{l:{a:0}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},i:{n:{t:{ :{J:{o:{h:{n:{':{s:{ :{C:{o:{l:{l:{e:{g:{e:0}}}}}}}}}}}}},L:{o:{u:{i:{s:{ :{U:{n:{i:{v:{e:{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pen(/Users/michaelglass/.rvm/gems/ruby-1.9.3-p0@global/gems/ruby-debug-base19-0.11.25/lib/ruby_debug.bundle, 9): Symbol not found: _ruby_threadptr_data_type (LoadError) | |
Referenced from: /Users/michaelglass/.rvm/gems/ruby-1.9.3-p0@global/gems/ruby-debug-base19-0.11.25/lib/ruby_debug.bundle | |
Expected in: flat namespace | |
in /Users/michaelglass/.rvm/gems/ruby-1.9.3-p0@global/gems/ruby-debug-base19-0.11.25/lib/ruby_debug.bundle - /Users/michaelglass/.rvm/gems/ruby-1.9.3-p0@global/gems/ruby-debug-base19-0.11.25/lib/ruby_debug.bundle |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'test_helper' | |
require 'models' | |
class StackLevelTooDeepTest < Test::Unit::TestCase | |
def setup | |
@klass = Doc('Person') do | |
key :name, String | |
end | |
@pet_klass = EDoc('Pet') do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Redis | |
God.watch do |w| | |
w.name = "redis" | |
w.interval = 30.seconds | |
w.start = "/etc/init.d/redis start" | |
w.stop = "/etc/init.d/redis stop" | |
w.restart = "/etc/init.d/redis restart" | |
w.start_grace = 10.seconds | |
w.restart_grace = 10.seconds |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; | |
CREATE TABLE IF NOT EXISTS `integrity_builds` ( | |
`id` int(11) NOT NULL auto_increment, | |
`started_at` datetime default NULL, | |
`completed_at` datetime default NULL, | |
`successful` tinyint(1) default NULL, | |
`output` text NOT NULL, | |
`created_at` datetime default NULL, | |
`updated_at` datetime default NULL, | |
`commit_id` int(11) default NULL, |
NewerOlder