Skip to content

Instantly share code, notes, and snippets.

@GrfxGuru
Last active October 23, 2022 17:05
Show Gist options
  • Save GrfxGuru/12b1941f561d5e7b5be8ae7a5e07b98c to your computer and use it in GitHub Desktop.
Save GrfxGuru/12b1941f561d5e7b5be8ae7a5e07b98c to your computer and use it in GitHub Desktop.
My bootstrap for setting up a new macOS machine
#!/usr/bin/env bash
#
# Bootstrap script for setting up a macOS machine
#
#
echo "Remember to install Xcode from the Store first"
echo "Starting bootstrapping"
# Check for Homebrew, install if we don't have it
if test ! $(which brew); then
echo "Installing homebrew..."
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
fi
# Update homebrew recipes
brew update
PACKAGES=(
git
npm
pkg-config
postgresql
python
python3
pypy
rabbitmq
rename
ssh-copy-id
terminal-notifier
the_silver_searcher
tmux
tree
vim
wget
cheat
)
echo "Installing packages..."
brew install ${PACKAGES[@]}
echo "Cleaning up..."
brew cleanup
echo "Installing cask..."
brew tap homebrew/cask
CASKS=(
alfred
audio-hijack
carbon-copy-cloner
choosy
devonthink
dropbox
farrago
firefox
fission
google-chrome
grammarly
iterm2
keyboard-maestro
google-drive
loopback
omnifocus
path-finder
skype
slack
screenflow
sherlock
sketch
spamsieve
spotify
steam
sublime-text
tower
tunnelbear
visual-studio-code
vlc
homebrew/cask-fonts/font-victor-mono
qlmarkdown
quicklook-json
qlimagesize
)
echo "Installing cask apps..."
brew cask install ${CASKS[@]}
echo "Installing fonts..."
brew tap homebrew/cask-fonts
FONTS=(
font-inconsolidata
font-roboto
font-clear-sans
font-hack-nerd-font
font-hack
font-source-code-pro
font-space-mono
font-jetbrains-mono
)
brew cask install ${FONTS[@]}
echo "Installing Python packages..."
PYTHON_PACKAGES=(
ipython
virtualenv
virtualenvwrapper
)
sudo pip install ${PYTHON_PACKAGES[@]}
echo "Installing Ruby gems"
RUBY_GEMS=(
bundler
filewatcher
cocoapods
colorls
xcode-install
pprof
)
sudo gem install ${RUBY_GEMS[@]}
echo "Installing global npm packages..."
npm install marked -g
echo "Configuring OSX..."
# Set fast key repeat rate
defaults write NSGlobalDomain KeyRepeat -int 0
# Require password as soon as screensaver or sleep mode starts
defaults write com.apple.screensaver askForPassword -int 1
defaults write com.apple.screensaver askForPasswordDelay -int 0
# Show filename extensions by default
defaults write NSGlobalDomain AppleShowAllExtensions -bool true
# Enable tap-to-click
defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad Clicking -bool true
defaults -currentHost write NSGlobalDomain com.apple.mouse.tapBehavior -int 1
echo "Bootstrapping complete"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment