Skip to content

Instantly share code, notes, and snippets.

View ScottJWalter's full-sized avatar
🔮
Particle. Wave. It's all data.

Scott J. Walter ScottJWalter

🔮
Particle. Wave. It's all data.
View GitHub Profile
@ScottJWalter
ScottJWalter / git-cherry-pick-forks.md
Created February 1, 2026 17:53 — forked from jrussellsmyth/git-cherry-pick-forks.md
How to Cherry pick commits across forks

Cherry picking commits across forks

When working with forks in Git, you may need to pull specific commits from one fork to another. This can be useful when you want to include a specific change from one fork to another without merging the entire branch.

From another fork to your fork

From your fork to another fork

From another fork to your fork

  1. Identify the commit hash(es) of the commit(s) you want to cherry-pick. You can find this hash on GitHub or by using git log after fetching.
@ScottJWalter
ScottJWalter / enable-adb-port-for-wsl2.ps1
Created January 15, 2026 18:18 — forked from Steakeye/enable-adb-port-for-wsl2.ps1
Setup ADB on WSL and the Windows host so you can connect to the Android device from WSL
netsh advfirewall firewall add rule name="ADB WSL2: Open Port 5037" dir=in action=allow protocol=TCP localport=5037 remoteip=172.16.0.0/12 profile=domain,private
@ScottJWalter
ScottJWalter / set-terminal-window-name.sh
Created October 18, 2025 20:57
Set Terminal Window name in ZSH + OMZ
#!/bin/sh
.
.
.
# In .zshrc after OMZ initialization, so towrads the bottom
title() {
echo -ne '\033]0;'"$(hostname)"'\a'
}
# Then in precmd/preexec or manually
@ScottJWalter
ScottJWalter / portainer-admin-reset.sh
Created October 7, 2025 15:13
Reset portainer admin password
#!/bin/sh
# pass the id of the container in on the command line
PORTAINER_CONTAINER_ID=$1
docker stop $PORTAINER_CONTAINER_ID
docker pull portainer/helper-reset-password
docker run --rm -v portainer_data:/data portainer/helper-reset-password
@ScottJWalter
ScottJWalter / ghcreate.sh
Created August 7, 2025 10:54
create upstream repo from current folder
# create upstream repo from current folder
# optional params allow for alternate repo name, private repo, and auto-push (in order)
export GITHUB_AUTO_PUSH="--push"
gh repo create [alternate-upstream-name] [--private] --source=. --remote=${GITHUB_DEFAULT_REMOTE:-origin} ${GITHUB_AUTO_PUSH:-[--push]
git config --global alias.ghcreate '!f() {
REPO_NAME=${1:-$(basename $(pwd))}
REMOTE_NAME=${2:-origin}
##
# Copyright (c) 2020 Valentin Weber
#
# After some minor modifications (as marked below) this EventGhost
# Python script provides a method to send requests to devices
# registered with the Join API <https://joaoapps.com/join/api/> from
# any EventGhost Python Script or Command.
#
# EventGhost usage: `eg.globals.JoinPushDevice(text="hello_world")`
##
@ScottJWalter
ScottJWalter / update-docker-rpi.bash
Last active April 20, 2025 22:06
Install 32-bit docker on rpi (3, etc.)
#!/bin/bash
set -e
########################################
# 🧭 Configuration #
########################################
ARCH="$(dpkg --print-architecture)"
VERSION_CODENAME="$(grep -oP '(?<=\bVERSION_CODENAME=)[^;]+' /etc/os-release)"
URL="https://download.docker.com/linux/raspbian/dists/${VERSION_CODENAME}/pool/stable/${ARCH}/"
@ScottJWalter
ScottJWalter / move-rpi-keys.bash
Created April 20, 2025 18:26
Move Raspberry pi keys from the deprecated 'apt-key' method
#!/bin/bash
sudo mkdir /etc/apt/trusted.gpg.d
sudo apt-key export 90FDDD2E | sudo gpg --dearmour -o /etc/apt/trusted.gpg.d/raspbian.public.gpg
sudo apt-key export 7FA3303E | sudo gpg --dearmour -o /etc/apt/trusted.gpg.d/raspberrypi.gpg
rm -rf /etc/apt/trusted.gpg
rm -rf /etc/apt/trusted.gpg~
@ScottJWalter
ScottJWalter / cmatrix.c
Created April 16, 2025 16:55 — forked from gvanem/cmatrix.c
Matrix clone in C
/*
* "Bleh" -- a "potato-friendly" cmatrix clone.
*
* Screenshot: https://i.imgur.com/dt6RmU7.png
*
* Adapted to Windows from:
* https://www.reddit.com/r/commandline/comments/1jcnyht/bleh_a_potatofriendly_cmatrix_clone/
*/
#include <stdio.h>
#include <stdlib.h>