Last active
January 22, 2018 16:14
-
-
Save endSly/11342347 to your computer and use it in GitHub Desktop.
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
# execute at home | |
cd | |
# Install Xcode | |
xcode-select --install | |
# Download gitconfig | |
curl -O https://gist.githubusercontent.com/endSly/0d2e9a7e6d3cf44a274a/raw/.gitconfig | |
curl -O https://gist.githubusercontent.com/endSly/fe1a8b44782d5a6f99c8/raw/.gitignore_global | |
# Install Laptop (https://github.com/thoughtbot/laptop) | |
bash <(curl -s https://raw.githubusercontent.com/thoughtbot/laptop/master/mac) 2>&1 | tee ~/laptop.log | |
# Install oh-my-zsh (https://github.com/robbyrussell/oh-my-zsh) | |
curl -L http://install.ohmyz.sh | sh | |
# Install zsh plugins | |
git clone git://github.com/zsh-users/zsh-syntax-highlighting.git ~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting | |
# edit .zshrc | |
# plugins=( [plugins...] zsh-syntax-highlighting) | |
echo "export LC_ALL=en_US.UTF-8" >> ~/.zshrc | |
echo "export LANG=en_US.UTF-8" >> ~/.zshrc | |
# Install Macvim | |
brew install macvim --with-override-system-vim | |
brew install md5sha1sum | |
brew install jq | |
brew install caskroom/cask/brew-cask | |
brew tap homebrew/services | |
brew cask install google-chrome | |
brew cask install spotify | |
brew cask install onyx | |
brew cask install coconutbattery | |
# Install Janus (https://github.com/carlhuda/janus) | |
curl -Lo- https://bit.ly/janus-bootstrap | bash | |
# Build Janus plugin dir | |
mkdir ~/.janus | |
cd ~/.janus | |
git init | |
# Add ag.vim plugin (https://github.com/rking/ag.vim) | |
git submodule add https://github.com/rking/ag.vim.git | |
git commit -m "Ag.vim plugin added." | |
# Add Vim airline plugin | |
# See https://github.com/Lokaltog/powerline-fonts | |
git submodule add https://github.com/bling/vim-airline.git | |
git commit -m "Vim-airline plugin added." | |
# Add Codeschool theme | |
git submodule add https://github.com/29decibel/codeschool-vim-theme.git | |
git commit -m "Codeschool theme added." | |
# Add vim gitgutter | |
git submodule add https://github.com/airblade/vim-gitgutter.git | |
git commit -m "GitGutter plugin added." | |
cd | |
# Install powerline fonts https://github.com/Lokaltog/powerline-fonts | |
echo """ | |
let g:airline_powerline_fonts=1 | |
set colorcolumn=81 | |
set smartcase | |
""" >> .vimrc.before | |
echo """ | |
\"color CodeSchool | |
color Tomorrow-Night-Eighties | |
set guifont=Source\\ Code\\ Pro\\ for\\ Powerline:h12 | |
let g:airline_powerline_fonts=1 | |
set guioptions-=T \" Removes top toolbar | |
set guioptions-=r \" Removes right hand scroll bar | |
set go-=L \" Removes left hand scroll bar | |
set autoindent | |
nmap <silent> <D-Up> :wincmd k<CR> | |
nmap <silent> <D-Down> :wincmd j<CR> | |
nmap <silent> <D-Left> :wincmd h<CR> | |
nmap <silent> <D-Right> :wincmd l<CR> | |
""" >> .gvimrc.after | |
# | |
# OSX custom configuration | |
# See: https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# Disable the sound effects on boot | |
sudo nvram SystemAudioVolume=" " | |
# Automatically hide and show the Dock | |
defaults write com.apple.dock autohide -bool true | |
# Disable the “Are you sure you want to open this application?” dialog | |
defaults write com.apple.LaunchServices LSQuarantine -bool false | |
# Use plain text mode for new TextEdit documents | |
defaults write com.apple.TextEdit RichText -int 0 | |
# Open and save files as UTF-8 in TextEdit | |
defaults write com.apple.TextEdit PlainTextEncoding -int 4 | |
defaults write com.apple.TextEdit PlainTextEncodingForWrite -int 4 | |
# Disable disk image verification | |
defaults write com.apple.frameworks.diskimages skip-verify -bool true | |
defaults write com.apple.frameworks.diskimages skip-verify-locked -bool true | |
defaults write com.apple.frameworks.diskimages skip-verify-remote -bool true | |
# Automatically open a new Finder window when a volume is mounted | |
defaults write com.apple.frameworks.diskimages auto-open-ro-root -bool true | |
defaults write com.apple.frameworks.diskimages auto-open-rw-root -bool true | |
defaults write com.apple.finder OpenWindowForNewRemovableDisk -bool true | |
# Disable local Time Machine snapshots | |
sudo tmutil disablelocal | |
# Disable hibernation (speeds up entering sleep mode) | |
sudo pmset -a hibernatemode 0 | |
# Remove the sleep image file to save disk space | |
sudo rm /Private/var/vm/sleepimage | |
# Create a zero-byte file instead… | |
sudo touch /Private/var/vm/sleepimage | |
# …and make sure it can’t be rewritten | |
sudo chflags uchg /Private/var/vm/sleepimage | |
# Disable smart quotes as they’re annoying when typing code | |
defaults write NSGlobalDomain NSAutomaticQuoteSubstitutionEnabled -bool false | |
# Disable smart dashes as they’re annoying when typing code | |
defaults write NSGlobalDomain NSAutomaticDashSubstitutionEnabled -bool false | |
# Show icons for hard drives, servers, and removable media on the desktop | |
defaults write com.apple.finder ShowExternalHardDrivesOnDesktop -bool true | |
defaults write com.apple.finder ShowMountedServersOnDesktop -bool true | |
defaults write com.apple.finder ShowRemovableMediaOnDesktop -bool true | |
# Disable auto-correct | |
defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false | |
# Set a blazingly fast keyboard repeat rate | |
defaults write NSGlobalDomain KeyRepeat -int 0 | |
# Disable the warning when changing a file extension | |
defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false | |
# Use columns view in all Finder windows by default | |
# Four-letter codes for the other view modes: `icnv`, `clmv`, `Flwv`, `Nlsv` | |
defaults write com.apple.finder FXPreferredViewStyle -string "clmv" | |
# Add iOS Simulator to Launchpad | |
sudo ln -sf "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone Simulator.app" "/Applications/iOS Simulator.app" | |
# Prevent Photos from opening automatically when devices are plugged in | |
defaults -currentHost write com.apple.ImageCapture disableHotPlug -bool true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment