Skip to content

Instantly share code, notes, and snippets.

// fix systemd-boot menu
// on bios update removed boot entries
// boot archlinux install usb
# cryptsetup luksOpen /dev/nvme1n1p2 foo
# mount /dev/mapper/foo /mnt -o subvol=@
# mount /dev/nvme1n1p1 /mnt/boot
# arch-chroot /mnt
# bootctl install
@kleo
kleo / brother-dcpt310.txt
Last active July 28, 2025 17:10
Brother DCP-T310 printer install on Arch Linux notes
# Brother DCP-T310 printer install on Arch Linux notes
# install cups
yay -S cups
sudo systemctl enable cups.service
sudo systemctl start cups.service
sudo systemctl enable cups.socket
sudo systemctl start cups.socket
@kleo
kleo / btrfs-guide.md
Created May 23, 2022 17:37 — forked from MaxXor/btrfs-guide.md
Btrfs guide to set up an LUKS-encrypted btrfs raid volume with included maintenance & recovery guide

Encrypted Btrfs storage setup and maintenance guide

Initial setup with LUKS/dm-crypt

This exemplary initial setup uses two devices /dev/sdb and /dev/sdc but can be applied to any amount of devices by following the steps with additional devices.

Create keyfile:

dd bs=64 count=1 if=/dev/urandom of=/etc/cryptkey iflag=fullblock
chmod 600 /etc/cryptkey
@kleo
kleo / gist:d966c52e782862fad88f012c8cd3cb68
Created March 24, 2022 17:00
Strip metadata example.pdf and re-linearise
# https://exiftool.org/forum/index.php?topic=3943.msg54704#msg54704
exiftool -all= -overwrite_original example.pdf
mv example.pdf temp.pdf
qpdf --linearize temp.pdf example.pdf

generate keys for github actions rsync

on remote host

ssh-keygen -t rsa -b 4096 -N "" -f github-actions

cat github-actions.pub >> ~/.ssh/authorized_keys

on github repository

getevent keys (combined joycons)
X - BTN_NORTH
Y - BTN_WEST
A - BTN_EAST
B - BTN_GAMEPAD
plus - BTN_START
minus - BTN_SELECT
@kleo
kleo / chroot-to-pi-archlinux-docker.md
Last active April 7, 2022 08:55
Chroot to Pi SD card on Arch Linux with Docker
@kleo
kleo / dupe
Created February 3, 2021 10:19
Clonezilla clone sda to sdb
#!/bin/bash
# Make sure that sda is the source by placing the source SATA cable on the first SATA port number
# You will need 1.) clonezilla live
# 2.) a working space for saving our custom clonezilla iso, a flashdrive or any other storage medium
# Needed when cloning later
# 3.) source drive (sda)
# 4.) target drive (sdb)
#
# follow https://clonezilla.org/advanced/customized-clonezilla-live.php
/usr/sbin/ocs-onthefly -batch -g auto -e1 auto -e2 -r -j2 -sfsck -p poweroff -f sda -d sdb