Instantly share code, notes, and snippets.

View keybase.md

Keybase proof

I hereby claim:

  • I am i0rek on github.
  • I am i0rek (https://keybase.io/i0rek) on keybase.
  • I have a public key whose fingerprint is 3A99 65AD CAFC BA51 6057 0F49 3972 102D D7CA BE4D

To claim this, I am signing this object:

View dnsperf_install.sh
sudo apt-get install -y bind9utils libbind-dev libkrb5-dev libssl-dev libcap-dev libxml2-dev
curl ftp://ftp.nominum.com/pub/nominum/dnsperf/2.0.0.0/dnsperf-src-2.0.0.0-1.tar.gz -O
tar xfvz dnsperf-src-2.0.0.0-1.tar.gz
cd dnsperf-src-2.0.0.0-1
./configure
make
sudo make install
View gist:cda247e94d30bfe91cee
The initial observed cluster behavior:
1) Constant churn of nodes between Failed and Alive
2) Message bus saturated (~150 updates/sec)
3) Subset of cluster affected
4) Some nodes that are flapping don't exist! (Node dead, or agent down)
One immediate question is how the cluster remained in an unstable
state. We expect that the cluster should converge and return to
a quiet state after some time. However, there was a bug in the
low level SWIM implementation (memberlist library).
View gist:5565206
require 'ethon'
def forge_easy(url, file)
easy = Ethon::Easy.new(url: url, upload: true)
easy.set_read_callback(file)
easy.infilesize = file.size
easy
end
multi = Ethon::Multi.new
View fu
> require 'typhoeus'
#=> true
> Typhoeus::Config.verbose = true
> Typhoeus.get("www.example.com")
* About to connect() to www.example.com port 80 (#0)
* Trying 2001:500:88:200::10...
* Failed to connect to 2001:500:88:200::10: No route to host
* Undefined error: 0
* Trying 192.0.43.10...
* connected
View gist:4960948
2013-02-15T14:41:21+00:00 app[web.1]: Started POST "/adyen" for 91.212.42.11 at 2013-02-15 14:41:21 +0000
2013-02-15T14:41:21+00:00 app[web.1]: Parameters: {"pspReference"=>"8813609392802715", "eventDate"=>"2013-02-15T14:41:20.17Z", "merchantAccountCode"=>"Wunderlistshop", "reason"=>"73567:1111:6/2016", "originalReference"=>"", "value"=>"5", "eventCode"=>"AUTHORISATION", "merchantReference"=>"SKINTEST-blah", "operations"=>"CANCEL,CAPTURE,REFUND", "success"=>"true", "paymentMethod"=>"mc", "currency"=>"EUR", "live"=>"false"}
View gist:4960931
2013-02-15T14:55:01+00:00 app[web.1]: Started POST "/adyen" for 91.212.42.11 at 2013-02-15 14:55:01 +0000
2013-02-15T15:06:13+00:00 app[web.1]: Parameters: {"pspReference"=>"dispute_report_2013_02_07.csv", "eventDate"=>"2013-02-08T18:39:13.40Z", "merchantAccountCode"=>"Wunderlistshop", "reason"=>"https://ca-test.adyen.com/reports/download/MerchantAccount/Wunderlistshop/dispute_report_2013_02_07.csv", "originalReference"=>"", "value"=>"0", "eventCode"=>"REPORT_AVAILABLE", "merchantReference"=>"", "operations"=>"", "success"=>"true", "paymentMethod"=>"", "currency"=>"EUR", "live"=>"false"}
View Gemfile
source "http://rubygems.org"
gem 'typhoeus', :git => "https://github.com/typhoeus/typhoeus.git"
View gist:4645035
Typhoeus.get("api.travis-ci.org/repos/travis-ci/travis").total_time
#=> 0.428954
Typhoeus.get("https://api.travis-ci.org/repos/travis-ci/travis", followlocation: true).total_time
#=> 0.786656
View gist:4541852
$ ruby --version
ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-darwin12.0.0]
$ irb --version
irb 0.9.6(09/06/30)
$ irb
> a = "gc me"
=> "gc me"
> ObjectSpace.define_finalizer(a, proc {|id| puts "Finalizer one on #{id}" })
=> [0, #<Proc:0x007f9e2abb9200@(irb):3>]
> a = nil