Skip to content

Instantly share code, notes, and snippets.

View berglh's full-sized avatar
:octocat:
Working from home

berglh

:octocat:
Working from home
  • Brisbane, Australia
View GitHub Profile
@berglh
berglh / k3s-bootstrap.sh
Last active May 27, 2025 05:03
Script to bootstrap k3s with custom containerd
#!/bin/bash
set -euo pipefail
###
# This script is used to bootstrap the K3S server on a system with ZFS.
# It checks for the existence of ZFS datasets, creates necessary directories,
# installs containerd and nerdctl, configures containerd, and installs k3s.
# It also handles cleanup of temporary files and directories.
# It is recommended to run this script in a controlled environment.
@berglh
berglh / minimal-zfs-root.md
Last active May 9, 2025 15:16
Minimal ZFS Root on Ubuntu 25.04
@berglh
berglh / example output
Created August 24, 2021 03:50
Work from Home Calculator
Discover all Working Days in Mon-Fri Pattern
Number of working days for set: 261, numpy: 261 should match
Set working days: ['2020-07-01', '2020-07-02', '2020-07-03', '2020-07-06', '2020-07-07', '2020-07-08', '2020-07-09', '2020-07-10', '2020-07-13', '2020-07-14', '2020-07-15', '2020-07-16', '2020-07-17', '2020-07-20', '2020-07-21', '2020-07-22', '2020-07-23', '2020-07-24', '2020-07-27', '2020-07-28', '2020-07-29', '2020-07-30', '2020-07-31', '2020-08-03', '2020-08-04', '2020-08-05', '2020-08-06', '2020-08-07', '2020-08-10', '2020-08-11', '2020-08-12', '2020-08-13', '2020-08-14', '2020-08-17', '2020-08-18', '2020-08-19', '2020-08-20', '2020-08-21', '2020-08-24', '2020-08-25', '2020-08-26', '2020-08-27', '2020-08-28', '2020-08-31', '2020-09-01', '2020-09-02', '2020-09-03', '2020-09-04', '2020-09-07', '2020-09-08', '2020-09-09', '2020-09-10', '2020-09-11', '2020-09-14', '2020-09-15', '2020-09-16', '2020-09-17', '2020-09-18', '2020-09-21', '2020-09-22', '2020-09-23', '2020-09-24', '2020-09-25', '2020-09-28', '2