Skip to content

Instantly share code, notes, and snippets.

View WillMoggridge's full-sized avatar

Will Moggridge WillMoggridge

View GitHub Profile
@WillMoggridge
WillMoggridge / anti-keygrabber.user.js
Last active March 31, 2016 12:34
Prevent websites stealing keyboard shortcuts I use all the time... Modified from https://gist.github.com/rodneyrehm/5213304.
// ==UserScript==
// @name anti key-grabber
// @description Prevent web apps from capturing and muting vital keyboard shortcuts
// @grant none
// @version 1.2
// ==/UserScript==
(function(){
var isMac = unsafeWindow.navigator.oscpu.toLowerCase().contains("mac os x");
unsafeWindow.document.addEventListener('keydown', function(e) {
@WillMoggridge
WillMoggridge / trello-user-cycle.user.js
Created June 8, 2016 10:47
trello-user-cycle.user.js
// ==UserScript==
// @name Trello - Next User
// @namespace [email protected]
// @include https://trello.com/b/*
// @version 1
// @grant none
// ==/UserScript==
window.addEventListener('load', function() {
id summary categories tags difficulty status
tutorial-guidelines
A summary tutorial description. Remember the content of it (as the title) is searchable. It should be around 26 words.
snapcraft
tutorial,guidelines,snap
2
Published
@WillMoggridge
WillMoggridge / _Firefox Tree Style Tab tweaks.md
Last active September 19, 2022 22:35
Firefox styling tweaks
@WillMoggridge
WillMoggridge / _design-ubuntu-localhost.md
Last active November 8, 2017 18:07
design.ubuntu.localhost - Kubernetes test config
@WillMoggridge
WillMoggridge / Caddyfile
Last active January 18, 2018 15:31
Caddy HTTPS proxy
localhost:8443
tls self_signed
#root build/
#rewrite / /es6-unbundled/index.html
proxy / http://localhost:8080 {
transparent
}
@WillMoggridge
WillMoggridge / maas-lxc.sh
Created January 25, 2018 12:23
maas lxc deploy
export name="xenial-maas"
lxc init -p maas ubuntu:16.04 "${name}"
lxc config set "${name}" raw.idmap "both $(id -u) 1000"
lxc config device add "${name}" maas-src disk source="$(pwd)" path=/src/maas
lxc start "${name}"
lxc exec "${name}" --env=HOME=/src/maas -- sudo --login --user ubuntu
@WillMoggridge
WillMoggridge / my-kittens-game-tweaks.user.js
Last active December 10, 2018 21:28
Kittens game tweaks
// ==UserScript==
// @name My Kittens Game tweaks
// @namespace https://gist.github.com/WillMoggridge/133c22444caaa4cc3f2a5536e9621a37
// @description Kittens!
// @include *bloodrizer.ru/games/kittens/*
// @version 1.0.0
// @grant none
// ==/UserScript==
@WillMoggridge
WillMoggridge / _k8s-cheat-sheet.sh
Last active May 3, 2018 13:12
Kubernetes cheat sheet
# This looks like a useful resource:
# https://gist.github.com/so0k/42313dbb3b547a0f51a547bb968696ba
# Kubetail looks useful for watching multiple node logs
# https://github.com/johanhaleby/kubetail
# List everything for app label - seems to list items twice and is a bit too wide (with -o wide)
kubectl get all -l app=a.website.com -o wide
# List pods related to app
@WillMoggridge
WillMoggridge / default.pa
Created July 29, 2020 18:29
PulseAudio settings
#!/usr/bin/pulseaudio -nF
.include /etc/pulse/default.pa
# Focusrite Scarlett 2i2 USB
load-module module-remap-source source_name=scarlett_1 source_properties="device.description='Scarlett 2i2 Channel 1'" remix=no master=alsa_input.usb-Focusrite_Scarlett_2i2_USB-00.analog-stereo channels=2 channel_map=left,right master_channel_map=left,left
load-module module-remap-source source_name=scarlett_2 source_properties="device.description='Scarlett 2i2 Channel 2'" remix=no master=alsa_input.usb-Focusrite_Scarlett_2i2_USB-00.analog-stereo channels=2 channel_map=left,right master_channel_map=right,right
# set-default-sink alsa_output.pci-0000_09_04.0.analog-stereo.monitor
# set-default-source scarlett_1