Skip to content

Instantly share code, notes, and snippets.

Avatar

Jamie Counsell jamiecounsell

View GitHub Profile
View sudo.py
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 Jan 5, 2021
Let's Encrypt Auto-Renewal using the Webroot Plugin (Nginx)
View le-renew-webroot
#!/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 Jan 22, 2015
Python version of Nicki Minaj's hit song "Anaconda". Credits to Jamie Counsell (http://jamiecounsell.me) for the idea.
View anaconda.py
try:
import buns
except ImportError:
print "My Anaconda don't."