most of these require logout/restart to take effect
# Disable window animations ("new window" scale effect)
defaults write NSGlobalDomain NSAutomaticWindowAnimationsEnabled -bool false
# Set default Finder location to home folder (~/)
defaults write com.apple.finder NewWindowTarget -string "PfLo" && \
defaults write com.apple.finder NewWindowTargetPath -string "file://${HOME}"
# Expand save panel by default
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true
# Disable ext change warning
defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false
# Use current directory as default search scope in Finder
defaults write com.apple.finder FXDefaultSearchScope -string "SCcf"
# Show Path bar in Finder
defaults write com.apple.finder ShowPathbar -bool true
# Show Status bar in Finder
defaults write com.apple.finder ShowStatusBar -bool true
# Avoid creating .DS_Store files on network volumes
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true
# Trackpad: map bottom right corner to right-click
defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadCornerSecondaryClick -int 2 && \
defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadRightClick -bool true && \
defaults -currentHost write NSGlobalDomain com.apple.trackpad.trackpadCornerClickBehavior -int 1 && \
defaults -currentHost write NSGlobalDomain com.apple.trackpad.enableSecondaryClick -bool true
# Enable the Develop menu and the Web Inspector in Safari
defaults write com.apple.Safari IncludeInternalDebugMenu -bool true && \
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 && \
defaults write NSGlobalDomain WebKitDeveloperExtras -bool true
# Show the ~/Library folder
chflags nohidden ~/Library
# Show absolute path in finder's title bar.
defaults write com.apple.finder _FXShowPosixPathInTitle -bool YES
###Shell
####Switch to z-shell
curl -L https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh | sh####Update .zshrc
wget https://gist.githubusercontent.com/jmmerino/2bd85d87e8c3f91e3505/raw/ba6ff74875eef679a17c5338b0cefa2bd72c64b5/.zshrc -O \
~/.zshrc
#syntax highlighting
git clone git://github.com/zsh-users/zsh-syntax-highlighting.git \
~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting####Homebrew
# install package manager
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# install homebrew packages
brew install \
tree \
node \
wget \
jpegoptim \
pngcrush \
colordiff \
imagemagick \
ack \
caskroom/cask/brew-cask####Homebrew Cask Apps & Fonts
# add support for fonts
brew tap caskroom/fonts
#add dev/beta versions
brew tap caskroom/versions
#install mac apps & fonts
brew cask install \
font-source-code-pro \
sublime-text3 \
virtualbox \
firefox \
iterm2-beta \
sequel-pro \
imageoptim \
imagealpha \
vagrant \
spotify####Set hostname
sudo scutil --set HostName jmmerino-macbookpro###Agree To Xcode
sudo xcrun cc###Git
####Setup Github
ssh-keygen -t rsa -C "jmmerino@gmail.com"
#copy ssh key to clipboard for adding to github.com
pbcopy < ~/.ssh/id_rsa.pub
#test connection
ssh -T git@github.com
#set git config values
git config --global user.name "Jesús Merino" && \
git config --global user.email "jmmerino@gmail.com" && \
git config --global github.user jmmerino && \
git config --global core.editor "subl -w" && \
git config --global color.ui true && \
git config --global push.default simple
#token
git config --global github.token your_token_here###Sublime Text
####Install Soda Theme
git clone git://github.com/buymeasoda/soda-theme.git \
~/Library/Application\ Support/Sublime\ Text\ 3/Packages/Theme\ -\ Soda####Install Tomorrow Night Eighties Themes
#Sublime Text
git clone https://github.com/equinusocio/material-theme.git \
~/Library/Application\ Support/Sublime\ Text\ 3/Packages/Material\ Theme
#iTerm2
wget https://raw.githubusercontent.com/mbadolato/iTerm2-Color-Schemes/master/schemes/Tomorrow%20Night%20Eighties.itermcolors \
-O ~/Downloads/Tomorrow\ Night\ Eighties.itermcolors && open ~/Downloads/Tomorrow\ Night\ Eighties.itermcolors
####Settings
{
"close_windows_when_empty": true,
"draw_indent_guides": false,
"font_face": "Source Code Pro",
"font_size": 13.0,
"highlight_modified_tabs": true,
"ignored_packages":
[
"Vintage"
],
"show_full_path": true,
"show_tab_close_buttons": false,
"spell_check": false,
"tab_size": 2,
"theme": "Material-Theme.sublime-theme",
"color_scheme": "Packages/Material Theme/schemes/Material-Theme.tmTheme",
"word_separators": "./\\()\"'-:,.;<>~!@#%^&*|+=[]{}`~?"
}
####Snippets
git clone git@github.com:co-b/sublime-snippets.git \
~/Library/Application\ Support/Sublime\ Text\ 3/Packages/CoB####Package control Open sublime and open the console (Show > Console). Paste this:
import urllib.request,os,hashlib; h = '2915d1851351e5ee549c20394736b442' + '8bc59f460fa1548d1514676163dafc88'; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); by = urllib.request.urlopen( 'http://packagecontrol.io/' + pf.replace(' ', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); print('Error validating download (got %s instead of %s), please try manual install' % (dh, h)) if dh != h else open(os.path.join( ipp, pf), 'wb' ).write(by)vagrant plugin install vagrant-hostsupdater vagrant-cachier