cargo install cargo-make # cargo-edit is also useful
rustup target add x86_64-unknown-linux-gnu
rustup target add x86_64-pc-windows-gnu
# Only if you're on an Arch-based distro
paru -Sy mold upx binutils
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/fish | |
# requires ffmpeg with libfdk_aac, ffmpegthumbnailer, atomicparsley | |
set thread_limit (math (nproc --all) '*' 0.6) | |
set input_dir '/home/user/music' | |
set output_dir './output' | |
rm -rf ./encode_tmp |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fs = require('fs'); | |
class PatchTargetMissingException extends Error {} | |
class Patch { | |
constructor(name, target, replacement) { | |
this.name = name; | |
this.target = Buffer.from(target); | |
this.replacement = Buffer.from(replacement); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function vm | |
switch $argv[1] | |
case down | |
echo 'shutting down vm' | |
while true | |
sudo virsh destroy windows-11 &> /dev/null | |
sleep 1 | |
printf '. ' | |
if string match -q 'shut off' (sudo virsh domstate windows-11) | |
echo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/sudo fish | |
set all_filesystems tank/a tank/b tank/c | |
set user ww | |
set target zfs-unlocked.target | |
function check_target | |
set output (machinectl -q shell $user@ /usr/bin/systemctl --user is-active $target) | |
switch (string trim $output) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/sudo fish | |
# From /dev/disk/by-id | |
set -a disks scsi-SATA_SAMSUNG_HD204UI_S2H7J1CB906143 | |
set -a disks scsi-SATA_SAMSUNG_HD204UI_S2HGJ1BZ811296 | |
set -a disks scsi-SATA_WDC_WD2000F9YZ-0_WD-WCC5C0072942 | |
set -a disks scsi-SATA_WDC_WD20EARS-00M_WD-WCAZA0355682 | |
set -a disks scsi-SATA_WDC_WD20EARX-00P_WD-WCAZAE460554 | |
set -a disks scsi-SATA_WDC_WD20EARX-00P_WD-WMAZA5013504 | |
set -a disks scsi-SATA_WDC_WD20EARX-00P_WD-WMAZA5775943 |