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 17, 2019
SSH user / authorized keys
export NEW_USER=exampleuser
export NEW_HOME=/home/$USER
sudo useradd $NEW_USER \
--home $NEW_HOME \
--create-home \
--shell /bin/bash \
--groups ssh
sudo passwd $NEW_USER
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 Aug 20, 2019
In Ubuntu 16.04, randomize WiFi MAC addresses with a daily rotation - /etc/NetworkManager/dispatcher.d/pre-up.d/
# /etc/NetworkManager/dispatcher.d/pre-up.d/
# > curl -L '' |sudo tee /etc/NetworkManager/dispatcher.d/pre-up.d/
# > sudo chmod +x /etc/NetworkManager/dispatcher.d/pre-up.d/
# Configure every saved WiFi connection in NetworkManager with a spoofed MAC
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 / .gitconfig
Created Mar 11, 2019
.gitconfig snippet for nice `git log` showing signature status
View .gitconfig
date = relative
pretty = "%C(yellow)%h %C(blue)%<(50,trunc)%s %C(green)%<(8,trunc)%ad %C(reset)%ae%n%>(69,trunc)%C(magenta)%G? %GS%n%-b"
paulfurley /
Last active Feb 14, 2019
Firefox profile addons and settings
paulfurley / 30-randomize-mac-address.conf
Last active Jan 22, 2019
MAC address randomization in Ubuntu 17+ (>= 1.4.1): save to /etc/NetworkManager/conf.d/
View 30-randomize-mac-address.conf
# /etc/NetworkManager/conf.d/30-randomize-mac-address.conf
# REQUIRES NETWORK MANAGER >= 1.4.1 (Ubuntu Zesty and above)
# Thanks to
# This randomize your MAC address for *new* connections
# Be sure to change your existing (saved) connections in
# /etc/NetworkManager/system-connections/*
paulfurley /
Created Jan 11, 2019
Raid-1 + LUKS encrypted filesystem

make encrypted luks partition on raid-1 array from free space

  • use cfdisk /dev/sda to create a new partition in free space with type "Linux RAID"
  • repeat for /dev/sdb
  • cat /proc/mdstat to see what /dev/mdX device is next
$ mdadm --create --verbose /dev/md4 --level=1 --raid-devices=2 /dev/sda6 /dev/sdb6
View termtosvg-emoji.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#!/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
You can’t perform that action at this time.