Skip to content

Instantly share code, notes, and snippets.


Giles Thomas gpjt

View GitHub Profile
gpjt /
Last active Oct 25, 2020
Sample acme code to get a certificate from Let's Encrypt
# There's a lack of sample code for acme/Let's Encrypt out there, and
# this is an attempt to at least slightly remedy that. It's the result
# of my first day's hacking on this stuff, so almost certainly contains
# errors and oversights.
# It's not designed to be specifically useful if what you want is
# just a cert -- certbot or dehydrated are better for that. It is sample
# code for people who are building automated systems to deal with large
# numbers of Let's Encrypt certificates to play with.
import subprocess
print(subprocess.check_output(["pip", "install", "--user", "aafigure"]))
import mechanize
import getpass
import time
import os
def reload(username=None, password=None, domain=None):
if username is None:
username = raw_input('Username: ')
import subprocess
subprocess.check_call("git clone", shell=True)
import sys
import threadify.threadify_examples
gpjt /
Last active Dec 15, 2015
Loading CSVs as tuples
def load_file(filename):
fp = open(filename, 'Ur')
data_list = []
for line in fp:
return data_list
def save_file(filename, data_list):
fp = open(filename, 'w')
gpjt /
Last active Dec 10, 2015
Test gist
print "Hello, gistworld!"
gpjt /
Created Sep 5, 2012 — forked from hjwp/
Draft blog post on the switch from apache to nginx/uwsgi

Beloved users, and whomever else may find it of interest,

We recently made the switch from nginx to uwsgi. Well, I say recently, as far as I can tell from the commit logs we started work on it around July 10th, so that's fully six weeks ago. We just deployed it this week, and after a bumpy first few days it seems to be settling in well. We thought we'd share why we switched, and how it's going.


You can’t perform that action at this time.