Skip to content

Instantly share code, notes, and snippets.

View jason-kane's full-sized avatar

Jason Kane jason-kane

View GitHub Profile
@jason-kane
jason-kane / JCVD Movie List 2021
Created April 1, 2021 17:06
JCVD Movie List 2021
2019 We Die Young
2018 The Bouncer
2018 Black Water
2018 Kickboxer: Retaliation
2017 Kill 'Em All
2016 Kickboxer: Vengeance
2016 Kung Fu Panda3
2015 Jian Bing Man
2015 Pound of Flesh
2014 Soldiers
@jason-kane
jason-kane / .bash_prompt
Created April 3, 2018 18:31
Bash prompt with git branch and k8s context/namespace
#!/bin/bash
#
# DESCRIPTION:
#
# Set the bash prompt according to:
# * the active virtualenv
# * the branch of the current git/mercurial repository
# * the return value of the previous command
#
# USAGE:

Keybase proof

I hereby claim:

  • I am jason-kane on github.
  • I am jkane (https://keybase.io/jkane) on keybase.
  • I have a public key ASBnouHuqyQILFl__YV0N7CiQGzoa46uesjFLesmoNQhSgo

To claim this, I am signing this object:

#!/usr/bin/env python
"""
tnemyolped <deployment name>
"""
import docopt
import sh
import sys
import yaml
@jason-kane
jason-kane / docker_compose_fixnet.py
Created January 9, 2018 21:23
gross hackage to find an available subnet for docker-compose and smash it into the yaml
#!/usr/bin/env python3
import yaml
import docopt
import sh
import json
BLACKLIST = [24, 25, 26]
SKIP = ["host", "none"]
#!/usr/bin/python3
import sh
import re
HUMANS = ['jkane', 'djames', 'mkirk']
def clean_passwd(h, humans):
clean = []
#!/usr/bin/python3
import sys
# blacklist of humans to be removed from /etc/passwd, /etc/group and /etc/shadow
HUMANS = ['jkane', 'djames']
def clean_passwd(h, humans):
clean = []
for row in h:
@jason-kane
jason-kane / list_of_birds.txt
Created September 22, 2016 19:52
Bird names
accentor
adjutant
albatross
alethe
anhinga
ani
antbird
antpitta
antshrike
antthrush
@jason-kane
jason-kane / kssh
Created June 27, 2016 18:17
Shell wrapper for exec-ing into a kubernetes container with friendly terminal settings
#!/bin/sh
if [ "$1" = "" ]; then
echo "Usage: kshell <pod>"
exit 1
fi
COLUMNS=`tput cols`
LINES=`tput lines`
TERM=xterm
kubectl exec -i -t $@ env COLUMNS=$COLUMNS LINES=$LINES TERM=$TERM bash
@jason-kane
jason-kane / epollreactor.py
Created August 28, 2015 17:01
hacked up epollreactor for diagnostics
def doPoll(self, timeout):
"""
Poll the poller for new events.
"""
if timeout is None:
timeout = -1 # Wait indefinitely.
try:
# Limit the number of events to the number of io objects we're
# currently tracking (because that's maybe a good heuristic) and