Skip to content

Latest commit

 

History

10 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Snippets

Copy-paste shell scripts for macOS setup and utilities. Each script is a self-contained, curl-to-bash one-liner.

Scripts

MacOS Dock

Reset Mac Dock to its original factory layout and default settings

defaults delete com.apple.dock; killall Dock

MacOS HotPlug disable

defaults -currentHost write com.apple.ImageCapture disableHotPlug -bool YES

Safari Custom User Agent

Set 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 CustomUserAgent

Homebrew defaults

Installs 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.

Screen mirror

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.

MAC address spoofing

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.

File exchange

P2P file sharing directly between devices — no upload, no server.

open https://neardrop.me/

IPTV web player

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.html

Supports touch swipe left/right for channel switching on mobile devices. Channels include national networks (La7, Nove, TV 2000, Real Time, DMAX, etc.), music/radio stations (RTL 102.5, Radio 105 TV, Deejay TV, RDS Social TV, etc.), and regional broadcasters.

About

Self-contained macOS setup scripts and utilities — Homebrew provisioning, screen mirroring, IPTV web player, and MAC spoofing

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages