Skip to content

Instantly share code, notes, and snippets.

@mralexgray
Forked from codeinthehole/osx_bootstrap.sh
Last active April 20, 2020 04:36
Show Gist options
  • Save mralexgray/a68c1ea7cbcb13e70bdcb7acce0ac848 to your computer and use it in GitHub Desktop.
Save mralexgray/a68c1ea7cbcb13e70bdcb7acce0ac848 to your computer and use it in GitHub Desktop.
Script to install stuff I want on a new OSX machine
tap "caskroom/cask"
tap "denji/nginx"
tap "homebrew/bundle"
tap "homebrew/cask"
tap "homebrew/cask-fonts"
tap "homebrew/cask-versions"
tap "homebrew/core"
tap "homebrew/dupes"
tap "homebrew/services"
tap "mongodb/brew"
tap "osx-cross/avr"
# cask "osxfuse"
brew "autoconf"
brew "automake"
brew "avr-libc"
brew "avrdude"
brew "binutils", link: true
brew "gettext"
brew "certbot"
# brew "cocoapods"
brew "coreutils"
brew "esptool"
brew "jpeg"
brew "ffmpeg"
# Install GNU `find`, `locate`, `updatedb`, and `xargs`, g-prefixed
brew "findutils"
# brew "freeswitch"
brew "fzf"
brew "gdrive"
brew "git"
# Install GNU core utilities (those that come with OS X are outdated)
brew "gnu-sed", args: ["--with-default-names"]
brew "gnu-tar", args: ["--with-default-names"]
brew "gnu-indent", args: ["--with-default-names"]
brew "gnu-which", args: ["--with-default-names"]
brew "gnu-grep", args: ["--with-default-names"]
brew "gperf"
brew "grep"
brew "help2man"
brew "hub"
brew "jq"
brew "libid3tag"
brew "libmicrohttpd"
brew "libtool"
brew "mas"
brew "minicom"
brew "mosh"
brew "mplayer"
brew "nmap"
brew "node"
# brew "node", link: false
brew "pianobar"
brew "pidof"
brew "pkg-config"
# brew "platformio"
# brew "postgresql"
brew "rclone"
brew "renameutils"
brew "speedtest-cli"
brew "sphinx-doc"
brew "sshfs"
brew "ssh-copy-id"
brew "trash-cli"
brew "unrar"
brew "wget"
brew "youtube-dl"
brew "z"
# brew "zsh"
# brew "denji/nginx/nginx-full", args: ["with-fancyindex-module", "with-mp4-h264-module", "with-rtmp-module", "with-status", "with-stream", "with-vod-module"]
# brew "mongodb/brew/mongodb-community"
cask "aja-system-test"
cask "arduino"
cask "balenaetcher"
cask "bonjour-browser"
cask "calibre"
cask "cricut-design-space"
cask "dbschema"
cask "flash-player"
cask "flashlighttool"
cask "font-homemade-apple"
cask "font-nothing-you-could-do"
cask "font-share-tech-mono"
cask "font-ubuntu-mono-derivative-powerline"
cask "fritzing"
cask "gimp"
cask "google-chrome-canary"
cask "google-drive-file-stream"
cask "inkscape"
cask "iterm2"
cask "jeromelebel-mongohub"
cask "karabiner-elements"
cask "kicad"
cask "launchrocket"
cask "linein"
cask "livereload"
cask "namechanger"
cask "obs"
cask "qlvideo"
cask "quicktime-player7"
cask "ringcentral-meetings"
cask "smcfancontrol"
cask "the-unarchiver"
cask "unrarx"
cask "virtualbox"
cask "vlc-nightly"
cask "xquartz"
# mas "AJA System Test Lite", id: 1092006274
# mas "Apple Configurator 2", id: 1037126344
# mas "Countdowns", id: 926707738
# mas "Discovery", id: 1381004916
# mas "EnumHelperForXcode", id: 1168548047
# mas "Keynote", id: 409183694
# mas "Music Control", id: 494988859
# mas "Numbers", id: 409203825
# mas "Pages", id: 409201541
# mas "Shazam", id: 897118787
# mas "Swiftify for Xcode", id: 1183412116
#!/usr/bin/env bash
# Bootstrap script for setting up a new OSX machine
# This should be idempotent so it can be run multiple times.
# Notes:
# - If installing full Xcode, it's better to install that first from the app
# store before running the bootstrap script. Otherwise, Homebrew can't access
# the Xcode libraries as the agreement hasn't been accepted yet.
# Reading:
# - http://lapwinglabs.com/blog/hacker-guide-to-setting-up-your-mac
# - https://gist.github.com/MatthewMueller/e22d9840f9ea2fee4716
# - https://news.ycombinator.com/item?id=8402079
# - http://notes.jerzygangi.com/the-best-pgp-tutorial-for-mac-os-x-ever/
echo "Starting bootstrapping"
# Install command line dev tools
/usr/bin/xcode-select -p > /dev/null 2>&1
if [ $# != 0 ]; then
xcode-select --install
sudo xcodebuild -license accept
fi
# Change default shell to `zsh`
chsh -s /bin/zsh
# 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
# echo "Installing global npm packages..."
# npm install marked -g
echo "Configuring OSX..."1
# 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