Skip to content

Instantly share code, notes, and snippets.

View jamiecounsell's full-sized avatar

Jamie Counsell jamiecounsell

View GitHub Profile
import sys, marshal, functools, subprocess
child_script = """
import marshal, sys, types;
fn, args, kwargs = marshal.load(sys.stdin)
marshal.dump(
types.FunctionType(fn, globals())(*args, **kwargs),
sys.stdout)
"""
@thisismitch
thisismitch / le-renew-webroot
Last active January 5, 2021 15:20
Let's Encrypt Auto-Renewal using the Webroot Plugin (Nginx)
#!/bin/bash
web_service='nginx'
config_file="/usr/local/etc/le-renew-webroot.ini"
le_path='/opt/letsencrypt'
exp_limit=30;
if [ ! -f $config_file ]; then
echo "[ERROR] config file does not exist: $config_file"
@mistryrn
mistryrn / anaconda.py
Created January 22, 2015 01:12
Python version of Nicki Minaj's hit song "Anaconda". Credits to Jamie Counsell (http://jamiecounsell.me) for the idea.
try:
import buns
except ImportError:
print "My Anaconda don't."