Skip to content

Instantly share code, notes, and snippets.

View zshzebra's full-sized avatar

Ryder Retzlaff zshzebra

  • Newcastle, Australia
  • 16:19 (UTC +10:00)
View GitHub Profile
@zshzebra
zshzebra / kicanvas-github.js
Created May 12, 2025 01:38
A userscript to render KiCanvas for valid files in GitHub, rather than showing the source code.
// ==UserScript==
// @name KiCanvas GitHub
// @version 1
// @match https://github.com/*
// @grant GM_setValue
// ==/UserScript==
let deinitKiCanvas; // function
let initialView; // null || HTMLElement
@zshzebra
zshzebra / nix-install.sh
Created January 16, 2025 23:52
Nix os installer for virtual machines
#!/usr/bin/env bash
set -euo pipefail
CONFIGURATION_SOURCE="${CONFIGURATION_SOURCE:-}"
DISK_DEVICE="${DISK_DEVICE:-auto}"
BYPASS_VIRT="${BYPASS_VIRT:-false}"
PARTITION_SCHEME="${PARTITION_SCHEME:-bios}"
BOOT_SIZE="${BOOT_SIZE:-512MiB}"
log() {
@zshzebra
zshzebra / emoji.txt
Created December 5, 2024 07:52
Every emoji
๐Ÿฅ‡๐Ÿฅˆ๐Ÿฅ‰๐Ÿ†Ž๐Ÿง๐Ÿ…ฐ๏ธ๐Ÿ…ฐ๐Ÿ‡ฆ๐Ÿ‡ซ
๐Ÿ‡ฆ๐Ÿ‡ฑ๐Ÿ‡ฉ๐Ÿ‡ฟ๐Ÿ‡ฆ๐Ÿ‡ธ๐Ÿ‡ฆ๐Ÿ‡ฉ๐Ÿ‡ฆ๐Ÿ‡ด๐Ÿ‡ฆ๐Ÿ‡ฎ๐Ÿ‡ฆ๐Ÿ‡ถ๐Ÿ‡ฆ๐Ÿ‡ฌ
โ™’๐Ÿ‡ฆ๐Ÿ‡ทโ™ˆ๐Ÿ‡ฆ๐Ÿ‡ฒ๐Ÿ‡ฆ๐Ÿ‡ผ๐Ÿ‡ฆ๐Ÿ‡จ๐Ÿ‡ฆ๐Ÿ‡บ๐Ÿ‡ฆ๐Ÿ‡น
๐Ÿ‡ฆ๐Ÿ‡ฟ๐Ÿ”™๐Ÿ…ฑ๏ธ๐Ÿ…ฑ๐Ÿ‡ง๐Ÿ‡ธ๐Ÿ‡ง๐Ÿ‡ญ๐Ÿ‡ง๐Ÿ‡ฉ๐Ÿ‡ง๐Ÿ‡ง
๐Ÿ‡ง๐Ÿ‡พ๐Ÿ‡ง๐Ÿ‡ช๐Ÿ‡ง๐Ÿ‡ฟ๐Ÿ‡ง๐Ÿ‡ฏ๐Ÿ‡ง๐Ÿ‡ฒ๐Ÿ‡ง๐Ÿ‡น๐Ÿ‡ง๐Ÿ‡ด๐Ÿ‡ง๐Ÿ‡ฆ
๐Ÿ‡ง๐Ÿ‡ผ๐Ÿ‡ง๐Ÿ‡ป๐Ÿ‡ง๐Ÿ‡ท๐Ÿ‡ฎ๐Ÿ‡ด๐Ÿ‡ป๐Ÿ‡ฌ๐Ÿ‡ง๐Ÿ‡ณ๐Ÿ‡ง๐Ÿ‡ฌ๐Ÿ‡ง๐Ÿ‡ซ
๐Ÿ‡ง๐Ÿ‡ฎ๐Ÿ†‘๐Ÿ†’๐Ÿ‡ฐ๐Ÿ‡ญ๐Ÿ‡จ๐Ÿ‡ฒ๐Ÿ‡จ๐Ÿ‡ฆ๐Ÿ‡ฎ๐Ÿ‡จโ™‹
๐Ÿ‡จ๐Ÿ‡ปโ™‘๐Ÿ‡ง๐Ÿ‡ถ๐Ÿ‡ฐ๐Ÿ‡พ๐Ÿ‡จ๐Ÿ‡ซ๐Ÿ‡ช๐Ÿ‡ฆ๐Ÿ‡น๐Ÿ‡ฉ๐Ÿ‡จ๐Ÿ‡ฑ
๐Ÿ‡จ๐Ÿ‡ณ๐Ÿ‡จ๐Ÿ‡ฝ๐ŸŽ„๐Ÿ‡จ๐Ÿ‡ต๐Ÿ‡จ๐Ÿ‡จ๐Ÿ‡จ๐Ÿ‡ด๐Ÿ‡ฐ๐Ÿ‡ฒ๐Ÿ‡จ๐Ÿ‡ฌ
๐Ÿ‡จ๐Ÿ‡ฉ๐Ÿ‡จ๐Ÿ‡ฐ๐Ÿ‡จ๐Ÿ‡ท๐Ÿ‡ญ๐Ÿ‡ท๐Ÿ‡จ๐Ÿ‡บ๐Ÿ‡จ๐Ÿ‡ผ๐Ÿ‡จ๐Ÿ‡พ๐Ÿ‡จ๐Ÿ‡ฟ
import os, re, pathlib, subprocess, csv
if os.getuid() != 0:
print("You need to be root to run this script")
exit(0)
mounted = False
with open("/proc/mounts", "r") as f:
for line in f.readlines():
from library.lcd.lcd_comm import Orientation
from library.lcd.lcd_comm_rev_a import LcdCommRevA
from PIL import Image
import time, threading, inputs, sys, random, select, termios, tty
from importlib import reload
lcd_comm = LcdCommRevA()
lcd_comm.Reset()
ngrok
requests
Add-Type -TypeDefinition @'
using System.Runtime.InteropServices;
[Guid("5CDF2C82-841E-4546-9722-0CF74078229A"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
interface IAudioEndpointVolume {
// f(), g(), ... are unused COM method slots. Define these if you care
int f(); int g(); int h(); int i();
int SetMasterVolumeLevelScalar(float fLevel, System.Guid pguidEventContext);
int j();
int GetMasterVolumeLevelScalar(out float pfLevel);
@zshzebra
zshzebra / retro_gamepad.py
Last active June 26, 2022 05:58
My code for retro gamepad
import sys
import pygame
from pygame.locals import *
pygame.init()
clock = pygame.time.Clock()
pygame.joystick.init()
joysticks = [pygame.joystick.Joystick(i) for i in range(pygame.joystick.get_count())]