Copy-paste shell scripts for macOS setup and utilities. Each script is a self-contained, curl-to-bash one-liner.
Reset Mac Dock to its original factory layout and default settings
defaults delete com.apple.dock; killall Dockdefaults -currentHost write com.apple.ImageCapture disableHotPlug -bool YESSet as Chrome on Linux
USER_AGENT='Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/152.0.0.0 Safari/537.36'
defaults write com.apple.Safari CustomUserAgent \'$USER_AGENT\'Remove custom setting
defaults delete com.apple.Safari CustomUserAgentInstalls Homebrew, adds it to PATH, and sets up a standard set of packages.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/ntilau/Snippets/HEAD/brew.sh)"Installs: git, gh, sevenzip, tree, Google Chrome, ONLYOFFICE, Scroll Reverser, Syncthing, Claude Code.
Installs scrcpy and adb, connects to a Samsung device over the local network, and launches screen mirroring.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/ntilau/Snippets/HEAD/mirror.sh)"Requires USB debugging already enabled on the Android device.
Sets a custom MAC address on a network interface. Requires sudo.
if=en5
mac=cc:96:e5:d8:47:98
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/ntilau/Snippets/HEAD/mac.sh)" _ "$if" "$mac"The _ is a placeholder for $0 — the script reads the interface and MAC from $1 and $2. Use en0 for Wi-Fi on modern Macs; check with networksetup -listallhardwareports if unsure.
P2P file sharing directly between devices — no upload, no server.
open https://neardrop.me/A self-contained HTML page that plays 227 Italian TV and radio channels using HLS.js. Open in any browser — no server needed.
curl -O https://raw.githubusercontent.com/ntilau/Snippets/HEAD/index.htmlAdd this to your ~/.bash_aliases or ~/.zshrc
export ANTHROPIC_BASE_URL=https://api.deepseek.com/anthropic
export ANTHROPIC_AUTH_TOKEN=sk-***
export ANTHROPIC_MODEL=deepseek-v4-flash
export ANTHROPIC_DEFAULT_OPUS_MODEL=deepseek-v4-pro[1m]
export ANTHROPIC_DEFAULT_SONNET_MODEL=deepseek-v4-pro
export ANTHROPIC_DEFAULT_HAIKU_MODEL=deepseek-v4-flash
export CLAUDE_CODE_SUBAGENT_MODEL=deepseek-v4-flash
export CLAUDE_CODE_SUBAGENT_MODEL=deepseek-v4-flash