Skip to content

Instantly share code, notes, and snippets.

@bjorne
bjorne / _README.md
Last active December 23, 2020 07:47
Command-click to open in emacs from iTerm

@bjorne
bjorne / rot13.go
Created July 19, 2018 19:52
rot13 from the Go tour
package main
import (
"io"
"os"
"strings"
)
type rot13Reader struct {
r io.Reader
@bjorne
bjorne / 00_README.md
Created July 20, 2018 21:27
Equivalent binary trees

From the Go tour. Only supports trees of size 10 for now.

@bjorne
bjorne / btrfs-guide.md
Created January 13, 2025 21:57 — 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