Skip to content

Instantly share code, notes, and snippets.

View nomnivore's full-sized avatar

Kyle nomnivore

  • Student
  • 16:20 (UTC -04:00)
View GitHub Profile
#!/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
@nomnivore
nomnivore / debounce.js
Created November 29, 2022 18:20
JS utils
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);
};