Skip to content

Instantly share code, notes, and snippets.

View lromor's full-sized avatar

Leonardo Romor lromor

  • Ellogon
  • Amsterdam
View GitHub Profile
@garymacindoe
garymacindoe / redshift.conf.d
Last active June 30, 2021 10:22
OpenRC Initscripts for Redshift
# /etc/conf.d/redshift
DISPLAY="${DISPLAY:-:0}"
# Make it a function in case we have to repeat it in init script later
set_xauth() {
# common case (works in almost all tested environments (except of lightdm)):
#XAUTHORITY="$(ps wwax -C X,Xorg -o args= --sort=-stime | grep -m 1 -o '\B[-]auth\s*/var\S*' | cut -d ' ' -f 2)"
@MaxXor
MaxXor / btrfs-guide.md
Last active April 19, 2025 23:29
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
Rules for invoking patchelf in Bazel