A collection of useful shell scripts for macOS
- macOS
- gsed (GNU sed)
git clone https://github.com/chrisbradleydev/executables.git
cd executablesTo make these scripts available system-wide, create symlinks in /usr/local/bin:
sudo ln -s "$(pwd)/bud" /usr/local/bin/bud
sudo ln -s "$(pwd)/epoch" /usr/local/bin/epoch
sudo ln -s "$(pwd)/google-chrome-hard-refresh" /usr/local/bin/google-chrome-hard-refresh
sudo ln -s "$(pwd)/stop" /usr/local/bin/stop
sudo ln -s "$(pwd)/zoom" /usr/local/bin/zoomAfter installation, you can run any script from anywhere in your terminal.
Creates a tar.gz archive of the current directory and moves it to the archive directory.
Usage:
budFeatures:
- Archives the current directory using its name as the filename
- Excludes the archive file itself from being included
- Moves the archive to the archive directory
Converts epoch time to human-readable date/time.
Usage:
epoch 946684800Features:
- Accepts an integer and outputs EST and GMT date/time.
Performs a hard refresh (Cmd+Shift+R) on the active Google Chrome tab.
Usage:
google-chrome-hard-refreshFeatures:
- Brings Google Chrome to the foreground
- Executes a hard refresh to bypass cache
Kills processes running on a specified TCP port.
Usage:
stop <port>Arguments:
port- The TCP port number
Examples:
stop 3000 # Kill process running on port 3000
stop 8080 # Kill process running on port 8080Features:
- Finds processes using the specified port
- Force kills the process with SIGKILL
Updates the zoom level in VS Code and Cursor settings across all profiles.
Usage:
zoom [level]Arguments:
level- Zoom level (default: 0). Can be positive or negative numbers, including decimals
Examples:
zoom 2 # Increase zoom to 2
zoom -0.5 # Decrease zoom to -0.5
zoom # Reset zoom to 0Features:
- Updates both VS Code and Cursor settings
- Handles all user profiles automatically