Skip to content

Instantly share code, notes, and snippets.

View jhaubrich's full-sized avatar

Jesse Haubrich jhaubrich

View GitHub Profile
for f in $(find $1 -iname "*.wsp"); do
if [ -a $f ];
then /opt/graphite/bin/whisper-set-aggregation-method.py $f max;
fi;
done
from subprocess import Popen, PIPE
p = Popen(['tail', '-f', 'popen_test'], stdout=PIPE)
p.stdout.readline() # will block until there is something to be read
# Then just `echo "hello world!" >> popen_test

A Cultural History of Beer

Take­Home Midterm Exam (for the two hour class)

Choose one of the following “cultural essays” and write an essay of no less than a thousand words (four double­spaced pages, 10­12 type Times New Roman font, with 1 inch margins). Use footnotes or endnotes where appropriate.

  1. You are sitting in a bar with Ninkasi, Tenenet, Sabazius, and Sucellus, when who should walk in, but Dionysus. A pleasant conversation ensues. What was said. [Feel free to use a dialog format, but include the appropriate cultural perspectives and terminology for each participant].
  2. What is the role of the early church in the evolution of beer?

Practicum in Brewing Technologies

Take­Home Midterm Exam (for the one hour class)

waas@GLaDOS:/home/waas $ ps -ef | egrep '13861|PPID'
UID PID PPID C STIME TTY TIME CMD
root 13861 13846 0 15:30 ? 00:00:03 /usr/bin/python /usr/bin/supervisord
root 13988 13861 0 15:30 ? 00:00:00 /usr/sbin/sshd -D
root 25664 13861 4 20:22 ? 00:01:18 python /opt/waas_brewery/zmq_hopper.py --tcsmode
root 25666 13861 0 20:22 ? 00:00:12 python /opt/waas_brewery/zmq_keg.py
root 25706 13861 91 20:22 ? 00:25:38 python /opt/waas_brewery/packet_harvester.py -i eth1
root 30054 13861 5 20:50 ? 00:00:00 python /opt/waas_brewery/brew/seqn.py
waas 30106 26115 0 20:50 pts/18 00:00:00 egrep 13861|PPID
# NOC1
2014-03-05 23:22:33.292148 - Listening on tcp://glados:50011
defaultdict(<type 'int'>, {'SNMP': 37746, 'SEQN': 5376})^C
2014-03-06 15:00:03.925397 - Closing feed conection to tcp://glados:50011...
2014-03-05 23:22:34.814211 - Listening on tcp://atlas:8011
defaultdict(<type 'int'>, {'SEQN': 5302})^C
2014-03-06 15:00:04.590234 - Closing feed conection to tcp://atlas:8011...
# NOC2
@jhaubrich
jhaubrich / esnoc1.py
Last active August 29, 2015 13:57
SNMP data from the brewery (docker)
SNMP {u'timestamp': 1394134461.336842, u'snmp': {u'snmp-ver': u'SNMPv1', u'snmp-get-error-status': 0, u'snmp-pdutype': u'get-request', u'snmp-get-request': 18, u'snmp-get-error-index': 0, u'snmp-get-details': [[u'oid_num=1.3.6.1.4.1.134.87.4.1.1.3.4.1.1.1', u'oid_name=pcuInfo2', u'oid_val='], [u'oid_num=1.3.6.1.4.1.134.87.4.1.1.3.4.1.1.2', u'oid_name=pcuInfo2', u'oid_val='], [u'oid_num=1.3.6.1.4.1.134.87.4.1.1.3.4.1.1.3', u'oid_name=pcuInfo2', u'oid_val='], [u'oid_num=1.3.6.1.4.1.134.87.4.1.1.3.4.1.1.4', u'oid_name=pcuInfo2', u'oid_val='], [u'oid_num=1.3.6.1.4.1.134.87.4.1.1.3.4.1.1.5', u'oid_name=pcuInfo2', u'oid_val='], [u'oid_num=1.3.6.1.4.1.134.87.4.1.1.3.4.1.1.6', u'oid_name=pcuInfo2', u'oid_val='], [u'oid_num=1.3.6.1.4.1.134.87.4.1.1.3.4.1.1.7', u'oid_name=pcuInfo2', u'oid_val='], [u'oid_num=1.3.6.1.4.1.134.87.4.1.1.3.4.1.1.8', u'oid_name=pcuInfo2', u'oid_val='], [u'oid_num=1.3.6.1.4.1.134.87.4.1.1.5.1.2.1.2.1', u'oid_name=pcuInfo3', u'oid_val='], [u'oid_num=1.3.6.1.4.1.134.87.4.1.1.3.1.2.0', u'oid_name
root 4660 0.0 0.0 173104 4904 ? S 04:22 0:04 python /opt/pcaptools/waas_brewery/waas_brewery/packet_harvester.py -i eth8 --hopper localhost:50131
root 4664 5.5 11.1 3976820 1373520 ? Sl 04:22 43:10 python /opt/pcaptools/waas_brewery/waas_brewery/packet_harvester.py -i eth5 --hopper localhost:50121
root 4677 5.1 17.2 4202460 2118180 ? Dl 04:22 39:50 python /opt/pcaptools/waas_brewery/waas_brewery/packet_harvester.py -i eth2 --hopper localhost:50102
root 4678 5.0 11.1 4032188 1367740 ? Sl 04:22 39:14 python /opt/pcaptools/waas_brewery/waas_brewery/packet_harvester.py -i eth6 --hopper localhost:50122
root 4679 3.6 7.1 2946204 876932 ? Rl 04:22 27:48 python /opt/pcaptools/waas_brewery/waas_brewery/packet_harvester.py -i eth9 --hopper localhost:50132
root 4680 6.1 25.6 4397232 3152880 ? Sl 04:22 47:32 python /opt/pcaptools/waas_brewery/waas_brewery/packet_harvester.py -i eth4 --hopper localhost:50112
root 31170 5.6 0.2 199
@jhaubrich
jhaubrich / gist:10683576
Created April 14, 2014 21:21
sat maneuvers
jhaubrich@modok.waas.lab:/AppData/django_website/web/images/mcp git:(master) $ cat cre138/man/20051013182000.txt
ID = G6
GENERATION TIME = 2008/01/28 19:06:47
MAN. NUMBER = 473
MAN. DIRECTION = 4
START TIME = 2005/10/13 18:20:00.000
MAN. DURATION = 1650.000000
TANGENTIAL DV = 0.000000
NORMAL DV = 0.000028
RADIAL DV = -0.001144
@jhaubrich
jhaubrich / GUS_ID.py
Last active August 29, 2015 14:02
Atomize GUS receiver DATA
GUS_ID = {
94: dict(site='APC', location='Napa Valley, CA'),
98: dict(site='HDH', location=''),
102: dict(site='BRE', location=''),
106: dict(site='SZP', location=''),
118: dict(site='LTN', location=''),
194: dict(site='WBN', location='')}
@jhaubrich
jhaubrich / gist:c1bc34940bec62e328ac
Created June 16, 2014 20:09
This is what happens with you replace a docker image with a new image of the same name. It keeps the old image, moves the tag to point at the new image, and the running container continues to point at the old image.
MCP · (master) ⟩ docker images; docker ps ~/s/MCP
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
sog/mcp latest 37a694e7ca0e 3 weeks ago 489 MB
<none> <none> 3560e045ada2 7 weeks ago 489 MB
<none> <none> 5affacbae672 7 weeks ago 489 MB
<none> <none> bba7aff6f597 7 weeks ago 489 MB
<none> <none> 6e67e654bb4a 7 weeks ago 489 MB
<none> <none> 2cd914b12ec9 7 weeks ago 489 MB
<none> <none> eb6d36a5621b 7 weeks ago 489 MB
<none> <none> bc5d6787c2c8 7 weeks ago 489 MB