metasyn icon navigation icon
pastel rainbow stripes

spellbook

Notes for things I find myself searching for over and over. I know they’re faster to find here than somewhere else.

ffmpeg


ffmpeg -framerate 30 -i name%4d.webp -c:v libvpx-vp9 -pix_fmt yuva420p -lossless 1 out.webm

verse


ffmpeg -i input.webm -vf reverse reverse.webm

itch two files together


> cat input.txt
file 'one.webm'
file 'two.webm'

ffmpeg -f concat -i input.txt -c copy output.webm

magemagick


convert INPUT_FILE -rotate "+90" OUTPUT_FILE

size


convert INPUT_FILE -resize 70% OUTPUT_FILE
convert INPUT_FILE -resize 640x480 OUTPUT_FILE

mogrify for processing multiple files at once generally


convert INPUT -channel RGB -negate OUTPUT

ke transparent


convert INPUT -transparent white OUTPUT

im

profiling:


:profile start profile.log
:profile func *
:profile file *
" At this point do slow actions
:profile pause
:noautocmd qall!

inux special characters

first, choose a compose key in your os keyboard settings.

ubuntu/debian

dist upgrade


sudo apt update
sudo apt upgrade
sudo apt dist-upgrade
sudo apt autoremove
sudo do-release-upgrade
sudo reboot now

times after that there are some random dpkg / apt errors:


sudo dpkg --configure -a
sudo apt --fix-broken install

dd desktop launcher (popos)


[Desktop Entry]
Type=Application
Name=Wally
Comment=USB Flasher for Ergodox EZ
Version=3.0.23
Exec=/usr/local/bin/wally
Icon=/opt/wally/appicon.png
Terminal=False
Categories=Firmware

clean up


sudo apt-get clean
sudo apt-get autoremove --purge

rch linux

These are some notes for myself when setting up arch.

pacman

setup

before you can use the package manager pacman you need to run:


pacman-key --init

sets up your ability to set some keys and then use them to check the fingerprints on packages you’re going to install.

If you’re on a raspberry pi, you’ll need to add the keys for archlinuxarm in particular:


pacman-key --populate archlinuxarm

eafter you can go about installing whatever you need.

If you need to remove all the keys you have added to start over, you can:


rm -rf /etc/pacman.d/gnupg

re running the init again.

base packages

In order to get make, and a bunch of basic tooling:


pacman -S base-devel

AUR client

I always need to download some AUR packages. Usually we still need to download a client:


git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si

opOS

Sometimes my system76 laptop’s audio just stops working. This seems to fix it:


systemctl --user restart pulseaudio
rm -r ~/.config/pulse
pulseaudio -k

inserting emojis

I can never remember this:

disk space


df -h
du -h -d 1 . --exclude proc

nal logs


journalctl --rotate
journalctl --vacuum-size=100M
journalctl --vacuum-time=10d

er


docker system prune -a
docker volume prune -a

snap set system refresh.retain=2

emory

sometimes you run out of memory on tiny machines. don’t forget to use swap!


sudo fallocate -l 1G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile

sudo swapon /swapfile
sudo swapon --show

sudo cp /etc/fstab /etc/fstab.bak
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab

cat /proc/sys/vm/swappiness
sudo sysctl vm.swappiness=10

oas


permit persist lemongrab as root
permit nopass lemongrab as root cmd apt
permit nopass lemongrab as root cmd apt-get
permit persist :candy as root

just use doas instead of sudo

dmidecode

a tool for looking at ram slots without opening your computer.

see how many slots you have on your hardware, maximum ram


sudo dmidecode -t 16

hats in them


sudo dmidecode -t 17

proxmox setup

sources.list
deb http://download.proxmox.com/debian/pve bookworm pve-no-subscription

https://pve.proxmox.com/pve-docs/pve-admin-guide.html#qm_pci_passthrough o

avahi


apt-get install avahi-daemon
cp /usr/share/doc/avahi/daemon/examples/ssh/service /etc/avahi/service
systemctl service start avahi-daemon.service

loud init


wget https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64.img
qemu-img resize jammy-server-cloudimg-amd64.img +2G

# Create new vm
qm create 8000 --memory 2048 --core 2 --name ubuntu-cloud --net0 virtio,bridge=vmbr0

# Import the the image
qm importdisk 8000 jammy-server-cloudimg-amd64.img local-lvm

# Create a fake disk, attach to the cloud init, set boot, enable serial/vga for vnc terminal
qm set 8000 --scsihw virtio-scsi-pci --scsi0 local-lvm:vm-8000-disk-0
qm set 8000 --ide2 local-lvm:cloudinit
qm set 8000 --boot c --bootdisk scsi0
qm set 8000 --serial0 socket --vga serial0

# Save as template
qm template 8000

# now setup cloud init things like username, ssh, dhcp versus static


# Deploy as nodes
qm clone 8000 135 --name kropotkin --full
qm clone 8000 136 --name bakunin --full
qm clone 8000 137 --name graeber --full

# start them all
for i in 135 136 137; do qm start $i; done

# destroy them all
for i in 135 136 137; do qm stop $i && qm destroy $i; done

penpgp / gpg

expiration

for better or worse, OpenPGP keys expire. here is how i update that.


gpg --list-keys
gpg --edit-key (key id)

y need to select a subkey with key 1 for example.

then


gpg> expire
(follow prompts)
gpg> save

``shell gpg –keyserver keys.openpgp.org –send-keys (key id)


i realized that thunderbird also has a keymanager that can help here too.

##  <a name='makefile'>Makefile</a>

Declare all targets PHONY, basically:

```makefile

MAKEFLAGS += --always-make

last updated:

2024.10.28