Skip to content

Instantly share code, notes, and snippets.

View kbingham's full-sized avatar

Kieran Bingham kbingham

View GitHub Profile
@kbingham
kbingham / rpi4-usb.sh
Last active February 25, 2021 14:44 — forked from ianfinch/rpi4-usb.sh
Raspberry Pi 4 USB Gadget
#!/bin/bash
# Set up a Raspberry Pi 4 as a USB-C Ethernet Gadget
# Based on:
# - https://www.hardill.me.uk/wordpress/2019/11/02/pi4-usb-c-gadget/
# - https://pastebin.com/VtAusEmf
if ! $(grep -q dtoverlay=dwc2 /boot/config.txt) ; then
echo "Add the line dtoverlay=dwc2 to /boot/config.txt"
exit
fi
@kbingham
kbingham / noscript-tracking.go
Created May 7, 2019 08:18 — forked from wybiral/noscript-tracking.go
Tracking cursor position in real-time with remote monitoring (without JavaScript)
// Tracking cursor position in real-time without JavaScript
// Demo: https://twitter.com/davywtf/status/1124146339259002881
package main
import (
"fmt"
"net/http"
"strings"
)
@kbingham
kbingham / eth.network
Created July 11, 2017 08:39 — forked from kylemanna/eth.network
How to prevent systemd-networkd from breaking nfsroots
# /etc/systemd/network/eth.network
# Pass nfsroot=... on the kernel command line as you'd expect
[Match]
Name=eth*
KernelCommandLine=!nfsroot
[Network]
DHCP=v4
[DHCPv4]
@kbingham
kbingham / ignorelist
Last active August 30, 2015 08:48 — forked from rubo77/ignorelist
This ignorelist can be used to backup your home folder without useless folders and files, see http://askubuntu.com/a/545676/34298
#These directories may be excluded:
# contains mounted file systems
.gvfs
.local/share/gvfs-metadata
# contains the actual encrypted home directory
.Private
# session-specific
.dbus
.cache
@kbingham
kbingham / officespace
Last active January 29, 2016 10:41 — forked from anonymous/officespace
#!/bin/sh
launchonce() {
app=`basename $1`
pidof $app >/dev/null && echo "$app is already running" || $1 &
}
launchonce_alt() {
pidof $2 >/dev/null && echo "$1 is already running" || $1 &
}