Skip to content

Instantly share code, notes, and snippets.

View theodric's full-sized avatar
🎯
Shoobydoowop

theodric theodric

🎯
Shoobydoowop
View GitHub Profile
@theodric
theodric / build-devilutionx.sh
Last active December 18, 2022 22:25
build DevilutionX on RetroPie/Debian 10 32-bit
apt install libgtest-dev google-mock cmake-extras libgmock-dev libbz2-dev libsodium-dev libsdl2-mixer-dev
cd /usr/src/
wget https://github.com/diasurgical/devilutionX/archive/refs/heads/master.zip
unzip master.zip
cd devilutionX-master/
mkdir build
cmake -S. -Bbuild -DVERSION_NUM=1.0.0 -DVERSION_SUFFIX=FFFFFFF -DCMAKE_BUILD_TYPE=Release
cd build
make -j`nproc`
@theodric
theodric / newwin.txt
Last active July 27, 2022 09:49
New Windows system setup
https://support.microsoft.com/en-us/windows/ways-to-install-windows-11-e0edbbfb-cfc5-4011-868b-2ce77ac7c70e?ranMID=24542&ranEAID=kXQk6*ivFEQ&ranSiteID=kXQk6.ivFEQ-w8Lh.vaaDQ2hU8mEJ4ezuw&epi=kXQk6.ivFEQ-w8Lh.vaaDQ2hU8mEJ4ezuw&irgwc=1&OCID=AID2200057_aff_7593_1243925&tduid=%28ir__eydrbgfyhgkfqydckk0sohzw222xr61pyx9hmxx100%29%287593%29%281243925%29%28kXQk6.ivFEQ-w8Lh.vaaDQ2hU8mEJ4ezuw%29%28%29&irclickid=_eydrbgfyhgkfqydckk0sohzw222xr61pyx9hmxx100
https://www.startallback.com/
https://github.com/dremin/RetroBar
https://www.voidtools.com/downloads/
https://www.softpedia.com/get/Desktop-Enhancements/Shell-Replacements/ShortcutArrow-Changer.shtml
https://www.mozilla.org/en-US/firefox/windows/
https://www.cygwin.com/install.html
https://www.spotify.com/us/download/windows/
https://github.com/jwallet/spy-spotify/releases
@theodric
theodric / OLEDsysmon.txt
Created July 25, 2022 08:33
OLED system monitor RPi/Python
https://github.com/adafruit/Adafruit_Python_SSD1306
https://github.com/jumejume1/raspberry-oled-monitor
apt install python3-pil
in monitor.py, change all occurrences of unichr to chr
@theodric
theodric / pulseaudio-fix.txt
Created June 3, 2022 08:56
FIX: Can't play audio without replugging audio device/toggling output - Linux + pulseaudio
Problem: on reboot, unable to play audio (or videos with audio!) without first re-plugging audio jack or toggling output control
Cause: all audio sinks are in state 'SUSPENDED' on boot
Confirm by running 'pactl list short sinks | grep -i susp'
Workaround:
edit /etc/pulse/default.pa
comment out 'load-module module-suspend-on-idle'
reboot
re-run 'pactl list short sinks' and confirm the sinks that were previously 'SUSPENDED' are now 'IDLE'
check if audio works without replugging device or toggling output
@theodric
theodric / arch.sh
Last active March 28, 2023 14:37
minimal setup template for arch linux
### UPDATE 2023-02-27:
ARCH IS FUCKING TRASH
DO NOT USE IT
IT'S NOT WORTH IT
JUST INSTALL DEBIAN
#
##pacman rosetta stone
# https://wiki.archlinux.org/title/Pacman/Rosetta
##install guide https://wiki.archlinux.org/title/Installation_guide
@theodric
theodric / zyxel_nr7101_setup_hacks_tips_and_tweaks.txt
Last active March 16, 2024 22:05
Zyxel NR7101 setup/hacks/tips and tweaks
0. Don't have a SIM card in when you're updating radio firmware or it will bomb out partway through as it changes from internal IP to IP passthrough
1. Disable external IP passthrough mode: Network Setting -> Broadband -> Cellular APN -> #1 -> Modify icon -> "IP Passthrough" slider to off
2. Use "management" Wi-Fi AP as general Wi-Fi AP (with limitations) -> Network Setting -> Bridge1 -> Modify icon -> Move the Wi-Fi AP interface to the pane on the right alongside LAN1
NOTE: by default, once you do the above, the router will happily pass traffic from devices on the Wi-Fi AP to other devices on the LAN1 subnet, but will block traffic originating from the Wi-Fi AP from exiting to the Internet via the LTE side of the device. You can clumsily hack around this by setting another device, e.g. another Wi-Fi AP or Raspberry Pi or Cray supercomputer, as the default gateway for the LAN1 subnet in your DHCP server config, and pointing *that* device at the Zyxel as *its* default GW. This adds additional hops, but enabl
@theodric
theodric / kvm-passthrough-notes
Last active March 9, 2024 13:17
Notes on device passthrough configuration for KVM hosts
2024 ADDENDUM TO BELOW NOTES:
1. I have found that the linux-amd-znver3 kernel reliaby works for passthrough, initializing devices in a sane order and respecting boot-time blacklist kernel args https://aur.archlinux.org/packages/linux-amd-znver3
2. I have since managed to get the Nvidia RTX A2000 12GB working in passthrough with a few different settings which I will document here Real Soon Now, I Swear™.
3. The RTX 4000 SFF Ada Generation 20GB works as a drop-in replacement for the A2000.
4. Stability is not guaranteed - I don't know what to blame, but it's infrequent enough (i.e. one crash every few months) that I haven't spent time on it.
5. I have recently transitioned away from Arch to openSUSE Tumbleweed, which works out-of-the-box as a passthrough host and does not constantly break.
6. I am separately maintaning a variant of the linux-amd-znver3 and linux-amd-znver2 configs which have been tweaked to work on openSUSE. I can share these or even provide builds if there is interest.
2022 NOTES - FULLY WOR
@theodric
theodric / openbsd-setup.sh
Last active October 15, 2021 11:44
OpenBSD based install
# https://xmonad.org/
# https://github.com/jcs/sdorfehs
#apt-cache search ~= pkg_info -Q
pkg_add nano tmux htop git neofetch gdk-pixbuf pkg_mgr wget vim-8.2.3456-no_x11-perl-python3-ruby colorls md5sum vmwh firefox gdk-pixbuf-xlib
##current is broken, use 1.0 release! **cd /usr/src && git clone https://github.com/jcs/progman.git
cd /usr/src && wget https://github.com/jcs/progman/archive/refs/tags/v1.0.tar.gz
#edit Makefile, change CFLAGS+= -O2...... to CFLAGS= -pipe -Ofast......, CFLAGS+= -DHIDPI=1 to =0 for non-HiDPI screens
echo alias ls=\'colorls -G\' >> $HOME/.profile
echo progman >> $HOME/.xsession
#!/bin/bash
for i in *.avi;
do name=`echo "$i" | cut -d'.' -f1`
echo "$name"
ffmpeg -i "$i" "${name}.mp4"
done
@theodric
theodric / gist:de11d97ada25e1849579c7470fde8768
Created December 1, 2020 15:09
TDM410P in modern-ish Asterisk
https://serverfault.com/questions/978738/dahdi-3-0-0-not-assign-spans-and-cannot-generate-configuration?newreg=087dcf4ff9db40a9a48c8263c63c3ae3
1
Although the TDM410 and the TDM800 are no longer 'supported' they can be made to work to get yourself out of a mess.
Warning: You're on your own with support.
The example here is using DAHDI 3.1.0 as I found myself in the same mess.