Skip to content

Instantly share code, notes, and snippets.

@ethangunderson
Last active February 10, 2021 16:38
Show Gist options
  • Save ethangunderson/48e53e388a781a394103 to your computer and use it in GitHub Desktop.
Save ethangunderson/48e53e388a781a394103 to your computer and use it in GitHub Desktop.
new osx computer setup
osascript -e "tell application \"Terminal\" to set the font size of window 1 to 18"
touch ~/.hushlogin
xcode-select --install
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
brew install \
asdf \
awscli \
derailed/k9s/k9s \
fish \
git \
htop \
kubectl \
jq \
postgresql \
redis \
starship \
tree \
watch \
wget \
iterm2
brew install \
alfred \
aws-vault \
caffeine \
chromedriver \
docker \
launchrocket \
postgres \
postico \
spotify \
visual-studio-code
brew cleanup
#asfd plugins
asdf plugin-add nodejs https://github.com/asdf-vm/asdf-nodejs.git
asdf plugin-add ruby https://github.com/asdf-vm/asdf-ruby.git
asdf plugin-add yarn https://github.com/twuni/asdf-yarn.git
bash ~/.asdf/plugins/nodejs/bin/import-release-team-keyring
#Remove all applications from the dock, size it, restart
defaults write com.apple.dock static-only -bool true
defaults write com.apple.dock tilesize -integer 40
killall Dock
#Set fish as the default shell
echo /usr/local/bin/fish | sudo tee -a /etc/shells
chsh -s /usr/local/bin/fish
# Set DNS to Cloudflare
networksetup -setdnsservers Wi-Fi 0.0.0.0 1.0.0.1
#Auto quit the printer app when the print job completes
defaults write com.apple.print.PrintingPrefs "Quit When Finished" -bool true
# Disable smart quotes
defaults write NSGlobalDomain NSAutomaticQuoteSubstitutionEnabled -bool false
defaults write NSGlobalDomain NSAutomaticDashSubstitutionEnabled -bool false
#delete trash securely by default
defaults write com.apple.finder EmptyTrashSecurely -bool true
#don’t create .ds_stores on network drives
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true
# Expand save panel by default
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode2 -bool true
#disable OSX Gate Keeper
sudo spctl --master-disable
sudo defaults write /var/db/SystemPolicy-prefs.plist enabled -string no
defaults write com.apple.LaunchServices LSQuarantine -bool false
defaults write NSGlobalDomain AppleShowAllExtensions -bool true
defaults write com.apple.finder AppleShowAllFiles TRUE
#Always ask for password on sleep or screensaver
defaults write com.apple.screensaver askForPassword -int 1
defaults write com.apple.screensaver askForPasswordDelay -int 0
#Fast key repeat
defaults write NSGlobalDomain KeyRepeat -int 1
defaults write NSGlobalDomain ApplePressAndHoldEnabled -bool false
defaults write com.apple.finder CreateDesktop -bool false
# Automatically open a new Finder window when a volume is mounted
defaults write com.apple.frameworks.diskimages auto-open-ro-root -bool true
defaults write com.apple.frameworks.diskimages auto-open-rw-root -bool true
defaults write com.apple.finder OpenWindowForNewRemovableDisk -bool true
# Show the main window when launching Activity Monitor
defaults write com.apple.ActivityMonitor OpenMainWindow -bool true
# Visualize CPU usage in the Activity Monitor Dock icon
defaults write com.apple.ActivityMonitor IconType -int 5
# Show all processes in Activity Monitor
defaults write com.apple.ActivityMonitor ShowCategory -int 0
# Sort Activity Monitor results by CPU usage
defaults write com.apple.ActivityMonitor SortColumn -string "CPUUsage"
defaults write com.apple.ActivityMonitor SortDirection -int 0
# Enable snap-to-grid for icons on the desktop and in other icon views
/usr/libexec/PlistBuddy -c "Set :DesktopViewSettings:IconViewSettings:arrangeBy grid" ~/Library/Preferences/com.apple.finder.plist
/usr/libexec/PlistBuddy -c "Set :StandardViewSettings:IconViewSettings:arrangeBy grid" ~/Library/Preferences/com.apple.finder.plist
defaults write NSGlobalDomain AppleEnableMenuBarTransparency -bool false
defaults write NSGlobalDomain AppleShowScrollBars -string "Always"
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode2 -bool true
chflags nohidden ~/Library
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment