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
paulfurley / randomize-mac-addresses.sh
Last active Aug 20, 2019
In Ubuntu 16.04, randomize WiFi MAC addresses with a daily rotation - /etc/NetworkManager/dispatcher.d/pre-up.d/randomize-mac-addresses.sh
View randomize-mac-addresses.sh
#!/bin/sh
# /etc/NetworkManager/dispatcher.d/pre-up.d/randomize-mac-addresses.sh
# INSTALL
#
# > curl -L 'https://gist.github.com/paulfurley/46e0547ce5c5ea7eabeaef50dbacef3f/raw/56ee5dd5f40dec93b8f7438cbdeda5475ea3b5d2/randomize-mac-addresses.sh' |sudo tee /etc/NetworkManager/dispatcher.d/pre-up.d/randomize-mac-addresses.sh
# > sudo chmod +x /etc/NetworkManager/dispatcher.d/pre-up.d/randomize-mac-addresses.sh
# Configure every saved WiFi connection in NetworkManager with a spoofed MAC
@paulfurley
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`
# 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
@paulfurley
paulfurley / .gitconfig
Created Mar 11, 2019
.gitconfig snippet for nice `git log` showing signature status
View .gitconfig
[log]
date = relative
[format]
# https://mirrors.edge.kernel.org/pub/software/scm/git/docs/git-log.html#_pretty_formats
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
paulfurley / firefox.md
Last active Feb 14, 2019
Firefox profile addons and settings
View firefox.md
@paulfurley
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 https://blogs.gnome.org/thaller/2016/08/26/mac-address-spoofing-in-networkmanager-1-4-0/
# This randomize your MAC address for *new* connections
# Be sure to change your existing (saved) connections in
# /etc/NetworkManager/system-connections/*
@paulfurley
paulfurley / raid-1-luks.md
Created Jan 11, 2019
Raid-1 + LUKS encrypted filesystem
View raid-1-luks.md

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.
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
@paulfurley
paulfurley / yealink_t20.md
Last active Oct 11, 2018
Yealink T20 VoIP phone setup notes
View yealink_t20.md
@paulfurley
paulfurley / hockeypuck-supervisor.conf
Last active Sep 23, 2018
Installing Hockeypuck with PostgreSQL on
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
You can’t perform that action at this time.