Skip to content

Instantly share code, notes, and snippets.

View gbraad's full-sized avatar
Working from home

Gerard Braad gbraad

Working from home
View GitHub Profile
gbraad /
Last active April 28, 2023 01:05 — forked from SkaTeMasTer/top-25-ssh-commands-tricks
25 Best SSH Commands / Tricks
  1. Copy ssh keys to user@host to enable password-less ssh logins.
ssh-copy-id user@host

To generate the keys use the command ssh-keygen

  1. Start a tunnel from some machine’s port 80 to your local post 2001
gbraad /
Created September 15, 2021 12:28 — forked from guillaumerose/
Microshift with podman machine

5 minutes to OpenShift on a Mac with podman machine and microshift.


  1. brew install podman
  2. podman machine init
  3. podman machine start
  4. podman machine ssh

(in the ssh session)

gbraad / flappy.html
Created December 1, 2020 12:28 — forked from gullyn/flappy.html
Flappy bird in 205 bytes (improved!)
View flappy.html
<body onload=z=c.getContext`2d`,setInterval(`c.width=W=150,Y<W&&P<Y&Y<P+E|9<p?z.fillText(S++${Y=`,9,9|z.fillRect(p`}*0,Y-=--M${Y+Y},P+E,9,W),P))):p=M=Y=S=6,p=p-6||(P=S%E,W)`,E=49) onclick=M=9><canvas id=c>
View sniff_nrf24.ino
#include "iface_nrf24l01.h" // from nrf24_multipro, also requires nrf24l01.ino
#include <stdarg.h>
//SPI Comm.pins with nRF24L01
#define MOSI_pin 3 // MOSI - D3
#define SCK_pin 4 // SCK - D4
#define CE_pin 5 // CE - D5
#define MISO_pin A0 // MISO - A0
#define CS_pin A1 // CS - A1
gbraad /
Created December 2, 2019 14:30 — forked from darrylsloan/
Music sequencer for the BBC micro:bit
# MUSIC SEQUENCER by Darryl Sloan (30/11/2017)
# Step 1: press A to toggle the first note of the desired scale, then B to select.
# Step 2: press A to toggle the time signature (3/4, 4/4 or 5/4), then B to select.
# Step 3: press A to toggle the desired number of patterns (1 to 4), then B to select.
# Press A to move the range of notes selected. Press B to randomise the selected notes.
# The direction of tilt determines which scale the random notes conform to:
# Left = minor; right = major; forward = minor pentatonic; backward = major pentatonic.
# While holding A during the first note of the sequence, tilting up/down increases/decreases the tempo,
# tilting left/right selects a lower/higher octave.
gbraad /
Created July 3, 2019 12:45 — forked from cerebrate/
Recompile your WSL2 kernel - support for snaps, apparmor, lxc, etc.

Recompile your WSL2 kernel - support for snaps, apparmor, lxc, etc.

Yes, I've done this, and yes, it works. It is, however, entirely unsupported and assembled through reasonable guesswork, so if you try this and it explodes your computer, brain, career, relationships, or anything else, you agree that you take sole responsibility for doing it, that I never claimed it was a good idea, and that you didn't get these instructions from me .

Also note: I have done this with Debian Stretch. While one kernel ought to fit all, some of the packages you need to build it may be different. Adapting to other distros is up to you.

Step One: Install the stuff you need to build the kernel

gbraad /
Created December 28, 2018 09:55 — forked from praveenkumar/
Minishift with Virtualbox
set +x
# Check if VirtualBox is installed
if [[ $(vboxmanage --version | head -c1 | wc -c) -eq 0 ]]; then
echo "Virtualbox is not installed on this system"
exit 1
gbraad / installerDump
Created October 22, 2018 13:50 — forked from praveenkumar/installerDump
Openshift Installer dump
View installerDump
bootstrap: 16GB HDD/2 CPUS/2GB Memory
master: 16GB HDD/2 CPUS/3GB Memory
test1-worker: unknown HDD/2 CPUS/2GB Memory
Time-Taken (on office-network)
View proxy.patch
@@ -46,10 +46,18 @@ func StartProxy(proxyPort int, proxyUpstreamAddr string) {
// set custom CA
setCA(minishiftTLS.CACert, minishiftTLS.CAKey)
+ f, err := goos.OpenFile("/tmp/proxy_access.log", goos.O_APPEND|goos.O_CREATE|goos.O_WRONLY, 0644)
+ if err != nil {
+ log.Fatal(err)
+ }
+ logger := log.New(f, "proxy", log.Lshortfile)
gbraad /
Last active June 19, 2022 15:02
How to get NDI output to work in CasparCG

How to get NDI output to work in CasparCG

  1. Install NewTek Network Video Send.exe
  2. Install NewTek NDI AirSend Updater.exe
  3. The AirSend Updater has a bug, and will not properly copy the x64 version of the DLL to the correct place. So, you'll need to manually copy C:\Program Files\NewTek\NewTek NDI AirSend Updater\Processing.AirSend.x64.dll to C:\Windows\System32\, overwriting the existing file.
  4. Restart your PC.
  5. Configure the CasparCG Server to use a Newtek iVGA output. Even though it says iVGA, it will actually be outputting NDI thanks to the updated AirSend DLLs.
  • You can do this manually by adding a `` consumer to your casparcg.config, or you can do it via the third-party [Caspar