Skip to content

Instantly share code, notes, and snippets.

@yuulf
yuulf / KotlinEchoServer.kt
Created February 7, 2020 10:17 — forked from banasiak/KotlinEchoServer.kt
An example echo server written in Kotlin.
import java.io.BufferedReader
import java.io.InputStreamReader
import java.io.PrintWriter
import java.net.ServerSocket
import kotlin.concurrent.thread
const val SERVER_PORT = 1337
fun main(args: Array<String>) {
@yuulf
yuulf / btrfs-guide.md
Created October 22, 2022 08:34 — 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