Skip to content

Instantly share code, notes, and snippets.

@rw
rw / foo
Created August 18, 2016 19:06
https://rw.github.io/misc-talks/2016/Benchmarking%20InfluxDB%20vs.%20Cassandra.html#1
@rw
rw / fail.py
Created February 18, 2013 04:01
JSON doesn't handle arbitrary bytes
In [1]: arb = open('random-crap', 'rb').read()
In [2]: import json
In [3]: arb
Out[3]: '\x88\xb5rz\xe8(\xcd\x7f\xbc\x8e\xae\xfe\xfcA\xd7Q\xa8NOPQg\rZ\xe4\xb7\xf7p\xc4U<\xc6.\x94\xc8\xc3M\x91\xcdN\x91%j\xa8\xfd\xef\xcaI\xa1\xb2XB\xa5#\xae~\n\xc1\x8b0B\xe1^F.E\xdc\xea`<\xd7\x88&pR\xf0\xd8\xde\xabA\\\xc1\x10\x91\x8bsQ\x8a[\x15\x0c%G2\x85\x14\x97\t\xbe\x99T\xc8\x02\xac\xc6\xec\x1a\xe4\xa0x\x99]`\x90\xca&\x9a\x15\x08\x84W\x9eO\\\xa3NE\xd0YyA\xed|\xde\x1dl\xb8\xccU^\xb9\x83\xfe4\xd8\xa4\x0c2\xfb;\xff\xf3Qw\xeeX\xd6&\xef\x0f\xdc\xc7i\x93\xbd\xbav\xcb\x9a\x85%\x0c\xe2\x1dc\xb6\x8dcLN\x98\x9a?\x18{\x80`o\x0c\x07\xdf\xf9\x03\x01\xd6H\xa1\x11r\x16Gm\xdfW\xbd\xac\xb0!\x8f8\xa8\x99\n\x1c\x16(\x00\xdb~\xe3\x11\x8d?\xba\xc5\xc9\x94\x963(:\x99\xa8\x99\xc6\xae\x1f\xf1\xa2\x1c\xfc\x9b\x92\xb4\xb0\xf5!\x19\x01@\xb8\xb7\x8bOx\x19\x0fP\xfe\x86\xb7\x04\x05\xcd\xac\x8e@qC\xa7\xdb\x85\xae\x92\xa9:\x81_\xf1\x1b\xfd\xcb\x87\xb9\x88r\x94\xe6 \xfeG\xfe\xcd\xf2\x1d\x152\x04g\xd0\xe9O\xd0\xf5\x04\xc0\x9c\xb44\xa3\x84\x9f\xbd\xd0\xe3b\x9
@rw
rw / gist:2772779
Created May 23, 2012 01:42
Interesting coffeescript operator precedence levels
console.log a for a in [1,2]
> 1
> 2
console.log (a for a in [1,2])
> [1, 2]
@rw
rw / autocats.sh
Created December 14, 2011 19:20
Open all HTTP cats
# http://httpcats.herokuapp.com/
# https://news.ycombinator.com/item?id=3352698
for n in 302 401 403 404 405 406 408 409 413 414 417 418 426 429 431 444 500 502 507 508 599
do
open http://httpcats.herokuapp.com/${n}.jpg
done