Skip to content

Instantly share code, notes, and snippets.

@teeberg
teeberg / circleci.py
Created January 8, 2016 23:19
CircleCI Command Line Helper
#!/usr/bin/env python
import os
import pprint
import subprocess
import sys
from optparse import make_option
from urllib import quote_plus
from urlparse import urljoin
import dateutil.parser
@teeberg
teeberg / keybase.md
Created December 27, 2016 21:22
keybase.md

Keybase proof

I hereby claim:

  • I am teeberg on github.
  • I am teeberg (https://keybase.io/teeberg) on keybase.
  • I have a public key ASAOEVMjPukgdgsoiB6pcgDzINW1COpCBP0wuQiWNDp9UQo

To claim this, I am signing this object:

@teeberg
teeberg / bashrc
Last active January 9, 2018 06:08
`eb ssh` wrapper to connect to Elastic Beanstalk while verifying SSH host keys using the instance's console output
function eb() {
if [[ $# > 0 && $1 == "ssh" ]]; then
"$(which eb)" ssh -e "$(which ebssh.py)" "${@:2}"
else
"$(which eb)" "$@"
fi
}
@teeberg
teeberg / circleci_2_0_cancel_redundant_builds.py
Last active October 4, 2019 16:32
CircleCI cancel redundant builds within workflows
import json
import logging
import os
import sys
from os.path import dirname, join
from time import sleep
sys.path.insert(0, join(dirname(__file__), '.env'))
import arrow
@teeberg
teeberg / it2check.py
Created August 5, 2019 09:36
Check whether running in iTerm2 under Python (Translated `it2check` utility)
# coding=utf-8
from __future__ import absolute_import, division, print_function, unicode_literals
import sys
import termios
def csi(num):
"""
Control Sequence Introducer