Skip to content

Instantly share code, notes, and snippets.

@adamisntdead
Last active December 24, 2016 16:45
Show Gist options
  • Save adamisntdead/257dedabb60ec8889e76af0ac94e00d2 to your computer and use it in GitHub Desktop.
Save adamisntdead/257dedabb60ec8889e76af0ac94e00d2 to your computer and use it in GitHub Desktop.
2016 Macbook Pro Setup

Using the Script

To use this script, first you must install XCode, or the XCode Command Line Tools. To install the command line tools, use the command:

xcode-select --install

Then you can use the script!

sh -c "$(curl -fsSL https://gist.githubusercontent.com/adamisntdead/257dedabb60ec8889e76af0ac94e00d2/raw/66355d5c4af8b4a7bb7e65787db8eef200141af0/setup.sh)"
# Color Variables
RED='\033[0;31m'
GREEN='\033[0;32m'
NC='\033[0m' # No Color
sudo -v
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
if type xcode-select >&- && xpath=$( xcode-select --print-path ) &&
test -d "${xpath}" && test -x "${xpath}" ; then
echo -e "${RED}Enter your computer name please?${NC}"
read cpname
echo -e "${RED}Please enter your name?${NC}"
read name
echo -e "${RED}Please enter your git email?${NC}"
read email
clear
sudo scutil --set ComputerName "$cpname"
sudo scutil --set HostName "$cpname"
sudo scutil --set LocalHostName "$cpname"
defaults write /Library/Preferences/SystemConfiguration/com.apple.smb.server NetBIOSName -string "$cpname"
defaults write -g ApplePressAndHoldEnabled -bool false
defaults write com.apple.finder ShowPathbar -bool true
defaults write com.apple.finder ShowStatusBar -bool true
defaults write NSGlobalDomain KeyRepeat -int 0.02
defaults write NSGlobalDomain InitialKeyRepeat -int 12
chflags nohidden ~/Library
git config --global user.name "$name"
git config --global user.email "$email"
git config --global color.ui true
clear
echo "Installing Homebrew"
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew tap caskroom/cask
clear
echo "Installing NVM"
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.4/install.sh | bash
export NVM_DIR="/Users/adam/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm so we dont have to reboot the terminal
nvm install 6.9.1
brew cask install unity unity-web-player
brew install python
brew install gpg
command curl -sSL https://rvm.io/mpapis.asc | gpg --import -
\curl -L https://get.rvm.io | bash -s stable
source ~/.rvm/scripts/rvm
rvm install ruby-2.3.1
gem install bundler
gem install rails
brew cask install java eclipse-ide eclipse-java android-studio
brew install android-sdk
brew install mongo
brew install tree wget ack heroku-toolbelt
brew cask install google-chrome gitter github-desktop atom mamp macdown google-drive \
hyper firefox spotify minecraft steam obs webtorrent deluge kodi vlc
clear
brew cask cleanup
curl -o ~/wallpaper.jpg http://www.facets.la/wallpaper/W_2014_339.jpg
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
sqlite3 ~/Library/Application\ Support/Dock/desktoppicture.db "update data set value = '~/wallpaper.jpg'"
killall Dock;
clear
echo "Done!"
else
echo "Need to install the OSX Command Line Tools (or XCode) First! Starting Install..."
# Install XCODE Command Line Tools
xcode-select --install
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment