Skip to content

Instantly share code, notes, and snippets.

@xaf
xaf / check_failovers.py
Last active August 30, 2019 19:33
Script to check failover approaches between DynECT & Route53
#!/usr/bin/env python3
import argparse
import json
def parse_args():
parser = argparse.ArgumentParser()
weights_group = parser.add_mutually_exclusive_group(required=True)
weights_group.add_argument('--weights', type=str, nargs=2, action='append')
#!/bin/bash
if [ "$#" -lt 2 ]; then
echo "usage: $0 <git directory> <user name>" 1>&2
exit 1
fi
cd "$1"
git log --author="$2" --numstat --pretty=format:'%h' | \
@xaf
xaf / test.py
Created February 11, 2017 18:19
#!/usr/bin/env python
import StringIO
import tarfile
tar = tarfile.open("test.tgz","w:gz")
string = StringIO.StringIO()
string.write("hello")
string.seek(0)