Skip to content

Instantly share code, notes, and snippets.

@dshoreman
dshoreman / btrfs-guide.md
Created May 21, 2022 18:48 — 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
@dshoreman
dshoreman / gist:3904286
Created October 17, 2012 07:55 — forked from druu/gist:3901226
Bookmarklet: Clean up Google's search result URLs
javascript:(function(){var links=document.querySelectorAll('a.l'),count=links.length;while(count--){links[count].onmousedown=null;if((/url=/i).test(links[count].href)){links[count].href=decodeURIComponent(links[count].href.match(/url=([a-z0-9\-+%._]+)&/i)[1].replace(/\+/g, ' '));}};})()