Skip to content

Instantly share code, notes, and snippets.

@landonlewis
Forked from soffes/install.markdown
Last active November 1, 2018 16:24
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save landonlewis/863105 to your computer and use it in GitHub Desktop.
Save landonlewis/863105 to your computer and use it in GitHub Desktop.
New Machine Setup

New Machine

What I do after I do a fresh install. Things are sorta grouped by type.

UPDATED for 10.9.

First Things First

  1. Turn on TRIM if machine has a non-Apple SSD

General Config

  1. Turn on the Firewall and Stealth Mode in Security
  • Disable auto-bright and turn brightness all the way up
  • Require password when:
    • Returning from screen saver
    • Booting up
  • Set DNS to OpenDNS:
    • 208.67.222.222
    • 208.67.220.220
  • Turn up trackpad tracking
  • Control-F7 to enable better tabbing
  • Remove sync from menubar
  • Disable energy saver dimming and up sleep times
  • Clean up dock
  • Remove sound from menubar
  • Turn on auto-hiding dock and magnification
  • Snap desktop items to grid
  • Setup hot corners
    • Upper left: screen saver
    • Upper right: Mission Control
    • Lower left: applications window
    • Lower right: Desktop
  • Add four "spaces" in Mission Control
  • Update Finder (Finder -> Preferences)
    • General
      • Set new Finder windows to open to the User directory
    • Sidebar
      • Remove AirDrop
      • Remove Tags
      • Add Devices
      • Add User account (ex: "John Doe")
  • Edit Finder toolbar (Right-click on Finder toolbar -> Customize Toolbar
    • Drag to remove:
      • Share
      • Tags

Install Apps

  1. Install apps from the App Store (make sure this inclues Xcode)

Install Unix Stuff

  1. Create Projects directory

     $ mkdir ~/Projects
    
  • Install Homebrew

    Before installing Homebrew make sure you have command-line tools installed along with Xcode. You can download these from the Apple Developer portal.

      $ ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
    
  • Install Git

      $ brew install git
    
  • Update ZShell

      $ brew install zsh
      $ echo '/usr/local/bin/zsh' | sudo tee -a /etc/shells
      $ chsh -s /bin/zsh # Changes default shell to ZSH
    

    Restart terminal to see changes.

  • Install Tmux

      $ brew install tmux
    
  • Install ACK

      $ brew install ack
    
  • Install SSH-Copy-ID

      $ brew install ssh-copy-id
    
  • Install GPG2

      $ brew install gpg2
    
  • Install PIP

      $ curl -O https://raw.github.com/pypa/pip/master/contrib/get-pip.py
      $ sudo python get-pip.py
    
  • Install VirtualEnvWrapper

      $ sudo pip install virtualenvwrapper
      $ mkdir -p $WORKON_HOME # Works if dotfiles are installed before this point
    

    Note:

    • VirtualEnvWrapper will also install VirtualEnv as a dependency.
    • Take note of the location listed towards the end of the installation process: Installing virtualenv-clone script to /usr/local/bin
  • Install RBEnv

      $ brew install rbenv rbenv-gem-rehash ruby-build
    
  • Install a new Ruby version

      $ rbenv install 2.0.0-p247
      $ rbenv global 2.0.0-p247 # Sets global version of Ruby to this version
    

    We are installing a version of Ruby in addition to the system Ruby. It is recommended not to mess with the Apple provided version of Ruby and the permissions set.

  • Install NVM

      $ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
    

    Add to your ~/.zshrc

      $ export NVM_DIR="${XDG_CONFIG_HOME/:-$HOME/.}nvm"
      $ [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
    
  • Install Teamocil

      $ gem install teamocil
    
  • Setup GitHub SSH key

  • Install my dotfiles

      $ cd ~
      $ git clone http://github.com/landonlewis/dotfiles.git .dotfiles
    
  • Setup links to dotfiles

      $ ln -s .dotfiles/.zshrc .zshrc
      $ ln -s .dotfiles/.vimrc .vimrc
      $ ln -s .dotfiles/.tmux.conf .tmux.conf
      $ ln -s .dotfiles/.gitignore .gitignore
    
  • Install MacVim

      $ brew install macvim --override-system-vim
    
    • Using MacVim instead of the system provided vim to get a build that is properly linked against Ruby and Python as well as better support for colors.
    • Installing MacVim via the above will setup the symlinks to override the local install of Vim provided that /usr/local/bin appears before /usr/bin in your $PATH. If MacVim doesn't open when you execute the vim command on command line then move /usr/local/bin ahead of /usr/bin in /etc/paths.
  • Install Pathogen

      mkdir -p ~/.vim/autoload ~/.vim/bundle && \
      curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim
    
  • Install EditorConfig

      $ cd ~/.vim/bundle
      $ git clone --depth=1 https://github.com/editorconfig/editorconfig-vim.git
    
  • Install ctrlp.vim

  • Set initial Git config options

      $ git config --global user.name "John Doe"
      $ git config --global user.email johndoe@gmail.com
      $ git config --global core.excludesfile ~/.gitignore
    

Terminal Setup

  1. Install Solarized
    • Install via Pathogen:
    cd ~/.vim/bundle
    git clone git://github.com/altercation/vim-colors-solarized.git
    mv vim-colors-solarized ~/.vim/bundle/
    
    • In iTerm2, open iTerm2 -> Preferences -> Profiles -> Colors, and click "Load Presets…" to load the Solarized color schemes (light and dark) that are found in the .zip in solarized/iterm2-colors-solarized/
    • Set 'Report Terminal Type':
      • In iTerm2, in Preferences -> Profiles -> Terminal, under 'Terminal Emulation' you have 'Report Terminal Type:' set to xterm-256color
    • Ensure that in the .vimrc file you have:
    set background=dark
    let g:solarized_termcolors=16
    let g:solarized_termtrans = 1
    colorscheme solarized
    
  • Change Terminal font to Andale Mono 11pt anti-aliased

Done.

Notes

  • I left out PHP and MySQL on purpose. I'm of the opinion that if you need either it's probably easier in the long run to run both inside a VM (like Vagrant + VirtualBox).

Areas that need improved

  • All the brew commands should be able to be ran at once.
  • A master .gitconfig file should be added to the dotfile's repo.
  • A master .editorconfig file should be added to the dotfile's repo.
  • Vim colors and the theme are jacked-up. Need to spend some time fixing this.
  • Setup instructions for Pathogen's environment need to be included.
  • Need to automate the install of Vim plugins
  • Although, it'd be better to automate this whole process...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment