Skip to content

Instantly share code, notes, and snippets.

Avatar

Paul Fawkesley fawkesley

View GitHub Profile
View pos58.md
@fawkesley
fawkesley / change.md
Created Feb 7, 2020
change a booking date
View change.md

booking server:

select * from bookings where primary_email='<EMAIL>';

(write down the booking UUID, game UUID)

update bookings SET date='<DATE>', game_url='', sent_joining_instructions=false WHERE uuid = '<UUID>';
@fawkesley
fawkesley / utm_params_notes.md
Last active Jun 26, 2020
utm_medium / utm_source / utm_campaign
View utm_params_notes.md
  • utm_medium required - can be e.g. referral, social, email
  • utm_source is required - e.g. facebook.com
  • utm_campaign is optional e.g. june-giveaway

Use these utm_* parameters in these scenarios:

facebook ad (boosted post / ad)

@fawkesley
fawkesley / commands.sh
Last active Dec 16, 2019
SSH user / authorized keys
View commands.sh
export NEW_USER=exampleuser
export NEW_HOME=/home/$NEW_USER
sudo useradd $NEW_USER \
--home $NEW_HOME \
--create-home \
--shell /bin/bash \
--groups ssh
sudo passwd $NEW_USER
@fawkesley
fawkesley / .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"
@fawkesley
fawkesley / 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
@fawkesley
fawkesley / firefox.md
Last active Feb 14, 2019
Firefox profile addons and settings
View firefox.md
@fawkesley
fawkesley / 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.