Skip to content

Instantly share code, notes, and snippets.

View CuddlyBunion341's full-sized avatar
🌈
Happy Pride Month

Daniel Bengl CuddlyBunion341

🌈
Happy Pride Month
View GitHub Profile
#!/bin/bash
# Check if a directory to flatten is provided
if [ $# -ne 2 ]; then
echo "Usage: $0 <directory_to_flatten> <target_directory>"
exit 1
fi
SOURCE_DIR="$1"
TARGET_DIR="$2"
@CuddlyBunion341
CuddlyBunion341 / config.kdl
Last active May 9, 2025 05:49
Zellij Config
//
// THIS FILE WAS AUTOGENERATED BY ZELLIJ, THE PREVIOUS FILE AT THIS LOCATION WAS COPIED TO: /Users/dani/.config/zellij/config.kdl.bak.2
//
keybinds clear-defaults=true {
normal {
bind "Super c" { Copy; }
bind "Super [" { GoToPreviousTab; }
bind "Super ]" { GoToNextTab; }
bind "Super w" { CloseFocus; }
@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 ---