Skip to content

Instantly share code, notes, and snippets.

View ewdurbin's full-sized avatar
🌮
eatin' tacos

Ee Durbin ewdurbin

🌮
eatin' tacos
View GitHub Profile
@ewdurbin
ewdurbin / 0-README.md
Last active August 29, 2015 14:05
GISTAGE OMG

gistage

Edit/manage gists, even with multiple files, in an editor of your choice.

Requirements

@ewdurbin
ewdurbin / subnetme.py
Last active August 29, 2015 14:05
subnetted
import sys
import itertools
from netaddr import IPNetwork
from netaddr import cidr_merge
AWS_RESERVED_IPS = 5
ALLOCATIONS = {
import io
class StringIteratorIO(io.IOBase):
def __init__(self, iterator):
io.IOBase.__init__(self)
self._iter = iterator
self._left = ''

Keybase proof

I hereby claim:

  • I am EWDurbin on github.
  • I am ewdurbin (https://keybase.io/ewdurbin) on keybase.
  • I have a public key whose fingerprint is 11CD 3DD9 8D7E 61C7 6D1A 3224 8815 9C24 830F 6F7E

To claim this, I am signing this object:

sudoer_groups:
kmadmin:
commands:
- "ALL=(ALL) NOPASSWD: ALL"
kissmetrics:
commands:
- "ALL = NOPASSWD: /bin/su - km-legacy"
@ewdurbin
ewdurbin / example.py
Last active December 22, 2015 09:19
decorator for a flask route to disable based on missing environment configuration
from flask import Blueprint, jsonify
from utils import env_check
import os
import hipchat
ANNOY_HIPCHAT_TOKEN = os.environ.get('ANNOY_HIPCHAT_TOKEN')
annoy = Blueprint('annoy', __name__)
url = require('url')
querystring = require('querystring')
component_name = (organization_id, component_id) ->
http.get("http://#{organization_id}.statuspage.io/index.json", (res) ->
payload = JSON.parse res.body.payload
component_name_str = ""
components = payload.components
@ewdurbin
ewdurbin / scrape.py
Created October 19, 2012 17:37
Cheap RAM
#!/usr/bin/env python
import requests
from pyquery import PyQuery as pq
results = []
for page in range(1,6):
url = 'http://stores.ebay.com/IT-Creations-inc/_i.html?rt=nc&_nkw=dell%2010600R&_pgn=' + str(page)
r = requests.get(url)
d = pq(r.text)
@ewdurbin
ewdurbin / bofhtar.sh
Created July 25, 2012 03:00
zomg/ compression
#!/bin/bash
compress()
{
find $1 -type d > foo
echo "files" >> foo
for file in `find $1 -type f`; do
size=$(ls -l $file | awk '{print $5}')
echo -e "$size\t$file" >> foo
done