Skip to content

Instantly share code, notes, and snippets.

@btmerr
btmerr / keybase.md
Created June 4, 2015 20:09
keybase.md

Keybase proof

I hereby claim:

  • I am btmerr on github.
  • I am btmerr (https://keybase.io/btmerr) on keybase.
  • I have a public key whose fingerprint is 80AC 4D0B 1D53 20A8 54BB D450 79B5 22E2 5F1D D8EF

To claim this, I am signing this object:

@btmerr
btmerr / gist:2951711
Created June 19, 2012 00:59
Banned banking countries.
Albania & Macedonia (Balkans) AB and ALB MK and MKD
Belarus BY and BLR
Bosnia-Herzegovina (Balkans) BA and BIH
Columbia CO and COL
Congo CG and COG
Cote D'Ivoire (Ivory Coast) CI and CIV
Croatia/Hrvatska (Balkans) HR and HRV
Cuba CU and CUB
Iran IR and IRN
Iraq IQ and IRQ
@btmerr
btmerr / gist:900144
Created April 3, 2011 03:06
A human friendly example of the metrics output from a dropwizard app using https://github.com/codahale/metrics
{
"jvm": {
"memory": {
"heap_usage": 0.01099958490852696,
"non_heap_usage": 0.23714602195610435,
"memory_pool_usages": {
"Code Cache": 0.03793907165527344,
"Eden Space": 0.026162116082160028,
"Perm Gen": 0.19015753269195557,
"Perm Gen [shared-ro]": 0.7345474243164063,
@btmerr
btmerr / gist:899911
Created April 2, 2011 21:21
I <heart> Coda Hale.
[brian@huffy](~): curl http://user-app001:8081/metrics
{"jvm":{"memory":{"heap_usage":0.010116898933735321,"non_heap_usage":0.24900927786099708,"memory_pool_usages":{"Code Cache":0.040618896484375,"Eden Space":0.021985064496050824,"Perm Gen":0.21069049835205078,"Perm Gen [shared-ro]":0.7345474243164063,"Perm Gen [shared-rw]":0.6044743855794271,"Survivor Space":0.012887584420787546,"Tenured Gen":0.005232887449652142}},"daemon_thread_count":9,"thread_count":18,"uptime":842,"fd_usage":0.017578125,"thread-states":{"blocked":0.0,"runnable":0.2222222222222222,"terminated":0.0,"waiting":0.2777777777777778,"new":0.0,"timed_waiting":0.5},"gc":{"duration":{"Copy":{"type":"timer","duration":{"unit":"milliseconds","min":2.0,"max":25.0,"mean":10.0,"std_dev":13.0,"median":3.0,"p75":25.0,"p95":25.0,"p98":25.0,"p99":25.0,"p999":25.0},"rate":{"unit":"hours","count":3,"mean":12.854146883070923,"m1":0.0,"m5":2.0402262197945578E-13,"m15":0.015288834065195104}}},"throughput":{"Copy":{"type":"meter","event_type":"bytes","unit":"se
brian@host:~$ echo $EC2_URL
http://ec2.us-west-1.amazonaws.com
brian@host:~$ ec2-describe-regions
REGION eu-west-1 ec2.eu-west-1.amazonaws.com
REGION us-east-1 ec2.us-east-1.amazonaws.com
REGION ap-northeast-1 ec2.ap-northeast-1.amazonaws.com
REGION us-west-1 ec2.us-west-1.amazonaws.com
REGION ap-southeast-1 ec2.ap-southeast-1.amazonaws.com
brian@host:~$ ec2-describe-availability-zones
AVAILABILITYZONE us-west-1a available us-west-1
[Sat Mar 26 20:37:47 2011] [error] [client 10.162.54.181] PHP Fatal error: Uncaught exception 'Dwoo_Exception' with message 'Plugin <em>page_title</em> can not be found, maybe you forgot to bind it if it's a custom plugin ?' in /usr/share/ganglia-webfrontend/dwoo/Dwoo/Loader.php:112\nStack trace:\n#0 /usr/share/ganglia-webfrontend/dwoo/Dwoo/Compiler.php(2968): Dwoo_Loader->loadPlugin('page_title', true)\n#1 /usr/share/ganglia-webfrontend/dwoo/Dwoo/Compiler.php(1715): Dwoo_Compiler->getPluginType('page_title')\n#2 /usr/share/ganglia-webfrontend/dwoo/Dwoo/Compiler.php(1365): Dwoo_Compiler->parseFunction('<!DOCTYPE HTML ...', 96, 1183, false, 'root', 106)\n#3 /usr/share/ganglia-webfrontend/dwoo/Dwoo/Compiler.php(805): Dwoo_Compiler->parse('<!DOCTYPE HTML ...', 96, NULL, false, 'root', 106)\n#4 /usr/share/ganglia-webfrontend/dwoo/Dwoo/Template/String.php(369): Dwoo_Compiler->compile(Object(Dwoo), Object(Dwoo_Template_File))\n#5 /usr/share/ganglia-webfrontend/dwoo/Dwoo/Core.php(371): Dwoo_Template_String->getComp