Skip to content

Instantly share code, notes, and snippets.

@alcol80
alcol80 / btrfs-nixos-install.sh
Last active October 22, 2023 12:25
nixos install (boot + btrfs root + btrfs docker)
gdisk /dev/sda # make 1 partition
mkfs.vfat -n BOOT /dev/sda1
mkfs.btrfs -L root /dev/sdb
mkfs.btrfs -L docker /dev/sdc
mount -t btrfs -o noatime,discard,ssd,autodefrag,compress=lzo,space_cache /dev/sdb /mnt/
btrfs subvolume create /mnt/nixos
umount /mnt/
mount -t btrfs -o noatime,discard,ssd,autodefrag,compress=lzo,space_cache,subvol=nixos /dev/sdb /mnt/
@ninewise
ninewise / bracket.js
Created November 7, 2014 16:42
Easy tournament bracket, double elimination
function Node() {
this.left = undefined;
this.right = undefined;
this.person = undefined;
};
function makeWinners(people, size) {
var root = new Node();
if(people.length === 1 && (size === 1 || size === 2)) {