Skip to content

Instantly share code, notes, and snippets.

@F1LT3R
Last active August 29, 2015 14:10
Show Gist options
  • Select an option

  • Save F1LT3R/bbef32917dc93c7715c0 to your computer and use it in GitHub Desktop.

Select an option

Save F1LT3R/bbef32917dc93c7715c0 to your computer and use it in GitHub Desktop.
Alistair's OS X Setup

##Alistair's OS X Setup

###OS X Interaction Setup

####Setup Trackpad

Goto: Apple > System Preferences > TrackPad > Point & Click

  • [✘] Swipe between pages
  • [✔] Tap to click
  • [✔] Three finger drag
  • Fast tracking speed (third notch from right)

Mouse Setup

Goto: Apple > System Preferences > TrackPad > More Gestures

  • [✔] App Exposé

App Exposé replaces "Dock > Launchpad"

App Exposé replaces Dock > Launchpad

####Keyboard

#####Fast Keyboard Repeat Rate

In your terminal:

defaults write NSGlobalDomain KeyRepeat -int 0

Then logout & login again.

#####Keyboard for Dialogs

Apple > Prefs. > Keyboard > Shortcuts > Accessibility

  • [✔] Zoom
  • [✘] Applications windows ^↓ (interferes with SublimeText multicursor commands)
  • (*) All controls (keyboard shortcuts work on Dialogs)

Keyboard shortcuts for Dialogs and Zoom

Apple > Prefs. > Accessibility > Zoom

  • [✔] Use Keyboard Shortcuts to Zoom
  • [✔] Use scroll gesture with modifier keys to zoom

Ctrl + Trackpad-Scoll to Zoom

Apple > Prefs. > Accessibility > Audio

  • [✔] Flash the screen when an alert sound occurs

####Dock

No Doc Animations
defaults write com.apple.dock autohide-time-modifier -int 0; killall Dock

Full paths in Finder windows

defaults write com.apple.finder _FXShowPosixPathInTitle -bool YES
killall Finder

###Console Setup

#####Download iTerm2 http://iterm2.com/

###Editor Setup

#####Download & Install SublimeText3

http://www.sublimetext.com/3

#####Install the Pakcage Manager for sublime

https://sublime.wbond.net/installation

#####Install Adobe Source Code Pro font for SublimeText

// Direct Download
http://www.google.com/fonts/download?kit=5CnRSlG29fo96WRM6evqx3XmVIqD4Rma_X5NukQ7EX0

// Google Font Page
http://www.google.com/fonts/specimen/Source+Code+Pro

// Repository
https://github.com/adobe-fonts/source-code-pro

// Get SecretCode Font
http://www.dafont.com/search.php?q=secret+code

// Josefin Slab OpenFont
http://www.fontsquirrel.com/fonts/josefin-slab

#####Alias SublimeText for console use

sudo ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" /usr/bin/sublime

Make SublimeText Default Editor from the console

...

Install packages...

  • Markdown Editing
  • Markdown Preview
  • Table Editor
  • GitGutter
  • WordCount
  • BracketHighlighter
  • DocBlockr
  • GoogleSpelLCheck
  • JS Hint Gutter
  • LESS
  • PackageResourceViewer
  • Pretty JSON
  • Plain Tasks
  • Djanero (for django syntax highlighting)
  • Plain Tasks

####User Settings

SublimeText > Preferences > Settings - User.

{    
    "caret_style": "phase",    
    "font_face": "Source Code Pro Light",    
    "font_size": 16,    
    "highlight_line": true,    
    "ignored_packages":    
    [    
        "Markdown",    
        "Vintage"    
    ],    
    "match_brackets_angle": true,    
    "open_files_in_new_window": false,    
    "rulers":    
    [    
        100    
    ],    
    "scroll_speed": 2.0,    
    "show_encoding": true,    
    "word_wrap": "none"    
}    

####Word-Wrap Keyboard Shortcut

In: SublimeText > Preferences > Key Bindings > User.

[
    { "keys": ["ctrl+shift+w"], "command": "toggle_setting", "args": {"setting": "word_wrap"}}
]

