Skip to content

Instantly share code, notes, and snippets.

View jhaubrich's full-sized avatar

Jesse Haubrich jhaubrich

View GitHub Profile
@jhaubrich
jhaubrich / list_loop_over_copy.py
Created December 27, 2011 21:03 — forked from bjcubsfan/list_loop_over_copy.py
How to list over a copy of a loop
HA! You've been forked!
!/usr/bin/env python
import pdb
expected_rngs = range(0,10)
file_list = [0, 1, 2, 3, 4, 5, 6, 8, 9]
for antenna in expected_rngs[:]:
print "*********************************************************************"
@jhaubrich
jhaubrich / *27_4.py
Last active December 27, 2015 09:39 — forked from bjcubsfan/gust.py
{'src_node_id': 94, 'dst_serv_id': 27, 'src_seqn': 20, 'ip_dst': '225.1.3.5', 'site_name': 'waas_wapcgusp1c1', 'dst_node_id': 127, 'src_timestamp': 1383591358L, 'source': 'poc1', 'datagram_proto': 'nsns', 'timestamp': 1383591342.295468, 'ip_proto': 17, 'nsns_datetime': datetime.datetime(2013, 11, 4, 18, 55, 58), 'net': 1, 'payload': '\x00\x00\x00\x08\x00\x00\x00\x07A\xcf\xd1X\x1f\x19\x94\xf2A\xcf\xcc\x1d:\xff\xeaN\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00O\x00\x00\x00\x00\x00\x01\x00U\x00\x00\x00\x00\x00\x01\x00Z\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00_\x00\x00\x00\x00\x00\x00\x00\x00\x1e\xe2V\x88\x00\x
for f in $(find $1 -iname "*.wsp"); do
if [ -a $f ];
then /opt/graphite/bin/whisper-set-aggregation-method.py $f max;
fi;
done
#!/usr/bin/env zsh
print -n "Does the new linux and zfs-git use the same kernel verision?
https://www.archlinux.org/packages/core/x86_64/linux/
https://aur.archlinux.org/packages/zfs-git/
"
read -q REPLY
if [[ $REPLY == "y" ]] ; then
set -x

Things that programmers don't know but should

(A book that I might eventually write!)

Gary Bernhardt

I imagine each of these chapters being about 2,000 words, making the whole book about the size of a small novel. For comparison, articles in large papers like the New York Times average about 1,200 words. Each topic gets whatever level of detail I can fit into that space. For simple topics, that's a lot of space: I can probably walk through a very basic, but working, implementation of the IP protocol.

@jhaubrich
jhaubrich / emacs-email-setup.md
Last active August 29, 2015 14:25 — forked from areina/emacs-email-setup.md
Manage your email in emacs with mu4e

Manage your gmail account in emacs with mu4e

There're a lot of combinations to manage your email with emacs, but this works for me. I've a backup and I can manage my daily email.

The stack:

  • emacs
  • offlineimap
  • mu
  • mu4e

ert

(ert-deftest foo ()
  (assert nil))

Now: M-x ert RET foo RET

apropos

Emacs makes discovery easier.

@jhaubrich
jhaubrich / zillow.py
Created January 15, 2021 17:52 — forked from scrapehero/zillow.py
Python 3 script to find real estate listings of properties up for sale on zillow.com
from lxml import html
import requests
import unicodecsv as csv
import argparse
import json
def clean(text):
if text:
return ' '.join(' '.join(text).split())