Inspired by the grimoire of Fred Bednarski, this is my place to put assorted snippets of code (which may or may not be cursed, so use at your own risk). Have fun, poke around, but remember that this information may be totally borked.
To change the extensions of audio files in a directory:More generally, to do something to some files:To download the mp3 audio (or the best audio if that fails) of a youtube video:To download a playlist of music from youtube (more stable for playlists than youtube-dl):To forward your port 8388 to a server's port 8384 (can be used to get the web interface for syncthing remotely):To sanitize a file name (the .opus can be any extension):To sanitize everything in a directory, preserving extensions:To push file changes over ssh:To dither and shrink an image (courtesy of Thomasorus with some modification for personal preference):To simply dither of an image:Super simple, but to make a div element take up the whole height of a veiwportThis is something pretty specific (and simple), but this is how I fixed my audio continuously muting in Manjaro i3:To play a streaming fileGrab some html from the Noita wikiFind all files which match a given regexSorta change the colors of an image? With black and white, it'll change the white to something else (in this case orange)Function to convert a string into a hashed longCopy an array to a pointer's valueConvert an mp4 to an animated gifGet the audio from an mp4Convert gif to mp4Combine audio and video filesAdd centered text in white to a videoConvert mkv to mp4 preserving subtitlesFind the file with the most lines in a directoryCrop an image and the virtual canvas (so a "normal crop" basically)Cut a video file with start and end pointsCombine videos from text fileCount all the characters in all files in a directoryGet disk information (available, used, etc)Prints IP addresses for computerGets all ip addresses on local network. Requires `arp-scan`, and replace `wlp3s0` with your network device (as shown by running `ifconfig`)Get open ports/ips on local systemPretty-print devices across network rangeDownloads whole websiteDither image while still looking niceGrab window (with name including "video2") and put into output.mp4In theory, grab video in, pass through complex filter (in this case just add text), and out to virtual webcamTurn the background of an image transparentFind combined file size of specific filetype (in this case html)Set i3 desktop background to colorDelete files matching a patternRestarts v4l2loopbackNaively remove consecutive duplicate lines in a fileRemove consecutive duplicate lines in a file, preserving empty lines