Skip to content

Instantly share code, notes, and snippets.

View bearlikelion's full-sized avatar

Mark bearlikelion

View GitHub Profile
@bearlikelion
bearlikelion / ghostBeats.py
Created March 8, 2026 02:16 — forked from twobob/ghostBeats.py
Ghost Beats straight to midi. No Deps.
import struct
import math
import random
import os
from typing import List, Tuple, Dict, Optional
# --- MIDI CONSTANTS ---
PPQ = 960
# General MIDI Map
@bearlikelion
bearlikelion / motd_generator.sh
Last active February 8, 2024 10:19 — forked from ergoz/motd_generator.sh
Dynamic motd generator for Alpine Linux (/etc/periodic/15min/motd)
#!/bin/sh
UPTIME_DAYS=$(expr `cat /proc/uptime | cut -d '.' -f1` % 31556926 / 86400)
UPTIME_HOURS=$(expr `cat /proc/uptime | cut -d '.' -f1` % 31556926 % 86400 / 3600)
UPTIME_MINUTES=$(expr `cat /proc/uptime | cut -d '.' -f1` % 31556926 % 86400 % 3600 / 60)
cat > /etc/motd << EOF
%--------------------------------------------------------------%
Hostname: `hostname`.`dnsdomainname`
Uptime: $UPTIME_DAYS days, $UPTIME_HOURS hours, $UPTIME_MINUTES minutes