💾 Archived View for metasyn.pw › spellbook.gmi captured on 2023-11-04 at 11:24:02. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2023-09-28)

➡️ Next capture (2023-11-14)

🚧 View Differences

-=-=-=-=-=-=-

spellbook

Notes for things I find myself searching for over and over. I know they're

faster to find here than somewhere else.

ffmpeg

- convert a bunch of stils into a webm file

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

- reverse

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

- stitch two files together

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

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

imagemagick

- see [tkacz.pro] also

- rotate

convert INPUT_FILE -rotate "+90" OUTPUT_FILE

- resize

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

use `mogrify` for processing multiple files at once generally

- invert colors

convert INPUT -channel RGB -negate OUTPUT

- make transparent

convert INPUT -transparent white OUTPUT

vim

profiling:

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

linux special characters

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

- For ë you press Compose+", e.

- For ẽ you press Compose+~, e.

- For ô you press Compose+^, o.

- For á you press Compose+', a.

- For à you press Compose+`, a.

- For € you press Compose+=, e.

- For £ you press Compose+-, l.

ubuntu/debian

dist upgrade

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

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

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

add desktop launcher (popos)

- example file in `/usr/share/applications/wally.desktop`

[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

arch 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

This 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

Thereafter 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

before 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

PopOS

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:

- `Ctrl + Shift + E + Space`: then search via word tags

disk space

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

journal logs

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

docker

docker system prune -a
docker volume prune -a

snap

snap set system refresh.retain=2

memory

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

doas

- install doas with your package manager

- modify `/etc/doas.conf` as root

- example contents for user `lemongrab` and group `candy`

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

then just use doas instead of sudo

Gemini Links:

index and recent changes

directory of all pages

Web Links:

tkacz.pro