Skip to content

Instantly share code, notes, and snippets.

View mathgeniuszach's full-sized avatar

Zach K mathgeniuszach

View GitHub Profile
@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})
// ==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 / 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
@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):
#

The Ultimate Guide to Community KTaNE

This guide is public domain (under CC0), but credits are always appreciated.
It was written by mathgeniuszach with help from the KTaNE community.

This guide assumes you have some experience with vanilla (unmodded) KTaNE. That is, you or someone you know owns the game and you've played at least a little bit of section 1, either as a Defuser or an Expert.

# Some code using python's curses library to obtain banana
# Released into the Public Domain and CC0
import curses
import time
FPS = 60
bananas = 0
banana_cooldown = 0