Skip to content

Instantly share code, notes, and snippets.

View theodric's full-sized avatar
🎯
Shoobydoowop

theodric theodric

🎯
Shoobydoowop
View GitHub Profile
@theodric
theodric / fixtweets.sh
Created October 13, 2024 22:07
Extract your tweets in plaintext from the tweets.js / tweets-part1.js files inside your Twitter archive, and remove old-fashioned retweets, plain URLs, and other crap
cat tweets.js | grep -i full_text | sed -E 's/.*"full_text" *: *"(.*)",/\1/' | egrep -v ^@ | egrep -v ^https:// | egrep -v ^RT > fulltext2.txt
@theodric
theodric / functions.sh
Last active July 13, 2024 15:30
Random functions
printf "\nSystem has been awake for `echo $delta | awk '{printf("%d:%02d:%02d:%02d\n",($1/60/60/24),($1/60/60%24),($1/60%60),($1%60))}'`\n\n"
Either:
a. dump your BIOS with a chip clip and a CH341 and pay dosdude1 like $20 to remove the whitelist using blaque magicke or
b. use 1vyrain softmod
If b, then any changes you want to make to EC (Embedded Controller) firmware (for classic keyboard mod and/or battery whitelist removal) must be made BEFORE flashing 1vyrain. You can go back later, revert 1vyrain, modify EC, then redo 1vyrain; but you cannot mod EC after 1vyrain is in place.
1. EC mod
https://github.com/hamishcoleman/thinkpad-ec
Follow instructions.
@theodric
theodric / year-of-linux-on-the-laptop.txt
Last active July 9, 2024 18:50
Linux laptop daily driver setup notes
Assume openSuSE Tumbleweed, but Fedora/Nobara is also an option
#build-essentials
zypper install --type pattern devel_basis
zypper in net-tools xpra fortune xhost tmux htop cowsay
Native packages:
touchegg (for gestures)
@theodric
theodric / audible-convert-notes.txt
Last active October 25, 2024 12:35
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, but also want a nice chapter-marked m4b, try AAXtoMP3 https://github.com/KrumpetPirate/AAXtoMP3.git
AAXtoMP3 --authcode XXXXXXXX -e:m4b --loglevel 1 sourcefile.aax
After this, the chapter numbering will be fucked up, so use MP4Box to fix it:
(steps courtesy of https://chiwbaka.com/2023/notes-on-editing-chapters-of-a-m4b/ )
@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