Skip to content

Instantly share code, notes, and snippets.

View cscutcher's full-sized avatar

Chris Scutcher cscutcher

View GitHub Profile
class DirtyTemplateMeta(type):
'''
Metaclass for :class:`DirtyTemplate`
'''
def __new__(cls, name, bases, dct, *, template_bases=()):
new_cls = super().__new__(cls, name, bases, dct)
new_cls.template_dict = dct
new_cls.template_bases = template_bases
return new_cls
@cscutcher
cscutcher / keybase.md
Created February 2, 2019 17:09
keybase.md

Keybase proof

I hereby claim:

  • I am cscutcher on github.
  • I am cscutcher (https://keybase.io/cscutcher) on keybase.
  • I have a public key ASCXIQtcDLVsNO5vBfDUz_xst-CRQnv491P2AXecl5If0wo

To claim this, I am signing this object:

@cscutcher
cscutcher / openpgp.txt
Created June 2, 2018 22:44
OpenKeychain Linked Identity
This Gist confirms the Linked Identity in my OpenPGP key, and links it to this GitHub account.
Token for proof:
[Verifying my OpenPGP key: openpgp4fpr:2351ad620c3d83f2a5a562e17b8c6179aa1cd475]
@cscutcher
cscutcher / openpgp.txt
Last active June 2, 2018 22:43
OpenKeychain Linked Identity
This Gist confirms the Linked Identity in my OpenPGP key, and links it to this GitHub account.
Token for proof:
[Verifying my OpenPGP key: openpgp4fpr:2351ad620c3d83f2a5a562e17b8c6179aa1cd475]
@cscutcher
cscutcher / 1.generate_dockerignore.py
Last active May 17, 2018 18:37 — forked from wassname/1.generate_dockerignore.py
Convert .gitignore to .dockerignore: quick and dirty.
"""
Convert .gitignore to .dockerignore: quick and dirty.
This is a quick and dirty script to convert this:
`__pycache__/`
Into this:
```
__pycache__
*/__pycache__
@cscutcher
cscutcher / freeipa-dynamic-inventory.py
Last active June 2, 2017 07:27 — forked from devynspencer/freeipa.py
Use FreeIPA hostgroups as a dynamic inventory source for Ansible. Badass.
#!/usr/bin/env python2
"""
Shamelessly stolen from [davynspencer](https://gist.github.com/devynspencer)'s
[gist](https://gist.github.com/devynspencer/2bcca0a7654168ef454f/) with minor
modifications for freeipa 4.4.0
"""
import argparse
import json
from ipalib import api
@cscutcher
cscutcher / stmux
Last active August 29, 2015 14:20
My setup for tmux. Its all terrible hacked. Need to make a python module.
#!/bin/bash
tmux -S /tmp/tmux-shared $*