Skip to content

Instantly share code, notes, and snippets.

** [12:38:32 2011-04-30] 23600: resque-1.15.0: Forked 13359 at 1304163512
** [12:38:32 2011-04-30] 13359: resque-1.15.0: Processing incoming_message
Starting NewRelic injected perform
reseting stats
performing action with newrelic trace
calling original perform method
returned from original perform with true
calling agent shutdown
done calling agent shutdown
finally leaving injected perform
[04/30/11 12:37:44 +0100 hashblue-com (12250)] DEBUG : Http Connection opened to 204.93.223.139:80
[04/30/11 12:37:45 +0100 hashblue-com (12250)] DEBUG : Uncompressed content returned
[04/30/11 12:37:45 +0100 hashblue-com (12250)] DEBUG : Sat Apr 30 12:37:44 +0100 2011: sent 7 timeslices (99207573) in 0.271603 seconds
[04/30/11 12:37:53 +0100 hashblue-com (10552)] DEBUG : Connect to collector-5.newrelic.com:80/agent_listener/8/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/metric_data?run_id=99206895
[04/30/11 12:37:53 +0100 hashblue-com (10552)] DEBUG : Http Connection opened to 204.93.223.139:80
[04/30/11 12:37:53 +0100 hashblue-com (10552)] DEBUG : Uncompressed content returned
[04/30/11 12:37:53 +0100 hashblue-com (10552)] DEBUG : Sat Apr 30 12:37:53 +0100 2011: sent 7 timeslices (99206895) in 0.272491 seconds
[04/30/11 12:38:44 +0100 hashblue-com (12250)] DEBUG : Connect to collector-5.newrelic.com:80/agent_listener/8/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/metric_data?run_id=99207573
[04/30/11 12:38:44 +0100
@floehopper
floehopper / detecting-private-singleton-methods-in-ruby-1.8.7.rb
Created May 14, 2011 13:43
Detecting Private Singleton Methods in Ruby 1.8.7
class Klass
public
def my_public_instance_method
"my_public_instance_method"
end
private
def my_private_instance_method
"my_private_instance_method"
end
end
module GreatUncle
def foo
super
rescue NoMethodError
ensure
puts "GreatUncle#foo"
end
end
module GreatAunt
@floehopper
floehopper / alias_method.rb
Created May 16, 2011 19:20
Does alias_method create a copy of the method implementation?
class Foo
def original
"original"
end
alias_method :aliased, :original
remove_method :original
end
foo = Foo.new
@floehopper
floehopper / Gemfile
Created May 21, 2011 14:19
Mocha / Autotest / Bundler / Rails integration
source 'http://rubygems.org'
gem 'rails', '3.0.7'
gem 'sqlite3'
gem 'autotest'
gem 'autotest-rails'
gem 'mocha', :require => false
@floehopper
floehopper / cumulative-count-of-process-messages.rb
Created July 5, 2011 16:22
cumulative count of process messages
count = 0
Subscriber.all.each do |subscriber|
count += subscriber.messages.where(:timestamp.lt => Time.zone.parse("2011-07-01")).count
end
puts count
@floehopper
floehopper / skype-agc.txt
Created July 6, 2011 12:41
Disabling Skype AGC to avoid excessive background noise (via Kalv)
* Edit ~/Library/Application Support/Skype/shared.xml
* Add <AGC>0</AGC> to the <VoiceEng> section
* Then turn microphone volume down quite low.
jruby-1.6.2 :011 > client = Jabber::Client.new(Jabber::JID::new(im_account.user))
jruby-1.6.2 :012 > client.connect(im_account.jabber_server, 5222)
D, [2011-07-06T15:24:30.690000 #31873] DEBUG -- : CONNECTING:
    talk.google.com:5222
D, [2011-07-06T15:24:30.715000 #31873] DEBUG -- : SENDING:
    <stream:stream xmlns:stream='http://etherx.jabber.org/streams' xmlns='jabber:client' to='gmail.com' xml:lang='en' version='1.0' >
D, [2011-07-06T15:24:30.753000 #31873] DEBUG -- : RECEIVED:
    <stream:stream from='gmail.com' id='AC4FFCD9BAB4BFCD' version='1.0' xmlns:stream='http://etherx.jabber.org/streams' xmlns='jabber:client'/>
D, [2011-07-06T15:24:30.756000 #31873] DEBUG -- : FEATURES: waiting...

D, [2011-07-06T15:24:30.775000 #31873] DEBUG -- : RECEIVED:

D, [2011-07-14T16:18:19.844146 #13177] DEBUG -- : Handling event: #<Connfu::Event::Offer:0x1015693f0 @call_id="af2d9cfd-52a4-4e3b-b2a7-e3f4e85f6fa6", @from="\"James Mead\" <sip:userb@127.0.0.1>;tag=wMecfKPo11QU8gRyT2uMN4b3OC5U-MNc", @to="<sip:usera@127.0.0.1>", @presence_to="usera@127.0.0.1/voxeo", @presence_from="af2d9cfd-52a4-4e3b-b2a7-e3f4e85f6fa6@127.0.0.1">
D, [2011-07-14T16:18:19.844469 #13177] DEBUG -- : <iq type="set" to="af2d9cfd-52a4-4e3b-b2a7-e3f4e85f6fa6@127.0.0.1" id="blather0008" from="usera@127.0.0.1/voxeo">
<answer xmlns="urn:xmpp:ozone:1"/>
</iq>
D, [2011-07-14T16:18:19.844683 #13177] DEBUG -- : Sent command: #<Connfu::Commands::Answer:0x101568dd8>
D, [2011-07-14T16:18:19.929514 #13177] DEBUG -- : Receiving iq from server
D, [2011-07-14T16:18:19.929910 #13177] DEBUG -- : <iq type="result" id="blather0008" from="af2d9cfd-52a4-4e3b-b2a7-e3f4e85f6fa6@127.0.0.1" to="usera@127.0.0.1/voxeo"/>
D, [2011-07-14T16:18:19.930538 #13177] DEBUG -- : Handling event: #<Connfu::Event::Result:0x1015645a8 @ca