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 rebuild.sh
service monit stop
service sks stop
# obliterate existing database
rm -rf /var/lib/sks/{DB,PTree,berkeley_db.active}
# get dump from generously hosted stueve.us
mkdir ~/keydump && cd ~/keydump
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
View google-analytics.html
<script>
var dnt = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
if (dnt != "1" && dnt != "yes") {
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-XXXXXXXX-X', 'auto');
ga('set', 'anonymizeIp', true);
View apt-key-add-from-fingerprint.md

Apt-key add from key fingerprint

$ sudo apt-key adv --keyserver pool.sks-keyservers.net --recv-key 0xDBA36B5181D0C816F630E889D980A17457F6FB06
View mkdir_p.py
import os
def mkdir_p(directory):
if not os.path.isdir(directory):
os.makedirs(directory)
return directory
View organise-cctv
#!/bin/sh -eu
PATH=/bin:/usr/bin
DIR=/media/seagate_250gb/cameras/front
USER="camera-front"
cd_to_directory() {
cd "$DIR"
}