Skip to content

Instantly share code, notes, and snippets.

@bradp
Last active July 22, 2025 23:13

Revisions

  1. bradp revised this gist Oct 21, 2014. 1 changed file with 0 additions and 1 deletion.
    1 change: 0 additions & 1 deletion setup.sh
    Original file line number Diff line number Diff line change
    @@ -109,7 +109,6 @@ apps=(
    transmission
    zoomus
    onepassword
    rescue
    sequel-pro
    chromecast
    qlmarkdown
  2. bradp revised this gist Oct 20, 2014. No changes.
  3. bradp revised this gist Oct 20, 2014. 1 changed file with 4 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions setup.sh
    Original file line number Diff line number Diff line change
    @@ -289,6 +289,10 @@ defaults write org.m0k.transmission WarningLegal -bool false
    #"Disable 'natural' (Lion-style) scrolling"
    defaults write NSGlobalDomain com.apple.swipescrolldirection -bool false

    # Don’t automatically rearrange Spaces based on most recent use
    defaults write com.apple.dock mru-spaces -bool false



    killall Finder

  4. bradp revised this gist Oct 20, 2014. 1 changed file with 4 additions and 4 deletions.
    8 changes: 4 additions & 4 deletions setup.sh
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,7 @@ echo "Creating an SSH key for you..."
    ssh-keygen -t rsa

    echo "Please add this public key to Github \n"
    echo "https://help.github.com/articles/generating-ssh-keys/ \n"
    echo "https://github.com/account/ssh \n"
    read -p "Press [Enter] key after this..."

    echo "Installing xcode-stuff"
    @@ -52,8 +52,8 @@ brew install caskroom/cask/brew-cask

    echo "Copying dotfiles from Github"
    cd ~
    git clone [email protected]:bradp/dotfiles.git
    cd dotfiles
    git clone [email protected]:bradp/dotfiles.git .dotfiles
    cd .dotfiles
    sh symdotfiles

    echo "Grunting it up"
    @@ -64,7 +64,7 @@ echo "Installing Oh My ZSH..."
    curl -L http://install.ohmyz.sh | sh

    echo "Setting up Oh My Zsh theme..."
    cd /Users/bradparbs/.oh-my-zsh/themes
    cd /Users/bradparbs/.oh-my-zsh/themes
    curl https://gist.githubusercontent.com/bradp/a52fffd9cad1cd51edb7/raw/cb46de8e4c77beb7fad38c81dbddf531d9875c78/brad-muse.zsh-theme > brad-muse.zsh-theme

    echo "Setting up Zsh plugins..."
  5. bradp revised this gist Oct 20, 2014. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion setup.sh
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    echo "Creating an SSH key for you..."
    ssh-keygen -t rsa
    #@TODO make a public key

    echo "Please add this public key to Github \n"
    echo "https://help.github.com/articles/generating-ssh-keys/ \n"
    read -p "Press [Enter] key after this..."
  6. bradp revised this gist Oct 20, 2014. 1 changed file with 15 additions and 1 deletion.
    16 changes: 15 additions & 1 deletion setup.sh
    Original file line number Diff line number Diff line change
    @@ -1,8 +1,13 @@
    echo "Creating an SSH key for you..."
    ssh-keygen -t rsa
    #@TODO make a public key
    echo "Please add your public key to Github \n"
    echo "Please add this public key to Github \n"
    echo "https://help.github.com/articles/generating-ssh-keys/ \n"
    read -p "Press [Enter] key after this..."

    echo "Installing xcode-stuff"
    xcode-select --install

    # Check for Homebrew,
    # Install if we don't have it
    if test ! $(which brew); then
    @@ -17,6 +22,12 @@ brew update
    echo "Installing Git..."
    brew install git

    echo "Git config"

    git config --global user.name "Brad Parbs"
    git config --global user.email [email protected]


    echo "Installing brew git utilities..."
    brew install git-extras
    brew install legit
    @@ -60,6 +71,9 @@ echo "Setting up Zsh plugins..."
    cd ~/.oh-my-zsh/custom/plugins
    git clone git://github.com/zsh-users/zsh-syntax-highlighting.git

    echo "Setting ZSH as shell..."
    chsh -s /bin/zsh

    # Apps
    apps=(
    alfred
  7. bradp created this gist Oct 20, 2014.
    284 changes: 284 additions & 0 deletions setup.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,284 @@
    #@TODO make a public key
    echo "Please add your public key to Github \n"
    echo "https://help.github.com/articles/generating-ssh-keys/ \n"
    read -p "Press [Enter] key after this..."

    # 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
    echo "Updating homebrew..."
    brew update

    echo "Installing Git..."
    brew install git

    echo "Installing brew git utilities..."
    brew install git-extras
    brew install legit
    brew install git-flow

    echo "Installing other brew stuff..."
    brew install tree
    brew install wget
    brew install trash
    brew install svn
    brew install mackup
    brew install node


    #@TODO install our custom fonts and stuff

    echo "Cleaning up brew"
    brew cleanup

    echo "Installing homebrew cask"
    brew install caskroom/cask/brew-cask

    echo "Copying dotfiles from Github"
    cd ~
    git clone [email protected]:bradp/dotfiles.git
    cd dotfiles
    sh symdotfiles

    echo "Grunting it up"
    npm install -g grunt-cli

    #Install Zsh & Oh My Zsh
    echo "Installing Oh My ZSH..."
    curl -L http://install.ohmyz.sh | sh

    echo "Setting up Oh My Zsh theme..."
    cd /Users/bradparbs/.oh-my-zsh/themes
    curl https://gist.githubusercontent.com/bradp/a52fffd9cad1cd51edb7/raw/cb46de8e4c77beb7fad38c81dbddf531d9875c78/brad-muse.zsh-theme > brad-muse.zsh-theme

    echo "Setting up Zsh plugins..."
    cd ~/.oh-my-zsh/custom/plugins
    git clone git://github.com/zsh-users/zsh-syntax-highlighting.git

    # Apps
    apps=(
    alfred
    bartender
    bettertouchtool
    cleanmymac
    cloud
    colloquy
    cornerstone
    diffmerge
    dropbox
    filezilla
    firefox
    google-chrome
    harvest
    hipchat
    licecap
    mou
    phpstorm
    private-internet-access
    razer-synapse
    sourcetree
    steam
    spotify
    vagrant
    iterm2
    sublime-text2
    textexpander
    virtualbox
    mailbox
    vlc
    skype
    transmission
    zoomus
    onepassword
    rescue
    sequel-pro
    chromecast
    qlmarkdown
    qlstephen
    suspicious-package
    )

    # Install apps to /Applications
    # Default is: /Users/$user/Applications
    echo "installing apps with Cask..."
    brew cask install --appdir="/Applications" ${apps[@]}

    brew cask alfred link

    brew cask cleanup
    brew cleanup

    echo "Please setup and sync Dropbox, and then run this script again."
    read -p "Press [Enter] key after this..."

    echo "Restoring setup from Mackup..."
    #mackup restore @TODO uncomment


    echo "Setting some Mac settings..."

    #"Disabling system-wide resume"
    defaults write NSGlobalDomain NSQuitAlwaysKeepsWindows -bool false

    #"Disabling automatic termination of inactive apps"
    defaults write NSGlobalDomain NSDisableAutomaticTermination -bool true

    #"Allow text selection in Quick Look"
    defaults write com.apple.finder QLEnableTextSelection -bool TRUE

    #"Disabling OS X Gate Keeper"
    #"(You'll be able to install any app you want from here on, not just Mac App Store apps)"
    sudo spctl --master-disable
    sudo defaults write /var/db/SystemPolicy-prefs.plist enabled -string no
    defaults write com.apple.LaunchServices LSQuarantine -bool false

    #"Expanding the save panel by default"
    defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true
    defaults write NSGlobalDomain PMPrintingExpandedStateForPrint -bool true
    defaults write NSGlobalDomain PMPrintingExpandedStateForPrint2 -bool true

    #"Automatically quit printer app once the print jobs complete"
    defaults write com.apple.print.PrintingPrefs "Quit When Finished" -bool true

    #"Saving to disk (not to iCloud) by default"
    defaults write NSGlobalDomain NSDocumentSaveNewDocumentsToCloud -bool false

    #"Check for software updates daily, not just once per week"
    defaults write com.apple.SoftwareUpdate ScheduleFrequency -int 1

    #"Disable smart quotes and smart dashes as they are annoying when typing code"
    defaults write NSGlobalDomain NSAutomaticQuoteSubstitutionEnabled -bool false
    defaults write NSGlobalDomain NSAutomaticDashSubstitutionEnabled -bool false

    #"Enabling full keyboard access for all controls (e.g. enable Tab in modal dialogs)"
    defaults write NSGlobalDomain AppleKeyboardUIMode -int 3

    #"Disabling press-and-hold for keys in favor of a key repeat"
    defaults write NSGlobalDomain ApplePressAndHoldEnabled -bool false

    #"Setting trackpad & mouse speed to a reasonable number"
    defaults write -g com.apple.trackpad.scaling 2
    defaults write -g com.apple.mouse.scaling 2.5

    #"Enabling subpixel font rendering on non-Apple LCDs"
    defaults write NSGlobalDomain AppleFontSmoothing -int 2

    #"Showing icons for hard drives, servers, and removable media on the desktop"
    defaults write com.apple.finder ShowExternalHardDrivesOnDesktop -bool true

    #"Showing all filename extensions in Finder by default"
    defaults write NSGlobalDomain AppleShowAllExtensions -bool true

    #"Disabling the warning when changing a file extension"
    defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false

    #"Use column view in all Finder windows by default"
    defaults write com.apple.finder FXPreferredViewStyle Clmv

    #"Avoiding the creation of .DS_Store files on network volumes"
    defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true

    #"Enabling 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 :FK_StandardViewSettings:IconViewSettings:arrangeBy grid" ~/Library/Preferences/com.apple.finder.plist
    /usr/libexec/PlistBuddy -c "Set :StandardViewSettings:IconViewSettings:arrangeBy grid" ~/Library/Preferences/com.apple.finder.plist

    #"Setting the icon size of Dock items to 36 pixels for optimal size/screen-realestate"
    defaults write com.apple.dock tilesize -int 36

    #"Speeding up Mission Control animations and grouping windows by application"
    defaults write com.apple.dock expose-animation-duration -float 0.1
    defaults write com.apple.dock "expose-group-by-app" -bool true

    #"Setting Dock to auto-hide and removing the auto-hiding delay"
    defaults write com.apple.dock autohide -bool true
    defaults write com.apple.dock autohide-delay -float 0
    defaults write com.apple.dock autohide-time-modifier -float 0

    #"Setting email addresses to copy as '[email protected]' instead of 'Foo Bar <[email protected]>' in Mail.app"
    defaults write com.apple.mail AddressesIncludeNameOnPasteboard -bool false

    #"Enabling UTF-8 ONLY in Terminal.app and setting the Pro theme by default"
    defaults write com.apple.terminal StringEncodings -array 4
    defaults write com.apple.Terminal "Default Window Settings" -string "Pro"
    defaults write com.apple.Terminal "Startup Window Settings" -string "Pro"

    #"Preventing Time Machine from prompting to use new hard drives as backup volume"
    defaults write com.apple.TimeMachine DoNotOfferNewDisksForBackup -bool true

    #"Disable the sudden motion sensor as its not useful for SSDs"
    sudo pmset -a sms 0

    #"Speeding up wake from sleep to 24 hours from an hour"
    # http://www.cultofmac.com/221392/quick-hack-speeds-up-retina-macbooks-wake-from-sleep-os-x-tips/
    sudo pmset -a standbydelay 86400

    #"Disable annoying backswipe in Chrome"
    defaults write com.google.Chrome AppleEnableSwipeNavigateWithScrolls -bool false

    #"Setting screenshots location to ~/Desktop"
    defaults write com.apple.screencapture location -string "$HOME/Desktop"

    #"Setting screenshot format to PNG"
    defaults write com.apple.screencapture type -string "png"

    #"Hiding Safari's bookmarks bar by default"
    defaults write com.apple.Safari ShowFavoritesBar -bool false

    #"Hiding Safari's sidebar in Top Sites"
    defaults write com.apple.Safari ShowSidebarInTopSites -bool false

    #"Disabling Safari's thumbnail cache for History and Top Sites"
    defaults write com.apple.Safari DebugSnapshotsUpdatePolicy -int 2

    #"Enabling Safari's debug menu"
    defaults write com.apple.Safari IncludeInternalDebugMenu -bool true

    #"Making Safari's search banners default to Contains instead of Starts With"
    defaults write com.apple.Safari FindOnPageMatchesWordStartsOnly -bool false

    #"Removing useless icons from Safari's bookmarks bar"
    defaults write com.apple.Safari ProxiesInBookmarksBar "()"

    #"Allow hitting the Backspace key to go to the previous page in history"
    defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2BackspaceKeyNavigationEnabled -bool true

    #"Enabling the Develop menu and the Web Inspector in Safari"
    defaults write com.apple.Safari IncludeDevelopMenu -bool true
    defaults write com.apple.Safari WebKitDeveloperExtrasEnabledPreferenceKey -bool true
    defaults write com.apple.Safari "com.apple.Safari.ContentPageGroupIdentifier.WebKit2DeveloperExtrasEnabled" -bool true

    #"Adding a context menu item for showing the Web Inspector in web views"
    defaults write NSGlobalDomain WebKitDeveloperExtras -bool true

    #"Use `~/Downloads/Incomplete` to store incomplete downloads"
    defaults write org.m0k.transmission UseIncompleteDownloadFolder -bool true
    defaults write org.m0k.transmission IncompleteDownloadFolder -string "${HOME}/Downloads/Incomplete"

    #"Don't prompt for confirmation before downloading"
    defaults write org.m0k.transmission DownloadAsk -bool false

    #"Trash original torrent files"
    defaults write org.m0k.transmission DeleteOriginalTorrent -bool true

    #"Hide the donate message"
    defaults write org.m0k.transmission WarningDonate -bool false

    #"Hide the legal disclaimer"
    defaults write org.m0k.transmission WarningLegal -bool false

    #"Disable 'natural' (Lion-style) scrolling"
    defaults write NSGlobalDomain com.apple.swipescrolldirection -bool false


    killall Finder


    echo "Done!"

    #@TODO install vagrant and sites folder