Skip to content

Instantly share code, notes, and snippets.

@ShawInnes
Last active January 31, 2023 09:57
Show Gist options
  • Save ShawInnes/e42672d8645859604d2be320cff35777 to your computer and use it in GitHub Desktop.
Save ShawInnes/e42672d8645859604d2be320cff35777 to your computer and use it in GitHub Desktop.
New Mac Setup
#!/bin/sh
touch ~/.zprofile
COMPNAME="Titan"
sudo scutil --set ComputerName "$COMPNAME"
sudo scutil --set HostName "$COMPNAME"
sudo scutil --set LocalHostName "$COMPNAME"
sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.smb.server NetBIOSName -string "$COMPNAME"
xcode-select --install
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/shaw/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"
brew tap homebrew/cask
brew install jsonlint
brew install youtube-dl
brew install wget
brew install mas
brew install dockutil
brew install docker --cask
brew install docker-compose
brew install kubectl
brew install k3d
brew install k9s
brew install helm
brew install ghi # github issues client
brew install jq
brew install joplin
brew install plex
brew install zoom
brew install ultimaker-cura
brew install miro
brew install platformio
brew install azure-cli
brew install telnet
brew install microsoft-azure-storage-explorer
brew install git
brew tap microsoft/git
brew install --cask git-credential-manager-core
mas install `mas search "Airmail" | cut -f1 -d" "`
# mas install `mas search "Final Cut Pro" | egrep "[0-9] Final Cut Pro \(" | cut -f1 -d" "`
# mas install `mas search "Compressor" | egrep "[0-9] Compressor \(" | cut -f1 -d" "`
# mas install `mas search "Motion" | egrep "[0-9] Motion \(" | cut -f1 -d" "`
mas install `mas search "Kindle" | egrep "[0-9] Kindle \(" | cut -f1 -d" "`
brew tap isen-ng/dotnet-sdk-versions
brew install --cask dotnet-sdk6-0-405
brew install google-chrome
brew install firefox
brew install slack
brew install spotify
brew install alfred
brew install vlc
brew install calibre
brew install iterm2
brew install sketch
# brew cask install airparrot
# brew cask install reflector
brew install ultimaker-cura
brew install miro
brew install jetbrains-toolbox
brew install setapp
# Install oh-my-zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
dotnet tool install --global dotnet-outdated
dotnet tool install --global dotnet-ef
#vagrant plugin install vagrant-vmware-fusion
#vagrant plugin license vagrant-vmware-fusion ~/Downloads/license.lic
#vagrant plugin install vagrant-berkshelf
brew install visual-studio-code
# code --install-extension eg2.tslint
# code --install-extension ms-vscode.csharp
# code --install-extension dbaeumer.vscode-eslint
# code --install-extension msjsdiag.debugger-for-chrome
# code --install-extension HookyQR.beautify
# code --install-extension Pendrica.chef
# code --install-extension PeterJausovec.vscode-docker
# code --install-extension lonefy.vscode-js-css-html-formatter
# code --install-extension felipe.nasc-touchbar
## https://github.com/mas-cli/mas
# install node version manager
brew install nvm
nvm install --lts
nvm use --lts
brew install yarn
# install terraform version manager
brew install tfenv
tfenv install
tfenv use
# install ruby version manager
brew install rbenv
rbenv install 3.1.0
# install python version manager
brew install pyenv
pyenv install 3.6.5
dockutil --remove Launchpad
dockutil --remove Safari
dockutil --remove Mail
dockutil --remove Contacts
dockutil --remove Calendar
dockutil --remove Notes
dockutil --remove Reminders
dockutil --remove Maps
dockutil --remove Photos
dockutil --remove Messages
dockutil --remove FaceTime
dockutil --remove Pages
dockutil --remove Numbers
dockutil --remove Keynote
dockutil --remove Music
dockutil --remove News
dockutil --remove Podcasts
dockutil --remove "App Store"
dockutil --add "/Applications/Google Chrome.app"
dockutil --add "/Applications/iTerm.app"
dockutil --add "/Applications/Slack.app"
dockutil --add "/Applications/Joplin.app"
dockutil --add "/Applications/Spotify.app"
# Configure Git
git config --global user.name "Your Name Here"
git config --global user.email "[email protected]"
git config --global credential.helper osxkeychain
## Below settings borrowed from: https://github.com/donnemartin/dev-setup
# Disable audio at boot
sudo nvram SystemAudioVolume=" "
# Stop Chrome asking every time to open 3rd party links
defaults write com.google.Chrome ExternalProtocolDialogShowAlwaysOpenCheckbox -bool true
# Enable AAC codec for bluetooth audio
sudo defaults write bluetoothaudiod "Enable AAC codec" -bool true
# Save to disk (not to iCloud) by default
defaults write NSGlobalDomain NSDocumentSaveNewDocumentsToCloud -bool false
# Automatically quit printer app once the print jobs complete
defaults write com.apple.print.PrintingPrefs "Quit When Finished" -bool true
# Disable the “Are you sure you want to open this application?” dialog
defaults write com.apple.LaunchServices LSQuarantine -bool false
# Check for software updates daily, not just once per week
defaults write com.apple.SoftwareUpdate ScheduleFrequency -int 1
# Disable smart quotes as they’re annoying when typing code
defaults write NSGlobalDomain NSAutomaticQuoteSubstitutionEnabled -bool false
# Disable smart dashes as they’re annoying when typing code
defaults write NSGlobalDomain NSAutomaticDashSubstitutionEnabled -bool false
# Trackpad: enable tap to click for this user and for the login screen
defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad Clicking -bool true
defaults -currentHost write NSGlobalDomain com.apple.mouse.tapBehavior -int 1
defaults write NSGlobalDomain com.apple.mouse.tapBehavior -int 1
# Enable full keyboard access for all controls
# (e.g. enable Tab in modal dialogs)
defaults write NSGlobalDomain AppleKeyboardUIMode -int 3
# Set the timezone; see `sudo systemsetup -listtimezones` for other values
sudo systemsetup -settimezone "Australia/Brisbane" > /dev/null
# Require password immediately after sleep or screen saver begins
defaults write com.apple.screensaver askForPassword -int 1
defaults write com.apple.screensaver askForPasswordDelay -int 0
# Save screenshots to the Pictures/Screenshots
mkdir ${HOME}/Pictures/Screenshots
defaults write com.apple.screencapture location -string "${HOME}/Pictures/Screenshots"
# Save screenshots in PNG format (other options: BMP, GIF, JPG, PDF, TIFF)
defaults write com.apple.screencapture type -string "png"
# Finder: show all filename extensions
defaults write NSGlobalDomain AppleShowAllExtensions -bool true
# Finder: show status bar
defaults write com.apple.finder ShowStatusBar -bool true
# Finder: show path bar
defaults write com.apple.finder ShowPathbar -bool true
# Disable the warning when changing a file extension
defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false
# Avoid creating .DS_Store files on network volumes
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true
# Use scroll gesture with the Ctrl (^) modifier key to zoom
defaults write com.apple.universalaccess closeViewScrollWheelToggle -bool true
defaults write com.apple.universalaccess HIDScrollZoomModifierMask -int 262144
# Follow the keyboard focus while zoomed in
defaults write com.apple.universalaccess closeViewZoomFollowsFocus -bool true
# Disable disk image verification
defaults write com.apple.frameworks.diskimages skip-verify -bool true
defaults write com.apple.frameworks.diskimages skip-verify-locked -bool true
defaults write com.apple.frameworks.diskimages skip-verify-remote -bool true
# 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
# Top left screen corner → Mission Control
defaults write com.apple.dock wvous-tl-corner -int 2
defaults write com.apple.dock wvous-tl-modifier -int 0
# Bottom right screen corner → Start screen saver
defaults write com.apple.dock wvous-br-corner -int 5
defaults write com.apple.dock wvous-br-modifier -int 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment