├── dots ├── pryrc ├── bash_profile ├── gemrc ├── gitignore ├── ackrc ├── tidyrc ├── inputrc ├── tmux.conf ├── bash_aliases ├── gitconfig ├── bashrc ├── bash_prompt ├── bash_completions ├── jshintrc ├── wemux.conf └── vimrc ├── vim ├── snippets │ ├── make.snippets │ ├── snippet.snippets │ ├── cucumber.snippets │ ├── sh.snippets │ ├── vim.snippets │ ├── haml.snippets │ ├── cpp.snippets │ ├── coffee-jasmine.snippets │ ├── javascript-jasmine.snippets │ ├── _.snippets │ ├── markdown.snippets │ ├── c.snippets │ ├── javascript.snippets │ ├── coffee.snippets │ ├── html.snippets │ ├── eruby.snippets │ ├── objc.snippets │ ├── sass.snippets │ ├── css.snippets │ ├── scss.snippets │ └── ruby.snippets ├── doc │ └── mscheat.txt └── colors │ ├── colorblind.vim │ └── polarized.vim ├── config ├── gems.txt └── bundles.txt ├── extras ├── vimrc.local.example ├── bashrc_local.example ├── polarized.terminal └── colorblind.terminal ├── .gitignore ├── bin ├── psg ├── trash ├── ff ├── kill9 ├── clone └── yo ├── dotils ├── dotset └── README.md /dots/pryrc: -------------------------------------------------------------------------------- 1 | Pry.config.editor = 'vim' 2 | -------------------------------------------------------------------------------- /dots/bash_profile: -------------------------------------------------------------------------------- 1 | 2 | if [[ -f ~/.bashrc ]]; then source ~/.bashrc; fi 3 | 4 | -------------------------------------------------------------------------------- /vim/snippets/make.snippets: -------------------------------------------------------------------------------- 1 | snippet ifeq 2 | ifeq (${1:cond0},${2:cond1}) 3 | ${3:code} 4 | endif 5 | -------------------------------------------------------------------------------- /config/gems.txt: -------------------------------------------------------------------------------- 1 | rbenv-rehash 2 | bundler 3 | CoffeeTags 4 | heroku 5 | powder 6 | redcarpet 7 | sass 8 | pry 9 | -------------------------------------------------------------------------------- /extras/vimrc.local.example: -------------------------------------------------------------------------------- 1 | 2 | " User plugin configurations 3 | let g:snips_author = 'Your Name' 4 | colorscheme polarized 5 | 6 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | backup/ 2 | config/bundles.local.txt 3 | config/gems.local.txt 4 | .DS_Store 5 | *.swp 6 | .VimballRecord 7 | .netrwhist 8 | tags 9 | -------------------------------------------------------------------------------- /vim/snippets/snippet.snippets: -------------------------------------------------------------------------------- 1 | # snippets for making snippets :) 2 | snippet snip 3 | snippet ${1:trigger} 4 | ${2} 5 | snippet msnip 6 | snippet ${1:trigger} ${2:description} 7 | ${3} 8 | -------------------------------------------------------------------------------- /dots/gemrc: -------------------------------------------------------------------------------- 1 | --- 2 | :update_sources: true 3 | :sources: 4 | - http://rubygems.org 5 | :verbose: true 6 | :bulk_threshold: 1000 7 | :backtrace: false 8 | :benchmark: false 9 | gem: --no-ri --no-rdoc 10 | -------------------------------------------------------------------------------- /dots/gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .idea 3 | *.tmproj 4 | .project 5 | .settings 6 | .svn 7 | *.swp 8 | .livereload 9 | .sass-cache 10 | .rake_cache 11 | typescript 12 | vendor/bundle 13 | .bundle/ 14 | tmp/**/* 15 | log/**/* 16 | tmp/* 17 | log/* 18 | -------------------------------------------------------------------------------- /dots/ackrc: -------------------------------------------------------------------------------- 1 | --type-add 2 | js=.coffee 3 | --type-add 4 | html=.haml 5 | --type-add 6 | css=.sass,.scss 7 | --ignore-dir=log 8 | --ignore-dir=tmp 9 | --ignore-dir=vendor 10 | --sort-files 11 | --color-filename=cyan 12 | --color-match=magenta 13 | -a 14 | -------------------------------------------------------------------------------- /bin/psg: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [[ "$1" == "-h" || "$1" == "--help" || "$1" == "help" ]]; then cat <} ${4} 43 | augroup end 44 | snippet bun 45 | Bundle '${1}' 46 | -------------------------------------------------------------------------------- /dots/bashrc: -------------------------------------------------------------------------------- 1 | 2 | eval "$(rbenv init -)" 3 | 4 | # Environment pathing and editor defaults 5 | # TODO: Can PATH variable be cleaned up? 6 | export PATH="$HOME/local/bin:$HOME/.bin:/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:/usr/local/heroku/bin:$PATH" 7 | export EDITOR="vim" 8 | export ARCHFLAGS="-arch i386 -arch x86_64" 9 | export HISTCONTROL=ignoreboth 10 | export HISTFILESIZE=10000 11 | export HISTSIZE=10000 12 | export HTML_TIDY="$HOME/.tidyrc" 13 | unset MAILCHECK 14 | 15 | # Add some color to man pages 16 | export LESS_TERMCAP_md="$(tput setaf 4)" 17 | 18 | # http://ss64.com/bash/shopt.html 19 | shopt -s histappend 20 | shopt -s nocaseglob 21 | shopt -s cdspell 22 | 23 | 24 | if [[ -f ~/.bash_prompt ]]; then source ~/.bash_prompt; fi 25 | if [[ -f ~/.bash_aliases ]]; then source ~/.bash_aliases; fi 26 | if [[ -f ~/.bash_completions ]]; then source ~/.bash_completions; fi 27 | if [[ -f ~/.bashrc_local ]]; then source ~/.bashrc_local; fi 28 | 29 | # Only print if we're in an interactive shell. 30 | # Non-interactive stuff like rsync will blow up otherwise 31 | if [[ "$-" == *"i"* ]]; then 32 | echo -e "\033[0;35m------------------------------------------\033[0m" 33 | fi 34 | -------------------------------------------------------------------------------- /vim/snippets/haml.snippets: -------------------------------------------------------------------------------- 1 | # Haml 2 | snippet page 3 | !!! 4 | %html{:lang => 'en'} 5 | %head 6 | %title ${1:Title} 7 | %meta{ :content => 'text/html; charset=UTF-8', :'http-equiv' => 'content-type' } 8 | %meta{ :name => '${2:name}', :content => '${3:content}'${4:, } }${5} 9 | %body 10 | snippet ie 11 | /[if ${1:lte }IE${3: ${2:version}}] 12 | ${3} 13 | snippet cdata 14 | :cdata 15 | ${1} 16 | snippet md 17 | :markdown 18 | ${1} 19 | snippet plain 20 | :plain 21 | ${1} 22 | snippet js 23 | :javascript 24 | ${1} 25 | snippet escaped 26 | :escaped 27 | ${1} 28 | snippet ruby 29 | :ruby 30 | ${1} 31 | snippet preserve 32 | :preserve 33 | ${1} 34 | snippet erb 35 | :erb 36 | ${1} 37 | snippet sass 38 | :sass 39 | ${1} 40 | snippet textile 41 | :textile 42 | ${1} 43 | snippet maruku 44 | :maruku 45 | ${1} 46 | snippet : 47 | :${1:name} => "${2:value}"${3:, }${4} 48 | snippet t 49 | %${1:p} 50 | snippet meta 51 | %meta(name="${1:name}" content="${2:content}")${3} 52 | snippet partial 53 | = render :partial => '${1:path}'${2} 54 | snippet link 55 | %a(href="${1:#}") ${2:Link} 56 | snippet img 57 | %img(src="${1:path}" alt="${2:alt}")${3} 58 | snippet imgd 59 | %img(src="${1:path}" alt="${2:alt}" width="${3}" height="${4}")${5} 60 | snippet nav 61 | %nav 62 | %ul 63 | %li 64 | %a(href="${1:#}") ${2:Link} 65 | -------------------------------------------------------------------------------- /vim/snippets/cpp.snippets: -------------------------------------------------------------------------------- 1 | # Read File Into Vector 2 | snippet readfile 3 | std::vector v; 4 | if (FILE *${2:fp} = fopen(${1:"filename"}, "r")) { 5 | char buf[1024]; 6 | while (size_t len = fread(buf, 1, sizeof(buf), $2)) 7 | v.insert(v.end(), buf, buf + len); 8 | fclose($2); 9 | }${3} 10 | # std::map 11 | snippet map 12 | std::map<${1:key}, ${2:value}> map${3}; 13 | # std::vector 14 | snippet vector 15 | std::vector<${1:char}> v${2}; 16 | # Namespace 17 | snippet ns 18 | namespace ${1:`Filename('', 'my')`} { 19 | ${2} 20 | } /* $1 */ 21 | # Class 22 | snippet cl 23 | class ${1:`Filename('$1_t', 'name')`} { 24 | public: 25 | $1 (${2:arguments}); 26 | virtual ~$1 (); 27 | 28 | private: 29 | ${3:/* data */} 30 | }; 31 | snippet fori 32 | for (int ${2:i} = 0; $2 < ${1:count}; $2${3:++}) { 33 | ${4:/* code */} 34 | } 35 | # auto iterator 36 | snippet itera 37 | for (auto ${1:i} = $1.begin(); $1 != $1.end(); ++$1) { 38 | ${2:std::cout << *$1 << std::endl;} 39 | } 40 | 41 | # iterator 42 | snippet iter 43 | for (${1:std::vector}<${2:type}>::${3:const_iterator} ${4:i} = ${5:container}.begin(); $4 != $5.end(); ++$4) { 44 | ${6} 45 | } 46 | 47 | # member function implementations 48 | snippet mfun 49 | ${4:void} ${1:`Filename('$1', 'ClassName')`}::${2:memberFunction}(${3}) { 50 | ${5:return}; 51 | } 52 | snippet scout 53 | std::cout << ${1} << std::endl; 54 | snippet cout 55 | cout << ${1} << endl; 56 | snippet scin 57 | std::cin >> ${1}; 58 | snippet cin 59 | cin >> ${1}; 60 | -------------------------------------------------------------------------------- /config/bundles.txt: -------------------------------------------------------------------------------- 1 | https://github.com/mileszs/ack.vim.git 2 | https://github.com/vim-scripts/camelcasemotion.git 3 | https://github.com/kien/ctrlp.vim.git 4 | https://github.com/Raimondi/delimitMate.git 5 | https://github.com/othree/html5.vim.git 6 | https://github.com/vim-scripts/IndexedSearch.git 7 | https://github.com/mkitt/markdown-preview.vim.git 8 | https://github.com/juvenn/mustache.vim.git 9 | https://github.com/scrooloose/nerdcommenter.git 10 | https://github.com/scrooloose/nerdtree.git 11 | https://github.com/vim-scripts/SearchComplete.git 12 | https://github.com/msanders/snipmate.vim.git 13 | https://github.com/ervandew/supertab.git 14 | https://github.com/scrooloose/syntastic.git 15 | https://github.com/mkitt/tabline.vim.git 16 | https://github.com/godlygeek/tabular.git 17 | https://github.com/majutsushi/tagbar.git 18 | https://github.com/jeetsukumaran/vim-buffergator.git 19 | https://github.com/kchmck/vim-coffee-script.git 20 | https://github.com/tpope/vim-cucumber.git 21 | https://github.com/tpope/vim-fugitive.git 22 | https://github.com/tpope/vim-haml.git 23 | https://github.com/nathanaelkane/vim-indent-guides.git 24 | https://github.com/pangloss/vim-javascript.git 25 | https://github.com/elzr/vim-json.git 26 | https://github.com/tpope/vim-markdown.git 27 | https://github.com/tpope/vim-rails.git 28 | https://github.com/tpope/vim-repeat.git 29 | https://github.com/vim-ruby/vim-ruby.git 30 | https://github.com/millermedeiros/vim-statline.git 31 | https://github.com/tpope/vim-surround.git 32 | https://github.com/tpope/vim-unimpaired.git 33 | https://github.com/nelstrom/vim-visual-star-search.git 34 | https://github.com/vim-scripts/YankRing.vim.git 35 | -------------------------------------------------------------------------------- /bin/clone: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env ruby 2 | 3 | require 'open-uri' 4 | 5 | errors = [] 6 | errors << "you must supply the heroku remote" unless ARGV[0] and ARGV[0].length > 1 7 | errors << "install the heroku gem" unless `heroku` 8 | 9 | project = Dir.getwd.match(/(\w+)$/)[1] 10 | 11 | if ARGV[0] and ARGV[0].match(/help/) 12 | puts "Clone: the easiest way to dupliate data for development" 13 | puts "Puts a remote heroku datbase into your local postgres db for developmemt." 14 | puts "Your heroku remotes must be defined in your git config." 15 | puts "example" 16 | puts "-------" 17 | puts "clone staging" 18 | puts "" 19 | puts "clones the data from the staging heroku remote into the #{project}_development database" 20 | exit 21 | end 22 | 23 | unless errors.empty? 24 | errors.each {|e| STDERR.puts e} 25 | puts "try --help if you need it" 26 | exit 27 | end 28 | 29 | remote = ARGV[0] 30 | git_remotes = `git remote show`.split(/\s/) 31 | 32 | unless git_remotes.include?(remote) 33 | puts "#{remote} remote is not defined" 34 | exit 35 | end 36 | 37 | puts "talking to heroku to find backups for #{remote}" 38 | 39 | last_backup = `heroku pgbackups -r #{remote}`.split("\n")[-1][0...4] 40 | 41 | puts "cloning from last backup #{last_backup}" 42 | 43 | backup_url = `heroku pgbackups:url #{last_backup} -r #{remote}` 44 | 45 | backup_name = "#{last_backup}.dump" 46 | 47 | puts "backing up to local file: #{backup_name}" 48 | 49 | open(backup_name, "wb") do |file| 50 | file << open(backup_url).read 51 | end 52 | 53 | puts "dumping data into #{project}_development database" 54 | 55 | system("pg_restore --verbose --clean --no-acl --no-owner -d #{project}_development #{backup_name}") 56 | puts "*" * 80 57 | puts "OK. Don't forget to remove the backup file before you commit." 58 | -------------------------------------------------------------------------------- /dots/bash_prompt: -------------------------------------------------------------------------------- 1 | 2 | # Color settings for bash 3 | export TERM=xterm-color 4 | export GREP_OPTIONS='--color=auto' GREP_COLOR='0;36' 5 | export CLICOLOR=1 6 | 7 | # The order of the attributes are as follows (fgbg): 8 | # 01. directory 9 | # 02. symbolic link 10 | # 03. socket 11 | # 04. pipe 12 | # 05. executable 13 | # 06. block special 14 | # 07. character special 15 | # 08. executable with setuid bit set 16 | # 09. executable with setgid bit set 17 | # 10. directory writable to others, with sticky bit 18 | # 11. directory writable to others, without sticky bit 19 | # LSCOLORS=0102030405060708091011 20 | export LSCOLORS=excxgxfxbxdxbxbxbxexex 21 | 22 | # Color | Escaped | ANSI 23 | # -------------- | ---------- | ------------ 24 | # No Color | \033[0m | x (default foreground) 25 | # Black | \033[0;30m | a 26 | # Grey | \033[1;30m | A 27 | # Red | \033[0;31m | b 28 | # Bright Red | \033[1;31m | B 29 | # Green | \033[0;32m | c 30 | # Bright Green | \033[1;32m | C 31 | # Brown | \033[0;33m | d 32 | # Yellow | \033[1;33m | D 33 | # Blue | \033[0;34m | e 34 | # Bright Blue | \033[1;34m | E 35 | # Magenta | \033[0;35m | f 36 | # Bright Magenta | \033[1;35m | F 37 | # Cyan | \033[0;36m | g 38 | # Bright Cyan | \033[1;36m | G 39 | # Bright Grey | \033[0;37m | h 40 | # White | \033[1;37m | H 41 | 42 | parse_git_branch() { 43 | __git_ps1 " [%s]" 44 | } 45 | 46 | # Send back the results from either rbenv or rvm 47 | parse_ruby_version() { 48 | echo " [$(rbenv version-name)]" 49 | } 50 | 51 | settitle() { 52 | echo -n -e "\033]0;$*\007" 53 | } 54 | 55 | export GIT_PS1_SHOWDIRTYSTATE='true' 56 | export PS1="\[\033[35m\][\h\[\033[00m\]\[\033[35m\]] \[\033[34m\]\W\[\033[32m\]\$(parse_ruby_version)\[\033[31m\]\$(parse_git_branch)\[\033[00m\] \[\033[0m\]" 57 | export PS2="\[\033[35m\]→ \[\033[0m\]" 58 | 59 | -------------------------------------------------------------------------------- /dots/bash_completions: -------------------------------------------------------------------------------- 1 | 2 | if [ -f `brew --prefix`/etc/bash_completion ]; then 3 | . `brew --prefix`/etc/bash_completion 4 | fi 5 | 6 | # ps_1 was moved so source this file instead 7 | if [ -f /usr/local/share/git-core/contrib/completion/git-prompt.sh ]; then 8 | source /usr/local/share/git-core/contrib/completion/git-prompt.sh 9 | fi 10 | 11 | 12 | # Add completions for the `yo` program 13 | _yo() { 14 | COMPREPLY=() 15 | local cur="${COMP_WORDS[COMP_CWORD]}" 16 | local opts="go google github dochub rubydoc jquery wiki feedme help" 17 | COMPREPLY=($(compgen -W "${opts}" -- ${cur})) 18 | } 19 | complete -F _yo yo 20 | 21 | # npm command completion script 22 | # 23 | # Installation: npm completion >> ~/.bashrc (or ~/.zshrc) 24 | # Or, maybe: npm completion > /usr/local/etc/bash_completion.d/npm 25 | COMP_WORDBREAKS=${COMP_WORDBREAKS/=/} 26 | COMP_WORDBREAKS=${COMP_WORDBREAKS/@/} 27 | export COMP_WORDBREAKS 28 | 29 | if complete &>/dev/null; then 30 | _npm_completion () { 31 | local si="$IFS" 32 | IFS=$'\n' COMPREPLY=($(COMP_CWORD="$COMP_CWORD" \ 33 | COMP_LINE="$COMP_LINE" \ 34 | COMP_POINT="$COMP_POINT" \ 35 | npm completion -- "${COMP_WORDS[@]}" \ 36 | 2>/dev/null)) || return $? 37 | IFS="$si" 38 | } 39 | complete -F _npm_completion npm 40 | elif compctl &>/dev/null; then 41 | _npm_completion () { 42 | local cword line point words si 43 | read -Ac words 44 | read -cn cword 45 | let cword-=1 46 | read -l line 47 | read -ln point 48 | si="$IFS" 49 | IFS=$'\n' reply=($(COMP_CWORD="$cword" \ 50 | COMP_LINE="$line" \ 51 | COMP_POINT="$point" \ 52 | npm completion -- "${words[@]}" \ 53 | 2>/dev/null)) || return $? 54 | IFS="$si" 55 | } 56 | compctl -K _npm_completion npm 57 | fi 58 | ###-end-npm-completion-### 59 | -------------------------------------------------------------------------------- /vim/snippets/coffee-jasmine.snippets: -------------------------------------------------------------------------------- 1 | # Jasmine --------------------------------------------------------------------- 2 | snippet des 3 | describe '${1:description}', ->${2} 4 | snippet it 5 | it '${1:description}', ->${2} 6 | snippet desi 7 | describe '${1:description}', -> 8 | it '${2:description}', ->${3} 9 | snippet bef 10 | beforeEach ->${1} 11 | snippet aft 12 | afterEach -> ${1} 13 | snippet runs 14 | runs -> 15 | ${2} 16 | waits ${1:duration} 17 | runs -> 18 | ${3} 19 | snippet waits 20 | waits ${1:duration} 21 | snippet ex 22 | expect(${1:target})${2} 23 | snippet ee 24 | expect(${1:target}).toEqual(${2:value})${3} 25 | snippet eb 26 | expect(${1:target}).toBe(${2:value})${3} 27 | snippet em 28 | expect(${1:target}).toMatch(${2:pattern})${3} 29 | snippet ed 30 | expect(${1:target}).toBeDefined()${2} 31 | snippet eu 32 | expect(${1:target}).toBeUndefined()${2} 33 | snippet en 34 | expect(${1:target}).toBeNull()${2} 35 | snippet et 36 | expect(${1:target}).toBeTruthy()${2} 37 | snippet ef 38 | expect(${1:target}).toBeFalsy()${2} 39 | snippet ec 40 | expect(${1:target}).toContain(${2:value})${3} 41 | snippet el 42 | expect(${1:target}).toBeLessThan(${2:value})${3} 43 | snippet eg 44 | expect(${1:target}).toBeGreaterThan(${2:value})${3} 45 | snippet eth 46 | expect(-> 47 | ${1:fn} 48 | ).toThrow() 49 | snippet wf 50 | waitsFor (-> 51 | ${1:fn} 52 | ), "${2:message}", ${3:duration} 53 | snippet ecall 54 | expect(${1:target}).toHaveBeenCalled() 55 | snippet ecallw 56 | expect(${1:target}).toHaveBeenCalledWith(${2:arguments}) 57 | snippet soct 58 | spyOn(${1:object}, '${2:method}').andCallThrough()${3} 59 | snippet sor 60 | spyOn(${1:object}, '${2:method}').andReturn(${3:arguments})${4} 61 | snippet sot 62 | spyOn(${1:object}, '${2:method}').andThrow(${3:exception})${4} 63 | snippet socf 64 | spyOn(${1:object}, '${2:method}').andCallFake(${3:function})${4} 65 | snippet scc 66 | ${1:spy}.callCount 67 | snippet sra 68 | ${1:spy}.mostRecentCall.args 69 | snippet safc 70 | ${1:spy}.argsForCall[${2:index}] 71 | -------------------------------------------------------------------------------- /vim/snippets/javascript-jasmine.snippets: -------------------------------------------------------------------------------- 1 | # Jasmine --------------------------------------------------------------------- 2 | snippet des 3 | describe('${1:description}', function() { 4 | ${2} 5 | }) 6 | snippet it 7 | it('${1:description}', function() { 8 | ${2} 9 | }) 10 | snippet desi 11 | describe('${1:description}', function() { 12 | it('${2:description}', function() { 13 | ${3} 14 | }) 15 | }) 16 | snippet bef 17 | beforeEach(function() { 18 | ${1} 19 | }) 20 | snippet aft 21 | afterEach(function() { 22 | ${1} 23 | }) 24 | snippet runs 25 | runs(function() { 26 | ${1} 27 | }) 28 | snippet waits 29 | waits(${1}) 30 | snippet ex 31 | expect(${1:target})${2} 32 | snippet ee 33 | expect(${1:target}).toEqual(${2:value})${3} 34 | snippet eb 35 | expect(${1:target}).toBe(${2:value})${3} 36 | snippet em 37 | expect(${1:target}).toMatch(${2:pattern})${3} 38 | snippet et 39 | expect(${1:target}).toBeTruthy()${2} 40 | snippet ef 41 | expect(${1:target}).toBeFalsy()${2} 42 | snippet ed 43 | expect(${1:target}).toBeDefined()${2} 44 | snippet eu 45 | expect(${1:target}).toBeUndefined()${2} 46 | snippet en 47 | expect(${1:target}).toBeNull()${2} 48 | snippet ec 49 | expect(${1:target}).toContain(${2:value})${3} 50 | snippet el 51 | expect(${1:target}).toBeLessThan(${2:value})${3} 52 | snippet eg 53 | expect(${1:target}).toBeGreaterThan(${2:value})${3} 54 | snippet eth 55 | expect(${1:fn}).toThrow() 56 | snippet wf 57 | waitsFor(function() { 58 | ${1:fn} 59 | }, "${2:message}", ${3:duration}) 60 | snippet ecall 61 | expect(${1:target}).toHaveBeenCalled() 62 | snippet ecallw 63 | expect(${1:target}).toHaveBeenCalledWith(${2:arguments}) 64 | snippet soct 65 | spyOn(${1:object}, '${2:method}').andCallThrough()${3} 66 | snippet sor 67 | spyOn(${1:object}, '${2:method}').andReturn(${3:arguments})${4} 68 | snippet sot 69 | spyOn(${1:object}, '${2:method}').andThrow(${3:exception})${4} 70 | snippet socf 71 | spyOn(${1:object}, '${2:method}').andCallFake(${3:function})${4} 72 | snippet scc 73 | ${1:spy}.callCount 74 | snippet sra 75 | ${1:spy}.mostRecentCall.args 76 | snippet safc 77 | ${1:spy}.argsForCall[${2:index}] 78 | -------------------------------------------------------------------------------- /dots/jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "asi" : true, 3 | "bitwise" : true, 4 | "boss" : false, 5 | "browser" : true, 6 | "couch" : true, 7 | "curly" : false, 8 | "debug" : false, 9 | "devel" : true, 10 | "dojo" : false, 11 | "eqeqeq" : true, 12 | "eqnull" : false, 13 | "es5" : true, 14 | "esnext" : true, 15 | "evil" : false, 16 | "expr" : false, 17 | "forin" : false, 18 | "funcscope" : true, 19 | "globalstrict" : false, 20 | "immed" : true, 21 | "iterator" : true, 22 | "jquery" : true, 23 | "lastsemic" : true, 24 | "latedef" : true, 25 | "laxbreak" : false, 26 | "laxcomma" : true, 27 | "loopfunc" : false, 28 | "mootools" : true, 29 | "multistr" : true, 30 | "newcap" : false, 31 | "noarg" : true, 32 | "node" : true, 33 | "noempty" : false, 34 | "nonew" : false, 35 | "nonstandard" : true, 36 | "nomen" : false, 37 | "onecase" : true, 38 | "onevar" : false, 39 | "passfail" : false, 40 | "plusplus" : false, 41 | "proto" : false, 42 | "prototypejs" : true, 43 | "regexdash" : true, 44 | "regexp" : true, 45 | "rhino" : false, 46 | "undef" : true, 47 | "scripturl" : true, 48 | "shadow" : true, 49 | "smarttabs" : true, 50 | "strict" : false, 51 | "sub" : true, 52 | "supernew" : false, 53 | "trailing" : false, 54 | "validthis" : true, 55 | "withstmt" : false, 56 | "white" : false, 57 | "wsh" : false, 58 | "indent" : 2, 59 | 60 | "predef" : [ 61 | "_", 62 | "jasmine", 63 | "describe", 64 | "xdescribe", 65 | "it", 66 | "xit", 67 | "beforeEach", 68 | "afterEach", 69 | "expect", 70 | "spyOn", 71 | "runs", 72 | "waits", 73 | "waitsFor", 74 | "Benchmark", 75 | "Raphael", 76 | "Backbone", 77 | "Modernizr", 78 | "Bindable", 79 | "utensils", 80 | "Ext", 81 | "_gaq" 82 | ] 83 | } 84 | 85 | -------------------------------------------------------------------------------- /vim/snippets/_.snippets: -------------------------------------------------------------------------------- 1 | # Global snippets 2 | 3 | # (c) holds no legal value ;) 4 | snippet c) 5 | Copyright `&enc[:2] == "utf" ? "©" : "(c)"` `strftime("%Y")` ${1:`g:snips_author`}. All Rights Reserved.${2} 6 | snippet mtc) 7 | Copyright `&enc[:2] == "utf" ? "©" : "(c)"` `strftime("%Y")` Mode Set. All Rights Reserved.${2} 8 | snippet date 9 | `strftime("%Y-%m-%d")` 10 | snippet ddate 11 | `strftime("%B %d, %Y")` 12 | snippet lorem 13 | Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. 14 | snippet author 15 | `g:snips_author` 16 | snippet { 17 | { 18 | ${1} 19 | 20 | snippet MIT 21 | Copyright (c) `strftime("%Y")` by `g:snips_author` 22 | 23 | Permission is hereby granted, free of charge, to any person 24 | obtaining a copy of this software and associated documentation 25 | files (the "Software"), to deal in the Software without 26 | restriction, including without limitation the rights to use, 27 | copy, modify, merge, publish, distribute, sublicense, and/or sell 28 | copies of the Software, and to permit persons to whom the 29 | Software is furnished to do so, subject to the following 30 | conditions: 31 | 32 | The above copyright notice and this permission notice shall be 33 | included in all copies or substantial portions of the Software. 34 | 35 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 36 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 37 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 38 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 39 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 40 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 41 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 42 | OTHER DEALINGS IN THE SOFTWARE. 43 | -------------------------------------------------------------------------------- /vim/snippets/markdown.snippets: -------------------------------------------------------------------------------- 1 | 2 | # Markdown 3 | snippet link 4 | [${1:text}](http://www.${2:url}.com/)${3} 5 | snippet lid 6 | [${1:text}][${2:id}] 7 | snippet id 8 | [${1:id}]: http://www.${2:url}.com/ 9 | snippet img 10 | ![${1:alt text}](${2:image path} "${3:title}")${4} 11 | snippet h1 12 | # ${1:Header} 13 | 14 | ${2} 15 | snippet h2 16 | ## ${1:Header} 17 | 18 | ${2} 19 | snippet h3 20 | ### ${1:Header} 21 | 22 | ${2} 23 | snippet h4 24 | #### ${1:Header} 25 | 26 | ${2} 27 | snippet h5 28 | ##### ${1:Header} 29 | 30 | ${2} 31 | snippet h6 32 | ###### ${1:Header} 33 | 34 | ${2} 35 | snippet ms_break 36 |
37 | ${1} 38 | snippet ms_highlight 39 | ${1:text}${2} 40 | 41 | snippet ms_eaves 42 | ${1:text}${2} 43 | snippet ms_sig 44 |
45 | ${2} 46 | snippet ms_copy 47 | 48 | ${1} 49 | snippet ms_copyright 50 | 51 | ${1} 52 | snippet ms_logo 53 | ![logo](http://modeset.github.com/images/modeset-logo.png "${1:xsmall|small|medium|large|xl} block") 54 | snippet ms_logo_trade 55 | ![logo](http://modeset.github.com/images/modeset-logo-trademark.png "${1:xsmall|small|medium|large|xl} block") 56 | snippet ms_crest 57 | ![logo](http://modeset.github.com/images/modeset-crest.png "${1:xsmall|small|medium|large|xl} block") 58 | snippet ms_logotype 59 | ![logo](http://modeset.github.com/images/modeset-logotype.png "${1:xsmall|small|medium|large|xl} block") 60 | snippet ms_logotype_trade 61 | ![logo](http://modeset.github.com/images/modeset-logotype-trademark.png "${1:xsmall|small|medium|large|xl} block") 62 | snippet ms_binary_dark 63 | ![logo](http://modeset.github.com/images/modeset-binary-dark.png "${1:xsmall|small|medium|large|xl} block") 64 | snippet ms_binary_light 65 | ![logo](http://modeset.github.com/images/modeset-binary-light.png "${1:xsmall|small|medium|large|xl} block") 66 | snippet ms_masthead 67 | ![banner](http://modeset.github.com/images/modeset-masthead.png "masthead") 68 | snippet ms_gravatar 69 | ![crest](https://secure.gravatar.com/avatar/aa8ea677b07f626479fd280049b0e19f?s=75) 70 | -------------------------------------------------------------------------------- /vim/snippets/c.snippets: -------------------------------------------------------------------------------- 1 | # main() 2 | snippet main 3 | int main(int argc, const char *argv[]) 4 | { 5 | ${1} 6 | return 0; 7 | } 8 | snippet mainn 9 | int main(void) 10 | { 11 | ${1} 12 | return 0; 13 | } 14 | # #include <...> 15 | snippet inc 16 | #include <${1:stdio}.h>${2} 17 | # #include "..." 18 | snippet Inc 19 | #include "${1:`Filename("$1.h")`}"${2} 20 | # #ifndef ... #define ... #endif 21 | snippet Def 22 | #ifndef $1 23 | #define ${1:SYMBOL} ${2:value} 24 | #endif${3} 25 | snippet def 26 | #define 27 | snippet ifdef 28 | #ifdef ${1:FOO} 29 | ${2:#define } 30 | #endif 31 | snippet #if 32 | #if ${1:FOO} 33 | ${2} 34 | #endif 35 | # Header Include-Guard 36 | snippet once 37 | #ifndef ${1:`toupper(Filename('$1_H', 'UNTITLED_H'))`} 38 | 39 | #define $1 40 | 41 | ${2} 42 | 43 | #endif /* end of include guard: $1 */ 44 | # If Condition 45 | snippet if 46 | if (${1:/* condition */}) { 47 | ${2:/* code */} 48 | } 49 | snippet el 50 | else { 51 | ${1} 52 | } 53 | # Ternary conditional 54 | snippet t 55 | ${1:/* condition */} ? ${2:a} : ${3:b} 56 | # Do While Loop 57 | snippet do 58 | do { 59 | ${2:/* code */} 60 | } while (${1:/* condition */}); 61 | # While Loop 62 | snippet wh 63 | while (${1:/* condition */}) { 64 | ${2:/* code */} 65 | } 66 | # For Loop 67 | snippet for 68 | for (${2:i} = 0; $2 < ${1:count}; $2${3:++}) { 69 | ${4:/* code */} 70 | } 71 | # Custom For Loop 72 | snippet forr 73 | for (${1:i} = ${2:0}; ${3:$1 < 10}; $1${4:++}) { 74 | ${5:/* code */} 75 | } 76 | # Function 77 | snippet fun 78 | ${1:void} ${2:function_name}(${3}) 79 | { 80 | ${4:/* code */} 81 | } 82 | # Function Declaration 83 | snippet fund 84 | ${1:void} ${2:function_name}(${3});${4} 85 | # Typedef 86 | snippet td 87 | typedef ${1:int} ${2:MyCustomType};${3} 88 | # Struct 89 | snippet st 90 | struct ${1:`Filename('$1_t', 'name')`} { 91 | ${2:/* data */} 92 | }${3: /* optional variable list */};${4} 93 | # Typedef struct 94 | snippet tds 95 | typedef struct ${2:_$1 }{ 96 | ${3:/* data */} 97 | } ${1:`Filename('$1_t', 'name')`}; 98 | # Typdef enum 99 | snippet tde 100 | typedef enum { 101 | ${1:/* data */} 102 | } ${2:foo}; 103 | # printf 104 | # unfortunately version this isn't as nice as TextMates's, given the lack of a 105 | # dynamic `...` 106 | snippet pr 107 | printf("${1:%s}\n"${2});${3} 108 | # fprintf (again, this isn't as nice as TextMate's version, but it works) 109 | snippet fpr 110 | fprintf(${1:stderr}, "${2:%s}\n"${3});${4} 111 | # This is kind of convenient 112 | snippet . 113 | [${1}]${2} 114 | -------------------------------------------------------------------------------- /vim/snippets/javascript.snippets: -------------------------------------------------------------------------------- 1 | # Native JS 2 | # ----------------------------------------------------------------------------- 3 | snippet proto 4 | ${1:class_name}.prototype.${2:method_name} = function(${3:first_argument}) { 5 | ${4:// body...} 6 | }; 7 | snippet fun 8 | function ${1:function_name}(${2:argument}) { 9 | ${3:// body...} 10 | } 11 | snippet anon 12 | (function() { 13 | ${1:// body} 14 | }()) 15 | snippet fa 16 | function() { 17 | ${1:// body} 18 | } 19 | snippet vf 20 | var ${1:var_name} = function(${2:argument}) { 21 | ${3:// body...} 22 | }; 23 | snippet f 24 | function(${1}) {${2}} 25 | snippet if 26 | if (${1:true}) { 27 | ${2} 28 | } 29 | snippet ife 30 | if (${1:true}) { 31 | ${2} 32 | } 33 | else { 34 | ${3} 35 | } 36 | snippet ter 37 | (${1:/* condition */}) ? ${2:a} : ${3:b} 38 | snippet switch 39 | switch (${1:expression}) { 40 | case '${3:case}': 41 | ${4:// code} 42 | break; 43 | ${5} 44 | default: 45 | ${2:// code} 46 | } 47 | snippet case 48 | case '${1:case}': 49 | ${2:// code} 50 | break; 51 | ${3} 52 | snippet for 53 | for (var ${2:i} = 0, ${3:len} = ${1:Things}.length; $2 < $3; $2 += 1) { 54 | ${4:$1[$2]} 55 | } 56 | snippet forr 57 | for (var ${2:i} = ${1:Things}.length - 1; $2 >= 0; $2${3: -= 1}) { 58 | ${4:$1[$2]} 59 | } 60 | snippet while 61 | while (${1:/* condition */}) { 62 | ${2:/* code */} 63 | } 64 | snippet do 65 | do {)) 66 | ${2:/* code */} 67 | } while (${1:/* condition */}) 68 | snippet :f 69 | ${1:method_name}: function(${2:attribute}) { 70 | ${4} 71 | }${3:,} 72 | snippet :, 73 | ${1:value_name}: ${2:value}${3:,} 74 | snippet timeout 75 | setTimeout(function() { 76 | ${2} 77 | }, ${1:ms}) 78 | snippet interval 79 | setInterval(function() { 80 | ${2} 81 | }, ${1:ms}) 82 | snippet getBy 83 | getElementsBy${1:Id/TagName}('${2}') 84 | snippet callback 85 | (function () { 86 | ${1:// body...} 87 | }()) 88 | snippet hr 89 | // ---------------------------------------------------------------------------- 90 | snippet self 91 | var self = this;${1} 92 | snippet comb 93 | /** 94 | * ${1:Description} 95 | */ 96 | snippet log 97 | console.log(${1})${2} 98 | snippet :error 99 | console.error(${1})${2} 100 | snippet trace 101 | console.log('${1:var} is ' + $1)${2} 102 | snippet :inspect 103 | for (var ${1:prop} in ${2:obj}) { 104 | console.log($1 + ': ' + $2[$1])${3} 105 | } 106 | snippet lint 107 | /*global ${1:Global} */ 108 | snippet sc 109 | + ${1:content} + ${2} 110 | snippet throw 111 | throw new Error('${1:e}')${2} 112 | snippet try 113 | try { 114 | ${1} 115 | } catch (err) { 116 | ${2} 117 | } 118 | snippet var 119 | var ${1:name} = ${2:value}${3} 120 | -------------------------------------------------------------------------------- /dots/wemux.conf: -------------------------------------------------------------------------------- 1 | ## wemux Configuration: 2 | ## wemux version 3.1.0 3 | ## 4 | ## Uncomment an option (remove the # in front of it) if you would like to change 5 | ## the option from its default setting. 6 | 7 | ####### HOST OPTIONS ####### 8 | 9 | ## All usernames in host_list will use wemux in host mode, allowing 10 | ## them to create wemux servers for other users to attach to. 11 | ## Add the usernames of users who should use wemux in host mode: 12 | ## example: host_list=(zolrath csagan brocksamson) 13 | ## host_list=(change_this) 14 | 15 | ####### CLIENT OPTIONS ####### 16 | 17 | ## Allow users to attach to the wemux sever in pair mode. 18 | ## When set to false, clients will only be able to attach in mirror mode. 19 | ## Defaults to "true" 20 | # allow_pair_mode="false" 21 | 22 | ## Allow users to attach to the wemux sever in rogue mode. 23 | ## When set to false, clients will only be able to attach in pair or mirror mode. 24 | ## Defaults to "true" 25 | # allow_rogue_mode="false" 26 | 27 | ## When clients enter 'wemux' with no arguments by default it will attempt to 28 | ## join an existing pair mode session, if there is no pair session it will start 29 | ## a mirror mode session. 30 | ## By setting default_client_mode to "pair", 'wemux' with no arguments will always 31 | ## join a pair mode session, even if it has to create it. 32 | ## Defaults to "mirror" 33 | # default_client_mode="pair" 34 | 35 | ## Allow hosts to kick SSH users from the server and remove the kicked users 36 | ## wemux sessions. 37 | ## Defaults to "true" 38 | # allow_kick_user="false" 39 | 40 | ####### MULTI-HOST OPTIONS ####### 41 | 42 | ## Allow users to change their sever for multi-host environments. 43 | ## Defaults to "false" 44 | allow_session_change="true" 45 | allow_server_change="true" 46 | 47 | ## Set name for default wemux sever. Will be used with wemux reset and 48 | ## when allow_sever_change is disabled. 49 | ## Defaults to "wemux" 50 | # default_sever_name="customname" 51 | 52 | ## Allow users to list all currently running wemux sockets/severs. 53 | ## Automatically disabled if allow_sever_change="false" 54 | ## Defaults to "true" 55 | allow_sever_list="true" 56 | 57 | ####### ANNOUNCEMENT OPTIONS ####### 58 | 59 | ## Allow users to see list of currently connected wemux users. 60 | ## Defaults to "true" 61 | # allow_user_list="false" 62 | 63 | ## Announce when users attach/detach from a tmux sever. 64 | ## Defaults to "true" 65 | # announce_attach="false" 66 | 67 | ## Announce when users change the wemux sever they are using. 68 | ## Defaults to "true" 69 | # announce_sever_change="false" 70 | 71 | ####### OTHER OPTIONS ####### 72 | 73 | ## Location of tmux socket, will have sever name appended to end: 74 | ## Defaults to "/tmp/wemux" 75 | # socket-prefix="/tmp/wemux" 76 | 77 | ## Tmux Options: 78 | ## Defaults to -u to have tmux always attempt to use utf-8 mode. 79 | # options="-u" 80 | -------------------------------------------------------------------------------- /vim/snippets/coffee.snippets: -------------------------------------------------------------------------------- 1 | # Native CoffeeScript 2 | # ----------------------------------------------------------------------------- 3 | snippet var 4 | ${1:name} = ${2:value}${3} 5 | snippet vp 6 | ${1:name}: ${2:value}${3} 7 | snippet f 8 | ${1:name} = -> ${2} 9 | snippet fa 10 | ${1:name} = (${2:args}) -> ${3} 11 | snippet fb 12 | ${1:name} = => ${2} 13 | snippet fba 14 | ${1:name} = (${2:args}) => ${3} 15 | snippet m 16 | ${1:name}: -> ${2} 17 | snippet ma 18 | ${1:name}: (${2:args}) -> ${3} 19 | snippet mb 20 | ${1:name}: => ${2} 21 | snippet mba 22 | ${1:name}: (${2:args}) => ${3} 23 | snippet proto 24 | ${1:class_name}::${2:method_name} = -> ${3} 25 | snippet protoa 26 | ${1:class_name}::${2:method_name} = (${3:args}) -> ${4} 27 | snippet class 28 | class ${1:name} 29 | constructor: (${2:args}) -> ${3} 30 | snippet extend 31 | class ${1:name} extends ${2:parent} 32 | constructor: (${3:args}) -> 33 | super 34 | ${4} 35 | snippet new 36 | ${1:instance} = new ${2:class} 37 | snippet if 38 | if ${1:condition} 39 | ${2} 40 | snippet ife 41 | if ${1:condition} 42 | ${2} 43 | else 44 | ${3} 45 | snippet ifeif 46 | if ${1:condition} 47 | ${2} 48 | else if ${3:condition} 49 | ${4} 50 | else 51 | ${5} 52 | snippet ter 53 | ${1:prop} = if ${2:condition} then ${3:a} else ${4:b} 54 | snippet soak 55 | ${1:prop} = ${2:exists} ? ${3:default} 56 | snippet switch 57 | switch ${1:expression} 58 | when ${2:case} then ${3:execute} 59 | else ${4:default} 60 | snippet case 61 | when ${1:case} then ${2:execute} 62 | snippet for 63 | for ${1:value} in ${2:array} 64 | snippet fordo 65 | for ${1:value} in ${2:array} 66 | do ($1) -> 67 | ${3:# body..} 68 | snippet fore 69 | for ${1:key}, ${2:value} of ${3:object} 70 | "#{$1} is #{$2}" 71 | snippet foreo 72 | for own ${1:key}, ${2:value} of ${3:object} 73 | "#{$1} is #{$2}" 74 | snippet lc 75 | ${1:prop} = (${2:value} for $2 in ${3:array}) 76 | snippet elc 77 | ${1:fn} ${2:value} for $2 in ${3:array} 78 | snippet oc 79 | ${1:prop} = for ${2:key}, ${3:value} of ${4:object} 80 | "#{$2} is #{$3}" 81 | snippet eoc 82 | ${1:fn} ${2:key}, ${3:value} for $2, $3 of ${4:object} 83 | snippet do 84 | do (${1:iterator}) -> 85 | ${2:# body..} 86 | snippet while 87 | ${1:fn} while ${2:true} 88 | snippet unless 89 | ${1:fn} unless ${2:false} 90 | snippet hr 91 | # ----------------------------------------------------------------------------- 92 | snippet # 93 | #{${1:prop}}${2} 94 | snippet log 95 | console.log ${1} 96 | snippet :error 97 | console.error ${1} 98 | snippet trace 99 | console.log "${1:var} is #{$1}"${2} 100 | snippet throw 101 | throw new Error '${1:e}' 102 | snippet try 103 | try 104 | ${1} 105 | catch err 106 | ${2} 107 | snippet timeout 108 | setTimeout(( => 109 | ${2} 110 | ), ${1:ms}) 111 | snippet interval 112 | setInterval(( => 113 | ${2} 114 | ), ${1:ms}) 115 | snippet hdoc 116 | ${1:prop} = """ 117 | ${2:# contents} 118 | """ 119 | snippet bindable 120 | class ${1:namespace}.${2:ClassName} 121 | constructor: (@el, data) -> 122 | Bindable.register '${3:attrName}', $1.$2 123 | snippet scope 124 | => ${1:method} arguments... 125 | -------------------------------------------------------------------------------- /vim/doc/mscheat.txt: -------------------------------------------------------------------------------- 1 | 2 | mscheat.txt* Settings and various information for the Mode Set configuration 3 | 4 | Author: Mode Set 5 | 6 | ============================================================================== 7 | Mode Set Cheat *mscheat* 8 | 9 | 1. Introduction |mscheat-intro| 10 | 2. Key Mapping |mscheat-key-mappings| 11 | 3. Leader Mapping |mscheat-leader-mappings| 12 | 4. Command Mapping |mscheat-command-mappings| 13 | ============================================================================== 14 | 1. Introduction *mscheat-intro* 15 | 16 | Listed below are key and leader mappings setup within the .vimrc file. Check 17 | out the installed plug-in help docs as they setup their own bindings as well. 18 | ============================================================================== 19 | 2. Key Mapping *mscheat-key-mappings* 20 | 21 | Normal Mode: 22 | j => move down 23 | k => move up 24 | => move to split left 25 | => move to split right 26 | => move to split top 27 | => move to split bottom 28 | => move between blocks (visual and normal modes) 29 | \ => clear search highlight 30 | gV => Visually select the text that was last edited/pasted 31 | 32 | Insert Mode: 33 | jj => 34 | => supertab forward / snippets complete 35 | => supertab backward 36 | 37 | Function Keys: 38 | => toggle CtrlP 39 | => toggle NerdTree 40 | => toggle Buffergator 41 | => toggle Tagbar 42 | => toggle Yankring 43 | => show file type snippets (insert mode only) 44 | => reserved for .vimrc 45 | => reserved for .vimrc.user 46 | => reserved for .vimrc.user 47 | => reserved for .vimrc.user 48 | => bubble line(s) down 49 | => bubble line(s) up 50 | ============================================================================== 51 | 3. Leader Mapping *mscheat-leader-mappings* 52 | 53 | The leader key is mapped to comma ",". Always in normal mode. 54 | 55 | Global: 56 | f => ack search 57 | evm => edit ~/.vimrc 58 | evl => edit ~/.vimrc.local 59 | ebl => edit ~/.bashrc_local 60 | CN => collapse multi-line whitespace to one line 61 | CW => clean empty whitespace (when [\s] is in status line) 62 | rt => reload ctags 63 | lc => close syntastic's location list 64 | y => in visual mode yank the contents to register "x" 65 | p => paste the contents of named register "x" 66 | 67 | CoffeeScript: 68 | b => Print selected to JavaScript in scratch buffer 69 | d => Run selected text in scratch buffer (uses node) 70 | ============================================================================== 71 | 4. Command Mapping *mscheat-command-mappings* 72 | 73 | Shortcuts while in command mode. 74 | 75 | w!! => Write to a file using sudo (prompts for pw) 76 | => Inserts the path of the current file from command mode 77 | 78 | ==================================================================== 79 | vim:tw=78:ts=8:ft=help:norl: 80 | 81 | -------------------------------------------------------------------------------- /dotils: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | ARGS=(osx help) 5 | CWD=`pwd` 6 | 7 | 8 | ## Public API 9 | # ----------------------------------------------------------------------------- 10 | 11 | #/ osx Sets reasonable OS X defaults for a new system [http://mths.be/osx], take a look before running. 12 | osx() { 13 | # Show the ~/Library folder 14 | chflags nohidden ~/Library 15 | 16 | # Expand save panel by default 17 | defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true 18 | 19 | # Expand print panel by default 20 | defaults write NSGlobalDomain PMPrintingExpandedStateForPrint -bool true 21 | 22 | # Disable shadow in screenshots 23 | defaults write com.apple.screencapture disable-shadow -bool true 24 | 25 | # Finder: allow text selection in Quick Look 26 | defaults write com.apple.finder QLEnableTextSelection -bool true 27 | 28 | # Avoid creating .DS_Store files on network volumes 29 | defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true 30 | 31 | # Show indicator lights for open applications in the Dock 32 | defaults write com.apple.dock show-process-indicators -bool true 33 | 34 | # Make Dock icons of hidden applications translucent 35 | defaults write com.apple.dock showhidden -bool true 36 | 37 | # Enable the Develop menu and the Web Inspector in Safari 38 | defaults write com.apple.Safari IncludeDevelopMenu -bool true 39 | defaults write com.apple.Safari WebKitDeveloperExtrasEnabledPreferenceKey -bool true 40 | defaults write com.apple.Safari "com.apple.Safari.ContentPageGroupIdentifier.WebKit2DeveloperExtrasEnabled" -bool true 41 | 42 | # Disable send and reply animations in Mail.app 43 | defaults write com.apple.Mail DisableReplyAnimations -bool true 44 | defaults write com.apple.Mail DisableSendAnimations -bool true 45 | 46 | # Copy email addresses as `foo@example.com` instead of `Foo Bar ` in Mail.app 47 | defaults write com.apple.mail AddressesIncludeNameOnPasteboard -bool false 48 | 49 | # Add a context menu item for showing the Web Inspector in web views 50 | defaults write NSGlobalDomain WebKitDeveloperExtras -bool true 51 | 52 | # Display full POSIX path as Finder window title 53 | defaults write com.apple.finder _FXShowPosixPathInTitle -bool true 54 | 55 | # Disable press-and-hold for keys in favor of key repeat 56 | # defaults write NSGlobalDomain ApplePressAndHoldEnabled -bool false 57 | 58 | # Enable AirDrop over Ethernet and on unsupported Macs running Lion 59 | # defaults write com.apple.NetworkBrowser BrowseAllInterfaces -bool true 60 | 61 | # Always open everything in Finder's list view. 62 | # defaults write com.apple.Finder FXPreferredViewStyle Nlsv 63 | 64 | echo "Done. Note that some of these changes require a logout/restart to take effect." 65 | } 66 | 67 | 68 | #/ help Print this message 69 | help() { 70 | cat<CNN.*<\/title/>/g' \ 74 | -e 's/ESPN.*<\/title/>/g' | \ 75 | ack -m15 -o '<title>[^/]*' | \ 76 | sed -e 's,.*\([^<]*\).*,\1,g' \ 78 | )" 79 | echo "" 80 | } 81 | 82 | #/ help Print this message 83 | help() { 84 | cat< 1 ]]; then 122 | for fn in "${ARGS[@]}"; do 123 | if [[ $fn == $1 ]]; then 124 | func=$1 125 | shift 126 | ARGV=($@) 127 | $fn 128 | exit 0 129 | fi 130 | done 131 | fi 132 | 133 | # ...otherwise barf out a help warning 134 | help 135 | exit 0 136 | 137 | -------------------------------------------------------------------------------- /vim/snippets/html.snippets: -------------------------------------------------------------------------------- 1 | # Some useful Unicode entities 2 | # Non-Breaking Space 3 | snippet nbs 4 |   5 | snippet doctype 6 | 7 | snippet html 8 | 9 | ${1} 10 | 11 | snippet xhtml 12 | 13 | ${1} 14 | 15 | snippet body 16 | 17 | ${1} 18 | 19 | snippet head 20 | 21 | 22 | ${1:`substitute(Filename('', 'Page Title'), '^.', '\u&', '')`} 23 | ${2} 24 | 25 | snippet title 26 | ${1:`substitute(Filename('', 'Page Title'), '^.', '\u&', '')`}${2} 27 | snippet script 28 | ${2} 31 | snippet scriptsrc 32 | ${2} 33 | snippet style 34 | ${3} 37 | snippet base 38 | 39 | snippet r 40 | 41 | snippet div 42 |
43 | ${1} 44 |
45 | snippet fieldset 46 |
47 | ${1:name} 48 | ${3} 49 |
50 | snippet form 51 |
52 | ${3} 53 |

54 |
55 | snippet h1 56 |

${1:header}

57 | snippet h2 58 |

${1:header}

59 | snippet h3 60 |

${1:header}

61 | snippet h4 62 |

${1:header}

63 | snippet h5 64 |
${1:header}
65 | snippet h6 66 |
${1:header}
67 | snippet input 68 | ${4} 69 | snippet label 70 | ${7} 71 | snippet link 72 | ${4} 73 | snippet mailto 74 | ${3:email me} 75 | snippet meta 76 | ${3} 77 | snippet opt 78 | ${3} 79 | snippet optt 80 | ${2} 81 | snippet optgroup 82 | 83 | 84 | 85 | snippet select 86 | ${5} 89 | snippet table 90 | 91 | 92 | 93 |
${2:Header}
${3:Data}
${4} 94 | snippet textarea 95 | ${5} 96 | # mHTML additions 97 | # Links 98 | snippet a 99 | ${2:Link}${3} 100 | snippet href 101 | ${3:Link}${4} 102 | snippet aclass 103 | ${3:Link}${4} 104 | snippet aid 105 | ${3:Link}${4} 106 | snippet address 107 |
108 | ${1:address} 109 |
${2} 110 | snippet quote 111 |
112 | ${1:quote} 113 |
${2} 114 | snippet br 115 |
${1} 116 | snippet cite 117 | ${1:citation}${2} 118 | snippet code 119 | ${1:code}${2} 120 | snippet divid 121 |
122 | ${2} 123 |
124 | snippet divclass 125 |
126 | ${2} 127 |
128 | snippet img 129 | ${4:alt}${5} 130 | snippet imgph 131 | ${7:alt}${8} 132 | snippet dl 133 |
134 | ${1:item} 135 |
${2} 136 | snippet dt 137 |
138 | ${1:definition} 139 |
140 |
141 | ${2:dd} 142 |
${3} 143 | snippet ul 144 |
    145 | ${1} 146 |
147 | snippet ol 148 |
    149 | ${1} 150 |
151 | snippet li 152 |
  • ${1:item}
  • ${2} 153 | snippet list 154 |
      155 |
    • ${1:item}
    • 156 |
    157 | snippet p 158 |

    ${1:text}

    ${2} 159 | snippet pre 160 |
    161 | 		${1:code}
    162 | 	
    ${2} 163 | snippet nav 164 | ${3} 169 | snippet span 170 | ${2:text}${3} 171 | snippet strong 172 | ${1:text}${2} 173 | snippet ftable 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 |
    Header 1Header 2
    row 1, cell 1row 1, cell 2
    row 2, cell 1row 2, cell 2
    row 3, cell 1row 3, cell 2
    192 | snippet section 193 |
    194 | ${2} 195 |
    196 | -------------------------------------------------------------------------------- /vim/snippets/eruby.snippets: -------------------------------------------------------------------------------- 1 | 2 | # Some useful Unicode entities 3 | # Non-Breaking Space 4 | snippet nbs 5 |   6 | # ← 7 | # Generic Doctype 8 | snippet doctype 9 | 10 | snippet html 11 | 12 | ${1} 13 | 14 | snippet xhtml 15 | 16 | ${1} 17 | 18 | snippet body 19 | 20 | ${1} 21 | 22 | snippet head 23 | 24 | 25 | ${1:`substitute(Filename('', 'Page Title'), '^.', '\u&', '')`} 26 | ${2} 27 | 28 | snippet title 29 | ${1:`substitute(Filename('', 'Page Title'), '^.', '\u&', '')`}${2} 30 | snippet script 31 | ${2} 34 | snippet scriptsrc 35 | ${2} 36 | snippet style 37 | ${3} 40 | snippet base 41 | 42 | snippet r 43 | 44 | snippet div 45 |
    46 | ${1} 47 |
    48 | snippet fieldset 49 |
    50 | ${1:name} 51 | ${3} 52 |
    53 | snippet form 54 |
    55 | ${3} 56 |

    57 |
    58 | snippet h1 59 |

    ${1:header}

    60 | snippet h2 61 |

    ${1:header}

    62 | snippet h3 63 |

    ${1:header}

    64 | snippet h4 65 |

    ${1:header}

    66 | snippet h5 67 |
    ${1:header}
    68 | snippet h6 69 |
    ${1:header}
    70 | snippet input 71 | ${4} 72 | snippet label 73 | ${7} 74 | snippet link 75 | ${4} 76 | snippet mailto 77 | ${3:email me} 78 | snippet meta 79 | ${3} 80 | snippet opt 81 | ${3} 82 | snippet optt 83 | ${2} 84 | snippet optgroup 85 | 86 | 87 | 88 | snippet select 89 | ${5} 92 | snippet table 93 | 94 | 95 | 96 |
    ${2:Header}
    ${3:Data}
    ${4} 97 | snippet textarea 98 | ${5} 99 | # mHTML additions 100 | # Links 101 | snippet a 102 | ${2:Link}${3} 103 | snippet href 104 | ${3:Link}${4} 105 | snippet aclass 106 | ${3:Link}${4} 107 | snippet aid 108 | ${3:Link}${4} 109 | snippet address 110 |
    111 | ${1:address} 112 |
    ${2} 113 | snippet quote 114 |
    115 | ${1:quote} 116 |
    ${2} 117 | snippet br 118 |
    ${1} 119 | snippet cite 120 | ${1:citation}${2} 121 | snippet code 122 | ${1:code}${2} 123 | snippet divid 124 |
    125 | ${2} 126 |
    127 | snippet divclass 128 |
    129 | ${2} 130 |
    131 | snippet img 132 | ${4:alt}${5} 133 | snippet imgph 134 | ${7:alt}${8} 135 | snippet dl 136 |
    137 | ${1:item} 138 |
    ${2} 139 | snippet dt 140 |
    141 | ${1:definition} 142 |
    143 |
    144 | ${2:dd} 145 |
    ${3} 146 | snippet ul 147 |
      148 | ${1} 149 |
    150 | snippet ol 151 |
      152 | ${1} 153 |
    154 | snippet li 155 |
  • ${1:item}
  • ${2} 156 | snippet list 157 |
      158 |
    • ${1:item}
    • 159 |
    160 | snippet p 161 |

    ${1:text}

    ${2} 162 | snippet pre 163 |
    164 | 		${1:code}
    165 | 	
    ${2} 166 | snippet nav 167 | ${3} 172 | snippet span 173 | ${2:text}${3} 174 | snippet strong 175 | ${1:text}${2} 176 | snippet ftable 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 |
    Header 1Header 2
    row 1, cell 1row 1, cell 2
    row 2, cell 1row 2, cell 2
    row 3, cell 1row 3, cell 2
    195 | snippet erb 196 | <%= ${1:text} %>${2} 197 | snippet section 198 |
    199 | ${2} 200 |
    201 | -------------------------------------------------------------------------------- /vim/snippets/objc.snippets: -------------------------------------------------------------------------------- 1 | # #import <...> 2 | snippet Imp 3 | #import <${1:Cocoa/Cocoa.h}>${2} 4 | # #import "..." 5 | snippet imp 6 | #import "${1:`Filename()`.h}"${2} 7 | # @selector(...) 8 | snippet sel 9 | @selector(${1:method}:)${3} 10 | # @"..." string 11 | snippet s 12 | @"${1}"${2} 13 | # Object 14 | snippet o 15 | ${1:NSObject} *${2:foo} = [${3:$1 alloc}]${4};${5} 16 | # NSLog(...) 17 | snippet log 18 | NSLog(@"${1:%@}"${2});${3} 19 | # Class 20 | snippet objc 21 | @interface ${1:`Filename('', 'someClass')`} : ${2:NSObject} 22 | { 23 | } 24 | @end 25 | 26 | @implementation $1 27 | ${3} 28 | @end 29 | # Class Interface 30 | snippet int 31 | @interface ${1:`Filename('', 'someClass')`} : ${2:NSObject} 32 | {${3} 33 | } 34 | ${4} 35 | @end 36 | snippet @interface 37 | @interface ${1:`Filename('', 'someClass')`} : ${2:NSObject} 38 | {${3} 39 | } 40 | ${4} 41 | @end 42 | # Class Implementation 43 | snippet impl 44 | @implementation ${1:`Filename('', 'someClass')`} 45 | ${2} 46 | @end 47 | snippet @implementation 48 | @implementation ${1:`Filename('', 'someClass')`} 49 | ${2} 50 | @end 51 | # Protocol 52 | snippet pro 53 | @protocol ${1:`Filename('$1Delegate', 'MyProtocol')`} ${2:} 54 | ${3} 55 | @end 56 | snippet @protocol 57 | @protocol ${1:`Filename('$1Delegate', 'MyProtocol')`} ${2:} 58 | ${3} 59 | @end 60 | # init Definition 61 | snippet init 62 | - (id)init 63 | { 64 | if (self = [super init]) { 65 | ${1} 66 | } 67 | return self; 68 | } 69 | # dealloc Definition 70 | snippet dealloc 71 | - (void) dealloc 72 | { 73 | ${1:deallocations} 74 | [super dealloc]; 75 | } 76 | snippet su 77 | [super ${1:init}]${2} 78 | snippet ibo 79 | IBOutlet ${1:NSSomeClass} *${2:$1};${3} 80 | # Category 81 | snippet cat 82 | @interface ${1:NSObject} (${2:MyCategory}) 83 | @end 84 | 85 | @implementation $1 ($2) 86 | ${3} 87 | @end 88 | # Category Interface 89 | snippet cath 90 | @interface ${1:`Filename('$1', 'NSObject')`} (${2:MyCategory}) 91 | ${3} 92 | @end 93 | # Method 94 | snippet m 95 | - (${1:id})${2:method} 96 | { 97 | ${3} 98 | } 99 | # Method declaration 100 | snippet md 101 | - (${1:id})${2:method};${3} 102 | # IBAction declaration 103 | snippet ibad 104 | - (IBAction)${1:method}:(${2:id})sender;${3} 105 | # IBAction method 106 | snippet iba 107 | - (IBAction)${1:method}:(${2:id})sender 108 | { 109 | ${3} 110 | } 111 | # awakeFromNib method 112 | snippet wake 113 | - (void)awakeFromNib 114 | { 115 | ${1} 116 | } 117 | # Class Method 118 | snippet M 119 | + (${1:id})${2:method} 120 | { 121 | ${3:return nil;} 122 | } 123 | # Sub-method (Call super) 124 | snippet sm 125 | - (${1:id})${2:method} 126 | { 127 | [super $2];${3} 128 | return self; 129 | } 130 | # Accessor Methods For: 131 | # Object 132 | snippet objacc 133 | - (${1:id})${2:thing} 134 | { 135 | return $2; 136 | } 137 | 138 | - (void)set$2:($1)${3:new$2} 139 | { 140 | [$3 retain]; 141 | [$2 release]; 142 | $2 = $3; 143 | }${4} 144 | # for (object in array) 145 | snippet forin 146 | for (${1:Class} *${2:some$1} in ${3:array}) { 147 | ${4} 148 | } 149 | snippet fore 150 | for (${1:object} in ${2:array}) { 151 | ${3:statements} 152 | } 153 | snippet forarray 154 | unsigned int ${1:object}Count = [${2:array} count]; 155 | 156 | for (unsigned int index = 0; index < $1Count; index++) { 157 | ${3:id} $1 = [$2 $1AtIndex:index]; 158 | ${4} 159 | } 160 | snippet fora 161 | unsigned int ${1:object}Count = [${2:array} count]; 162 | 163 | for (unsigned int index = 0; index < $1Count; index++) { 164 | ${3:id} $1 = [$2 $1AtIndex:index]; 165 | ${4} 166 | } 167 | # Try / Catch Block 168 | snippet @try 169 | @try { 170 | ${1:statements} 171 | } 172 | @catch (NSException * e) { 173 | ${2:handler} 174 | } 175 | @finally { 176 | ${3:statements} 177 | } 178 | snippet @catch 179 | @catch (${1:exception}) { 180 | ${2:handler} 181 | } 182 | snippet @finally 183 | @finally { 184 | ${1:statements} 185 | } 186 | # IBOutlet 187 | # @property (Objective-C 2.0) 188 | snippet prop 189 | @property (${1:retain}) ${2:NSSomeClass} ${3:*$2};${4} 190 | # @synthesize (Objective-C 2.0) 191 | snippet syn 192 | @synthesize ${1:property};${2} 193 | # [[ alloc] init] 194 | snippet alloc 195 | [[${1:foo} alloc] init${2}];${3} 196 | snippet a 197 | [[${1:foo} alloc] init${2}];${3} 198 | # retain 199 | snippet ret 200 | [${1:foo} retain];${2} 201 | # release 202 | snippet rel 203 | [${1:foo} release]; 204 | # autorelease 205 | snippet arel 206 | [${1:foo} autorelease]; 207 | # autorelease pool 208 | snippet pool 209 | NSAutoreleasePool *${1:pool} = [[NSAutoreleasePool alloc] init]; 210 | ${2:/* code */} 211 | [$1 drain]; 212 | # Throw an exception 213 | snippet except 214 | NSException *${1:badness}; 215 | $1 = [NSException exceptionWithName:@"${2:$1Name}" 216 | reason:@"${3}" 217 | userInfo:nil]; 218 | [$1 raise]; 219 | snippet prag 220 | #pragma mark ${1:-} 221 | snippet cl 222 | @class ${1:Foo};${2} 223 | snippet color 224 | [[NSColor ${1:blackColor}] set]; 225 | # NSArray 226 | snippet array 227 | NSMutableArray *${1:array} = [NSMutable array];${2} 228 | snippet nsa 229 | NSArray ${1} 230 | snippet nsma 231 | NSMutableArray ${1} 232 | snippet aa 233 | NSArray * array;${1} 234 | snippet ma 235 | NSMutableArray * array;${1} 236 | # NSDictionary 237 | snippet dict 238 | NSMutableDictionary *${1:dict} = [NSMutableDictionary dictionary];${2} 239 | snippet nsd 240 | NSDictionary ${1} 241 | snippet nsmd 242 | NSMutableDictionary ${1} 243 | # NSString 244 | snippet nss 245 | NSString ${1} 246 | snippet nsms 247 | NSMutableString ${1} 248 | -------------------------------------------------------------------------------- /dotset: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | ARGS=(install update uninstall backup weekly help) 5 | CWD=`pwd` 6 | 7 | 8 | ## Public API 9 | # ----------------------------------------------------------------------------- 10 | 11 | #/ install Installs dotfiles, vimfiles, and various executables 12 | install() { 13 | backup 14 | printf "%sInstalling:\n" 15 | install_dots 16 | install_directory bin 17 | install_pathogen 18 | install_bundles 19 | install_vimfiles colors .vim 20 | install_vimfiles doc .txt 21 | install_vimfiles snippets .snippets 22 | install_vimtmps 23 | printf "%s\nThanks for flying dotset!\n" 24 | } 25 | 26 | 27 | #/ update Removes existing setup and installs fresh from git 28 | update() { 29 | check_for_dirty_repo 30 | uninstall 31 | git pull --rebase 32 | install 33 | } 34 | 35 | #/ uninstall Restores original dot files (or latest backup) 36 | uninstall() { 37 | if [[ ! -d $CWD/backup ]]; then 38 | while true; do 39 | echo "No backup found for replacement, continuing will blow away existing dot files." 40 | read -p "Do you wish to continue? (y/n) " yn 41 | case $yn in 42 | [Yy]* ) break;; 43 | [Nn]* ) exit 0;; 44 | * ) echo "Please answer yes or no.";; 45 | esac 46 | done 47 | fi 48 | printf "%sUninstalling:\n" 49 | uninstall_dots 50 | uninstall_directory bin 51 | uninstall_directory vim 52 | restore_dots 53 | restore_directory bin 54 | restore_directory vim 55 | rm -rf $CWD/backup 56 | } 57 | 58 | #/ backup Backup the existing dot files from the $HOME directory 59 | backup() { 60 | if [[ -d $CWD/backup ]]; then 61 | printf "%sBackup exists, skipping.\n" 62 | else 63 | printf "%sCreating backup:\n" 64 | mkdir -p $CWD/backup 65 | backup_dots 66 | backup_directory bin 67 | backup_directory vim 68 | fi 69 | } 70 | 71 | #/ weekly Runs a weekly update script to keep your machine pure 72 | weekly() { 73 | printf "%sRunning software update..\n" 74 | sudo softwareupdate -l 75 | sudo softwareupdate -i -a 76 | printf "%sUpdating homebrew..\n" 77 | brew update 78 | brew outdated 79 | brew upgrade `brew outdated` 80 | brew cleanup 81 | brew prune 82 | printf "%sUpdating pow..\n" 83 | curl get.pow.cx | sh 84 | printf "%sUpdating gems..\n" 85 | gem update 86 | gem cleanup 87 | printf "%sUpdating global npm packages..\n" 88 | npm update -g 89 | printf "%sUpdating dotset..\n" 90 | ./dotset update 91 | printf "%s-----------------------------------------------------------------\n" 92 | printf "%sRun any migrations and follow instructions from weekly update.\n" 93 | printf "%s-----------------------------------------------------------------\n" 94 | } 95 | 96 | #/ help Print this message 97 | help() { 98 | cat<