-
-
Save wass3r/50123b88dcd2c8d7623d to your computer and use it in GitHub Desktop.
OSX Setup
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
| # Get Sudo. | |
| if [ $EUID != 0 ]; then | |
| sudo "$0" "$@" | |
| exit $? | |
| fi | |
| # Install Xcode command line tools. | |
| xcode-select --install | |
| # Install Homebrew. | |
| ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
| # Configure Homebrew. | |
| brew doctor | |
| # Setup Homebrew Cask. | |
| brew tap caskroom/cask | |
| brew install brew-cask | |
| brew tap caskroom/versions | |
| brew tap homebrew/dupes | |
| brew tap homebrew/versions | |
| brew tap homebrew/homebrew-php | |
| brew tap homebrew/services | |
| brew update && brew upgrade brew-cask && brew cleanup && brew cask cleanup | |
| # Setup Homebrew fonts. | |
| brew tap caskroom/fonts | |
| # Nicer plugins for QuickLook. | |
| brew cask install qlcolorcode | |
| brew cask install qlstephen | |
| brew cask install qlmarkdown | |
| brew cask install quicklook-json | |
| brew cask install webpquicklook | |
| brew cask install qlimagesize | |
| # Apps. | |
| brew cask install google-chrome | |
| brew cask install appcleaner | |
| brew cask install dropbox | |
| brew cask install sublime-text3 | |
| brew cask install cakebrew | |
| brew cask install cyberduck | |
| brew cask install steam | |
| brew cask install owncloud | |
| brew cask install the-unarchiver | |
| brew cask install firefox | |
| brew cask install phpstorm | |
| brew cask install androidtool | |
| brew cask install android-studio | |
| brew cask install virtualbox | |
| brew cask install genymotion | |
| brew cask install slack | |
| brew cask install spotify | |
| brew cask install droplr | |
| brew cask install mou | |
| brew cask install skype | |
| brew cask install resolutionator | |
| brew cask install go2shell | |
| brew cask install sourcetree | |
| brew cask install fabric | |
| brew cask install imageoptim | |
| brew cask install jd-gui | |
| brew cask install sequel-pro | |
| brew cask install grandperspective | |
| # System tools. | |
| brew install coreutils | |
| brew install findutils --with-default-names | |
| brew install bash | |
| brew install homebrew/dupes/grep --with-default-names | |
| brew install git | |
| brew install git-flow | |
| brew install nano | |
| brew install vim | |
| brew install emacs | |
| brew install openssh | |
| brew install unzip | |
| brew install node | |
| brew install java | |
| brew install jenv | |
| brew install python | |
| curl -L https://get.rvm.io | bash -s stable --ruby | |
| brew install mysql | |
| brew install php56-opcache | |
| brew install composer | |
| brew cask install dockertoolbox | |
| brew install android-sdk | |
| brew cask install vagrant | |
| brew cask install vagrant-manager | |
| # Setup OSX to use Homebrew-installed apps. | |
| echo 'export PATH="/usr/local/bin:$PATH"' >> ~/.bash_profile | |
| echo 'export PATH="$(brew --prefix coreutils)/libexec/gnubin:/usr/local/bin:$PATH"' >> ~/.bash_profile | |
| echo 'export PATH="$HOME/.jenv/bin:$PATH"' >> ~/.bash_profile | |
| echo 'eval "$(jenv init -)"' >> ~/.bash_profile | |
| # Setup Git. | |
| read -e -p "Enter your git username: " USERNAME | |
| read -e -p "Enter your git email address: " EMAIL | |
| git config --global user.name $USERNAME | |
| git config --global user.email $EMAIL | |
| ssh-keygen -t rsa -b 4096 -C $EMAIL | |
| eval "$(ssh-agent -s)" | |
| ssh-add ~/.ssh/id_rsa | |
| pbcopy < ~/.ssh/id_rsa.pub | |
| sudo ln -s /usr/local/bin/git-flow /usr/bin/git-flow | |
| sudo ln -s /usr/local/bin/gitflow-common /usr/bin/gitflow-common | |
| sudo ln -s /usr/local/bin/git-flow-init /usr/bin/git-flow-init | |
| sudo ln -s /usr/local/bin/git-flow-version /usr/bin/git-flow-version | |
| sudo ln -s /usr/local/bin/git-flow-feature /usr/bin/git-flow-feature | |
| sudo ln -s /usr/local/bin/git-flow-release /usr/bin/git-flow-release | |
| sudo ln -s /usr/local/bin/git-flow-hotfix /usr/bin/git-flow-hotfix | |
| sudo ln -s /usr/local/bin/git-flow-support /usr/bin/git-flow-support | |
| sudo ln -s /usr/local/bin/gitflow-shFlags /usr/bin/gitflow-shFlags | |
| # ZSH replacing shell. | |
| brew install zsh | |
| curl -L http://install.ohmyz.sh | sh | |
| # All done with Homebrew. | |
| brew update && brew upgrade && brew cleanup && brew cask cleanup | |
| # Expand "Save" and "Print" panels. | |
| defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true | |
| defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode2 -bool true | |
| defaults write NSGlobalDomain PMPrintingExpandedStateForPrint -bool true | |
| defaults write NSGlobalDomain PMPrintingExpandedStateForPrint2 -bool true | |
| # Use current directory as default search scope in Finder. | |
| defaults write com.apple.finder FXDefaultSearchScope -string "SCcf" | |
| # Remove duplicate "Open With" options. | |
| /System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user | |
| # Show extensions in Finder. | |
| defaults write NSGlobalDomain AppleShowAllExtensions -bool true | |
| # Show path in Finder. | |
| defaults write com.apple.finder ShowPathbar -bool true | |
| defaults write com.apple.finder _FXShowPosixPathInTitle -bool true | |
| # Allow selecting text in Quick Look. | |
| defaults write com.apple.finder QLEnableTextSelection -bool true | |
| # Use OSX print dialog in Chrome. | |
| defaults write com.google.Chrome DisablePrintPreview -bool true | |
| defaults write com.google.Chrome PMPrintingExpandedStateForPrint2 -bool true | |
| # Copy email addresses, not names, from Mail. | |
| defaults write com.apple.mail AddressesIncludeNameOnPasteboard -bool false | |
| # Quit Printer app when complete. | |
| defaults write com.apple.print.PrintingPrefs "Quit When Finished" -bool true | |
| # Ignore Quarentine of unknown apps. | |
| defaults write com.apple.LaunchServices LSQuarantine -bool false | |
| # Reboot to a clean slate. | |
| defaults write com.apple.systempreferences NSQuitAlwaysKeepsWindows -bool false | |
| # Enable "Tap to Click". | |
| 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 | |
| # Invert scrolling direction. | |
| defaults write NSGlobalDomain com.apple.swipescrolldirection -bool false | |
| # Open Finder at "~/" directory. | |
| defaults write com.apple.finder NewWindowTarget -string "PfLo" | |
| defaults write com.apple.finder NewWindowTargetPath -string "file://${HOME}/" | |
| # Don't create temporary files to network mounted drives. | |
| defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true | |
| # Unhide "~/Library" folder. | |
| chflags nohidden ~/Library | |
| # Add iOS Simulator app to normal "/Applications" directory. | |
| ln -sf "/Applications/Xcode.app/Contents/Developer/Applications/Simulator.app" "/Applications/iOS Simulator.app" | |
| # Disable Time Machine prompt for every disk. | |
| defaults write com.apple.TimeMachine DoNotOfferNewDisksForBackup -bool true | |
| # Configure Activity Monitor to always open a window, sorted by the most CPU intensive tasks. | |
| defaults write com.apple.ActivityMonitor OpenMainWindow -bool true | |
| defaults write com.apple.ActivityMonitor ShowCategory -int 0 | |
| defaults write com.apple.ActivityMonitor SortColumn -string "cpUUsage" | |
| defaults write com.apple.ActivityMonitor SortDirection -int 0 | |
| # Done. | |
| echo "All Done. Your SSH Key is on the clipboard, ready for pasting into Git." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment