This is a paragraph, which is text surrounded by whitespace. Paragraphs can be on one
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# See https://gist.github.com/westurner/3196564 | |
brew install readline | |
brew install zeromq | |
virtualenv ~/py | |
~/py/bin/pip install ipython pyzmq tornado pygments numpy python-dateutil pytz scipy matplotlib statsmodels pandas | |
~/py/bin/easy_install pyzmq | |
~/py/bin/easy_install tornado | |
# Remove the version check | |
vi py/lib/python2.7/site-packages/IPython/utils/zmqrelated.py | |
~/py/bin/ipython notebook |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"metadata": { | |
"name": "", | |
"signature": "sha256:d2f389e058e5bdca375e594db6578970fa9ed3b67ca98e85e2b9865dd974ef37" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# https://gist.github.com/philz/dfca51807d9431b662aa | |
export PAGER= | |
if [[ $# -ne 1 ]]; then | |
echo "$0 finds all branches and tags a commit is in, based on" | |
echo "'git log --grep' and 'git branch --contains'" | |
echo "Usage: $0 <grep_term>" | |
exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h1>foo</h1> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Leak file descriptors | |
$ python <<EOF | |
import time | |
a=[] | |
while True: | |
a.append(open("/tmp/z" + str(len(a)), "w")) | |
time.sleep(0.5) | |
EOF | |
## Find leakers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Make sense of puppet circular dependency error messages. | |
# Tags: graphviz, puppet | |
# See output at http://i41.tinypic.com/b6yeqv.jpg | |
$ cat circular.pp | |
node default { | |
exec { "/a": require => Exec["/b"] } | |
exec { "/b": require => Exec["/c"] } | |
exec { "/c": require => Exec["/a"] } | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# | |
# Python code for http://www.cloudera.com/blog/2009/06/17/analyzing-apache-logs-with-piganalyzing-apache-logs-with-pig/ | |
import sys | |
import math | |
def rescale(values, low=0, high=4095): | |
"""Linearly rescales values to be strictly between low and high.""" | |
maxval = max(values) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# $unixtime 1354232717 | |
# local Thu 29 Nov 2012 03:45:17 PM PST utc Thu 29 Nov 2012 11:45:17 PM GMT | |
unixtime () | |
{ | |
gawk "BEGIN { print \"local\", strftime("'"'"%c"'"'", $1), \"utc\", strftime("'"'"%c"'"'", $1, 1) ; }" | |
} | |
# Alternately, | |
# $date -d @1354298146 | |
# Fri Nov 30 09:55:46 PST 2012 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dot -Tpng -o out.png <(cat stacks.txt | awk '/^Thread/ { cur = $2 } /Blocked by/ { print "t"cur, "->", "t"$3 } BEGIN { print "digraph G {"} END { print "}" }') |
OlderNewer