Skip to content

Instantly share code, notes, and snippets.

View stpettersens's full-sized avatar

Sam Saint-Pettersen stpettersens

View GitHub Profile
@stpettersens
stpettersens / Dockerfile.python
Last active December 4, 2025 00:31
Dockerfile to build Python 3.13.9 from source with an Alpine image.
# Dockerfile to build Python 3.13.9 from source with an Alpine image.
FROM alpine:latest
# Install build dependencies for python and git
RUN sed -i '2s/^# *//' /etc/apk/repositories
RUN apk update && apk add --no-cache build-base zlib-dev openssl-dev git
# Create python directory.
RUN mkdir -p /usr/build/python
WORKDIR /usr/build/python
@stpettersens
stpettersens / rc.xml
Last active November 4, 2025 16:15 — forked from downthecrop/rc.xml
A Better Aero Snap with Openbox
<!-- Window Tiling: Emulates Windows 7 Snap feature JASON CAVETT -->
<keybind key="W-J">
<action name="UnmaximizeFull"/>
<action name="MaximizeVert"/>
<action name="MoveResizeTo">
<width>50%</width>
</action>
<action name="MoveToEdgeWest"/>
</keybind>
<keybind key="W-L">
@stpettersens
stpettersens / dtc.openbox.conf
Created November 3, 2025 16:04 — forked from downthecrop/dtc.openbox.conf
Useful links for openbox/tint2/urxvt
Openbox
Tint2
Urxvt
lxappearance
breeze dark
for system-wide mouse configuration, one can edit /usr/share/icons/default/index.theme
tint2conf is the customizer
sudo xbps-query -Rs rxvt
@stpettersens
stpettersens / update-brave-void.sh
Last active November 3, 2025 16:07
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 November 12, 2025 17:46
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
}