Skip to content

Instantly share code, notes, and snippets.

View theodric's full-sized avatar
🎯
Shoobydoowop

theodric theodric

🎯
Shoobydoowop
View GitHub Profile
@theodric
theodric / audible-convert-notes.txt
Created March 13, 2024 15:03
Convert YOUR OWN Audible books to MP3 for use on other devices AS YOU ARE LEGALLY ENTITLED TO DO, SO FUCK OFF AMAZON, SUCK MY BALLS
pip install audible-cli # no need to clone, but it lives here: https://github.com/mkb79/audible-cli
audible quickstart # follow the instructions and log into your Audible account
audible activation-bytes # get the activation bytes required to decrypt the file in ffmpeg
audible download --all --aax-fallback # optional - download your entire library in 'classic' AAX format, which is crackable
ffmpeg -activation_bytes XXXXXXXX -i audiobook.aax audiobook.mp3 # where XXXXXXXX are your 'activation bytes'
## or if you like using tools that are no longer maintained, try AAXtoMP3 https://github.com/KrumpetPirate/AAXtoMP3.git
# AAXtoMP3 --authcode XXXXXXXX -e:mp3 --chaptered --level 4 --loglevel 1 *.aax
@theodric
theodric / lvm-crypt-resize.txt
Last active April 5, 2024 13:14
Resize encrypted LVM
IN SHORT:
0. increase size of outermost container (grow qcow2, dd disk to larger disk, etc.)
1. increase size of partition containing the encrypted volume set (cfdisk, fdisk, etc.)
2. unlock encrypted volume
3. grow LVM "physical volume"
4. grow LVM "logical volume"
5. check filesystem
6. grow filesystem
7. tidy up and test.
@theodric
theodric / pi5-notes.txt
Created December 20, 2023 23:50
Raspberry Pi 5 notes
#stop bitching about PSU
usb_max_current_enable=1
#enable PCIe header & PCIe v3 support
dtparam=pciex1
dtparam=pciex1_gen=3
@theodric
theodric / spot-unfuck.txt
Created December 6, 2023 19:17
macOS Spotlight fuckup - not finding applications in /System/Applications, etc.
Run the following in a terminal:
sudo mdutil -Ea
sudo mdutil -ai off
sudo mdutil -ai on
Alternatively, use Automator to create an Application with a Run Shell Script Action containing the above and put it somewhere it's easy to access.
@theodric
theodric / openSUSE.txt
Last active November 12, 2023 18:50
openSUSE install notes
## fuck me, this distro is awesome
## like, seriously, they chose defaults that *I* would have chosen!
## and shit just, y'know, like....works
## it even comes with XScreenSaver!!!
## frfr no cap
## total lack of cap
## not even a yarmulke
## absolutely unprecedented
##
zypper update
@theodric
theodric / deboot.txt
Created April 30, 2023 16:42
Devolo Magic LAN 2 scheduled reboots
git clone https://github.com/gebi/devolo-cli
then put in /etc/crontab
56 5 * * 7 root /root/src/bin/devolo-cli reboot 10.10.11.180
58 5 * * 7 root /root/src/bin/devolo-cli reboot 10.10.11.181
00 6 * * * root /root/src/bin/devolo-cli reboot 10.10.11.182
@theodric
theodric / xfstools.txt
Last active March 21, 2023 13:13
xfstools build prereqs - debian
grab the latest source from here: https://mirrors.edge.kernel.org/pub/linux/utils/fs/xfs/xfsprogs/
apt install gettext libinih-dev uuid-dev liburcu-dev libblkid-dev
@theodric
theodric / alpine.txt
Last active December 10, 2023 14:50
Alpine Linux basic setup
apk add nano udev tmux htop curl sntpc
/etc/init.d/udev start #test
rc-update add udev default
rc-update add local default
# create files e.g. /etc/local.d/rc-local.start
#
## this is peculiar to the picm4 with 200MHz dynamic downclock, which induces several seconds per second of clock drift. Sync with a local NTP server every 5 seconds of server time, ~10-15 seconds realtime, to keep things more-or-less in line.
echo sntpc -i5 -v -d 10.10.11.202 > /etc/local.d/3-fixtime.start && chmod +x /etc/local.d/3-fixtime.start
## NOTE: files apparently have to end in .start or they will not be executed
## NOTE: commands have to exit or daemonize, or 'local' will fail to finish initialization and subsequent attempts to reboot will fail!
@theodric
theodric / killswitch.txt
Created March 7, 2023 21:19
VPN killswitch
cat /etc/udev/rules.d/81-vpn-firewall.rules
KERNEL=="tun0", ACTION=="add", RUN+="/usr/bin/forward.sh add"
KERNEL=="tun0", ACTION=="remove", RUN+="/usr/bin/forward.sh remove"
cat /usr/bin/forward.sh
#!/bin/bash
#
# forward.sh
# VER 0.1
#
@theodric
theodric / steam-deck-arch-chroot.txt
Last active December 26, 2023 13:16
Setting up an Arch chroot environment on the Steam Deck, then using as NOT a chroot environment
## So you want to use stuff like 'tmux' and 'lolcat' on the Steam Deck, but they haven't been included in the base OS?
# One way to do it is this.
# 1. setup a chroot environment so there is a file structure in which Pacman can download/unpack packages and their dependencies.
# 2. don't use it as a chroot environment; rather, add the various /bin directories inside it to your $PATH, and create an /etc/ld.so.conf.d/deck-local-arch.conf to permit the bins to find the libs they need.
mkdir -p ~/.local/packer
cd ~/.local
#these steps are required, or else the pacstrap will fail with 'marginal trust' errors
pacman -Sy archlinux-keyring
pacman-key --populate archlinux