Last active
July 23, 2023 15:21
-
-
Save maxackerman/930146246c6a023f4ac0e7c09cf05a68 to your computer and use it in GitHub Desktop.
bash srcipt to setup a new mac with homebrew and dev environment
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # BACKUP BEFORE WIPE: | |
| # SSH keys | |
| # Fonts | |
| # Keychain passwords | |
| # files outside dropbox: downloads, documetns, photos | |
| # music itunes | |
| # bash profile | |
| # transmit favs | |
| # reference: | |
| # https://github.com/thoughtbot/laptop | |
| # https://github.com/tylucaskelley/setup | |
| # http://sourabhbajaj.com/mac-setup/ | |
| echo "Starting configuration..." | |
| if ! brew help &> /dev/null; then | |
| echo "installing homebrew..." | |
| /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
| else | |
| echo "homebrew already installed" | |
| fi | |
| echo "Updating Homebrew formulae ..." | |
| brew update | |
| echo "Begin Homebrew bundle install..." | |
| brew bundle --file=- <<EOF | |
| tap "homebrew/cask" | |
| tap "homebrew/cask-drivers" | |
| # brew | |
| brew "dockutil" | |
| brew "git" | |
| brew "ffmpeg" | |
| brew "youtube-dl" | |
| brew "node" | |
| brew "imagemagick" | |
| brew "rbenv" | |
| brew "ruby-build" | |
| brew "rsync" | |
| # osx apps | |
| cask "adobe-creative-cloud" | |
| cask "alfred" | |
| cask "arq" | |
| cask "authy" | |
| cask "dropbox" | |
| cask "firefox" | |
| cask "google-chrome" | |
| cask "hazel" | |
| cask "mamp" | |
| cask "microsoft-office" | |
| cask "numi" | |
| cask "nvalt" | |
| cask "sketch" | |
| cask "slack" | |
| cask "spectacle" | |
| cask "spotify" | |
| cask "sublime-text" | |
| cask "suitcase-fusion" | |
| cask "superduper" | |
| cask "tower" | |
| cask "transmit" | |
| cask "vlc" | |
| # drivers | |
| cask "wacom-tablet" | |
| EOF | |
| echo "brew cleanup..." | |
| brew cleanup | |
| # youtube-dl config | |
| mkdir ~/.config/youtube-dl && touch ~/.config/youtube-dl/config | |
| echo '-f bestvideo[ext=mp4]+bestaudio[ext=m4a]/mp4' >> ~/.config/youtube-dl/config | |
| # RUBY | |
| # https://gorails.com/setup/osx/10.14-mojave | |
| # https://sourabhbajaj.com/mac-setup/Ruby/ | |
| echo "Begin Ruby config..." | |
| # Add rbenv to bash so that it loads every time you open a terminal | |
| echo 'if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi' >> ~/.bash_profile | |
| source ~/.bash_profile | |
| rbenv install 2.6.1 | |
| rbenv global 2.6.1 | |
| ruby -v | |
| echo "Begin OSX Settings..." | |
| # OSX Settings | |
| # reference: https://github.com/keith/dotfiles/blob/master/osx/defaults.sh | |
| # Disable "shake to find mouse" | |
| defaults write NSGlobalDomain CGDisableCursorLocationMagnification -bool true | |
| # Enable two button mouse | |
| defaults write com.apple.driver.AppleBluetoothMultitouch.mouse.plist MouseButtonMode -string "TwoButton" | |
| # 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 | |
| # set key repeat speed | |
| defaults write -g InitialKeyRepeat -int 15 | |
| defaults write -g KeyRepeat -int 2 | |
| # When performing a search, search the current folder by default | |
| defaults write com.apple.finder FXDefaultSearchScope -string SCcf | |
| # Dont reopen apps after shutdown | |
| defaults write -g ApplePersistence -bool no | |
| # Automatically hide and show the Dock | |
| defaults write com.apple.dock autohide -bool true | |
| # Change the auto-hiding Dock delay adn speed | |
| defaults write com.apple.dock autohide-delay -float 0.0 | |
| defaults write com.apple.dock autohide-time-modifier -float 0.5 | |
| # set DNS servers | |
| networksetup -setdnsservers Wi-Fi 1.1.1.1 1.0.0.1 2606:4700:4700::1111 2606:4700:4700::1001 | |
| # Dock setup | |
| if command -v dockutil; then | |
| dockutil --remove all | |
| else | |
| echo "dockutil not installed, re-run after installing" | |
| fi | |
| echo "Setup process complete!" | |
| # MANUAL SETUP | |
| # install font manager | |
| # adobe-creative-cloud run the installer '/usr/local/Caskroom/adobe-creative-cloud/latest/Creative Cloud Installer.app' | |
| # git config | |
| # mamp settings: set server ports to 80, 81, 433... | |
| # Spectacle: remove shortcuts that conflict with photoshop undo, start at login, and set as background application | |
| # setup Dropbox | |
| # Alfred: link settings in dropbox | |
| # Sublime: link settings in dropbox |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment