Skip to content

Instantly share code, notes, and snippets.

@hynek
hynek / Example Usage
Last active November 26, 2016 19:10
PoC of using attrs’s upcoming metadata feature for using declarative application configuration from env variables including envconsul’s HashiCorp Vault support.
$ env APP_ENV=dev APP_PROMETHEUS_PORT=7000 SECRET_WHOIS_DEV_APP_PROMETHEUS_CONSUL_TOKEN=abc python app.py
WhoisConfig(env='dev', prometheus=Prometheus(address='127.0.0.1', port='7000', consul_token='abc'))
@ericmoritz
ericmoritz / README.md
Created November 15, 2012 16:53
Fizzbuzz Rube Goldburg

Obviously simplicity wasn't the goal of this, so don't judge me.

@encukou
encukou / getpatch.sh
Created November 13, 2012 09:04
get patches from remote repo, name them according to freeipa guidelines
#! /bin/bash
export project=freeipa
export username=pviktori
export localrepo=~/dev/freeipa
export patchdir=~/patches/in
export remote=vm081
# Usage: getpatch <patchnumber> [num_patches]
#
@vgoklani
vgoklani / firehose.py
Created November 11, 2011 18:31
Twitter Streaming via Python and pycurl + filters by Klout score
#!/usr/bin/env python
import pycurl, urllib, json, sys, httplib2
'''
curl -d 'track=google' https://stream.twitter.com/1/statuses/filter.json -uusername:password
http://dev.twitter.com/pages/streaming_api_methods
https://gist.github.com/1046726
http://www.angryobjects.com/2011/10/15/http-with-python-pycurl-by-example/
'''