Skip to content

Instantly share code, notes, and snippets.

View mathgeniuszach's full-sized avatar

Zach K mathgeniuszach

View GitHub Profile
@mathgeniuszach
mathgeniuszach / nixos-linode.sh
Created September 20, 2024 06:15
Bootstrap NixOS on Linode.
#!/bin/sh
# Forked from https://raw.githubusercontent.com/pjones/phoebe/master/scripts/linode-bootstrap.sh
################################################################################
#
# Bootstrap NixOS on Linode.
#
# Based on (read this so you know what's going on):
#
@mathgeniuszach
mathgeniuszach / rrupdate.py
Last active July 28, 2024 02:54
Updater Script for RetroRewind
#!/usr/bin/env python3
import requests
import sys
import glob
import shutil
import re
import os
from zipfile import ZipFile
// ==UserScript==
// @name Bingosync Custom Input
// @author mathgeniuszach
// @description Enables you to paste lines of text from a spreadsheet or list into Bingosync.
// @version 1.0
// @match https://bingosync.com/
// @run-at document-start
// ==/UserScript==
window.addEventListener("DOMContentLoaded", () => {
@mathgeniuszach
mathgeniuszach / sbin2h.cmake
Created November 3, 2021 18:50
Space efficient sbin2h. Only saves space in the header file, as compilation makes it all the same.
function(sbin2h header assetdir)
string(TOUPPER ${assetdir} hdef)
string(REGEX REPLACE "^[0-9]|[^A-Z0-9_]+" "_" hdef ${hdef})
file(WRITE ${header} "#ifndef BIN_${hdef}_H\n#define BIN_${hdef}_H\n\n")
file(GLOB_RECURSE assets "${assetdir}/*")
foreach(asset ${assets})
# Get variable name
string(REGEX MATCH "${assetdir}.*" fname ${asset})
string(REGEX REPLACE "${assetdir}[/\\\\]" "" fname ${fname})