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
// Finds unused indexes in a mysql database | |
SELECT | |
t.TABLE_SCHEMA, | |
t.TABLE_NAME, | |
s.INDEX_NAME, | |
s.COLUMN_NAME, | |
s.SEQ_IN_INDEX, | |
( SELECT MAX(SEQ_IN_INDEX) | |
FROM INFORMATION_SCHEMA.STATISTICS s2 |
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
Rubinius Crash Report #rbxcrashreport | |
Error: signal SIGSEGV | |
[[Backtrace]] | |
0 rbx 0x0000000100021e41 _ZN8rubiniusL12segv_handlerEi + 241 | |
1 libSystem.B.dylib 0x00007fff85f2b1ba _sigtramp + 26 | |
2 libSystem.B.dylib 0x00007fff85ed1cdc szone_free_definite_size + 2083 | |
3 openssl.bundle 0x0000000109d3f77d ossl_ssl_verify_callback + 45 | |
4 libcrypto.1.0.0.dylib 0x0000000109c1244b internal_verify + 347 |
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
$ ruby ~/Downloads/REPRO4.rb | |
^CAn exception occurred running /Users/gnarg/Downloads/REPRO4.rb | |
Thread has been interrupted (Interrupt) | |
Backtrace: | |
{ } in Rubinius::Loader#signals at kernel/loader.rb:126 | |
Signal.run_handler at kernel/common/signal.rb:68 | |
Rubinius.received_signal at kernel/delta/rubinius.rb:240 | |
Thread#join_inner at kernel/bootstrap/thread.rb:300 | |
Thread#join at kernel/bootstrap/thread.rb:274 |
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
$ rbx -d ~/Downloads/REPRO4.rb | |
^CException: `Interrupt' kernel/common/signal.rb:68 - Thread has been interrupted | |
An exception occurred running /Users/gnarg/Downloads/REPRO4.rb | |
Thread has been interrupted (Interrupt) | |
Backtrace: | |
{ } in Rubinius::Loader#signals at kernel/loader.rb:126 | |
Signal.run_handler at kernel/common/signal.rb:68 | |
Rubinius.received_signal at kernel/delta/rubinius.rb:240 | |
Thread#join_inner at kernel/bootstrap/thread.rb:300 |
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
console> bt | |
Thread 0: | |
0x7fff5fbfbdd0: Thread#join_inner in kernel/bootstrap/thread.rb:300 (+96) | |
0x7fff5fbfc230: Thread#join in kernel/bootstrap/thread.rb:274 (+17) | |
0x7fff5fbfc620: __block__ in /Users/gnarg/Downloads/REPRO4.rb:39 (+9) | |
0x7fff5fbfca50: Array#map in kernel/bootstrap/array18.rb:16 (+96) | |
0x7fff5fbfcee0: Object#__script__ in /Users/gnarg/Downloads/REPRO4.rb:39 (+102) | |
0x7fff5fbfd3b0: Rubinius::CodeLoader#load_script in kernel/delta/codeloader.rb:65 (+54) | |
0x7fff5fbfd860: Rubinius::CodeLoader.load_script in kernel/delta/codeloader.rb:107 (+40) | |
0x7fff5fbfdd30: Rubinius::Loader#script in kernel/loader.rb:602 (+222) |
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
module NewRelic::Rack | |
class BrowserMonitoring | |
def should_instrument?(status, headers) | |
false | |
end | |
end | |
end |
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
around_filter :ignore_transaction | |
def ignore_transaction | |
if current_user.team_member? | |
NewRelic::Agent.disable_all_tracing do | |
yield | |
end | |
else | |
yeild | |
end |
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
config.after_initialize do | |
begin | |
DependencyDetection.dependency_by_name(:passenger).execute | |
rescue Exception => e | |
NewRelic::Agent.logger.error(e.message) | |
NewRelic::Agent.logger.error(e.backtrace.join("\n")) | |
end | |
end |
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
module Rubinius | |
BUILD_CONFIG = { | |
:which_ruby => :ruby, | |
:build_ruby => "/home/hudson/.rvm/rubies/ruby-1.8.7-p334/bin/ruby", | |
:build_rake => "rake", | |
:build_perl => "perl", | |
:llvm => :prebuilt, | |
:llvm_configure => "", | |
:cc => "gcc", | |
:cxx => "g++", |
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 | |
require 'yaml' | |
module Timmy | |
class Step | |
def self.set_priority(priority) | |
@priority = priority | |
end |
OlderNewer