Skip to content

Instantly share code, notes, and snippets.

View TeddyDD's full-sized avatar

Daniel Lewan TeddyDD

View GitHub Profile
@TeddyDD
TeddyDD / btrfs-guide.md
Created April 7, 2024 16:59 — 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
@TeddyDD
TeddyDD / extract_cookies.sh
Last active August 11, 2022 08:52 — forked from hackerb9/extract_cookies.sh
Extract cookies.sqlite to cookies.txt for use in wget or curl.
#!/bin/sh -e
# extract_cookies.sh:
#
# Convert from Firefox's cookies.sqlite format to Netscape cookies,
# which can then be used by wget and curl. (Why don't wget and curl
# just use libsqlite if it's installed?)
# USAGE:
#
# $ extract_cookies.sh > /tmp/cookies.txt
local ffi = require('ffi')
--local lib = ffi.load('libraylib.2.0.0.dylib')
local lib = ffi.load('libraylib')
ffi.cdef[[
// Vector2 type
typedef struct Vector2 {
float x;
float y;
} Vector2;