Skip to content

Instantly share code, notes, and snippets.

View mwhooker's full-sized avatar

Matthew Hooker mwhooker

  • tbd
  • San Francisco
View GitHub Profile
>>> with open('test', 'w') as a:
... with open('test', 'w') as b:
... a.write('a')
... b.write('b')
...
>>>
[1] + 42274 suspended python
[mwhooker@Wolfe:~/test]$ cat test
a
./simple/Channels/#analytics/2013-03-05.txt:[14:49:23] <dan>Ah interesting: Error: User: arn:aws:iam::512062111522:user/data-pipeline-prod is not authorized to perform: elasticmapreduce:RunJobFlow
./simple/Channels/#analytics/2013-03-05.txt:[14:53:29] <dan> <Message>User: arn:aws:iam::512062111522:user/data-pipeline-prod is not authorized to perform: iam:GetInstanceProfile on resource: instance profile prod-data-pipeline-ec2</Message>
./simple/Channels/#analytics/2013-03-05.txt:[14:56:03] <dan>Still can't launch with that role: :user/data-pipeline-prod is not authorized to perform: iam:GetRole on resource: role prod-data-pipeline-ec2
./simple/Channels/#analytics/2013-03-05.txt:[14:59:41] <dan>Same issue: <Message>User: arn:aws:iam::512062111522:user/data-pipeline-prod is not authorized to perform: iam:GetRole on resource: role prod-data-pipeline-ec2</Message>
./simple/Channels/#analytics/2013-05-29.txt:[13:26:51] <moyer> hey dan, steven: I'm in the process of cleaning up IAM policies and it looks like the "
@mwhooker
mwhooker / changes.diff
Created May 28, 2013 05:44
Our changes to nginx cookbook
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..43c013a
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+.vagrant
+Berksfile.lock
diff --git a/.projector b/.projector
new file mode 100644
$ git archive --format tgz -o chef-zookeeper.tgz --prefix zookeeper/ master
{'span': <avro.schema.RecordSchema object at 0x101b13cd0>}
new span: {'parent_span_id': None, 'span_id': '1f30b7a0-dd94-47fc-af82-55f325111550', 'name': 'request-2-2', 'trace_id': '8022ed61-a80f-45a4-ade3-8b46cd770f85'}
annotation: ('1f30b7a0-dd94-47fc-af82-55f325111550', 1364855295581, '<start>', 'Wolfe.local.2-2')
annotation: ('1f30b7a0-dd94-47fc-af82-55f325111550', 1364855295738, '1895f1bb212a4105a6692a881d079e3b', 'Wolfe.local.2-2')
annotation: ('1f30b7a0-dd94-47fc-af82-55f325111550', 1364855295739, 'b1735b32a4d740d79fe6e4fee9772bd5', 'Wolfe.local.2-2')
annotation: ('1f30b7a0-dd94-47fc-af82-55f325111550', 1364855295740, '51bb5e61753f4012824af838a54d7807', 'Wolfe.local.2-2')
annotation: ('1f30b7a0-dd94-47fc-af82-55f325111550', 1364855295740, 'CS', 'Wolfe.local.2-2')
new span: {'parent_span_id': '1f30b7a0-dd94-47fc-af82-55f325111550', 'span_id': '22597be3-f18e-452b-8554-1d1fe63dbc17', 'name': 'request-1-2', 'trace_id': '8022ed61-a80f-45a4-ade3-8b46cd770f85'}
annotation: ('22597be3-f18e-452b-8554-1d1
@mwhooker
mwhooker / lalalala
Last active December 12, 2015 10:39
fantasy requirements for convergence tools
1. converge PAAS infrastructure
2. must fail fast
3. attributes should be evaluated only after every attribute file is processed
4. easy to inspect state
5. deterministic behavior
6. no server -- configuration optionally uploaded to s3/other
7. everything always idempotent
8. written in gmake
# This file looks empty when viewed with "vi". In fact, there is one
# '~', so users with no AppleVolumes file in their home directory get
# their home directory by default.
#
# volume format:
# :DEFAULT: [all of the default options except volume name]
# path [name] [casefold:x] [options:z,l,j] \
# [allow:a,@b,c,d] [deny:a,@b,c,d] [dbpath:path] [password:p] \
# [rwlist:a,@b,c,d] [rolist:a,@b,c,d] [limitsize:value in bytes] \
def do(doer):
doer.do()
mport logging
import time
import json
from kazoo.client import KazooClient
from jones.client import JonesClient
log = logging.getLogger('kazoo')
log.addHandler(logging.StreamHandler())
import logging
import time
import json
from kazoo.client import KazooClient
from jones.client import JonesClient
log = logging.getLogger('')
log.addHandler(logging.StreamHandler())