Skip to content

Instantly share code, notes, and snippets.

@MaxXor
MaxXor / btrfs-guide.md
Last active February 22, 2026 10:37
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
@StevenACoffman
StevenACoffman / Docker Best Practices.md
Last active February 10, 2026 03:15
Docker Best Practices

Mistakes to Avoid: Docker Antipatterns

Whichever route you take to implementing containers, you’ll want to steer clear of common pitfalls that can undermine the efficiency of your Docker stack.

Don’t run too many processes inside a single container

The beauty of containers—and an advantage of containers over virtual machines—is that it is easy to make multiple containers interact with one another in order to compose a complete application. There is no need to run a full application inside a single container. Instead, break your application down as much as possible into discrete services, and distribute services across multiple containers. This maximizes flexibility and reliability.

Don’t install operating systems inside Docker containers

It is possible to install a complete Linux operating system inside a container. In most cases, however, this is not necessary. If your goal is to host just a single application or part of an application in the container, you need to install only the essential

@DamonOehlman
DamonOehlman / PAGE-SCRIPTS.md
Last active July 30, 2021 01:34
Interesting webpage injection scripts

Youtube -> Imgur Screenshot Helper (copy and paste into your browser console when on a video site)

var clientId = ''; // insert your imgur application client id here
var videos = document.getElementsByTagName('video'), canvas = document.createElement('canvas'), context = canvas.getContext('2d'), http = new XMLHttpRequest();
canvas.width = videos[0].videoWidth; canvas.height = videos[0].videoHeight;
context.drawImage(videos[0], 0, 0);

var data = JSON.stringify({
  image: canvas.toDataURL('image/jpeg', 0.9).split(',')[1]
@davidwkeith
davidwkeith / index.html
Last active November 7, 2024 19:03
NOTE: This was a great hack in days gone by, but now both Apple and Google have improved their support for custom protocol handlers. Licensed under the WFTPL http://www.wtfpl.net/txt/copying/
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>App Redirection</title>
</head>
<body>
<!--
NOTE: This was a great hack in days gone by, but now both Apple and Google have improved their support for custom
protocol handlers.
/*
* Ultra_bcm_config - A utility that does one thing, pretty well.
*
* Andrew Robinson <andrew.robinson@gmail.com>
*
* Based off of the framework provided by iwconfig.c - the standard
* linux wireless driver configuration tool. Modified to pass a special
* structure to the custom Broadcom BCM4329 chipset driver running in the
* kernel to enable AccessPoint mode, broadcasting of the SSID, and WEP/WPA
* encryption.