Skip to content

Instantly share code, notes, and snippets.

View joshuaboniface's full-sized avatar
📺
The Jellyfin Admin is In

Joshua M. Boniface joshuaboniface

📺
The Jellyfin Admin is In
View GitHub Profile
@joshuaboniface
joshuaboniface / cross-lock-example.sh
Last active January 25, 2024 18:36
BASH cross-locking sequence script example
#!/usr/bin/env bash
##################################################################################################################
# An example of a cross-locking sequence script
#
# The purpose of this script is to provide a basic framework for what I'll call a "cross-locking sequence script".
# For example, let's take my usecase: you have a set of steps that need to be taken to shut down a complex server,
# and another (reversed) set of steps taken to bring up the server. This script could then be called by, for
# example, NUT (Network UPS Tools) based on UPS power state, and ensure you get a consistent shutdown/startup
# process.
@joshuaboniface
joshuaboniface / midi-rewriter-module.c
Last active May 10, 2023 05:01
STM32 Blackpill code for MIDI Rewriter Module (RB3 Pro Drums w/Alesis Strike Pro)
// Written with the Arduino IDE; to compile outside of the Arduino IDE, more includes would be required
#include <MIDI.h>
// Define GPIO pins
#define BUTTON PA5
#define LED_A PA6
#define LED_B PA7
#define LED_I PC13
@joshuaboniface
joshuaboniface / steam-headless-systemd.md
Last active March 28, 2024 23:25
Running Steam headless under Systemd

Initial setup guide:

https://steamcommunity.com/sharedfiles/filedetails/?id=680514371

Follow this first to get the basic manual session working.

I decided to take it one step further, and execute the whole thing from Systemd automatically on my server. This did require a bit of tweaking.

NOTE: In my usage, I named the user steam (not steamuser), it's in the group users, and its home directory is /var/home/steam; adjust any paths, etc. below to suit your actual details.

# NGiNX reverse proxy configuration for Jellyfin
#
# Use this configuration on NGiNX running on the same server as your Jellyfin instance. Replace the values as needed.
# LetsEncrypt is enabled and configured using `certbot`: install it via apt on Debian (`sudo apt install certbot`) or
# your package manager of choice. To start, make only the first section (port 80) active, then once that configuration
# is active, run Certbot for the first time to request your cert. Then, add the second section (port 443) and reload.
# With this config left in place, Certbot's automatic renewal will work and automatically replace the cert and
# reload NGiNX as needed, without interrupting your Jellyfin instance.
#
# Certbot request command: