This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# A semi-interactive script for NixOS pre-installation tasks | |
# (Partitioning, Formatting, and Initial Mounting) | |
# --- Terminal Color Variables --- | |
RED=$'\e[31m' # For Errors and Warnings | |
GREEN=$'\e[32m' # For Success and Main Headers/Highlighting | |
YELLOW=$'\e[33m' # For Notes and Prompts | |
CYAN=$'\e[36m' # For Step Headers |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const debounce = (func, timeout = 500) => { | |
let timer; | |
return function (...args) { | |
const context = this; | |
if (timer) clearTimeout(timer); | |
timer = setTimeout(() => { | |
timer = null; | |
func.apply(context, args); | |
}, timeout); | |
}; |