- Swap Control and Caps Lock in System Preferences -> Keyboard -> Modifier Keys
- Google Chrome http://www.google.com/chrome/
- iTerm2 http://www.iterm2.com/
- Oh my zsh https://github.com/robbyrussell/oh-my-zsh/
- XCode (from the mac app store)
- XCode command line tools (run XCode, go to Preferences -> Downloads -> Command Line Tools)
- Homebrew https://github.com/mxcl/homebrew/wiki/installation
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
| license: gpl-3.0 |
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
| # Mac OS X Lion introduced a new, iOS-like context menu when you press and hold a key | |
| # that enables you to choose a character from a menu of options. If you are on Lion | |
| # try it by pressing and holding down 'e' in any app that uses the default NSTextField | |
| # for input. | |
| # | |
| # It's a nice feature and continues the blending of Mac OS X and iOS features. However, | |
| # it's a nightmare to deal with in Sublime Text 2 if you're running Vintage (Vim) mode, | |
| # as it means you cannot press and hold h/j/k/l to move through your file. You have | |
| # to repeatedly press the keys to navigate. |
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
| # this function takes an input numeric vector and | |
| # partitions it into a set number of breaks | |
| # it then assigns a color to each break via RColorBrewer | |
| assignColors <- function(var, | |
| n = 9, # number of colors / breaks | |
| style = "jenks", # can be changed to other methods in "classIntervals" | |
| pal = "RdYlBu", # Palettes from RColorBrewer | |
| na_color ='#787878', # Color to give NA's | |
| na_omit = FALSE, # Logical, argument above will be irrelevant if TRUE |
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
| // Usage: $form.find('input[type="checkbox"]').shiftSelectable(); | |
| // replace input[type="checkbox"] with the selector to match your list of checkboxes | |
| $.fn.shiftSelectable = function() { | |
| var lastChecked, | |
| $boxes = this; | |
| $boxes.click(function(evt) { | |
| if(!lastChecked) { | |
| lastChecked = this; |
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
| license: gpl-3.0 | |
| redirect: https://observablehq.com/@d3/stacked-area-chart-via-d3-group |
I use Sublime for everything text related, but it doesn't have any built-in way to preview my Markdown files.
This is how easy it is to preview in Mou:
- In Sublime, go to Tools -> Build System -> New Build System...
- In the newly opened file, replace the file contents with this and save: { "osx": {
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
| #// Say you were building a dataset and wanted to automatically | |
| #// generate variable names by some pattern. | |
| #// For instance, you might want to do this with population counts | |
| #// within 100 census tracts by race | |
| #// IE: | |
| # | |
| # tracts <- paste("c", rep(1:100), sep="") | |
| # race - c("black", "white", "hispanic") | |
| # | |
| #// In this case you would want to generate 300 unique variable names |
cd ~/Library/Application\ Support/Sublime\ Text\ 2/Packages
git clone git://github.com/jashkenas/coffee-script-tmbundle CoffeeScript
git clone https://github.com/miksago/jade-tmbundle.git Jade
git clone https://github.com/LearnBoost/stylus.git Stylus