I hereby claim:
- I am rgarcia on github.
- I am rg (https://keybase.io/rg) on keybase.
- I have a public key whose fingerprint is 7E16 D413 A697 F986 DC01 811F BC59 BC47 D298 7D85
To claim this, I am signing this object:
| package main | |
| import ( | |
| "bytes" | |
| "fmt" | |
| "io" | |
| ) | |
| // Job is used by gearman clients after a job is submitted | |
| type Job interface { |
| import ( | |
| "encoding/base64" | |
| "fmt" | |
| "net/http" | |
| ) | |
| type BasicAuthTransport struct { | |
| Username string | |
| Password string | |
| } |
I hereby claim:
To claim this, I am signing this object:
| #!/usr/bin/env bash | |
| set -e | |
| # Clones a gist locally | |
| # usage: ./clone_gist.sh <gist id> <folder> | |
| git clone git@github.com:$1.git $2 |
$ node --expose-gc server.js
in another terminal:
$ curl localhost:5001
output in first terminal shows that req.foo is still sitting in the heap:
| package main | |
| import ( | |
| "fmt" | |
| "labix.org/v2/mgo" | |
| "labix.org/v2/mgo/bson" | |
| "log" | |
| "os" | |
| "strings" | |
| "text/tabwriter" |
| FROM salted | |
| # /etc/hosts and /etc/hostname are read only. so change minion config | |
| RUN HOSTNAME=`hostname` && sed "s/#id:/id: container-{{ name }}-$HOSTNAME/" -i /etc/salt/minion | |
| ADD {{ salt_dir }} /srv/salt | |
| ADD {{ pillar_dir }} /srv/pillar | |
| RUN rm -f /etc/salt/minion_id | |
| RUN salt-call --local state.highstate |
| {Readable,Transform} = require 'stream' | |
| crypto = require 'crypto' | |
| report = (stream) -> | |
| int = setInterval -> | |
| console.log "#{stream.constructor.name}(#{stream._writableState?.length or ''} #{stream._readableState?.length or ''})" | |
| , 1000 | |
| stream.on 'end', -> clearInterval int | |
| # generates a bunch of strings |
| {Readable,Transform} = require 'stream' | |
| crypto = require 'crypto' | |
| report = (stream) -> | |
| int = setInterval -> | |
| console.log "#{stream.constructor.name}(#{stream._writableState?.length or ''} #{stream._readableState?.length or ''})" | |
| , 1000 | |
| stream.on 'end', -> clearInterval int | |
| # generates a bunch of bytes |
| #!/usr/bin/env bash | |
| # create a string of "a"s that is length $1 | |
| longstr=$(head -c $1 < /dev/zero | tr '\0' '\141') | |
| sleep 1200 |