Skip to content

Instantly share code, notes, and snippets.

View hanshasselberg's full-sized avatar

Hans Hasselberg hanshasselberg

View GitHub Profile

https://www.youtube.com/watch?v=Dh86i9HDKck&t=569s

https://www.youtube.com/watch?v=NcpPO9D8jIM

  • oxalic acid vaporization (late november, early december)
# accepts git urls git@github.com:etcd-io/etcd.git
# accepts https urls https://github.com/etcd-io/etcd
function gclone
set url $argv
switch $url
case "git*"
set path (string replace -r "\.git\$" "" (string replace ":" "/" (string sub -s 5 $url)))
case "https://*"
set path (string sub -s 9 $url)
case '*'

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:

@hanshasselberg
hanshasselberg / dnsperf_install.sh
Last active August 18, 2021 09:25
Install dnsperf on ubuntu
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
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).
@hanshasselberg
hanshasselberg / gist:5565206
Created May 12, 2013 22:36
Demonstrate file upload with ethon.
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
> 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
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"}
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"}
source "http://rubygems.org"
gem 'typhoeus', :git => "https://github.com/typhoeus/typhoeus.git"