Skip to content

Instantly share code, notes, and snippets.

View kalefranz's full-sized avatar

Kale Franz kalefranz

  • Anaconda, Inc.
  • Austin, TX
View GitHub Profile
@kalefranz
kalefranz / enum.py
Created May 5, 2015 21:45
Extended Python Enum
"""The Enum class here is a python27 port of the python34 Enum, but extended with extra
functionality.
TODO: The API should be a strict superset of the python34 Enum.
"""
from transcomm.common.crypt import as_base64, from_base64
@kalefranz
kalefranz / s3.py
Last active August 29, 2015 14:20
boto s3 wrapper
import time
import uuid
from boto.exception import S3ResponseError
from boto.s3.connection import S3Connection
from boto.s3.key import Key
def create_key():
return str(time.time()) + '-' + uuid.uuid4().hex
@kalefranz
kalefranz / keybase.md
Created November 8, 2015 03:25
Keybase proof

Keybase proof

I hereby claim:

  • I am kalefranz on github.
  • I am kalefranz (https://keybase.io/kalefranz) on keybase.
  • I have a public key whose fingerprint is 19EC 56B9 63DF F1EA 529B 9508 B2BF 5972 608A D308

To claim this, I am signing this object:

@kalefranz
kalefranz / contracting_software.md
Created May 13, 2013 19:56
Processes for Contracting Software Development

Contracting Software Development

Core Assertion: The company owns the code, not the contractor.

If you're a contractor, why wouldn't you want to keep the actual source to yourself? You lock the company your contacting for into using your services in perpetuity. Good for the contractor; very bad for the company. My guess is that less-than-compentant and more "old school" contractors who aren't able to keep up with technology's pace will push this tactic for their own job security. But the contractor lock-in prevents the company from moving forward with their product using another contractor if the relationship sours with the current contractor. It also prevents the company from transitioning away from contract work to an in-house development team.

The rest of this document contains steps necessary to have the best chance for getting quality code from a contractor. I would consider each item mandatory. There are also plenty of "nice to haves," but I want to keep th

@kalefranz
kalefranz / config
Created December 18, 2015 13:31
SSH config for proxy
Host 10.32.*.* *.usw2.domain.site !10.32.220.14 !bastion.usw2.domain.site
ServerAliveInterval 60
TCPKeepAlive yes
ProxyCommand ssh -q -A username@10.32.220.14 nc %h %p
ControlPersist 15m
User username
IdentityFile ~/.ssh/my_key
ControlMaster auto
ControlPath ~/.ansible/ansible-ssh-%h-%p-%r
StrictHostKeyChecking no
Verifying that +kalefranz is my blockchain ID. https://onename.com/kalefranz
@kalefranz
kalefranz / strip_tokens.py
Last active August 22, 2017 16:36
Strip binstar tokens
import glob
import json
import os
import re
import shutil
import sys
def split_anaconda_token(url):
"""
Examples:
@kalefranz
kalefranz / ledenet_ufo.py
Created August 24, 2017 08:22
Simple python driver for the LEDENET Magic UFO LED WiFi Controller
# -*- coding: utf-8 -*-
#
# Simple python driver for the LEDENET Magic UFO LED WiFi Controller
#
# License: 3-Clause BSD
# Copyright 2017 Kale J. Franz
#
# Redistribution and use in source and binary forms, with or without modification, are permitted
# provided that the following conditions are met:
#
@kalefranz
kalefranz / ansible_style_guide.md
Created December 18, 2015 06:20
Ansible Style Guide