Skip to content

Instantly share code, notes, and snippets.

View stpettersens's full-sized avatar

Sam Saint-Pettersen stpettersens

View GitHub Profile
@stpettersens
stpettersens / update-brave-void.sh
Last active October 27, 2025 14:35
Update Brave browser on a Void Linux system (makes use of xdeb tool and Brave Debian package releases).
#!/usr/bin/env bash
# Update Brave browser on a Void system.
install_latest_brave_deb() {
# Get machine architecture.
local arch
arch=$(uname -m)
if [ "$arch" == "x86_64" ]; then
arch="amd64"
elif [ "$arch" == "aarch64" ]; then
@stpettersens
stpettersens / fix-hang-rescuezilla.sh
Created September 17, 2025 17:17
Fix hanging on 'os-prober' for Rescuezilla
#!/bin/sh
killall -9 grub-mount
@stpettersens
stpettersens / rotten_tomatoes_links_for_jellyfin-2025-09-07.user.js
Last active October 25, 2025 19:23
Rotten Tomatoes Links for Jellyfin user script (my instance).
@stpettersens
stpettersens / Rotten Tomatoes Links-2025-09-07.user.js
Last active September 15, 2025 15:55
Rotten Tomatoes Links for Jellyfin user script.
@stpettersens
stpettersens / copyparty
Last active July 28, 2025 23:43
Copyparty OpenRC service
#!/sbin/openrc-run
# This will start `/usr/local/bin/copyparty-sfx`
#
# Installation:
# cp -pv copyparty /etc/init.d && rc-update add copyparty
#
# You may want to:
# change '/usr/bin/python3' to another interpreter
@stpettersens
stpettersens / copyparty-demo.sh
Last active July 28, 2025 23:38
Working with copyparty
#!/usr/bin/env bash
python3 /usr/local/bin/copyparty-sfx.py -i 127.0.0.1 -p 3923 --dedup -c /etc/copyparty.conf
# HTTPS configuration generated by certbot here
# ...
listen 80;
server_name copyparty.homelab.mydomain.com;
@stpettersens
stpettersens / KeyBindings.ahk
Last active June 13, 2025 20:34
Key binding script for AutoHotKey I use in conjunction with GlazeWM but will work independently of it, should I close GlazeWM.
^+a:: {
MsgBox "Key bindings are active."
Return
}
!Enter:: {
Run "wt.cmd"
Return
}
@stpettersens
stpettersens / genisoimage.cmd
Last active May 27, 2025 17:10
Thin wrapper command around genisoimage.exe from Cygwin x64.
@echo off
@C:\Dev\cygwin64\bin\genisoimage.exe %*
@stpettersens
stpettersens / thread_demo.d
Last active September 13, 2024 18:10
Demonstrate threads and signals in D (dlang).
// Demonstrate threads and signals in D (dlang).
import std.stdio;
import core.thread;
shared bool g_Running = true;
version(Windows) {
import core.sys.windows.windows;
extern(Windows) BOOL CtrlHandler(DWORD fdwCtrlType) nothrow {
@stpettersens
stpettersens / build-reicast-deb.sh
Last active May 1, 2020 14:25 — forked from bmaupin/build-reicast.sh
Build Reicast emulator on Ubuntu/Debian
# Install prerequisites
sudo apt-get -y install build-essential libasound2 libasound2-dev libegl1-mesa-dev libgl1-mesa-dev libgles2-mesa-dev mesa-common-dev libudev-dev
# Build Reicast
git clone https://github.com/reicast/reicast-emulator.git
cd reicast-emulator
git checkout master # Make sure on 'master' branch so will find the necessary subdir (not in alpha branch).
cd shell/linux
make
# Run Reicast