#####Install Oh-My-Zsh

Using GIT to try installing Oh-My-ZSH should prompt you to install XCode.

// Clone oh-my-zsh
git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh

Install XCode Prompt

// Make ZSH the default shell on start
chsh -s /bin/zsh

// Edit the bash profile in SublimeText
sublime ~/.zshrc

// Add the following JSON settings...
// https://gist.github.com/F1LT3R/ee42c30152fc15b72d73

#####Fix Agnoster

curl -o  ~/.oh-my-zsh/themes/agnoster.zsh-theme https://gist.githubusercontent.com/F1LT3R/52f461940d1e4b479f15/raw/c3107c06c04fb42b0ca27b0a81b15854819969c6/agnoster.zsh-theme

Get Powerline Patched fonts

// Direct download
http://ethanschoonover.com/solarized/files/solarized.zip

// Sub repository
https://gist.github.com/qrush/1595572

iTerm2 > Profiles > Text

Change both fonts to: "Menlo for Powerline"

  • [✘] Uncheck: "Draw Bold Text in Bright Colors"
  • [✔] Check: "Blinking Text Allowed"

Fix the agnoster theme (it usually gets corrupted on zsh-shell-download)

curl -o  ~/.oh-my-zsh/themes/agnoster.zsh-theme https://gist.githubusercontent.com/F1LT3R/52f461940d1e4b479f15/raw/c3107c06c04fb42b0ca27b0a81b15854819969c6/agnoster.zsh

Restart the terminal and cd into a git directory, ls -a, and you should see something like this:

iTerm2, Oh-My-ZSH with Agnoster Theme

####Install Brew

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew doctor


brew install node

###Python

####IPython Notebook

sudo pip install "ipython[notebook]"

####Install Python-Django Environment

// Install PIP (Python package manager)
sudo easy_install pip

// Install Django Framework
pip install Django

// Install Python VirtualEnv Tools
sudo pip install virtualenv
sudo pip install virtualenvwrapper

// Install iPython Shell
pip install ipython

####Setup VirtualEnv Environment

// Create a hidden directory to store VirtualEnvs
mkdir ~/.virtualenvs

Export WORKON_HOME in your bash_profile... (mine is ~/.zshrc)

    #VirtualEnv
    export WORKON_HOME=~/.virtualenvs
    source /usr/local/bin/virtualenvwrapper.sh

Reload your profile:

    source ~/.zshrc

###Setup Postgres

Get the Postgres App here: Postgress App

Get Postgress Admin Tool here: pgAdmin

####psycopg2

Install the Django-Postgres Bindings for Python:

// Install postgres bindings for django
pip install psycopg2

Export the Postgres CLI tools in your bash_profile... (mine is ~/.zshrc)

    export PATH=$PATH:/Applications/Postgres.app/Contents/Versions/9.3/bin

Reload/source your profile:

    source ~/.zshrc

###GIT Setup

####Install TIG Pager

brew install tig

Using 'git log' with tig as the pager

Bind key [7] to file-diff view in ~/.tigrc

bind diff 7 !git diff %(commit)^ %(commit)

####Install Kaleidoscope Diff Tool

Download Kaleidoscope App: http://www.kaleidoscopeapp.com/

Install KSDIFF2 for launching diff from CLI: http://www.kaleidoscopeapp.com/ksdiff2

Using 'git difftool [commithash]' with KSDIFF2

####Setup Global ~/.gitconfig

[user]
    name = Alistair MacDonald
    email = [email protected]
[color]
    ui = false
[core]
    pager = tig
[merge]
    tool = ksdiff
[mergetool "ksdiff"]
  cmd = "/usr/local/bin/ksdiff -w $BASE $LOCAL $REMOTE $MERGED"[difftool "Kaleidoscope"]
    cmd = ksdiff --partial-changeset --relative-path \"$MERGED\" -- \"$LOCAL\" \"$REMOTE\"
[mergetool "Kaleidoscope"]
[difftool "Kaleidoscope"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment