Skip to content

Instantly share code, notes, and snippets.

Paul Fawkesley paulfurley

Block or report user

Report or block paulfurley

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
paulfurley /
Last active Oct 11, 2018
Yealink T20 VoIP phone setup notes
paulfurley / expirybot
Last active Sep 15, 2018
Rebuild sks keyserver 1.1.6 on debian
View expirybot

  • AKA

  • running sks-1.1.6

  • running via cron

  • only recon port, no public PKS queries

  • peered with other keyservers &

paulfurley /
Last active May 30, 2018
Wrapper for python requests providing session and user agent
import requests
class RequestsWrapper():
def __init__(self, user_agent):
self._session = requests.Session()
self._user_agent = user_agent
def get(self, *args, **kwargs):
headers = requests.structures.CaseInsensitiveDict(
paulfurley / Makefile
Last active May 17, 2019
Makefile for activating a virtualenv and installing requirements. Uses requirements-to-freeze.txt / requirements.txt pattern
View Makefile
# Put *unversioned* requirements in `requirements-to-freeze.txt` as described below.
# `requirements.txt` will be automatically generated from `pip freeze`
venv/bin/activate: requirements-to-freeze.txt
rm -rf venv/
test -f venv/bin/activate || virtualenv -p $(shell which python3) venv
. venv/bin/activate ;\
pip install -Ur requirements-to-freeze.txt ;\
pip freeze | sort > requirements.txt
paulfurley / google-analytics.html
Last active Oct 1, 2019
Google Analytics that respects Do-Not-Track header
View google-analytics.html
var dnt = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
if (dnt != "1" && dnt != "yes") {
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
ga('create', 'UA-XXXXXXXX-X', 'auto');
ga('set', 'anonymizeIp', true);
paulfurley /
Last active Mar 17, 2018
Safer `apt-key add` based on a key fingerprint

Apt-key add from key fingerprint

$ sudo apt-key adv --keyserver --recv-key 0xDBA36B5181D0C816F630E889D980A17457F6FB06
paulfurley /
Created Jan 27, 2018
Python `mkdir -p` equivalent
import os
def mkdir_p(directory):
if not os.path.isdir(directory):
return directory
paulfurley / organise-cctv
Last active Jan 24, 2018
/etc/cron.hourly/organise-cctv on cctv-server
View organise-cctv
#!/bin/sh -eu
cd_to_directory() {
cd "$DIR"
View cron-wrap
#!/bin/sh -u
LOG_FILE="${HOME}/log/$(date --iso-8601=seconds).log"
touch "${LOG_FILE}"
$1 "$@" >> ${LOG_FILE} 2>&1
paulfurley /
Created Dec 11, 2017
Let's Encrypt / nginx / webroot notes

/etc/nginx/sites-enabled/www.paulfurley.com_HTTP :

server {                                                                        
  listen 80;                                                                    
  listen  [::]:80;                                                              
  location /.well-known/acme-challenge/ {                                       
    # For the letsencrypt "webroot" plugin                                      
You can’t perform that action at this time.