Skip to content

Instantly share code, notes, and snippets.

@loukamb
loukamb / db13cryptfix.md
Created May 28, 2025 23:04
Debian 13 (Trixie) cryptsetup at boot fix

Debian 13 (Trixie) cryptsetup at boot fix

I'm unsure when this problem started, but installing cryptsetup and cryptsetup-initramfs, adding your partitions to /etc/crypttab, then updating the initramfs with update-initramfs does not work right away. You will reboot and wait 1 minute and 30 second as systemd fails to mount the partition.

I pulled my hair trying to fix this until I extracted the initramfs contents and figured out that Debian's distribution of cryptsetup doesn't read from /etc/crypttab but rather from cryptoroot/crypttab.

You could theoretically make this folder and file, but I suggest writing this tiny script to /etc/initramfs-tools/hooks/make-crypttab, which will entirely solve this problem and for good:

#!/bin/sh
cp /etc/crypttab "${DESTDIR}/cryptroot/crypttab"
@loukamb
loukamb / loukas_artix_notes.md
Created April 18, 2025 19:04
Louka's Artix Notes

Louka's Artix Notes

See also Louka's Arch Notes.

Artix Linux is a fork of Arch Linux that allows you to install a different init system. That's mostly it. The packages offered, the base system components (e.g. initramfs generator), and the package manager are the same.

There are some differences in release distribution (for example, they package pre-configured images with desktop environments), and they do shop some additional packages to provide service configurations depending on what init system you want, but the rest is pretty much Arch Linux.

This is a personal cheat sheet for myself with a few explainers.

Init system

@loukamb
loukamb / loukas_arch_notes.md
Last active July 5, 2025 19:30
Louka's Arch Notes

Louka's Arch Notes

A cheat sheet, notes sheet, and general guidance to setup a competent, stable, secure Arch Linux system. Written because some of my friends are looking into switching to Linux as Windows 10 falls out of support this year.

These notes will help you install an Arch Linux system, but also explain the packages you're installing and what they do, so you can better understand how a Linux system (in general) is structured.

Table of Contents

@loukamb
loukamb / arch-labwc.md
Last active February 4, 2025 21:49
Arch Linux - labwc

Quick personal cheat sheet for setting up a sane, useful instance of the labwc window manager on Arch Linux. These are my own personal notes and will not work on your computer without adjustment.

Setup (chroot after minimal install)

# Use archinstall to create a minimal Arch installation first. Chroot after installation is done.
archinstall

# Set parallel downloads to 25
nvim /etc/pacman.conf
@loukamb
loukamb / template
Last active January 9, 2025 20:21
MEGAsync XBPS template, for personal use
pkgname=megasync
version=5.6.1.0
revision=1
arch="x86_64"
depends="xdg-utils libnotify xz ffmpeg desktop-file-utils qt5-quickcontrols qt5-quickcontrols2 qt5-graphicaleffects"
short_desc="Automated syncing with MEGA Cloud Drive"
maintainer="louka <[email protected]>"
license="custom:Proprietary"
homepage="https://mega.io"
checksum="f6d4e564f82ada113d23de917531f7742f1ad72b4ade2927f5b968802bcd5573"
@loukamb
loukamb / macos-for-desktop.md
Last active March 24, 2025 16:36
Improving macOS for desktop use

Improving macOS for desktop use

macOS is a clean implementation of an Unix operating system. While it officially is supported for both laptop and desktop use, it is visibly better adapted for laptops with a lot of features that are odd or even maybe disruptive for desktops. This gist lists actions you can take to improve macOS for desktop use.

Last updated: March 24, 2025

Remove caps lock delay

Explanation

On macOS, there is a delay before caps lock activation and deactivation, forcing you to hold the key for an extra 1/5th of a second. This was implemented because users tend to accidentally trigger capslock while typing on butterfly keyboards produced by Apple. However, when using macOS on a desktop with external peripherals, this feature doesn't make sense and can be disruptive while typing.

Implementation

Run this in Terminal.

@loukamb
loukamb / biblegateway-uncrust.css
Last active November 10, 2024 04:58
BibleGateway.com Dark CSS + Uncrust layout
/* This CSS (for use with the Stylus extension) makes biblegateway.com much less shitty to use and read */
nav {
max-width: 340px !important;
min-width: 340px !important;
margin-left: -30rem;
transition: margin-left 100ms;
background-color: white;
}
@loukamb
loukamb / vlzfs.md
Last active January 24, 2025 19:04
Void Linux w/ ZFS on Root

Void Linux w/ ZFS on Root

This is a personal cheat sheet for myself that I use to install Void Linux. Assumes you're running a x64 CPU, using a NVMe disk at /dev/nvme0n1 and UEFI. If you're attempting this, use hrmpf to install Void Linux, not the live image they provide since it lacks ZFS support. Don't blindly copy/paste shit, you will have to adjust certain commands.

Pre-chroot

source /etc/os-release
export ID
export ARCH=x86_64
export MIRROR="https://repo-fastly.voidlinux.org/current"
export BOOT_DEVICE="/dev/nvme0n1p1"
@loukamb
loukamb / linux2bsd.md
Last active January 29, 2024 17:12
Linux-2-BSD: Crash course on getting started with FreeBSD from the perspective of a less-technical Linux user

Note

This is mainly a note sheet for myself so I know what to do when installing FreeBSD, but I also wrote some additional information for Linux users that are interested in using FreeBSD and the philosophy as to why one would use FreeBSD over a convential Linux system. This is not complete, has parts borrowed from guides on the Internet (I do not claim originality for any of this), but should be enough to get started with FreeBSD.

What is BSD? (contrasted with GNU/Linux)

BSD (Berkeley Software Distribution) is a discontinued operating system that is a direct descendant of Bell Labs UNIX. Unlike GNU/Linux, which is a remake of UNIX and therefore called a "UNIX-like" system, mainline *BSD systems such as FreeBSD, OpenBSD, and NetBSD can claim to be truly genetic "UNIX" (but not trademark UNIX). For brevity, I will just say "BSD" for the rest of this guide, but I will be referring to FreeBSD specifically.

In terms of the popularity of its distributions, the GNU/Linux distribution most used by the

@loukamb
loukamb / cmds.md
Created March 24, 2023 21:53
Web project setup commands

Augment NextJS project

Setup command

pnpm add -D tailwindcss postcss autoprefixer prettier prettier-plugin-tailwindcss @iconify/react @headlessui/react
npx tailwindcss init -p

prettier.config.js

module.exports = {
 plugins: [require('prettier-plugin-tailwindcss')],