Skip to content

Instantly share code, notes, and snippets.

View CuddlyBunion341's full-sized avatar

Daniel Bengl CuddlyBunion341

View GitHub Profile
@CuddlyBunion341
CuddlyBunion341 / dir_watcher.sh
Last active May 1, 2025 10:51
Simple Directory watcher
#!/bin/bash
# Function to watch a directory for changes on macOS and execute a command.
# Requires fswatch to be installed (e.g., via Homebrew: brew install fswatch).
# Usage: watch_dir <directory> <command>
#
# Arguments:
# <directory>: The directory to watch for changes.
# <command>: The command to execute when a change is detected.
@CuddlyBunion341
CuddlyBunion341 / zip_split.sh
Created April 5, 2025 21:43
A script for breaking zipping directory with many files, keeping bundles within limit for Discord upload.
#!/bin/bash
set -euo pipefail
# --- Config ---
DEFAULT_MAX_SIZE_MB=500
ZIP_PREFIX="archive_part"
OUTPUT_DIR="zipped_parts"
# --- Help ---