Skip to content

Instantly share code, notes, and snippets.

View astraw's full-sized avatar

Andrew Straw astraw

View GitHub Profile
@astraw
astraw / beep.py
Created March 11, 2013 22:02
Simple pushover.net notifier
#!/usr/bin/env python
import httplib, urllib
import argparse
def main():
parser = argparse.ArgumentParser(
description='send pushover.net notification')
parser.add_argument('note', metavar='note', default=['(no note)'], nargs='*')
args = parser.parse_args()
@astraw
astraw / Dockerfile
Created November 18, 2013 21:41
stdeb quickstart: This uses docker ( http://docker.io ) to create an IPython notebook pre-configured to build a Debian source package. See the comments at the top of the Dockerfile for further instructions.
# Build this docker image with:
#
# sudo docker build .
#
# Take note of the <image_id>, which will be the output above in the
# form "Successfully built <image_id>". Now, run the IPython web
# notebook with:
#
# sudo docker run -p 8889:8889 <image_id>
#
# Build this docker image with:
#
# sudo docker build .
#
# Take note of the <image_id>, which will be the output above in the
# form "Successfully built <image_id>". Now, run the IPython web
# notebook with:
#
# sudo docker run -p 8889:8889 <image_id>
#
{
"metadata": {
"name": "Zar birds two-way ANOVA"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
@astraw
astraw / hook-dns-01-lets-encrypt-route53.py
Created February 18, 2018 14:24
Python 3 script to use as a hook for the letsencrypt.sh client
#!/usr/bin/env python3
# How to use:
#
# LE_HOSTED_ZONE=XXXXXX LE_AWS_PROFILE=dns-access ./letsencrypt.sh --cron --domain example.org --challenge dns-01 --hook /tmp/hook-dns-01-lets-encrypt-route53.py
#
# More info about letsencrypt.sh: https://github.com/lukas2511/letsencrypt.sh/wiki/Examples-for-DNS-01-hooks
# Using AWS Profiles: http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html#cli-multiple-profiles
# Obtaining your Hosted Zone ID from Route 53: http://docs.aws.amazon.com/cli/latest/reference/route53/list-hosted-zones-by-name.html
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.