Instantly share code, notes, and snippets.

View fksync.sh
#!/bin/sh -eu
# fksync
#
# This scripts keeps your PGP keys in sync with your team by:
#
# 1. periodically uploading your key to the keyservers
# 2. periodically downloading their keys from the keyservesr
#
# Note: it can't handle *new* team members. You'll need to get their key the
View firefox.md
View hockeypuck-supervisor.conf
# /etc/supervisor/conf.d/hockeypuck-supervisor.conf
# Do `service supervisor reload` then start/stop with `supervisorctl start hockeypuck`
[program:hockeypuck]
user=hockeypuck
directory=/home/hockeypuck
command=/home/hockeypuck/bin/hockeypuck -config /home/hockeypuck/etc/hockeypuck/hockeypuck.conf
redirect_stderr=true
autorestart=true
startsecs=10
View pre-commit
#!/bin/sh -u
# Install this into ~/.githooks/pre-commit
#
# Make it executable:
# > chmod +x ~/.githooks/pre-commit
#
# Configure git to point at your hooks directory
# > git config --global core.hooksPath ~/.githooks
#
View install.md

Prerequisites

  • A full backup of /home/paul using backintime

Install Ubuntu

  • Choose "Something else" to enter the partitioning tool

  • Select "use the advanced partitioning tool for more control"

View irssi.md

irssi cheat sheet

These commands configure a network (e.g. freenode) with servers (e.g. irc.freenode.net) and channels (e.g. #doesliverpool).

Once configured you can just /connect <network> and everything happens automatically.

Add Freenode network

/network add -autosendcmd "/^msg nickserv identify <password>" freenode

View yealink_t20.md
View expirybot notes.md

keyserver-c.expirybot.com

  • AKA keyserver.paulfurley.com

  • running sks-1.1.6

  • running github.com/paulfurley/expirybot via cron

  • only recon port, no public PKS queries

  • peered with other keyservers & keyserver-b.expirybot.com

keyserver-b.expirybot.com

View requests_wrapper.py
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(
View Makefile
# Put *unversioned* requirements in `requirements-to-freeze.txt` as described below.
# `requirements.txt` will be automatically generated from `pip freeze`
# https://www.kennethreitz.org/essays/a-better-pip-workflow
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