require "yaml"
require "__data__"
class Status
REASONS = YAML.load __DATA__
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 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 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 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 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 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 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 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 GitHubPages | |
VERSION = 10 | |
DEPENDENCIES = Dependency::Hell.new({ | |
"jekyll" => "1.5.1", | |
"kramdown" => "1.3.1", | |
"liquid" => "2.5.5", | |
"maruku" => "0.7.0", | |
"rdiscount" => "2.1.7", | |
"redcarpet" => "2.3.0", |
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/perl | |
while (<>) { | |
if (/^[^"]+"([A-Z]+)\s([^"? ]+)[^"]*"\s(\d+)/) { | |
my $m = $1; | |
my $p = $2; | |
my $s = $3; | |
$p =~ s/^[a-f0-9]{8}(-[a-f0-9]{4}){3}-[a-f0-9]{12}$/{uuid}/; |
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 "benchmark/ips" | |
require "parslet" | |
module HTTP | |
class ContentType | |
class ParsletParser < ::Parslet::Parser | |
class CharList # :nodoc: | |
def initialize(list = nil) | |
@list = list || yield | |
end |
OlderNewer