This file contains hidden or 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
--- a/site-cookbooks/monit/templates/default/memcached.conf.erb | |
+++ b/site-cookbooks/monit/templates/default/memcached.conf.erb | |
@@ -2,5 +2,5 @@ check process memcached | |
with pidfile /var/run/memcached.pid | |
start program = "/etc/init.d/memcached start" | |
stop program = "/etc/init.d/memcached stop" | |
- if failed port 11211 protocol memcache 4 times within 6 cycles then restart | |
+ if failed port 11211 4 times within 6 cycles then restart | |
if 5 restarts within 5 cycles then timeout |
This file contains hidden or 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
1 (M=55122) ~/src/theclymb> rvm info | |
ruby-1.9.3-p125@theclymb3: | |
system: | |
uname: "Darwin Mikes-MacBook-Air.local 12.2.0 Darwin Kernel Version 12.2.0: Sat Aug 25 00:48:52 PDT 2012; root:xnu-2050.18.24~1/RELEASE_X86_64 x86_64" | |
system: "osx/10.8/x86_64" | |
bash: "/bin/bash => GNU bash, version 3.2.48(1)-release (x86_64-apple-darwin12)" | |
zsh: "/bin/zsh => zsh 4.3.11 (i386-apple-darwin12.0)" |
This file contains hidden or 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
.FF.......................................................................................................................................................................................................... | |
--------------------------------------------- | |
CRASH: A fatal error has occurred. | |
Backtrace: | |
0 rbx 0x000000010c04f6d0 _ZN8rubiniusL12segv_handlerEi + 544 | |
1 libsystem_c.dylib 0x00007fff91c31cfa _sigtramp + 26 | |
2 libsystem_c.dylib 0x00007fff91c2f3c8 malloc_zone_malloc + 77 | |
3 rbx 0x000000010c16a202 _ZN8rubinius12CompiledCode4Info4markEPNS_6ObjectERNS_10ObjectMarkE + 318 | |
4 rbx 0x000000010c20075e _ZN8rubinius16GarbageCollector11scan_objectEPNS_6ObjectE + 456 |
This file contains hidden or 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
(speedup_rails_startup=fa456 .rvmrc bin/) ~/src/clymb> !time | |
time bundle exec rake environment | |
real 0m7.853s | |
user 0m6.485s | |
sys 0m1.129s | |
(speedup_rails_startup=fa456 .rvmrc bin/) ~/src/clymb> time bundle exec rake environment | |
real 0m7.478s | |
user 0m6.378s |
This file contains hidden or 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 'sidekiq' | |
module Sidekiq | |
# Encapsulates a single job awaiting retry | |
class Retry | |
attr_reader :score, :item | |
def initialize(score, item) | |
@score = score | |
@item = Sidekiq.load_json(item) |
This file contains hidden or 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
## | |
# Broadcast a message to Campfire | |
# | |
# campfire = Campfire.new(options) | |
# campfire.say("#{self.class.name} finished successfully!") | |
# campfire.say("trombone", :Sound) | |
# | |
def say(msg, type=:Text) | |
http = Net::HTTP.new("#{options[:subdomain]}.campfirenow.com", 443) | |
http.use_ssl = true |
This file contains hidden or 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
# This works for me in 1.9.3-p125 but not in p194. | |
# Can anyone explain why? | |
require 'net/http' | |
http = Net::HTTP.new("theclymb1.campfirenow.com", 443) | |
http.use_ssl = true | |
http.verify_mode = OpenSSL::SSL::VERIFY_PEER | |
request = Net::HTTP::Get.new("/login") | |
response = http.request(request) | |
raise response.inspect if response.code != '200' |
This file contains hidden or 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
class ActiveRecord::Base | |
mattr_accessor :shared_connection | |
@@shared_connection = nil | |
def self.connection | |
@@shared_connection || ConnectionPool::Wrapper.new(:size => 1) { retrieve_connection } | |
end | |
end | |
ActiveRecord::Base.shared_connection = ActiveRecord::Base.connection |
This file contains hidden or 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
YAML.parse(BELOW) fails, I believe due to the shipCompany line below which contains a single backtick. | |
``` | |
--- !ruby/object:Delayed::PerformableMethod | |
args: [] | |
method_name: :push_to_wh | |
object: !ruby/ActiveRecord:Cart | |
attributes: | |
split_to: |
This file contains hidden or 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
DEPRECATION WARNING: Layout found at "admin/customer_service" for Admin::CustomerServiceController but parent controller set layout to "admin/customer_service". Please explicitly set your layout to "admin/customer_service" or set it to nil to force a dynamic lookup. (called from realtime at /Users/mperham/.rvm/rubies/ree-1.8.7-2012.02/lib/ruby/1.8/benchmark.rb:308) |