Skip to content

Instantly share code, notes, and snippets.

@ronaldbradford
Last active February 2, 2024 15:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ronaldbradford/a78d3983e663cc1db15eaa450c4b726f to your computer and use it in GitHub Desktop.
Save ronaldbradford/a78d3983e663cc1db15eaa450c4b726f to your computer and use it in GitHub Desktop.

First Time Install Instructions for Mac OS

  • System Preferences | Sharing | Set Computer Name (CLI automated)
  • System Preferences | Sharing | Tick Remote Login
  • System Preferences | Trackpad | Scroll & Zoom | untick Scroll Direction (CLI automated)
  • Set Screenprint to dedicated location (CLI automated)
  • Set default shell to bash (CLI automated)
# Set Computer Name
HOSTNAME="newname"
hostname
sudo scutil --set LocalHostName ${HOSTNAME}. #.local causes error
sudo scutil --set ComputerName ${HOSTNAME}
dscacheutil -flushcache
hostname

# Enable Remote Login
sudo systemsetup -setremotelogin on

# Turn off backwards scroll
defaults write -g com.apple.swipescrolldirection -bool FALSE

# Set dedicated screenprint directory
mkdir -p ${HOME}/screenprints
defaults write com.apple.screencapture location  ~/screenprints

# Set to bash shell
chsh -s /bin/bash

Brew Setup

Brew is the essential CLI package manager for MAC OS.

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
(echo; echo 'eval "$(/opt/homebrew/bin/brew shellenv)"') >> /Users/rbradfor/.bash_profile
eval "$(/opt/homebrew/bin/brew shellenv)"

# Essential simple CLI utilities
brew install wget htop rsync jq yq xq pigz shellcheck

iTerm

Improved Terminal manager

brew install iterm2
mkdir -p $HOME/log

iTerm Settings

  • iTerm | Settings | Profiles |
    • Terminal | Unlimited scrollback
    • Terminal | Tick Silence Bell
    • Session | Automatically log session imput to files & tick log plain text

Terminal Settings

Fix these for default terminal program also.

  • Terminal | Settings | Profiles
    • Advanced | untick Audible bell
    • Advanced | untick Visual bell

Python Setup

# xz is pre-requisite for lzma in python
brew install xz pyenv pyenv-virtualenv
pyenv --version
pyenv versions
pyenv install -l
pyenv install -l | grep 3.1[0-9]
pyenv install 3.12.1
pyenv global 3.12.1
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc
echo 'command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(pyenv init -)"' >> ~/.bashrc
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bash_profile
echo '[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bash_profile
echo 'eval "$(pyenv init -)"' >> ~/.bash_profile
exec "$SHELL"
python --version

Common Application Stack

  • Install Google Chrome
  • Install Firefox
  • Install Atom
  • Install VLC
  • Install Audicity
  • Install Slack
  • Install Discord
  • Install Signal
  • Install Zoom
  • Install Docker
  • Install MacVIM
  • Install ImageMagick
brew install google-chrome firefox
brew install atom vlc slack  discord signal docker macvim imagemagick
brew install --cask zoom
brew install --cask audacity

Mac Doc helper

https://github.com/kcrawford/dockutil

# Requires Python to run
# Sonoma is broken, requires actual /usr/bin/python?
brew install dockutil

dockutil --remove 'Maps' --allhomes
dockutil --remove 'Podcasts' --allhomes
dockutil --remove 'TV' --allhomes
dockutil --remove 'FaceTime' --allhomes
dockutil --remove 'Messages' --allhomes
dockutil --remove 'Mail' --allhomes
dockutil --remove 'Contacts' --allhomes
dockutil --remove 'Calendar' --allhomes
dockutil --remove 'News' --allhomes
dockutil --remove 'Numbers' --allhomes
dockutil --remove 'Keynote' --allhomes
dockutil --remove 'Pages' --allhomes
dockutil --remove 'Music' --allhomes
dockutil --remove 'App Store' --allhomes
dockutil --remove 'Reminders' --allhomes
dockutil --remove 'Notes' --allhomes

Tools one uses regularly

  • git
  • psql
  • mysql
  • aws
  • gcloud
  • az
brew install git libpq mysql-client awscli azure-cli
brew install --cask google-cloud-sdk
echo 'export PATH="/opt/homebrew/opt/libpq/bin:$PATH"' >> /Users/rbradfor/.bash_profile
echo 'export PATH="/opt/homebrew/opt/mysql-client/bin:$PATH"' >> /Users/rbradfor/.bash_profile

Web Development

brew install npm
node -v
npm -v
npx -v

Personalization Steps

  • Internal SSH key
ssh-keygen -b 2048 -t rsa -f ~/.ssh/id_rsa -q -N ""

TODO

  • whisper
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment