require "yaml"
require "__data__"
class Status
REASONS = YAML.load __DATA__
end
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 "erb" | |
| begin | |
| require "awesome_print" | |
| rescue LoadError | |
| puts "Install Awesome Print first:" | |
| puts | |
| puts " gem install awesome_print" | |
| puts | |
| exit 1 |
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
| var suite = new (require("benchmark").Suite); | |
| var stoper = '<~_#@!'; | |
| var stoperRE = /<~_#@!/g; | |
| function format(msg, arg) { | |
| return msg + ":" + arg; | |
| } | |
| function varify_puzrin(phrase, params) { |
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
| Authenticated to localhost ([::1]:22222). | |
| debug1: channel 0: new [client-session] | |
| debug2: channel 0: send open | |
| debug1: Requesting no-more-sessions@openssh.com | |
| debug1: Entering interactive session. | |
| debug2: callback start | |
| debug2: fd 3 setting TCP_NODELAY | |
| debug2: client_session2_setup: id 0 | |
| debug2: channel 0: request pty-req confirm 1 | |
| debug1: Sending environment. |
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
| /usr/local/lib/ruby/gems/1.9.1/gems/mongo-1.9.2/lib/mongo/util/pool.rb:119:in `ping_time' | |
| /usr/local/lib/ruby/gems/1.9.1/gems/mongo-1.9.2/lib/mongo/util/read_preference.rb:119:in `block in select_near_pool' | |
| /usr/local/lib/ruby/gems/1.9.1/gems/mongo-1.9.2/lib/mongo/util/read_preference.rb:119:in `each' | |
| /usr/local/lib/ruby/gems/1.9.1/gems/mongo-1.9.2/lib/mongo/util/read_preference.rb:119:in `min_by' | |
| /usr/local/lib/ruby/gems/1.9.1/gems/mongo-1.9.2/lib/mongo/util/read_preference.rb:119:in `select_near_pool' | |
| /usr/local/lib/ruby/gems/1.9.1/gems/mongo-1.9.2/lib/mongo/util/read_preference.rb:114:in `select_secondary_pool' | |
| /usr/local/lib/ruby/gems/1.9.1/gems/mongo-1.9.2/lib/mongo/util/read_preference.rb:92:in `select_pool' | |
| /usr/local/lib/ruby/gems/1.9.1/gems/mongo-1.9.2/lib/mongo/util/read_preference.rb:67:in `read_pool' | |
| /usr/local/lib/ruby/gems/1.9.1/gems/mongo-1.9.2/lib/mongo/mongo_replica_set_client.rb:360:in `block in checkout_reader' | |
| /usr/local/lib/ruby/gems/1.9.1/gems/mongo-1.9.2/lib/mongo/mongo_replica_set_clie |
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 'set' | |
| class HTTP::Headers | |
| def initialize | |
| @pile = [] | |
| @keys = Set.new | |
| end | |
| def set(name, value) | |
| delete(name) |
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
| module Kernel | |
| def chained_trap(signal, &block) | |
| oldproc = trap signal do |*args| | |
| block[*args] do | |
| trap signal, oldproc | |
| Process.kill signal, 0 | |
| end | |
| end | |
| end | |
| end |
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
| % mongo | |
| MongoDB shell version: 2.4.2 | |
| connecting to: test | |
| > db.t1.ensureIndex({ username: 1 }, { sparse: true }); | |
| > db.t1.find({ deleted_at: { $exists: false }, username: "foo" }).explain() | |
| { | |
| "cursor" : "BasicCursor", | |
| "isMultiKey" : false, | |
| "n" : 0, | |
| "nscannedObjects" : 3, |
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
| curl -v -L http://ixti.net | |
| * Rebuilt URL to: http://ixti.net/ | |
| * Hostname was NOT found in DNS cache | |
| * Adding handle: conn: 0x1210c50 | |
| * Adding handle: send: 0 | |
| * Adding handle: recv: 0 | |
| * Curl_addHandleToPipeline: length: 1 | |
| * - Conn 0 (0x1210c50) send_pipe: 1, recv_pipe: 0 | |
| * Trying 204.232.175.78... | |
| * Connected to ixti.net (204.232.175.78) port 80 (#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
| --- a/lib/thin/server.rb 2014-01-06 23:53:11.517120396 +0100 | |
| +++ b/lib/thin/server.rb 2014-01-06 23:54:18.549990835 +0100 | |
| @@ -207,6 +207,17 @@ | |
| def running? | |
| @backend.running? | |
| end | |
| + | |
| + def log_backtrace | |
| + Thread.list.each do |thread| | |
| + log "Thread TID-#{thread.object_id.to_s(36)} #{thread['label']}" |