From 6bba9581c02f57761d4e63ecb65996d41850e2f4 Mon Sep 17 00:00:00 2001 From: Ben Orenstein Date: Wed, 24 Dec 2014 00:09:40 +0100 Subject: [PATCH 001/144] Cleaned up a bit in the plugins --- vimrc | 33 ++++++++++++++------------------- 1 file changed, 14 insertions(+), 19 deletions(-) diff --git a/vimrc b/vimrc index 643fb41e1e..dbe13cfb9d 100644 --- a/vimrc +++ b/vimrc @@ -10,36 +10,31 @@ call vundle#begin() " let Vundle manage Vundle, required Plugin 'gmarik/Vundle.vim' - -" My bundles Plugin 'elixir-lang/vim-elixir' Plugin 'ervandew/supertab' -Plugin 'kchmck/vim-coffee-script' Plugin 'koron/nyancat-vim' -Plugin 'skwp/greplace.vim' Plugin 'tomtom/tcomment_vim' -Plugin 'tpope/vim-bundler' -Plugin 'tpope/vim-cucumber' -Plugin 'tpope/vim-dispatch' -Plugin 'tpope/vim-endwise' -Plugin 'tpope/vim-fugitive' -Plugin 'tpope/vim-rails' -Plugin 'tpope/vim-repeat' -Plugin 'tpope/vim-surround' -Plugin 'tpope/vim-unimpaired' Plugin 'vim-ruby/vim-ruby' Plugin 'wincent/Command-T' +" Ben Orenstein plugins +" Plugin 'kchmck/vim-coffee-script' +" Plugin 'skwp/greplace.vim' +" Plugin 'tpope/vim-bundler' +" Plugin 'tpope/vim-cucumber' +" Plugin 'tpope/vim-dispatch' +" Plugin 'tpope/vim-endwise' +" Plugin 'tpope/vim-fugitive' +" Plugin 'tpope/vim-rails' +" Plugin 'tpope/vim-commentary' +" Plugin 'tpope/vim-repeat' +" Plugin 'tpope/vim-surround' - tags +" Plugin 'tpope/vim-unimpaired' + " nelstrom's plugin depends on kana's Plugin 'kana/vim-textobj-user' Plugin 'nelstrom/vim-textobj-rubyblock' -" Clojure -Plugin 'guns/vim-clojure-static' -Plugin 'tpope/vim-classpath' -Plugin 'tpope/vim-fireplace' -Plugin 'tpope/vim-leiningen' - " Colors Plugin 'nanotech/jellybeans.vim' From 64a9b8ae50745221da2da76e6c7e5543f98bb79e Mon Sep 17 00:00:00 2001 From: Ben Orenstein Date: Wed, 24 Dec 2014 00:12:18 +0100 Subject: [PATCH 002/144] Use own zshrc based on oh my zsh --- zshrc | 48 ++++++++++++++++++++++++------------------------ zshrcr00k | 31 +++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+), 24 deletions(-) create mode 100644 zshrcr00k diff --git a/zshrc b/zshrc index 66d4c305f4..974e87655a 100644 --- a/zshrc +++ b/zshrc @@ -1,31 +1,31 @@ -# Allow completing of the remainder of a command -bindkey "^N" insert-last-word +# Path to your oh-my-zsh installation. +export ZSH=$HOME/.oh-my-zsh -# Show contents of directory after cd-ing into it -chpwd() { - ls -lrthG -} +ZSH_THEME="robbyrussell" -# Save a ton of history -HISTSIZE=20000 -HISTFILE=~/.zsh_history -SAVEHIST=20000 +# Uncomment the following line if you want to disable marking untracked files +# under VCS as dirty. This makes repository status check for large repositories +# much, much faster. +# DISABLE_UNTRACKED_FILES_DIRTY="true" -# Enable completion -autoload -U compinit -compinit +# Would you like to use another custom folder than $ZSH/custom? +# ZSH_CUSTOM=/path/to/new-custom-folder -# Disable flow control commands (keeps C-s from freezing everything) -stty start undef -stty stop undef +# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*) +# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/ +# Example format: plugins=(rails git textmate ruby lighthouse) +# Add wisely, as too many plugins slow down shell startup. +plugins=(git) -# RVM -[[ -s "/Users/ben/.rvm/scripts/rvm" ]] && source "/Users/ben/.rvm/scripts/rvm" +# User configuration -# Sourcing of other files -source $HOME/.dotfiles/zsh/aliases -source $HOME/.dotfiles/zsh/functions -source $HOME/.dotfiles/zsh/prompt -source $HOME/.dotfiles/zsh/z +export PATH=$HOME/bin:/usr/local/bin:$PATH +# export MANPATH="/usr/local/man:$MANPATH" -export PATH=$PATH:bin:~/bin:/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:/usr/local/git/bin:/usr/bin:/bin:/usr/sbin:/sbin:$HOME/.rvm/bin +source $ZSH/oh-my-zsh.sh + +# You may need to manually set your language environment +export LANG=en_US.UTF-8 +export EDITOR='mvim' + +alias gs="git status" diff --git a/zshrcr00k b/zshrcr00k new file mode 100644 index 0000000000..66d4c305f4 --- /dev/null +++ b/zshrcr00k @@ -0,0 +1,31 @@ +# Allow completing of the remainder of a command +bindkey "^N" insert-last-word + +# Show contents of directory after cd-ing into it +chpwd() { + ls -lrthG +} + +# Save a ton of history +HISTSIZE=20000 +HISTFILE=~/.zsh_history +SAVEHIST=20000 + +# Enable completion +autoload -U compinit +compinit + +# Disable flow control commands (keeps C-s from freezing everything) +stty start undef +stty stop undef + +# RVM +[[ -s "/Users/ben/.rvm/scripts/rvm" ]] && source "/Users/ben/.rvm/scripts/rvm" + +# Sourcing of other files +source $HOME/.dotfiles/zsh/aliases +source $HOME/.dotfiles/zsh/functions +source $HOME/.dotfiles/zsh/prompt +source $HOME/.dotfiles/zsh/z + +export PATH=$PATH:bin:~/bin:/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:/usr/local/git/bin:/usr/bin:/bin:/usr/sbin:/sbin:$HOME/.rvm/bin From cd669415979f145702ef1ac2b022fb60fbf8548a Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Wed, 24 Dec 2014 01:08:01 +0100 Subject: [PATCH 003/144] Aliases yeah --- zsh/aliases | 119 +--------------------------------------------------- zshrc | 31 +++++++------- 2 files changed, 16 insertions(+), 134 deletions(-) diff --git a/zsh/aliases b/zsh/aliases index 1d3da69cfb..a8a840ec5f 100644 --- a/zsh/aliases +++ b/zsh/aliases @@ -1,143 +1,28 @@ # Handle the fact that this file will be used with multiple OSs -platform=`uname` -if [[ $platform == 'Linux' ]]; then - alias a='ls -lrth --color' -elif [[ $platform == 'Darwin' ]]; then - alias a='ls -lrthG' -fi - -alias ack='ag' alias amend="git commit --amend" -alias asu="cd ~/code/rails/activesupport" alias aliases='vim ~/.dotfiles/zsh/aliases' -alias b='bin/rspec' alias bake='bundle exec rake' alias be='bundle exec' -alias ben='ssh ben@benorenstein.com' -alias bi='bundle install -j 8' -alias be='bundle exec' -alias bo='cd ~/code/boardwalk' -alias br='bin/rspec' alias bu='bundle update' -alias bunbang='bundle install && !!' -alias c='cd' -alias cc='cd ~/Dropbox/freelancing/code-climate' -alias chad='vim ~/Dropbox/work/thoughtbot/notes/1-1s/chad.txt' alias code='cd ~/code' -alias codereview='vim ~/Dropbox/notes/code-review-checklist.txt' alias d='cd ~/.dotfiles' -alias dbprep='rdm && rdtp' -alias di='cd ~/code/discourse' -alias dr='cd ~/Dropbox' alias drop='cd ~/Dropbox' -alias edwin='vim ~/Dropbox/work/thoughtbot/notes/1-1s/edwin.txt' -alias fs='foreman start' -alias -g G='| grep' alias gad='git add --all .' -alias gbc='gdc' -alias gca='git commit -a' -alias gcaa='git commit -a --amend -C HEAD' -alias gcl='git clone' alias gcm="git commit -m" alias gco='git checkout' alias gd='git diff' alias gdc='git diff --cached' alias gdm='git diff master' -alias get='sudo apt-get install' alias gg='git lg' -alias gig='vim ~/Dropbox/notes/gigmasters-prefill.txt' -alias gpush='echo "Use gp!" && git push' -alias gp='git push' -alias gpf='git push -f' -alias gpr='git pull --rebase' -alias gratitude='vim ~/Dropbox/docs/journal/gratitude.txt' -alias grc='git rebase --continue' -alias grake='rspec --drb spec/ && cucumber --drb features/' -alias gurad='guard' -alias h='sync' -alias he='cd ~/code/hacker-engine' -alias herkou='heroku' -alias hpr='hub pull-request' -alias hpush='git push heroku' -alias i='ssh -t ben@downtowncrossingquartet.com screen -rd irc' -alias irb='irb --readline -r irb/completion' -alias jokes='vim ~/Dropbox/notes/jokes.txt' -alias journal='vim ~/Dropbox/docs/journal/2011.txt' -alias killruby='killall -9 ruby' -alias killrudy='killall -9 ruby' -alias -g M='| more' -alias mastre='master' -alias mentor='vim ~/Dropbox/work/thoughtbot/notes/mentees.txt' -alias newscreen="tmux" -alias l='cd ~/code/upcase' -alias lt='lein test' -alias lrs='lein ring server' -alias -g L='| less' -alias pc='production-console' -alias parallel='rdtp && rake parallel:prepare test:parallel_with_specs' -alias patch='git format-patch HEAD^ --stdout > patch.diff' -alias phil='vim ~/Dropbox/work/thoughtbot/notes/1-1s/phil.txt' -alias phonecall='vim ~/Dropbox/work/thoughtbot/notes/prime/phonecalls.txt' -alias podcast='vim ~/Dropbox/work/thoughtbot/notes/podcast.txt' -alias prepdb='dbprep' -alias r='cd ~/code/refactoring-good-to-great' -alias remore='!! | more' -alias reguard='killall -9 ruby ; guard' -alias rerake='!! && rake' -alias restart_apache="sudo /etc/init.d/apache2 restart" -alias restart_postgres="stoppostgres && startpostgres" -alias retag='ctags -R --exclude=.svn --exclude=.git --exclude=log --exclude=tmp *' -alias retagwithcoffee='ctags -R --exclude=.svn --exclude=.git --exclude=log --exclude=tmp * && coffeetags -R -f >> tags' -alias repush="gpr && git push" -alias review="git diff master" -alias rc='bin/rails console' -alias remigrate='rake db:migrate && rake db:migrate:redo && rake db:schema:dump && rake db:test:prepare' -alias rdm="bin/rake db:migrate" -alias rdtp="bin/rake db:test:prepare" -alias rs='bundle install && rails server -p 3000' -alias safepush='git pull --rebase && bundle install && rdm && rake && git push' -alias sfh='cd ~/code/speaking-for-hackers-book' -alias shpush='rake && hpush' -alias sc='staging-console' alias so='source ~/.dotfiles/zsh/aliases' -alias sp='safepush' -alias speaking='cd ~/Dropbox/speaking' -alias squash='git rebase -i master' -alias ss='spring stop' -alias stage='git push staging head:master && staging open' alias startpostgres='pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start' alias startredis='redis-server /usr/local/etc/redis.conf &' alias stoppostgres='pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log stop' -alias status='vim ~/Dropbox/work/thoughtbot/notes/prime -c "Ex"' alias sync='git add -u . && git commit -m "Minor changes. Commit message skipped." && repush' alias tail-logs='heroku logs -t' -alias thom='vim ~/Dropbox/work/thoughtbot/notes/1-1s/thom.txt' -alias track='git checkout -t' -alias t='cd ~/code/trailmix' -alias tute='vim ~/Dropbox/work/thoughtbot/notes/1-1s/tute.txt' -alias w='cd ~/code/upcase-exercises' -alias worknotes='vim ~/Dropbox/work/thoughtbot/notes -c "Ex"' -alias u='cd ..' alias undeployed='git fetch --multiple production origin && git log production/master..origin/master' alias v='vim' alias vi='vim' -# Heroku staging -alias staging-console='heroku run console --remote staging' -alias staging-tail='heroku logs --tail --remote staging' - -# Heroku production -alias production-console='heroku run console --remote production' -alias production-tail='heroku logs --tail --remote production' - -# # Heroku databases - -alias db-pull-staging='development restore staging' -alias db-pull-production='development restore production' - -alias db-copy-production-to-staging='heroku pgbackups:restore DATABASE `heroku pgbackups:url --remote production` --remote staging --confirm `basename $PWD`-staging' -alias db-backup-production='heroku pgbackups:capture --remote production' -alias db-backups='heroku pgbackups --remote production' - -alias levelup-get-production='curl -o ~/Downloads/latest.dump `heroku pgbackups:url --app levelup-production`' -alias levelup-db-fix='killruby ; rake db:drop:all db:create:all ; pg_restore --verbose --clean --no-acl --no-owner -d levelup_development ~/Downloads/latest.dump -j 8 ; prepdb && rake levelup:dev:create_admin && rails runner CreditCard.delete_all' +# Git +alias gp="git add -p" diff --git a/zshrc b/zshrc index 974e87655a..4b195783a2 100644 --- a/zshrc +++ b/zshrc @@ -1,31 +1,28 @@ # Path to your oh-my-zsh installation. export ZSH=$HOME/.oh-my-zsh +# ZSH Theme ZSH_THEME="robbyrussell" -# Uncomment the following line if you want to disable marking untracked files -# under VCS as dirty. This makes repository status check for large repositories -# much, much faster. -# DISABLE_UNTRACKED_FILES_DIRTY="true" - -# Would you like to use another custom folder than $ZSH/custom? -# ZSH_CUSTOM=/path/to/new-custom-folder - -# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*) -# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/ -# Example format: plugins=(rails git textmate ruby lighthouse) -# Add wisely, as too many plugins slow down shell startup. +# oh-my-zsh plugins plugins=(git) # User configuration - -export PATH=$HOME/bin:/usr/local/bin:$PATH -# export MANPATH="/usr/local/man:$MANPATH" - +HISTSIZE=20000 +HISTFILE=~/.zsh_history +SAVEHIST=20000 + +# Show contents of directory after cd-ing into it +chpwd() { + ls -lrthG +} source $ZSH/oh-my-zsh.sh +export PATH=$HOME/bin:/usr/local/bin:$PATH # You may need to manually set your language environment export LANG=en_US.UTF-8 -export EDITOR='mvim' +export EDITOR='vim' + +# source /Users/anderslime/.dotfiles/zsh/aliases alias gs="git status" From 516bc9ee754fb70d0ca4221ca58d220dd326e59f Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Wed, 24 Dec 2014 01:08:34 +0100 Subject: [PATCH 004/144] Configr00k --- gitconfig => gitconfigr00k | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) rename gitconfig => gitconfigr00k (91%) diff --git a/gitconfig b/gitconfigr00k similarity index 91% rename from gitconfig rename to gitconfigr00k index 4fadc50f9c..e91cc6a0c7 100644 --- a/gitconfig +++ b/gitconfigr00k @@ -1,6 +1,6 @@ [user] - name = Ben Orenstein - email = ben.orenstein@gmail.com + name = anderslime + email = aemilnielsen@gmail.com [alias] co = checkout cleanup = !git remote prune origin && git gc && git clean -df && git stash clear @@ -20,6 +20,7 @@ [alias] lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative + ap = add [help] autocorrect = 1 [branch] From a5fbe84473505ca05dcd40b45e249df075ce9598 Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Wed, 24 Dec 2014 01:10:07 +0100 Subject: [PATCH 005/144] Empty git config - oh why --- gitconfig | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 gitconfig diff --git a/gitconfig b/gitconfig new file mode 100644 index 0000000000..e69de29bb2 From 1bc29e94499e6b2cf4fe27a2aed5540ef2496b8d Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Wed, 24 Dec 2014 01:17:55 +0100 Subject: [PATCH 006/144] yeah --- gitconfig | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gitconfig b/gitconfig index e69de29bb2..e1706f7d39 100644 --- a/gitconfig +++ b/gitconfig @@ -0,0 +1,6 @@ +[user] + name = Anders Emil Nielsen + email = aemilnielsen@gmail.com +[alias] + ap = add -p + cm = commit -m From 54089e9fbc95dbc2e73936191c5970f8afebaeec Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Wed, 24 Dec 2014 01:19:58 +0100 Subject: [PATCH 007/144] Remove id file --- id_dsa.pub | 1 - 1 file changed, 1 deletion(-) delete mode 100644 id_dsa.pub diff --git a/id_dsa.pub b/id_dsa.pub deleted file mode 100644 index 44143214c8..0000000000 --- a/id_dsa.pub +++ /dev/null @@ -1 +0,0 @@ -ssh-dss AAAAB3NzaC1kc3MAAACBALkrW/9sxuCz3CiR2o09sw5SCNSpXkTWM7263s5JOLF+GhGnu0hOdNZfDEHAY4osq4UtRCULB8Ufkaf5ZkbL/c47ahydQoj0fDgX7yllrZotC1vLl0ooQB406dPIPX6ZYTCbEXcC20zoqnkHUrm6/bVSXtYOFIsB0d1z22iKuha/AAAAFQCEhRIL9a1/7uZPgotg5fG6CsM43wAAAIEArAA4XIIgPg8brhrEcf29MZtPqnLSRwZtPLGmPM72xGoKttzAawrGi5vGxW7kLviZ/V2Jd/522+MbsC52bsOLb7vJkIA63k4PW6De2mqlhD2gPDWxE9Jtyq+EAP7IXn5YUOAMOzOmBGEGukrLXqnXyKUofdHfYdOXqM4J4nJvHNgAAACBAKrOPk2Yx8vpZgImJWQceelUTxfIe+okW3ryVpSC2PuuCmbIVb4V4Rol2/C0nwvK1CmXLX+Z3zf8w6EnNMnXBTfgtG6c2Yx56RXuWR+s0Bf7nE/TBTd069Z2ElyVVs6Xn86reg9Zepa0OaKjG0HzugEsrhILQCwUvdw04tx68jgL bjo@dhcp-172-24-115-72.dfci.harvard.edu From 3cc9a3d01e2fed59f0445fb75654421f5761bfd5 Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Wed, 24 Dec 2014 01:20:05 +0100 Subject: [PATCH 008/144] Use aliases --- zshrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zshrc b/zshrc index 4b195783a2..d7e96131f9 100644 --- a/zshrc +++ b/zshrc @@ -23,6 +23,6 @@ export PATH=$HOME/bin:/usr/local/bin:$PATH export LANG=en_US.UTF-8 export EDITOR='vim' -# source /Users/anderslime/.dotfiles/zsh/aliases +source /Users/anderslime/.dotfiles/zsh/aliases alias gs="git status" From f8d74e3ee7b45819a3fc03df16384f0e8dac53cc Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Wed, 24 Dec 2014 10:42:26 +0100 Subject: [PATCH 009/144] Some gitfoo --- gitconfig | 18 ++++++++++++++++++ gitconfigr00k | 36 ------------------------------------ zsh/aliases | 2 ++ 3 files changed, 20 insertions(+), 36 deletions(-) delete mode 100644 gitconfigr00k diff --git a/gitconfig b/gitconfig index e1706f7d39..dce589edbc 100644 --- a/gitconfig +++ b/gitconfig @@ -4,3 +4,21 @@ [alias] ap = add -p cm = commit -m + remove-merged = !sh -c 'git checkout master && git branch --merged | egrep -v \"production|master\" | xargs -L1 git delete-branch' + tmp = commit -a -m 'tmp' + wip = commit -a -m 'wip' + co = checkout + cob = checkout -b + dc = diff --cached + db = delete-branch +[color] + status = auto + diff = auto + branch = auto +[core] + excludefile = /Users/anderslime/.gitignore + editor = vim --noplugin +[credential] + helper = osxkeychain +[push] + default = current diff --git a/gitconfigr00k b/gitconfigr00k deleted file mode 100644 index e91cc6a0c7..0000000000 --- a/gitconfigr00k +++ /dev/null @@ -1,36 +0,0 @@ -[user] - name = anderslime - email = aemilnielsen@gmail.com -[alias] - co = checkout - cleanup = !git remote prune origin && git gc && git clean -df && git stash clear -[color] - diff = auto - status = auto - branch = auto - -[color "diff"] - meta = yellow - -[core] - excludesfile = ~/.gitignore - editor = vim --noplugin -[apply] - whitespace = nowarn - -[alias] - lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative - ap = add -[help] - autocorrect = 1 -[branch] - autosetupmerge = true - autosetuprebase = always -[push] - default = current -[rerere] - enabled = 1 -[github] - user = r00k -[merge] - ff = only diff --git a/zsh/aliases b/zsh/aliases index a8a840ec5f..592c8e79c0 100644 --- a/zsh/aliases +++ b/zsh/aliases @@ -26,3 +26,5 @@ alias vi='vim' # Git alias gp="git add -p" +alias tmp="git tmp" +alias wip="git wip" From e869b8f437178ab70d17e4b2e48b951cd7df3b73 Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Wed, 24 Dec 2014 11:58:21 +0100 Subject: [PATCH 010/144] Went through the vimrc and cleaned a bit --- vimrc | 396 ++++++++++++++-------------------------------------------- 1 file changed, 94 insertions(+), 302 deletions(-) diff --git a/vimrc b/vimrc index dbe13cfb9d..f56af6b54a 100644 --- a/vimrc +++ b/vimrc @@ -16,6 +16,8 @@ Plugin 'koron/nyancat-vim' Plugin 'tomtom/tcomment_vim' Plugin 'vim-ruby/vim-ruby' Plugin 'wincent/Command-T' +Plugin 'scrooloose/nerdtree' +Plugin 'LaTeX-Box-Team/LaTeX-Box' " Ben Orenstein plugins " Plugin 'kchmck/vim-coffee-script' @@ -46,133 +48,57 @@ filetype plugin indent on " required colorscheme jellybeans " ======================================================================== -" Ruby stuff +" Settings (things with set) " ======================================================================== -syntax on " Enable syntax highlighting -filetype plugin indent on " Enable filetype-specific indenting and plugins - -augroup myfiletypes - " Clear old autocmds in group - autocmd! - " autoindent with two spaces, always expand tabs - autocmd FileType ruby,eruby,yaml setlocal ai sw=2 sts=2 et - autocmd FileType ruby,eruby,yaml setlocal path+=lib - autocmd FileType ruby,eruby,yaml setlocal colorcolumn=80 - " Make ?s part of words - autocmd FileType ruby,eruby,yaml setlocal iskeyword+=? - - " Clojure - autocmd FileType clojure setlocal colorcolumn=80 - autocmd FileType clojure map t :!lein test % -augroup END - -" Enable built-in matchit plugin -runtime macros/matchit.vim -" ================ -let mapleader = "," +set autoindent " autoindent on linebreak +set ts=2 sts=2 sw=2 expandtab " Tab settings +set shiftround " When at 3 spaces and I hit >>, go to 4, not 5. +set history=500 " keep 500 lines of command line history +set showcmd " display incomplete commands +set ruler " show the cursor position all the time +set incsearch " do incremental searching +set nohlsearch " Stop highlihgt search after something -... +set backupdir=~/.tmp +set directory=~/.tmp +set timeoutlen=500 " Less leader timeout -map ac :sp app/controllers/application_controller.rb -vmap b :!git blame =expand("%:p") \| sed -n =line("'<") ,=line("'>") p -map bb :!bundle install -nmap bi :source ~/.vimrc:PluginInstall -vmap bed "td?describeobed"tpkdd/endo:nohl -map cc :!cucumber --drb % -map cu :Tabularize /\| -map co ggVG"*y -map cc :Rjcollection client/ -map cj :Rjspec client/ -map cm :Rjmodel client/ -map cs :call SearchForCallSitesCursor() -map ct :Rtemplate client/ -map cv :Rjview client/ -map cn :e ~/Dropbox/notes/coding-notes.txt -map d orequire 'pry'binding.pry:w -map dr :e ~/Dropbox -map dj :e ~/Dropbox/notes/debugging_journal.txt -map ec :e ~/code/ -map g :Start gitsh -map gw :!git add . && git commit -m 'WIP' && git push -map f :call OpenFactoryFile() -map fix :cnoremap % % -map fa :sp test/factories.rb -map h :CommandT -map i mmgg=G`m -map l oconsole.log 'debugging':w -map m :Rmodel -map nn :sp ~/Dropbox/notes/programming_notes.txt -map nt :e! ~/Dropbox/docs/trailmix/todo.md -map o :w:call RunCurrentLineInTest() -map p :set pasteo"*]p:set nopaste -map pn :sp ~/Dropbox/work/thoughtbot/notes/project-notes.txt -map ra :%s/ -map rd :!bundle exec rspec % --format documentation -map rf :CommandTFlush:CommandT -map rs :vsp #w -map rt q:?!ruby -map rw :%s/\s\+$//:w -map sc :sp db/schema.rb -map sg :sp:grep -map sj :call OpenJasmineSpecInBrowser() -map sm :RSmodel -map sp yss

-map sn :e ~/.vim/snippets/ruby.snippets -map so :so % -map sq j}klllcs:wq -map ss ds)i :w -map st :!ruby -Itest % -n "//" -map su :RSunittest -map sv :RSview -map t :w:call RunCurrentTest() -map y :!rspec --drb % -map u :Runittest -map vc :RVcontroller -map vf :RVfunctional -map vg :vsp:grep -map vi :tabe ~/.vimrc -map vu :RVunittest -map vm :RVmodel -map vv :RVview -map w w -map x :exec getline(".") +" Don't add the comment prefix when I hit enter or o/O on a comment line. +set formatoptions-=or -" Edit another file in the same directory as the current file -" uses expression to extract path from current file's path -map e :e =escape(expand("%:p:h"),' ') . '/' -map s :split =escape(expand("%:p:h"), ' ') . '/' -map v :vnew =escape(expand("%:p:h"), ' ') . '/' +" Readable highlight text +:highlight PmenuSel ctermfg=black -map :nohl -imap : -" Note that remapping C-s requires flow control to be disabled -" (e.g. in .bashrc or .zshrc) -map :w -imap :w -map :tabnew -map c -map :cn -map :cp - -" Emacs-like beginning and end of line. -imap $ -imap ^ +" Set gutter background to black +highlight SignColumn ctermbg=black -set backspace=indent,eol,start " allow backspacing over everything in insert mode -set history=500 " keep 500 lines of command line history -set ruler " show the cursor position all the time -set showcmd " display incomplete commands -set autoindent -set showmatch +" Use Silver Searcher for 'grepping' +set grepprg=ag + +set list listchars=tab:»·,trail:· +syntax on " syntax highlighting + +colorscheme jellybeans + +" Make it more obvious which paren I'm on +hi MatchParen cterm=none ctermbg=black ctermfg=yellow + +" By default, vim thinks .md is Modula-2. +autocmd BufNewFile,BufReadPost *.md set filetype=markdown + +" Read upon: +" Better? completion on command line +set wildmenu +" What to do when I press 'wildchar'. Worth tweaking to see what feels right. +set wildmode=list:full set nowrap -set backupdir=~/.tmp -set directory=~/.tmp " Don't clutter my dirs up with swp and tmp files +set backspace=indent,eol,start " allow backspacing over everything in insert mode set autoread set wmh=0 set viminfo+=! set guioptions-=T set guifont=Triskweline_10:h10 set et -set sw=2 set smarttab set noincsearch set ignorecase smartcase @@ -181,193 +107,55 @@ set relativenumber set gdefault " assume the /g flag on :s substitutions to replace all matches in a line set autoindent " always set autoindenting on set bg=light - -" Set the tag file search order set tags=./tags; - -" Use _ as a word-separator -" set iskeyword-=_ - -" Use Silver Searcher instead of grep -set grepprg=ag - -" Make the omnicomplete text readable -:highlight PmenuSel ctermfg=black - -" Fuzzy finder: ignore stuff that can't be opened, and generated files -let g:fuzzy_ignore = "*.png;*.PNG;*.JPG;*.jpg;*.GIF;*.gif;vendor/**;coverage/**;tmp/**;rdoc/**" - -" Highlight the status line highlight StatusLine ctermfg=blue ctermbg=yellow - -" Format xml files -au FileType xml exe ":silent 1,$!xmllint --format --recover - 2>/dev/null" - -set shiftround " When at 3 spaces and I hit >>, go to 4, not 5. - +au FileType xml exe ":silent 1,$!xmllint --format --recover - 2>/dev/null" set nofoldenable " Say no to code folding... -command! Q q " Bind :Q to :q -command! Qall qall - - -" Disable Ex mode -map Q - -" Disable K looking stuff up -map K - -au BufNewFile,BufRead *.txt setlocal nolist " Don't display whitespace - -" Better? completion on command line -set wildmenu -" What to do when I press 'wildchar'. Worth tweaking to see what feels right. -set wildmode=list:full - -" (Hopefully) removes the delay when hitting esc in insert mode -set noesckeys -set ttimeout -set ttimeoutlen=1 - -" Turn on spell-checking in markdown and text. -" au BufRead,BufNewFile *.md,*.txt setlocal spell - -" Merge a tab into a split in the previous window -function! MergeTabs() - if tabpagenr() == 1 - return - endif - let bufferName = bufname("%") - if tabpagenr("$") == tabpagenr() - close! - else - close! - tabprev - endif - split - execute "buffer " . bufferName -endfunction - -nmap u :call MergeTabs() - +" ======================================================================== +" Mappings +" ======================================================================== +let mapleader = "," -" Squash all commits into the first during rebase -function! SquashAll() - normal ggj}klllcf:w -endfunction +vmap b :!git blame =expand("%:p") \| sed -n =line("'<") ,=line("'>") p +map bb :!bundle install +nmap bi :source ~/.vimrc:PluginInstall +map d orequire 'pry'binding.pry:w +map h :CommandT +map ra :%s/ +map rd :!bundle exec rspec % --format documentation +map rf :CommandTFlush:CommandT +map rw :%s/\s\+$//:w +" Edit another file in the same directory as the current file +" uses expression to extract path from current file's path +map e :e =escape(expand("%:p:h"),' ') . '/' +map s :split =escape(expand("%:p:h"), ' ') . '/' +map v :vnew =escape(expand("%:p:h"), ' ') . '/' -function! SearchForCallSitesCursor() - let searchTerm = expand("") - call SearchForCallSites(searchTerm) -endfunction +" Beginning and end of files as in terminal +imap $ +imap ^ -" Search for call sites for term (excluding its definition) and -" load into the quickfix list. -function! SearchForCallSites(term) - cexpr system('ag ' . shellescape(a:term) . '\| grep -v def') -endfunction """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -" Test-running stuff +" Strip Trailing Whitespaces (from VimCast.org) """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -function! RunCurrentTest() - let in_test_file = match(expand("%"), '\(.feature\|_spec.rb\|_test.rb\)$') != -1 - if in_test_file - call SetTestFile() - - if match(expand('%'), '\.feature$') != -1 - call SetTestRunner("!bin/cucumber") - exec g:bjo_test_runner g:bjo_test_file - elseif match(expand('%'), '_spec\.rb$') != -1 - call SetTestRunner("!bin/rspec") - exec g:bjo_test_runner g:bjo_test_file - else - call SetTestRunner("!ruby -Itest") - exec g:bjo_test_runner g:bjo_test_file - endif - else - exec g:bjo_test_runner g:bjo_test_file - endif -endfunction - -function! SetTestRunner(runner) - let g:bjo_test_runner=a:runner -endfunction - -function! RunCurrentLineInTest() - let in_test_file = match(expand("%"), '\(.feature\|_spec.rb\|_test.rb\)$') != -1 - if in_test_file - call SetTestFileWithLine() - end - - exec "!bin/rspec" g:bjo_test_file . ":" . g:bjo_test_file_line -endfunction - -function! SetTestFile() - let g:bjo_test_file=@% -endfunction - -function! SetTestFileWithLine() - let g:bjo_test_file=@% - let g:bjo_test_file_line=line(".") -endfunction - -"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" - -inoremap - -" Let's be reasonable, shall we? -nmap k gk -nmap j gj - - -" Set up some useful Rails.vim bindings for working with Backbone.js -autocmd User Rails Rnavcommand template app/assets/templates -glob=**/* -suffix=.jst.ejs -autocmd User Rails Rnavcommand jmodel app/assets/javascripts/models -glob=**/* -suffix=.coffee -autocmd User Rails Rnavcommand jview app/assets/javascripts/views -glob=**/* -suffix=.coffee -autocmd User Rails Rnavcommand jcollection app/assets/javascripts/collections -glob=**/* -suffix=.coffee -autocmd User Rails Rnavcommand jrouter app/assets/javascripts/routers -glob=**/* -suffix=.coffee -autocmd User Rails Rnavcommand jspec spec/javascripts -glob=**/* -suffix=.coffee - -" Don't add the comment prefix when I hit enter or o/O on a comment line. -set formatoptions-=or - - -function! OpenJasmineSpecInBrowser() - let filename = expand('%') - " substitute(exprsson, pattern, substitution, flags) - let url_fragment = substitute(filename, "spec/javascripts", "evergreen/run", "") - let host_fragment = "http://localhost:3001/" - let url = host_fragment . url_fragment - silent exec "!open ~/bin/chrome" url -endfunction - -" set statusline+=%<%f\ %h%m%r%{fugitive#statusline()}%=%-14.(%l,%c%V%)\ %P - -let g:CommandTMaxHeight=50 -let g:CommandTMatchWindowAtTop=1 - -" Don't wait so long for the next keypress (particularly in ambigious Leader -" situations. -set timeoutlen=500 - -" Don't go past 100 chars on levelup: -autocmd BufNewFile,BufRead /Users/ben/code/levelup/*.rb set colorcolumn=100 - -" Remove trailing whitespace on save for ruby files. -au BufWritePre *.rb :%s/\s\+$//e - -function! OpenFactoryFile() - if filereadable("test/factories.rb") - execute ":sp test/factories.rb" - else - execute ":sp spec/factories.rb" - end +function! StripTrailingWhitespaces() + " Preparation: save last search, and cursor position. + let _s=@/ + let l = line(".") + let c = col(".") + " Do the business: + %s/\s\+$//e + " Clean up: restore previous search history, and cursor position + let @/=_s + call cursor(l, c) endfunction -" Set gutter background to black -highlight SignColumn ctermbg=black +if has("autocmd") + autocmd BufWritePre * :call StripTrailingWhitespaces() +end """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " RENAME CURRENT FILE (thanks Gary Bernhardt) @@ -383,8 +171,17 @@ function! RenameFile() endfunction map n :call RenameFile() -" Display extra whitespace -set list listchars=tab:»·,trail:· +" ======================================================================== +" End of things set by me. +" ======================================================================== + +" ======================================================================== +" Stuff from the vim example file +" ======================================================================== + +if has('mouse') + set mouse=a +endif " Switch syntax highlighting on, when the terminal has colors " Also switch on highlighting the last used search pattern. @@ -393,16 +190,6 @@ if &t_Co > 2 || has("gui_running") set hlsearch endif -" Make it more obvious which paren I'm on -hi MatchParen cterm=none ctermbg=black ctermfg=yellow - -" By default, vim thinks .md is Modula-2. -autocmd BufNewFile,BufReadPost *.md set filetype=markdown - -" ======================================================================== -" End of things set by me. -" ======================================================================== - " Only do this part when compiled with support for autocommands. if has("autocmd") @@ -416,12 +203,17 @@ if has("autocmd") augroup vimrcEx au! + " For all text files set 'textwidth' to 78 characters. + autocmd FileType text setlocal textwidth=78 + " When editing a file, always jump to the last known cursor position. " Don't do it when the position is invalid or when inside an event handler " (happens when dropping a file on gvim). + " Also don't do it when the mark is in the first line, that is the default + " position when opening a file. autocmd BufReadPost * - \ if line("'\"") > 0 && line("'\"") <= line("$") | - \ exe "normal g`\"" | + \ if line("'\"") > 1 && line("'\"") <= line("$") | + \ exe "normal! g`\"" | \ endif augroup END From 9fb20889e5e45c03d0b45271bf5bb066f931a4de Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Wed, 24 Dec 2014 12:01:55 +0100 Subject: [PATCH 011/144] Mapping for nerdtree --- vimrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vimrc b/vimrc index f56af6b54a..76d2e0c00f 100644 --- a/vimrc +++ b/vimrc @@ -126,7 +126,7 @@ map ra :%s/ map rd :!bundle exec rspec % --format documentation map rf :CommandTFlush:CommandT map rw :%s/\s\+$//:w - +map :NERDTreeToggle " Edit another file in the same directory as the current file " uses expression to extract path from current file's path map e :e =escape(expand("%:p:h"),' ') . '/' From 3370bdaa8b81819ec79ffea54fec67676805df16 Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Wed, 24 Dec 2014 12:03:00 +0100 Subject: [PATCH 012/144] GIt push alias --- zsh/aliases | 1 + 1 file changed, 1 insertion(+) diff --git a/zsh/aliases b/zsh/aliases index 592c8e79c0..53e75ce848 100644 --- a/zsh/aliases +++ b/zsh/aliases @@ -28,3 +28,4 @@ alias vi='vim' alias gp="git add -p" alias tmp="git tmp" alias wip="git wip" +alias gp="git push" From 369faddea08655892fd66e33631d9d636f46ccfd Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Wed, 24 Dec 2014 12:57:27 +0100 Subject: [PATCH 013/144] Use vim surround --- vimrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vimrc b/vimrc index 76d2e0c00f..6225111e0a 100644 --- a/vimrc +++ b/vimrc @@ -30,7 +30,7 @@ Plugin 'LaTeX-Box-Team/LaTeX-Box' " Plugin 'tpope/vim-rails' " Plugin 'tpope/vim-commentary' " Plugin 'tpope/vim-repeat' -" Plugin 'tpope/vim-surround' - tags +Plugin 'tpope/vim-surround' " Plugin 'tpope/vim-unimpaired' " nelstrom's plugin depends on kana's From 386dff4afec1bb5a98ee6e984692dbadb04acc97 Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Wed, 24 Dec 2014 12:57:33 +0100 Subject: [PATCH 014/144] Awesome panda --- zshrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zshrc b/zshrc index d7e96131f9..44101f8e84 100644 --- a/zshrc +++ b/zshrc @@ -2,7 +2,7 @@ export ZSH=$HOME/.oh-my-zsh # ZSH Theme -ZSH_THEME="robbyrussell" +ZSH_THEME="awesomepanda" # oh-my-zsh plugins plugins=(git) From d8dd17e8d1c1869c36f87c170e172180df30c7f6 Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Wed, 24 Dec 2014 14:43:56 +0100 Subject: [PATCH 015/144] TMP --- bin/gdone | 16 +++++++++++++ bin/gem_from_path | 16 +++++++++++++ bin/update_gem | 17 +++++++++++++ bin/update_gem_and_pr | 11 +++++++++ bin/validate_ie9_css | 55 +++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 115 insertions(+) create mode 100644 bin/gdone create mode 100644 bin/gem_from_path create mode 100644 bin/update_gem create mode 100644 bin/update_gem_and_pr create mode 100644 bin/validate_ie9_css diff --git a/bin/gdone b/bin/gdone new file mode 100644 index 0000000000..25f19ee7e0 --- /dev/null +++ b/bin/gdone @@ -0,0 +1,16 @@ +function run_normal_specs { + echo "Running normal specs changed since master" + bundle exec rspec $(git diff --name-only master..head | grep 'spec/' | xargs) +} + +function run_fast_specs { + echo "Running fast specs changed since master" + bundle exec rspec $(git diff --name-only master..head | grep 'spec_fast/' | xargs) +} + +if ! run_fast_specs || ! run_normal_specs; then + echo "We've got some failing specs. STAP!" +else + git push -u origin $(git_current_branch) + hub pull-request +fi diff --git a/bin/gem_from_path b/bin/gem_from_path new file mode 100644 index 0000000000..9a079d71df --- /dev/null +++ b/bin/gem_from_path @@ -0,0 +1,16 @@ +#!/usr/bin/env bash + +gem_name="$1" +echo $gem_name + +# Replace gem 'gem_name' with gem 'gem_name', path: '../gem_name' +perl -p -i -e "s/gem ('|\")${gem_name}('|\")\$/gem '${gem_name}', path: '..\/${gem_name}'/gi" Gemfile + +# Clear asset cache (for rails apps) +rm -rf tmp/cache/assets + +# Bundle +bundle + +# Restart server +powder -r diff --git a/bin/update_gem b/bin/update_gem new file mode 100644 index 0000000000..49707652f0 --- /dev/null +++ b/bin/update_gem @@ -0,0 +1,17 @@ +#!/usr/bin/env bash +# Usage: update_gem_and_pr gem_to_update + +gem_name="$1" +pull_request="$2" + +git add . -A +git commit -m "TMP" +git co master +git reset upstream/master --hard +git pull upstream master +git delete-branch "update-$gem_name" +git co -b "update-$gem_name" +bundle update --source "$gem_name" +git add . -A +git commit -m "Update $gem_name" +git push origin "update-$gem_name" diff --git a/bin/update_gem_and_pr b/bin/update_gem_and_pr new file mode 100644 index 0000000000..a0709476ad --- /dev/null +++ b/bin/update_gem_and_pr @@ -0,0 +1,11 @@ +#!/usr/bin/env bash +# Usage: update_gem_and_pr target_repo gem_to_update + +gem_name="$1" +pull_request="$2" + +ug "$gem_name" +if [ -n $pull_request ]; then + echo "Creating Pull Request" + hub pull-request -b lokalebasen:master -m "Update $gem_name" +fi; diff --git a/bin/validate_ie9_css b/bin/validate_ie9_css new file mode 100644 index 0000000000..f94cc23584 --- /dev/null +++ b/bin/validate_ie9_css @@ -0,0 +1,55 @@ +#!/usr/bin/env ruby + +begin + require 'active_support/core_ext' +rescue LoadError + puts 'Could not find rails. Installing rails...' + %x(gem install rails --no-rdoc --no-ri) + require 'active_support/core_ext' +end + +begin + require 'css_splitter/splitter' +rescue LoadError + puts "Could not find css_splitter. Installing css_splitter..." + %x(gem install css_splitter --no-rdoc --no-ri) + require 'css_splitter/splitter' +end + +print_stats = ENV["STATS"] + +precompiled_assets = Dir.glob("public/**/*.css") + +if precompiled_assets.empty? + abort "You have no precompiled assets. Please run 'bundle exec rake assets:precompile'" +end + +css_selector_counts = precompiled_assets.map do |css_file| + [File.basename(css_file), CssSplitter::Splitter.count_selectors(css_file)] +end + +invalid_css_sheets = css_selector_counts.select {|selector_count| + puts selector_count.first + selector_count.last > 4095 +} + +# Validate stylesheets +if invalid_css_sheets.empty? + puts "Your stylesheets are alright" +else + invalid_css_sheets.each do |selector_count| + puts "WARNING: #{selector_count.first} contains #{selector_count.last} - more selectors than IE9 can handle" + puts "Consider splitting the stylesheet into more stylesheets" + end +end + +# Print the selector counts +puts "Your stylesheet selector counts:" +puts 85.times.map { "-" }.join +printf "%-70s | %s\n", "Stylesheet", "Selectors" +puts 85.times.map { "-" }.join +css_selector_counts.each do |selector_count| + printf "%-70s | %d\n", selector_count.first, selector_count.last + puts 85.times.map { "-" }.join +end + From 376a842c89d4251ae3b6466c5665006ab00ff703 Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Wed, 24 Dec 2014 15:21:35 +0100 Subject: [PATCH 016/144] More zsh foo --- bin/gdone | 16 ---------------- bin/gem_from_path | 23 ++++++++++++----------- bin/update_gem | 17 ----------------- bin/update_gem_and_pr | 11 ----------- zsh/functions | 13 ++++++++++++- zshrc | 2 +- 6 files changed, 25 insertions(+), 57 deletions(-) delete mode 100644 bin/gdone delete mode 100644 bin/update_gem delete mode 100644 bin/update_gem_and_pr diff --git a/bin/gdone b/bin/gdone deleted file mode 100644 index 25f19ee7e0..0000000000 --- a/bin/gdone +++ /dev/null @@ -1,16 +0,0 @@ -function run_normal_specs { - echo "Running normal specs changed since master" - bundle exec rspec $(git diff --name-only master..head | grep 'spec/' | xargs) -} - -function run_fast_specs { - echo "Running fast specs changed since master" - bundle exec rspec $(git diff --name-only master..head | grep 'spec_fast/' | xargs) -} - -if ! run_fast_specs || ! run_normal_specs; then - echo "We've got some failing specs. STAP!" -else - git push -u origin $(git_current_branch) - hub pull-request -fi diff --git a/bin/gem_from_path b/bin/gem_from_path index 9a079d71df..bcbb85435d 100644 --- a/bin/gem_from_path +++ b/bin/gem_from_path @@ -1,16 +1,17 @@ #!/usr/bin/env bash +function gfp { + gem_name="$1" + echo $gem_name -gem_name="$1" -echo $gem_name + # Replace gem 'gem_name' with gem 'gem_name', path: '../gem_name' + perl -p -i -e "s/gem ('|\")${gem_name}('|\")\$/gem '${gem_name}', path: '..\/${gem_name}'/gi" Gemfile -# Replace gem 'gem_name' with gem 'gem_name', path: '../gem_name' -perl -p -i -e "s/gem ('|\")${gem_name}('|\")\$/gem '${gem_name}', path: '..\/${gem_name}'/gi" Gemfile + # Clear asset cache (for rails apps) + rm -rf tmp/cache/assets -# Clear asset cache (for rails apps) -rm -rf tmp/cache/assets + # Bundle + bundle -# Bundle -bundle - -# Restart server -powder -r + # Restart server + powder -r +} diff --git a/bin/update_gem b/bin/update_gem deleted file mode 100644 index 49707652f0..0000000000 --- a/bin/update_gem +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env bash -# Usage: update_gem_and_pr gem_to_update - -gem_name="$1" -pull_request="$2" - -git add . -A -git commit -m "TMP" -git co master -git reset upstream/master --hard -git pull upstream master -git delete-branch "update-$gem_name" -git co -b "update-$gem_name" -bundle update --source "$gem_name" -git add . -A -git commit -m "Update $gem_name" -git push origin "update-$gem_name" diff --git a/bin/update_gem_and_pr b/bin/update_gem_and_pr deleted file mode 100644 index a0709476ad..0000000000 --- a/bin/update_gem_and_pr +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env bash -# Usage: update_gem_and_pr target_repo gem_to_update - -gem_name="$1" -pull_request="$2" - -ug "$gem_name" -if [ -n $pull_request ]; then - echo "Creating Pull Request" - hub pull-request -b lokalebasen:master -m "Update $gem_name" -fi; diff --git a/zsh/functions b/zsh/functions index ac27248bd5..a026050fcb 100644 --- a/zsh/functions +++ b/zsh/functions @@ -19,7 +19,7 @@ compdef _git git-nuke=git-checkout function git-on-master { branch=`git_branch_name` - git checkout master && git pull --rebase + git checkout master && git pull --rebase git checkout $branch git rebase master } @@ -45,3 +45,14 @@ function take { function gc { git commit -m "$*" } + +function gem_from_path { + gem_name="$1" + + # Replace gem 'gem_name' with gem 'gem_name', path: '../gem_name' + perl -p -i -e "s/gem ('|\")${gem_name}('|\")\$/gem '${gem_name}', path: '..\/${gem_name}'/gi" Gemfile + rm -rf tmp/cache/assets # Clear asset cache (for rails apps) + bundle # Bundle + powder -r # Restart pow +} +alias gfp=gem_from_path diff --git a/zshrc b/zshrc index 44101f8e84..699274306a 100644 --- a/zshrc +++ b/zshrc @@ -17,7 +17,7 @@ chpwd() { ls -lrthG } source $ZSH/oh-my-zsh.sh -export PATH=$HOME/bin:/usr/local/bin:$PATH +export PATH=$HOME/bin:$HOME/.dotfiles/bin:/usr/local/bin:$PATH # You may need to manually set your language environment export LANG=en_US.UTF-8 From ef53238340bceffd01ea7ac73b7afb926614e155 Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Thu, 25 Dec 2014 14:33:41 +0100 Subject: [PATCH 017/144] TMP --- vimrc | 1 + zsh/func/prompt_grb_setup | 342 ++++++++++++++++++++++++++++++++++++ zsh/func/prompt_wunjo_setup | 294 +++++++++++++++++++++++++++++++ zsh/func/zgitinit | 243 +++++++++++++++++++++++++ zshrc | 2 +- 5 files changed, 881 insertions(+), 1 deletion(-) create mode 100644 zsh/func/prompt_grb_setup create mode 100644 zsh/func/prompt_wunjo_setup create mode 100644 zsh/func/zgitinit diff --git a/vimrc b/vimrc index 6225111e0a..fc38540aef 100644 --- a/vimrc +++ b/vimrc @@ -132,6 +132,7 @@ map :NERDTreeToggle map e :e =escape(expand("%:p:h"),' ') . '/' map s :split =escape(expand("%:p:h"), ' ') . '/' map v :vnew =escape(expand("%:p:h"), ' ') . '/' +map c i_r " Beginning and end of files as in terminal imap $ diff --git a/zsh/func/prompt_grb_setup b/zsh/func/prompt_grb_setup new file mode 100644 index 0000000000..57f4a11226 --- /dev/null +++ b/zsh/func/prompt_grb_setup @@ -0,0 +1,342 @@ +# grb prompt theme +# copied from wunjo prompt theme and modified + +autoload -U zgitinit +zgitinit + +prompt_grb_help () { + cat <<'EOF' + + prompt grb + +EOF +} + +revstring() { + git describe --always $1 2>/dev/null || + git rev-parse --short $1 2>/dev/null +} + +coloratom() { + local off=$1 atom=$2 + if [[ $atom[1] == [[:upper:]] ]]; then + off=$(( $off + 60 )) + fi + echo $(( $off + $colorcode[${(L)atom}] )) +} +colorword() { + local fg=$1 bg=$2 att=$3 + local -a s + + if [ -n "$fg" ]; then + s+=$(coloratom 30 $fg) + fi + if [ -n "$bg" ]; then + s+=$(coloratom 40 $bg) + fi + if [ -n "$att" ]; then + s+=$attcode[$att] + fi + + echo "%{"$'\e['${(j:;:)s}m"%}" +} + +function minutes_since_last_commit { + now=`date +%s` + last_commit=`git log --pretty=format:'%at' -1 2>/dev/null` + if $lastcommit ; then + seconds_since_last_commit=$((now-last_commit)) + minutes_since_last_commit=$((seconds_since_last_commit/60)) + echo $minutes_since_last_commit + else + echo "-1" + fi +} + +function prompt_grb_scm_time_since_commit() { + local -A pc + pc=(${(kv)wunjo_prompt_colors}) + + if zgit_inworktree; then + local MINUTES_SINCE_LAST_COMMIT=`minutes_since_last_commit` + if [ "$MINUTES_SINCE_LAST_COMMIT" -eq -1 ]; then + COLOR="$pc[scm_time_uncommitted]" + local SINCE_LAST_COMMIT="${COLOR}uncommitted$pc[reset]" + else + if [ "$MINUTES_SINCE_LAST_COMMIT" -gt 30 ]; then + COLOR="$pc[scm_time_long]" + elif [ "$MINUTES_SINCE_LAST_COMMIT" -gt 10 ]; then + COLOR="$pc[scm_time_medium]" + else + COLOR="$pc[scm_time_short]" + fi + local SINCE_LAST_COMMIT="${COLOR}$(minutes_since_last_commit)m$pc[reset]" + fi + echo $SINCE_LAST_COMMIT + fi +} + +function prompt_grb_scm_info() { + if zgit_inworktree; then + echo "($(prompt_wunjo_scm_branch))" + fi +} + +prompt_grb_setup() { + local verbose + if [[ $TERM == screen* ]] && [ -n "$STY" ]; then + verbose= + else + verbose=1 + fi + + typeset -A colorcode + colorcode[black]=0 + colorcode[red]=1 + colorcode[green]=2 + colorcode[yellow]=3 + colorcode[blue]=4 + colorcode[magenta]=5 + colorcode[cyan]=6 + colorcode[white]=7 + colorcode[default]=9 + colorcode[k]=$colorcode[black] + colorcode[r]=$colorcode[red] + colorcode[g]=$colorcode[green] + colorcode[y]=$colorcode[yellow] + colorcode[b]=$colorcode[blue] + colorcode[m]=$colorcode[magenta] + colorcode[c]=$colorcode[cyan] + colorcode[w]=$colorcode[white] + colorcode[.]=$colorcode[default] + + typeset -A attcode + attcode[none]=00 + attcode[bold]=01 + attcode[faint]=02 + attcode[standout]=03 + attcode[underline]=04 + attcode[blink]=05 + attcode[reverse]=07 + attcode[conceal]=08 + attcode[normal]=22 + attcode[no-standout]=23 + attcode[no-underline]=24 + attcode[no-blink]=25 + attcode[no-reverse]=27 + attcode[no-conceal]=28 + + local -A pc + pc[divider]='black' + pc[default]='default' + pc[date]='cyan' + pc[time]='Blue' + pc[host]='Green' + pc[user]='cyan' + pc[punc]='yellow' + pc[line]='magenta' + pc[hist]='green' + pc[path]='Cyan' + pc[shortpath]='default' + pc[rc]='red' + pc[scm_branch]='green' + pc[scm_commitid]='Yellow' + pc[scm_status_dirty]='Red' + pc[scm_status_staged]='Green' + pc[scm_time_short]='green' + pc[scm_time_medium]='yellow' + pc[scm_time_long]='red' + pc[scm_time_uncommitted]='Magenta' + pc[#]='Yellow' + for cn in ${(k)pc}; do + pc[${cn}]=$(colorword $pc[$cn]) + done + pc[reset]=$(colorword . . 00) + + typeset -Ag wunjo_prompt_colors + wunjo_prompt_colors=(${(kv)pc}) + + local p_date p_line p_rc + + p_date="$pc[date]%D{%Y-%m-%d} $pc[time]%D{%T}$pc[reset]" + + p_line="$pc[line]%y$pc[reset]" + + PROMPT="$pc[divider]\$(repeat \$COLUMNS printf '-')$pc[reset]" + PROMPT+= + if [ $verbose ]; then + PROMPT+="$pc[host]%m$pc[reset]" + fi + #PROMPT+="$pc[path]%(2~.%~.%/)$pc[reset]" + #PROMPT+="\$(prompt_wunjo_scm_status)" + #PROMPT+="%(?.. $pc[rc]exited %1v$pc[reset])" +# PROMPT+=" +#" + #PROMPT+="($pc[hist]%h$pc[reset])" + PROMPT+=":$pc[shortpath]%1~$pc[reset]" + PROMPT+="($pc[scm_branch]\$(prompt_wunjo_scm_branch)$pc[reset])" + PROMPT+=" $pc[#]\$$pc[reset] " + + #RPROMPT= + #if [ $verbose ]; then + # RPROMPT+="$p_date " + #fi + #RPROMPT+="$pc[user]%n$pc[reset]" + #RPROMPT+=" $p_line" + + export PROMPT RPROMPT + precmd_functions+='prompt_wunjo_precmd' +} + +prompt_wunjo_precmd() { + local ex=$? + psvar=() + + if [[ $ex -ge 128 ]]; then + sig=$signals[$ex-127] + psvar[1]="sig${(L)sig}" + else + psvar[1]="$ex" + fi +} + +prompt_wunjo_scm_status() { + zgit_isgit || return + local -A pc + pc=(${(kv)wunjo_prompt_colors}) + + head=$(zgit_head) + gitcommit=$(revstring $head) + + local -a commits + + if zgit_rebaseinfo; then + orig_commit=$(revstring $zgit_info[rb_head]) + orig_name=$(git name-rev --name-only $zgit_info[rb_head]) + orig="$pc[scm_branch]$orig_name$pc[punc]($pc[scm_commitid]$orig_commit$pc[punc])" + onto_commit=$(revstring $zgit_info[rb_onto]) + onto_name=$(git name-rev --name-only $zgit_info[rb_onto]) + onto="$pc[scm_branch]$onto_name$pc[punc]($pc[scm_commitid]$onto_commit$pc[punc])" + + if [ -n "$zgit_info[rb_upstream]" ] && [ $zgit_info[rb_upstream] != $zgit_info[rb_onto] ]; then + upstream_commit=$(revstring $zgit_info[rb_upstream]) + upstream_name=$(git name-rev --name-only $zgit_info[rb_upstream]) + upstream="$pc[scm_branch]$upstream_name$pc[punc]($pc[scm_commitid]$upstream_commit$pc[punc])" + commits+="rebasing $upstream$pc[reset]..$orig$pc[reset] onto $onto$pc[reset]" + else + commits+="rebasing $onto$pc[reset]..$orig$pc[reset]" + fi + + local -a revs + revs=($(git rev-list $zgit_info[rb_onto]..HEAD)) + if [ $#revs -gt 0 ]; then + commits+="\n$#revs commits in" + fi + + if [ -f $zgit_info[dotest]/message ]; then + mess=$(head -n1 $zgit_info[dotest]/message) + commits+="on $mess" + fi + elif [ -n "$gitcommit" ]; then + commits+="on $pc[scm_branch]$head$pc[punc]($pc[scm_commitid]$gitcommit$pc[punc])$pc[reset]" + local track_merge=$(zgit_tracking_merge) + if [ -n "$track_merge" ]; then + if git rev-parse --verify -q $track_merge >/dev/null; then + local track_remote=$(zgit_tracking_remote) + local tracked=$(revstring $track_merge 2>/dev/null) + + local -a revs + revs=($(git rev-list --reverse $track_merge..HEAD)) + if [ $#revs -gt 0 ]; then + local base=$(revstring $revs[1]~1) + local base_name=$(git name-rev --name-only $base) + local base_short=$(revstring $base) + local word_commits + if [ $#revs -gt 1 ]; then + word_commits='commits' + else + word_commits='commit' + fi + + local conj="since" + if [[ "$base" == "$tracked" ]]; then + conj+=" tracked" + tracked= + fi + commits+="$#revs $word_commits $conj $pc[scm_branch]$base_name$pc[punc]($pc[scm_commitid]$base_short$pc[punc])$pc[reset]" + fi + + if [ -n "$tracked" ]; then + local track_name=$track_merge + if [[ $track_remote == "." ]]; then + track_name=${track_name##*/} + fi + tracked=$(revstring $tracked) + commits+="tracking $pc[scm_branch]$track_name$pc[punc]" + if [[ "$tracked" != "$gitcommit" ]]; then + commits[$#commits]+="($pc[scm_commitid]$tracked$pc[punc])" + fi + commits[$#commits]+="$pc[reset]" + fi + fi + fi + fi + + gitsvn=$(git rev-parse --verify -q --short git-svn) + if [ $? -eq 0 ]; then + gitsvnrev=$(zgit_svnhead $gitsvn) + gitsvn=$(revstring $gitsvn) + if [ -n "$gitsvnrev" ]; then + local svninfo='' + local -a revs + svninfo+="$pc[default]svn$pc[punc]:$pc[scm_branch]r$gitsvnrev" + revs=($(git rev-list git-svn..HEAD)) + if [ $#revs -gt 0 ]; then + svninfo+="$pc[punc]@$pc[default]HEAD~$#revs" + svninfo+="$pc[punc]($pc[scm_commitid]$gitsvn$pc[punc])" + fi + commits+=$svninfo + fi + fi + + if [ $#commits -gt 0 ]; then + echo -n " ${(j: :)commits}" + fi +} + +prompt_wunjo_scm_branch() { + zgit_isgit || return + local -A pc + pc=(${(kv)wunjo_prompt_colors}) + + echo -n "$pc[punc]$pc[scm_branch]$(zgit_head)" + + #if zgit_inworktree; then + # if ! zgit_isindexclean; then + # echo -n "$pc[scm_status_staged]+" + # fi + + # local -a dirty + # if ! zgit_isworktreeclean; then + # dirty+='!' + # fi + + # if zgit_hasunmerged; then + # dirty+='*' + # fi + + # if zgit_hasuntracked; then + # dirty+='?' + # fi + + # if [ $#dirty -gt 0 ]; then + # echo -n "$pc[scm_status_dirty]${(j::)dirty}" + # fi + #fi + + echo $pc[reset] +} + +prompt_grb_setup "$@" + +# vim:set ft=zsh: diff --git a/zsh/func/prompt_wunjo_setup b/zsh/func/prompt_wunjo_setup new file mode 100644 index 0000000000..908b6e217a --- /dev/null +++ b/zsh/func/prompt_wunjo_setup @@ -0,0 +1,294 @@ +# wunjo prompt theme + +autoload -U zgitinit +zgitinit + +prompt_wunjo_help () { + cat <<'EOF' + + prompt wunjo + +EOF +} + +revstring() { + git describe --always $1 2>/dev/null || + git rev-parse --short $1 2>/dev/null +} + +coloratom() { + local off=$1 atom=$2 + if [[ $atom[1] == [[:upper:]] ]]; then + off=$(( $off + 60 )) + fi + echo $(( $off + $colorcode[${(L)atom}] )) +} +colorword() { + local fg=$1 bg=$2 att=$3 + local -a s + + if [ -n "$fg" ]; then + s+=$(coloratom 30 $fg) + fi + if [ -n "$bg" ]; then + s+=$(coloratom 40 $bg) + fi + if [ -n "$att" ]; then + s+=$attcode[$att] + fi + + echo "%{"$'\e['${(j:;:)s}m"%}" +} + +prompt_wunjo_setup() { + local verbose + if [[ $TERM == screen* ]] && [ -n "$STY" ]; then + verbose= + else + verbose=1 + fi + + typeset -A colorcode + colorcode[black]=0 + colorcode[red]=1 + colorcode[green]=2 + colorcode[yellow]=3 + colorcode[blue]=4 + colorcode[magenta]=5 + colorcode[cyan]=6 + colorcode[white]=7 + colorcode[default]=9 + colorcode[k]=$colorcode[black] + colorcode[r]=$colorcode[red] + colorcode[g]=$colorcode[green] + colorcode[y]=$colorcode[yellow] + colorcode[b]=$colorcode[blue] + colorcode[m]=$colorcode[magenta] + colorcode[c]=$colorcode[cyan] + colorcode[w]=$colorcode[white] + colorcode[.]=$colorcode[default] + + typeset -A attcode + attcode[none]=00 + attcode[bold]=01 + attcode[faint]=02 + attcode[standout]=03 + attcode[underline]=04 + attcode[blink]=05 + attcode[reverse]=07 + attcode[conceal]=08 + attcode[normal]=22 + attcode[no-standout]=23 + attcode[no-underline]=24 + attcode[no-blink]=25 + attcode[no-reverse]=27 + attcode[no-conceal]=28 + + local -A pc + pc[default]='default' + pc[date]='cyan' + pc[time]='Blue' + pc[host]='Green' + pc[user]='cyan' + pc[punc]='yellow' + pc[line]='magenta' + pc[hist]='green' + pc[path]='Cyan' + pc[shortpath]='default' + pc[rc]='red' + pc[scm_branch]='Cyan' + pc[scm_commitid]='Yellow' + pc[scm_status_dirty]='Red' + pc[scm_status_staged]='Green' + pc[#]='Yellow' + for cn in ${(k)pc}; do + pc[${cn}]=$(colorword $pc[$cn]) + done + pc[reset]=$(colorword . . 00) + + typeset -Ag wunjo_prompt_colors + wunjo_prompt_colors=(${(kv)pc}) + + local p_date p_line p_rc + + p_date="$pc[date]%D{%Y-%m-%d} $pc[time]%D{%T}$pc[reset]" + + p_line="$pc[line]%y$pc[reset]" + + PROMPT= + if [ $verbose ]; then + PROMPT+="$pc[host]%m$pc[reset] " + fi + PROMPT+="$pc[path]%(2~.%~.%/)$pc[reset]" + PROMPT+="\$(prompt_wunjo_scm_status)" + PROMPT+="%(?.. $pc[rc]exited %1v$pc[reset])" + PROMPT+=" +" + PROMPT+="$pc[hist]%h$pc[reset] " + PROMPT+="$pc[shortpath]%1~$pc[reset]" + PROMPT+="\$(prompt_wunjo_scm_branch)" + PROMPT+=" $pc[#]%#$pc[reset] " + + RPROMPT= + if [ $verbose ]; then + RPROMPT+="$p_date " + fi + RPROMPT+="$pc[user]%n$pc[reset]" + RPROMPT+=" $p_line" + + export PROMPT RPROMPT + precmd_functions+='prompt_wunjo_precmd' +} + +prompt_wunjo_precmd() { + local ex=$? + psvar=() + + if [[ $ex -ge 128 ]]; then + sig=$signals[$ex-127] + psvar[1]="sig${(L)sig}" + else + psvar[1]="$ex" + fi +} + +prompt_wunjo_scm_status() { + zgit_isgit || return + local -A pc + pc=(${(kv)wunjo_prompt_colors}) + + head=$(zgit_head) + gitcommit=$(revstring $head) + + local -a commits + + if zgit_rebaseinfo; then + orig_commit=$(revstring $zgit_info[rb_head]) + orig_name=$(git name-rev --name-only $zgit_info[rb_head]) + orig="$pc[scm_branch]$orig_name$pc[punc]($pc[scm_commitid]$orig_commit$pc[punc])" + onto_commit=$(revstring $zgit_info[rb_onto]) + onto_name=$(git name-rev --name-only $zgit_info[rb_onto]) + onto="$pc[scm_branch]$onto_name$pc[punc]($pc[scm_commitid]$onto_commit$pc[punc])" + + if [ -n "$zgit_info[rb_upstream]" ] && [ $zgit_info[rb_upstream] != $zgit_info[rb_onto] ]; then + upstream_commit=$(revstring $zgit_info[rb_upstream]) + upstream_name=$(git name-rev --name-only $zgit_info[rb_upstream]) + upstream="$pc[scm_branch]$upstream_name$pc[punc]($pc[scm_commitid]$upstream_commit$pc[punc])" + commits+="rebasing $upstream$pc[reset]..$orig$pc[reset] onto $onto$pc[reset]" + else + commits+="rebasing $onto$pc[reset]..$orig$pc[reset]" + fi + + local -a revs + revs=($(git rev-list $zgit_info[rb_onto]..HEAD)) + if [ $#revs -gt 0 ]; then + commits+="\n$#revs commits in" + fi + + if [ -f $zgit_info[dotest]/message ]; then + mess=$(head -n1 $zgit_info[dotest]/message) + commits+="on $mess" + fi + elif [ -n "$gitcommit" ]; then + commits+="on $pc[scm_branch]$head$pc[punc]($pc[scm_commitid]$gitcommit$pc[punc])$pc[reset]" + local track_merge=$(zgit_tracking_merge) + if [ -n "$track_merge" ]; then + if git rev-parse --verify -q $track_merge >/dev/null; then + local track_remote=$(zgit_tracking_remote) + local tracked=$(revstring $track_merge 2>/dev/null) + + local -a revs + revs=($(git rev-list --reverse $track_merge..HEAD)) + if [ $#revs -gt 0 ]; then + local base=$(revstring $revs[1]~1) + local base_name=$(git name-rev --name-only $base) + local base_short=$(revstring $base) + local word_commits + if [ $#revs -gt 1 ]; then + word_commits='commits' + else + word_commits='commit' + fi + + local conj="since" + if [[ "$base" == "$tracked" ]]; then + conj+=" tracked" + tracked= + fi + commits+="$#revs $word_commits $conj $pc[scm_branch]$base_name$pc[punc]($pc[scm_commitid]$base_short$pc[punc])$pc[reset]" + fi + + if [ -n "$tracked" ]; then + local track_name=$track_merge + if [[ $track_remote == "." ]]; then + track_name=${track_name##*/} + fi + tracked=$(revstring $tracked) + commits+="tracking $pc[scm_branch]$track_name$pc[punc]" + if [[ "$tracked" != "$gitcommit" ]]; then + commits[$#commits]+="($pc[scm_commitid]$tracked$pc[punc])" + fi + commits[$#commits]+="$pc[reset]" + fi + fi + fi + fi + + gitsvn=$(git rev-parse --verify -q --short git-svn) + if [ $? -eq 0 ]; then + gitsvnrev=$(zgit_svnhead $gitsvn) + gitsvn=$(revstring $gitsvn) + if [ -n "$gitsvnrev" ]; then + local svninfo='' + local -a revs + svninfo+="$pc[default]svn$pc[punc]:$pc[scm_branch]r$gitsvnrev" + revs=($(git rev-list git-svn..HEAD)) + if [ $#revs -gt 0 ]; then + svninfo+="$pc[punc]@$pc[default]HEAD~$#revs" + svninfo+="$pc[punc]($pc[scm_commitid]$gitsvn$pc[punc])" + fi + commits+=$svninfo + fi + fi + + if [ $#commits -gt 0 ]; then + echo -n " ${(j: :)commits}" + fi +} + +prompt_wunjo_scm_branch() { + zgit_isgit || return + local -A pc + pc=(${(kv)wunjo_prompt_colors}) + + echo -n "$pc[punc]:$pc[scm_branch]$(zgit_head)" + + if zgit_inworktree; then + if ! zgit_isindexclean; then + echo -n "$pc[scm_status_staged]+" + fi + + local -a dirty + if ! zgit_isworktreeclean; then + dirty+='!' + fi + + if zgit_hasunmerged; then + dirty+='*' + fi + + if zgit_hasuntracked; then + dirty+='?' + fi + + if [ $#dirty -gt 0 ]; then + echo -n "$pc[scm_status_dirty]${(j::)dirty}" + fi + fi + + echo $pc[reset] +} + +prompt_wunjo_setup "$@" + +# vim:set ft=zsh: diff --git a/zsh/func/zgitinit b/zsh/func/zgitinit new file mode 100644 index 0000000000..c85e962fbc --- /dev/null +++ b/zsh/func/zgitinit @@ -0,0 +1,243 @@ +## +## Load with `autoload -U zgitinit; zgitinit' +## + +typeset -gA zgit_info +zgit_info=() +autoload -U add-zsh-hook + +zgit_chpwd_hook() { + zgit_info_update +} + +zgit_preexec_hook() { + if [[ $2 == git\ * ]] || [[ $2 == *\ git\ * ]]; then + zgit_precmd_do_update=1 + fi +} + +zgit_precmd_hook() { + if [ $zgit_precmd_do_update ]; then + unset zgit_precmd_do_update + zgit_info_update + fi +} + +zgit_info_update() { + zgit_info=() + + local gitdir="$(git rev-parse --show-toplevel 2>/dev/null)" + if [ $? -ne 0 ] || [ -z "$gitdir" ]; then + return + fi + + zgit_info[dir]=$gitdir + zgit_info[bare]=$(git rev-parse --is-bare-repository) + zgit_info[inwork]=$(git rev-parse --is-inside-work-tree) +} + +zgit_isgit() { + if [ -z "$zgit_info[dir]" ]; then + return 1 + else + return 0 + fi +} + +zgit_inworktree() { + zgit_isgit || return + if [ "$zgit_info[inwork]" = "true" ]; then + return 0 + else + return 1 + fi +} + +zgit_isbare() { + zgit_isgit || return + if [ "$zgit_info[bare]" = "true" ]; then + return 0 + else + return 1 + fi +} + +zgit_head() { + zgit_isgit || return 1 + + if [ -z "$zgit_info[head]" ]; then + local name='' + name=$(git symbolic-ref -q HEAD) + if [ $? -eq 0 ]; then + if [[ $name == refs/(heads|tags)/* ]]; then + name=${name#refs/(heads|tags)/} + fi + else + name=$(git name-rev --name-only --no-undefined --always HEAD) + if [ $? -ne 0 ]; then + return 1 + elif [[ $name == remotes/* ]]; then + name=${name#remotes/} + fi + fi + zgit_info[head]=$name + fi + + echo $zgit_info[head] +} + +zgit_branch() { + zgit_isgit || return 1 + zgit_isbare && return 1 + + if [ -z "$zgit_info[branch]" ]; then + local branch=$(git symbolic-ref --short HEAD 2>/dev/null) + if [ $? -ne 0 ]; then + branch=$(git name-rev --name-only --always HEAD) + fi + zgit_info[branch]=$branch + fi + + echo $zgit_info[branch] + return 0 +} + +zgit_tracking_remote() { + zgit_isgit || return 1 + zgit_isbare && return 1 + + local branch + if [ -n "$1" ]; then + branch=$1 + elif [ -z "$zgit_info[branch]" ]; then + branch=$(zgit_branch) + [ $? -ne 0 ] && return 1 + else + branch=$zgit_info[branch] + fi + + local k="tracking_$branch" + local remote + if [ -z "$zgit_info[$k]" ]; then + remote=$(git config branch.$branch.remote) + zgit_info[$k]=$remote + fi + + echo $zgit_info[$k] + return 0 +} + +zgit_tracking_merge() { + zgit_isgit || return 1 + zgit_isbare && return 1 + + local branch + if [ -z "$zgit_info[branch]" ]; then + branch=$(zgit_branch) + [ $? -ne 0 ] && return 1 + else + branch=$zgit_info[branch] + fi + + local remote=$(zgit_tracking_remote $branch) + [ $? -ne 0 ] && return 1 + if [ -n "$remote" ]; then # tracking branch + local merge=$(git config branch.$branch.merge) + if [ $remote != "." ]; then + merge=$remote/$(basename $merge) + fi + echo $merge + return 0 + else + return 1 + fi +} + +zgit_isindexclean() { + zgit_isgit || return 1 + if git diff --quiet --cached 2>/dev/null; then + return 0 + else + return 1 + fi +} + +zgit_isworktreeclean() { + zgit_isgit || return 1 + if [ -z "$(git ls-files $zgit_info[dir] --modified)" ]; then + return 0 + else + return 1 + fi +} + +zgit_hasuntracked() { + zgit_isgit || return 1 + local -a flist + flist=($(git ls-files --others --exclude-standard)) + if [ $#flist -gt 0 ]; then + return 0 + else + return 1 + fi +} + +zgit_hasunmerged() { + zgit_isgit || return 1 + local -a flist + flist=($(git ls-files -u)) + if [ $#flist -gt 0 ]; then + return 0 + else + return 1 + fi +} + +zgit_svnhead() { + zgit_isgit || return 1 + + local commit=$1 + if [ -z "$commit" ]; then + commit='HEAD' + fi + + git svn find-rev $commit +} + +zgit_rebaseinfo() { + zgit_isgit || return 1 + if [ -d $zgit_info[dir]/rebase-merge ]; then + dotest=$zgit_info[dir]/rebase-merge + elif [ -d $zgit_info[dir]/.dotest-merge ]; then + dotest=$zgit_info[dir]/.dotest-merge + elif [ -d .dotest ]; then + dotest=.dotest + else + return 1 + fi + + zgit_info[dotest]=$dotest + + zgit_info[rb_onto]=$(cat "$dotest/onto") + if [ -f "$dotest/upstream" ]; then + zgit_info[rb_upstream]=$(cat "$dotest/upstream") + else + zgit_info[rb_upstream]= + fi + if [ -f "$dotest/orig-head" ]; then + zgit_info[rb_head]=$(cat "$dotest/orig-head") + elif [ -f "$dotest/head" ]; then + zgit_info[rb_head]=$(cat "$dotest/head") + fi + zgit_info[rb_head_name]=$(cat "$dotest/head-name") + + return 0 +} + +add-zsh-hook chpwd zgit_chpwd_hook +add-zsh-hook preexec zgit_preexec_hook +add-zsh-hook precmd zgit_precmd_hook + +zgit_info_update + +# vim:set ft=zsh: diff --git a/zshrc b/zshrc index 699274306a..786e8837f5 100644 --- a/zshrc +++ b/zshrc @@ -24,5 +24,5 @@ export LANG=en_US.UTF-8 export EDITOR='vim' source /Users/anderslime/.dotfiles/zsh/aliases - +# source /Users/anderslime/.dotfiles/zsh/prompt alias gs="git status" From 4aa8fec8ed6860098ac7b2f258fb80f518d379c9 Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Thu, 25 Dec 2014 17:00:29 +0100 Subject: [PATCH 018/144] tmp --- zshrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zshrc b/zshrc index 786e8837f5..8651a2d2b6 100644 --- a/zshrc +++ b/zshrc @@ -2,7 +2,7 @@ export ZSH=$HOME/.oh-my-zsh # ZSH Theme -ZSH_THEME="awesomepanda" +ZSH_THEME="anderslime" # oh-my-zsh plugins plugins=(git) From bb066af1a6266d76f4bc624433f947b1089aed41 Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Thu, 25 Dec 2014 18:41:08 +0100 Subject: [PATCH 019/144] My bash theme --- zsh/anderslime.zsh-theme | 87 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 zsh/anderslime.zsh-theme diff --git a/zsh/anderslime.zsh-theme b/zsh/anderslime.zsh-theme new file mode 100644 index 0000000000..2662cf7a1a --- /dev/null +++ b/zsh/anderslime.zsh-theme @@ -0,0 +1,87 @@ +PROMPT=$'%F{114}%m%{$reset_color%}:%c$(git_time_since_commit)$(git_prompt_info) %F{222}$ %{$reset_color%}' +RPROMPT=$'$(parse_rprompt_git_dirty)' + +DIRTY_YELLOW_COLOR="%F{220}" +LONG_SINCE_COMMMIT_RED="%F{9}" + +ZSH_THEME_GIT_PROMPT_PREFIX="%F{110}" +ZSH_THEME_GIT_PROMPT_DIRTY="" +ZSH_THEME_GIT_PROMPT_CLEAN="" +ZSH_THEME_GIT_PROMPT_SUFFIX=")%{$reset_color%}" + +GIT_RPROMPT_DIRTY="$DIRTY_YELLOW_COLOR ✗%{$reset_color%}" +GIT_RPROMPT_CLEAN="" + +ZSH_THEME_GIT_TIME_SINCE_COMMIT_SHORT=$fg[green] +ZSH_THEME_GIT_TIME_SHORT_COMMIT_MEDIUM=$DIRTY_YELLOW_COLOR +ZSH_THEME_GIT_TIME_SINCE_COMMIT_LONG=$LONG_SINCE_COMMMIT_RED +ZSH_THEME_GIT_TIME_SINCE_COMMIT_NEUTRAL=$reset_color + +# Determine the time since last commit. If branch is clean, +# use a neutral color, otherwise colors will vary according to time. +# Modified version inspired from: +# https://github.com/robbyrussell/oh-my-zsh/blob/master/themes/Soliah.zsh-theme +function git_time_since_commit() { + if git rev-parse --git-dir > /dev/null 2>&1; then + # Only proceed if there is actually a commit. + if [[ $(git log 2>&1 > /dev/null | grep -c "^fatal: bad default revision") == 0 ]]; then + # Get the last commit. + last_commit=`git log --pretty=format:'%at' -1 2> /dev/null` + now=`date +%s` + seconds_since_last_commit=$((now-last_commit)) + + # Totals + MINUTES=$((seconds_since_last_commit / 60)) + HOURS=$((seconds_since_last_commit/3600)) + + # Sub-hours and sub-minutes + DAYS=$((seconds_since_last_commit / 86400)) + SUB_HOURS=$((HOURS % 24)) + SUB_MINUTES=$((MINUTES % 60)) + + if [[ -n $(git status -s 2> /dev/null) ]]; then + if [ "$MINUTES" -gt 30 ]; then + COLOR="$ZSH_THEME_GIT_TIME_SINCE_COMMIT_LONG" + elif [ "$MINUTES" -gt 10 ]; then + COLOR="$ZSH_THEME_GIT_TIME_SHORT_COMMIT_MEDIUM" + else + COLOR="$ZSH_THEME_GIT_TIME_SINCE_COMMIT_SHORT" + fi + else + COLOR=$ZSH_THEME_GIT_TIME_SINCE_COMMIT_NEUTRAL + fi + + if [ "$HOURS" -gt 24 ]; then + echo "($COLOR${DAYS}d${SUB_HOURS}h${SUB_MINUTES}m%{$reset_color%}|" + elif [ "$MINUTES" -gt 60 ]; then + echo "($COLOR${HOURS}h${SUB_MINUTES}m%{$reset_color%}|" + else + echo "($COLOR${MINUTES}m%{$reset_color%}|" + fi + else + COLOR="$ZSH_THEME_GIT_TIME_SINCE_COMMIT_NEUTRAL" + echo "($COLOR~|" + fi + fi +} + +# Checks if working tree is dirty +function parse_rprompt_git_dirty { + local STATUS='' + local FLAGS + FLAGS=('--porcelain') + if [[ "$(command git config --get oh-my-zsh.hide-dirty)" != "1" ]]; then + if [[ $POST_1_7_2_GIT -gt 0 ]]; then + FLAGS+='--ignore-submodules=dirty' + fi + if [[ "$DISABLE_UNTRACKED_FILES_DIRTY" == "true" ]]; then + FLAGS+='--untracked-files=no' + fi + STATUS=$(command git status ${FLAGS} 2> /dev/null | tail -n1) + fi + if [[ -n $STATUS ]]; then + echo "$GIT_RPROMPT_DIRTY" + else + echo "$GIT_RPROMPT_CLEAN" + fi +} From 9d1500152fe7ec396eda68bb35015a00b31aa720 Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Thu, 25 Dec 2014 18:50:22 +0100 Subject: [PATCH 020/144] Always colorize min since last commit --- zsh/anderslime.zsh-theme | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/zsh/anderslime.zsh-theme b/zsh/anderslime.zsh-theme index 2662cf7a1a..3cc1184438 100644 --- a/zsh/anderslime.zsh-theme +++ b/zsh/anderslime.zsh-theme @@ -39,16 +39,12 @@ function git_time_since_commit() { SUB_HOURS=$((HOURS % 24)) SUB_MINUTES=$((MINUTES % 60)) - if [[ -n $(git status -s 2> /dev/null) ]]; then - if [ "$MINUTES" -gt 30 ]; then - COLOR="$ZSH_THEME_GIT_TIME_SINCE_COMMIT_LONG" - elif [ "$MINUTES" -gt 10 ]; then - COLOR="$ZSH_THEME_GIT_TIME_SHORT_COMMIT_MEDIUM" - else - COLOR="$ZSH_THEME_GIT_TIME_SINCE_COMMIT_SHORT" - fi + if [ "$MINUTES" -gt 30 ]; then + COLOR="$ZSH_THEME_GIT_TIME_SINCE_COMMIT_LONG" + elif [ "$MINUTES" -gt 10 ]; then + COLOR="$ZSH_THEME_GIT_TIME_SHORT_COMMIT_MEDIUM" else - COLOR=$ZSH_THEME_GIT_TIME_SINCE_COMMIT_NEUTRAL + COLOR="$ZSH_THEME_GIT_TIME_SINCE_COMMIT_SHORT" fi if [ "$HOURS" -gt 24 ]; then From 9c5427393395145ac41a70537e64093079a3f067 Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Thu, 25 Dec 2014 20:00:14 +0100 Subject: [PATCH 021/144] Super git status --- zsh/anderslime.zsh-theme | 64 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 59 insertions(+), 5 deletions(-) diff --git a/zsh/anderslime.zsh-theme b/zsh/anderslime.zsh-theme index 3cc1184438..30c318a6c3 100644 --- a/zsh/anderslime.zsh-theme +++ b/zsh/anderslime.zsh-theme @@ -1,20 +1,28 @@ PROMPT=$'%F{114}%m%{$reset_color%}:%c$(git_time_since_commit)$(git_prompt_info) %F{222}$ %{$reset_color%}' -RPROMPT=$'$(parse_rprompt_git_dirty)' +local return_status="%{$fg[red]%}%(?..⏎)%{$reset_color%}" +RPROMPT='${return_status}$(git_prompt_status)%{$reset_color%}' DIRTY_YELLOW_COLOR="%F{220}" -LONG_SINCE_COMMMIT_RED="%F{9}" +LONG_SINCE_COMMIT_RED="%F{9}" ZSH_THEME_GIT_PROMPT_PREFIX="%F{110}" -ZSH_THEME_GIT_PROMPT_DIRTY="" +ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%})" +ZSH_THEME_GIT_PROMPT_DIRTY="$LONG_SINCE_COMMIT_RED!" ZSH_THEME_GIT_PROMPT_CLEAN="" -ZSH_THEME_GIT_PROMPT_SUFFIX=")%{$reset_color%}" + +ZSH_THEME_GIT_PROMPT_ADDED="%{$fg[green]%} ✚" +ZSH_THEME_GIT_PROMPT_MODIFIED="$DIRTY_YELLOW_COLOR ✹" +ZSH_THEME_GIT_PROMPT_DELETED="$LONG_SINCE_COMMIT_RED ✖" +ZSH_THEME_GIT_PROMPT_RENAMED="%{$fg[magenta]%} ➜" +ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[yellow]%} ═" +ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[cyan]%} ✭" GIT_RPROMPT_DIRTY="$DIRTY_YELLOW_COLOR ✗%{$reset_color%}" GIT_RPROMPT_CLEAN="" ZSH_THEME_GIT_TIME_SINCE_COMMIT_SHORT=$fg[green] ZSH_THEME_GIT_TIME_SHORT_COMMIT_MEDIUM=$DIRTY_YELLOW_COLOR -ZSH_THEME_GIT_TIME_SINCE_COMMIT_LONG=$LONG_SINCE_COMMMIT_RED +ZSH_THEME_GIT_TIME_SINCE_COMMIT_LONG=$LONG_SINCE_COMMIT_RED ZSH_THEME_GIT_TIME_SINCE_COMMIT_NEUTRAL=$reset_color # Determine the time since last commit. If branch is clean, @@ -61,6 +69,52 @@ function git_time_since_commit() { fi } +function git_prompt_status { + INDEX=$(command git status --porcelain -b 2> /dev/null) + STATUS="" + if $(echo "$INDEX" | grep -E '^\?\? ' &> /dev/null); then + STATUS="$ZSH_THEME_GIT_PROMPT_UNTRACKED$STATUS" + fi + if $(echo "$INDEX" | grep '^A ' &> /dev/null); then + STATUS="$ZSH_THEME_GIT_PROMPT_ADDED$STATUS" + elif $(echo "$INDEX" | grep '^M ' &> /dev/null); then + STATUS="$ZSH_THEME_GIT_PROMPT_ADDED$STATUS" + fi + if $(echo "$INDEX" | grep '^ M ' &> /dev/null); then + STATUS="$ZSH_THEME_GIT_PROMPT_MODIFIED$STATUS" + elif $(echo "$INDEX" | grep '^AM ' &> /dev/null); then + STATUS="$ZSH_THEME_GIT_PROMPT_MODIFIED$STATUS" + elif $(echo "$INDEX" | grep '^ T ' &> /dev/null); then + STATUS="$ZSH_THEME_GIT_PROMPT_MODIFIED$STATUS" + fi + if $(echo "$INDEX" | grep '^R ' &> /dev/null); then + STATUS="$ZSH_THEME_GIT_PROMPT_RENAMED$STATUS" + fi + if $(echo "$INDEX" | grep '^ D ' &> /dev/null); then + STATUS="$ZSH_THEME_GIT_PROMPT_DELETED$STATUS" + elif $(echo "$INDEX" | grep '^D ' &> /dev/null); then + STATUS="$ZSH_THEME_GIT_PROMPT_DELETED$STATUS" + elif $(echo "$INDEX" | grep '^AD ' &> /dev/null); then + STATUS="$ZSH_THEME_GIT_PROMPT_DELETED$STATUS" + fi + if $(command git rev-parse --verify refs/stash >/dev/null 2>&1); then + STATUS="$ZSH_THEME_GIT_PROMPT_STASHED$STATUS" + fi + if $(echo "$INDEX" | grep '^UU ' &> /dev/null); then + STATUS="$ZSH_THEME_GIT_PROMPT_UNMERGED$STATUS" + fi + if $(echo "$INDEX" | grep '^## .*ahead' &> /dev/null); then + STATUS="$ZSH_THEME_GIT_PROMPT_AHEAD$STATUS" + fi + if $(echo "$INDEX" | grep '^## .*behind' &> /dev/null); then + STATUS="$ZSH_THEME_GIT_PROMPT_BEHIND$STATUS" + fi + if $(echo "$INDEX" | grep '^## .*diverged' &> /dev/null); then + STATUS="$ZSH_THEME_GIT_PROMPT_DIVERGED$STATUS" + fi + echo $STATUS +} + # Checks if working tree is dirty function parse_rprompt_git_dirty { local STATUS='' From 3b7e1863ea264b99ae48e7276db5d272da54b09a Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Thu, 25 Dec 2014 20:54:33 +0100 Subject: [PATCH 022/144] OSX Setup --- osx | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 osx diff --git a/osx b/osx new file mode 100644 index 0000000000..fdf323508e --- /dev/null +++ b/osx @@ -0,0 +1,69 @@ +#!/usr/bin/env bash + +# Ask for the administrator password upfront +sudo -v + +# Keep-alive: update existing `sudo` time stamp until `.osx` has finished +while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null & + +############################################################################### +# General UI/UX # +############################################################################### + +# Disable the sound effects on boot +sudo nvram SystemAudioVolume=" " + +# Disable transparency in the menu bar and elsewhere on Yosemite +defaults write com.apple.universalaccess reduceTransparency -bool true + +# Disable the “Are you sure you want to open this application?” dialog +defaults write com.apple.LaunchServices LSQuarantine -bool false + +# Check for software updates daily, not just once per week +defaults write com.apple.SoftwareUpdate ScheduleFrequency -int 1 + +############################################################################### +# Finder # +############################################################################### + +# Finder: show all filename extensions +defaults write NSGlobalDomain AppleShowAllExtensions -bool true + +# Finder: allow text selection in Quick Look +defaults write com.apple.finder QLEnableTextSelection -bool true + +# When performing a search, search the current folder by default +defaults write com.apple.finder FXDefaultSearchScope -string "SCcf" + +# Avoid creating .DS_Store files on network volumes +defaults write com.apple.desktopservices DSDontWriteNetworkStores -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 + +# Enable snap-to-grid for icons on the desktop and in other icon views +/usr/libexec/PlistBuddy -c "Set :DesktopViewSettings:IconViewSettings:arrangeBy grid" ~/Library/Preferences/com.apple.finder.plist +/usr/libexec/PlistBuddy -c "Set :FK_StandardViewSettings:IconViewSettings:arrangeBy grid" ~/Library/Preferences/com.apple.finder.plist +/usr/libexec/PlistBuddy -c "Set :StandardViewSettings:IconViewSettings:arrangeBy grid" ~/Library/Preferences/com.apple.finder.plist + +# Use list view in all Finder windows by default +# Four-letter codes for the other view modes: `icnv`, `clmv`, `Flwv` +defaults write com.apple.finder FXPreferredViewStyle -string "Nlsv" + +# Disable the warning before emptying the Trash +defaults write com.apple.finder WarnOnEmptyTrash -bool false + +# Empty Trash securely by default +defaults write com.apple.finder EmptyTrashSecurely -bool true + +# Set the icon size of Dock items to 36 pixels +defaults write com.apple.dock tilesize -int 36 + +# Speed up Mission Control animations +defaults write com.apple.dock expose-animation-duration -float 0.1 + +# Remove the animation when hiding/showing the Dock +defaults write com.apple.dock autohide-time-modifier -float 0.2 + From 30fcf9b87f8f0fa834acb93a69cefe0583f015fc Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Thu, 25 Dec 2014 20:54:43 +0100 Subject: [PATCH 023/144] git aliases --- zsh/aliases | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/zsh/aliases b/zsh/aliases index 53e75ce848..9a738538de 100644 --- a/zsh/aliases +++ b/zsh/aliases @@ -25,7 +25,7 @@ alias v='vim' alias vi='vim' # Git -alias gp="git add -p" -alias tmp="git tmp" -alias wip="git wip" -alias gp="git push" +alias gp="git add . -p" +alias gn="git add . -N" +alias tmp="git add . -A && git commit -m 'TMP'" +alias wip="git add . -A && git commit -m 'WIP'" From 62284a047df921016ddc21e795bbb749b947978b Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Thu, 25 Dec 2014 23:46:01 +0100 Subject: [PATCH 024/144] Aliases --- vimrc | 2 +- zsh/aliases | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/vimrc b/vimrc index fc38540aef..9e58b913bc 100644 --- a/vimrc +++ b/vimrc @@ -121,7 +121,7 @@ vmap b :!git blame =expand("%:p") \| sed -n =line("' map bb :!bundle install nmap bi :source ~/.vimrc:PluginInstall map d orequire 'pry'binding.pry:w -map h :CommandT +map t :CommandT map ra :%s/ map rd :!bundle exec rspec % --format documentation map rf :CommandTFlush:CommandT diff --git a/zsh/aliases b/zsh/aliases index 9a738538de..06f6224ee8 100644 --- a/zsh/aliases +++ b/zsh/aliases @@ -18,7 +18,7 @@ alias so='source ~/.dotfiles/zsh/aliases' alias startpostgres='pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start' alias startredis='redis-server /usr/local/etc/redis.conf &' alias stoppostgres='pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log stop' -alias sync='git add -u . && git commit -m "Minor changes. Commit message skipped." && repush' +alias sync='git add -u . && git commit -m "Minor changes. Commit message skipped." && gpo' alias tail-logs='heroku logs -t' alias undeployed='git fetch --multiple production origin && git log production/master..origin/master' alias v='vim' @@ -27,5 +27,8 @@ alias vi='vim' # Git alias gp="git add . -p" alias gn="git add . -N" +alias gaa="git add . -A" alias tmp="git add . -A && git commit -m 'TMP'" alias wip="git add . -A && git commit -m 'WIP'" +alias gpo="git push origin master" +alias gpu="git push upstream master" From 90fea8a9fa6018863e0afb6ee3d05d8299adbc75 Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Sun, 4 Jan 2015 14:28:07 +0100 Subject: [PATCH 025/144] Use ctrlp instead of command t for searching files --- vimrc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/vimrc b/vimrc index 9e58b913bc..e9f3e844a8 100644 --- a/vimrc +++ b/vimrc @@ -15,10 +15,10 @@ Plugin 'ervandew/supertab' Plugin 'koron/nyancat-vim' Plugin 'tomtom/tcomment_vim' Plugin 'vim-ruby/vim-ruby' -Plugin 'wincent/Command-T' +" Plugin 'wincent/Command-T' Plugin 'scrooloose/nerdtree' Plugin 'LaTeX-Box-Team/LaTeX-Box' - +Plugin 'kien/ctrlp.vim' " Ben Orenstein plugins " Plugin 'kchmck/vim-coffee-script' " Plugin 'skwp/greplace.vim' @@ -121,7 +121,6 @@ vmap b :!git blame =expand("%:p") \| sed -n =line("' map bb :!bundle install nmap bi :source ~/.vimrc:PluginInstall map d orequire 'pry'binding.pry:w -map t :CommandT map ra :%s/ map rd :!bundle exec rspec % --format documentation map rf :CommandTFlush:CommandT From 11a23ba7cc32dabf14504f7d2cb0d32c3ace5ce3 Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Sun, 4 Jan 2015 14:28:27 +0100 Subject: [PATCH 026/144] Use vim airline for nicer UI with git support through fugitive --- vimrc | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/vimrc b/vimrc index e9f3e844a8..697687645f 100644 --- a/vimrc +++ b/vimrc @@ -31,12 +31,32 @@ Plugin 'kien/ctrlp.vim' " Plugin 'tpope/vim-commentary' " Plugin 'tpope/vim-repeat' Plugin 'tpope/vim-surround' +Plugin 'tpope/vim-fugitive' " Plugin 'tpope/vim-unimpaired' " nelstrom's plugin depends on kana's Plugin 'kana/vim-textobj-user' Plugin 'nelstrom/vim-textobj-rubyblock' +" UI Plugins +Plugin 'bling/vim-airline' " UI statusbar niceties + set laststatus=2 " enable airline even if no splits + let g:airline_theme='luna' + let g:airline_powerline_fonts=1 + let g:airline_enable_branch=1 + let g:airline_enable_syntastic=1 + let g:airline_powerline_fonts = 1 + let g:airline_left_sep = '' + let g:airline_right_sep = '' + let g:airline_linecolumn_prefix = '␊ ' + let g:airline_linecolumn_prefix = '␤ ' + let g:airline_linecolumn_prefix = '¶ ' + let g:airline_branch_prefix = '⎇ ' + let g:airline_paste_symbol = 'ρ' + let g:airline_paste_symbol = 'Þ' + let g:airline_paste_symbol = '∥' + let g:airline#extensions#tabline#enabled = 0 + " Colors Plugin 'nanotech/jellybeans.vim' From 4536890db5c2b91c5327362f59829c9cd7828972 Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Sun, 4 Jan 2015 14:29:05 +0100 Subject: [PATCH 027/144] Do not use relative line numbering --- vimrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vimrc b/vimrc index 697687645f..ea353b2ff0 100644 --- a/vimrc +++ b/vimrc @@ -123,7 +123,7 @@ set smarttab set noincsearch set ignorecase smartcase set laststatus=2 " Always show status line. -set relativenumber +set number set gdefault " assume the /g flag on :s substitutions to replace all matches in a line set autoindent " always set autoindenting on set bg=light From bfe24daf5d38f0ba1bc9eb25f031eebb3e06fc83 Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Sun, 4 Jan 2015 14:50:53 +0100 Subject: [PATCH 028/144] Fsharp plugin for vim --- vimrc | 1 + 1 file changed, 1 insertion(+) diff --git a/vimrc b/vimrc index ea353b2ff0..d44e4bc1d7 100644 --- a/vimrc +++ b/vimrc @@ -19,6 +19,7 @@ Plugin 'vim-ruby/vim-ruby' Plugin 'scrooloose/nerdtree' Plugin 'LaTeX-Box-Team/LaTeX-Box' Plugin 'kien/ctrlp.vim' +Plugin 'kongo2002/fsharp-vim' " Ben Orenstein plugins " Plugin 'kchmck/vim-coffee-script' " Plugin 'skwp/greplace.vim' From 79a5257123f01d9cf276e9be83d4ab18aafdcb81 Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Mon, 5 Jan 2015 16:41:06 +0100 Subject: [PATCH 029/144] Ignore ruby gemsets for rvm --- gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/gitignore b/gitignore index 3e7e6b11b8..f222fba7dd 100644 --- a/gitignore +++ b/gitignore @@ -6,3 +6,4 @@ log/ db/*.sqlite3 .netrwhist project-notes.txt +.ruby-gemset From a6c3f3646287a00a47441e94082402362c82290c Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Sat, 10 Jan 2015 14:34:31 +0100 Subject: [PATCH 030/144] Git aliases --- gitconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gitconfig b/gitconfig index dce589edbc..40d01863c3 100644 --- a/gitconfig +++ b/gitconfig @@ -11,6 +11,8 @@ cob = checkout -b dc = diff --cached db = delete-branch + ri = rebase --interactive + rim = rebase --interactive master [color] status = auto diff = auto From aa50bb6baa14a362b4dd89f871ca2465c5d13a5f Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Sat, 10 Jan 2015 14:35:03 +0100 Subject: [PATCH 031/144] Fix git global exclude --- gitconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gitconfig b/gitconfig index 40d01863c3..1412c221fd 100644 --- a/gitconfig +++ b/gitconfig @@ -18,8 +18,8 @@ diff = auto branch = auto [core] - excludefile = /Users/anderslime/.gitignore editor = vim --noplugin + excludesfile = /Users/anderslime/.gitignore [credential] helper = osxkeychain [push] From 0738ad666585c0d52d75bcfeef0db88f044b448c Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Sat, 10 Jan 2015 14:35:14 +0100 Subject: [PATCH 032/144] Coffeescript syntax highlighting --- vimrc | 1 + 1 file changed, 1 insertion(+) diff --git a/vimrc b/vimrc index d44e4bc1d7..d9e4e012c1 100644 --- a/vimrc +++ b/vimrc @@ -20,6 +20,7 @@ Plugin 'scrooloose/nerdtree' Plugin 'LaTeX-Box-Team/LaTeX-Box' Plugin 'kien/ctrlp.vim' Plugin 'kongo2002/fsharp-vim' +Plugin 'kchmck/vim-coffee-script' " Ben Orenstein plugins " Plugin 'kchmck/vim-coffee-script' " Plugin 'skwp/greplace.vim' From 68dffd6b86cb5e18d741b70faf7197eef1cda52f Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Sat, 10 Jan 2015 14:35:24 +0100 Subject: [PATCH 033/144] Recognize fsharp files --- vimrc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/vimrc b/vimrc index d9e4e012c1..059b1a7bb9 100644 --- a/vimrc +++ b/vimrc @@ -108,6 +108,10 @@ hi MatchParen cterm=none ctermbg=black ctermfg=yellow " By default, vim thinks .md is Modula-2. autocmd BufNewFile,BufReadPost *.md set filetype=markdown +" Set FSharp Filetype +" au BufRead,BufNewFile *.fs set filetype=fs +" au BufRead,BufNewFile *.fsx set filetype=fs + " Read upon: " Better? completion on command line set wildmenu From c4b6c127e466bccc293e274bc4bcdd9a91e0733a Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Sat, 10 Jan 2015 14:35:37 +0100 Subject: [PATCH 034/144] Some mappings --- vimrc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vimrc b/vimrc index 059b1a7bb9..84d69176ab 100644 --- a/vimrc +++ b/vimrc @@ -146,6 +146,8 @@ let mapleader = "," vmap b :!git blame =expand("%:p") \| sed -n =line("'<") ,=line("'>") p map bb :!bundle install nmap bi :source ~/.vimrc:PluginInstall +map st :source % +map sv :source .vimrc map d orequire 'pry'binding.pry:w map ra :%s/ map rd :!bundle exec rspec % --format documentation From 1960ba1f3f0d5371d84fa7b3fdc0d0da8c8e7b83 Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Sat, 10 Jan 2015 14:36:00 +0100 Subject: [PATCH 035/144] Aliases for Fsharp and Rails --- zsh/aliases | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/zsh/aliases b/zsh/aliases index 06f6224ee8..8410c7303e 100644 --- a/zsh/aliases +++ b/zsh/aliases @@ -32,3 +32,11 @@ alias tmp="git add . -A && git commit -m 'TMP'" alias wip="git add . -A && git commit -m 'WIP'" alias gpo="git push origin master" alias gpu="git push upstream master" + +# Fsharp +alias cwhile="fslex Lexer.fsl && fsyacc --module Parser Parser.fsy" +alias whilerun="fsharpi --use:Script.fsx" +alias fswhile="cwhile && whilerun" + +# Rails +alias devlog="tail -f log/development.log" From 049ef6f36996fcc306490054db6396e02dfb5a61 Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Sat, 10 Jan 2015 14:36:12 +0100 Subject: [PATCH 036/144] Fsharp stuff --- zshrc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/zshrc b/zshrc index 8651a2d2b6..908d677c31 100644 --- a/zshrc +++ b/zshrc @@ -16,6 +16,13 @@ SAVEHIST=20000 chpwd() { ls -lrthG } + +# Fsharp stuf +export MONO_GAC_PREFIX="/usr/local" +alias fslex="mono ~/code/FSharpPowerPack-4.0.0.0/bin/fslex.exe" +alias fsyacc="mono ~/code/FSharpPowerPack-4.0.0.0/bin/fsyacc.exe" + +# Load oh my zsh source $ZSH/oh-my-zsh.sh export PATH=$HOME/bin:$HOME/.dotfiles/bin:/usr/local/bin:$PATH From fb78de69a809812d33ddb2ffc6b14704b2a6786c Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Sat, 10 Jan 2015 14:36:19 +0100 Subject: [PATCH 037/144] Lokalebaen CLI --- zshrc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/zshrc b/zshrc index 908d677c31..661b2ec31e 100644 --- a/zshrc +++ b/zshrc @@ -24,8 +24,13 @@ alias fsyacc="mono ~/code/FSharpPowerPack-4.0.0.0/bin/fsyacc.exe" # Load oh my zsh source $ZSH/oh-my-zsh.sh + +# PATH export PATH=$HOME/bin:$HOME/.dotfiles/bin:/usr/local/bin:$PATH +# Loklaebase stuff +export PATH=$HOME/code/lb/bin:$PATH + # You may need to manually set your language environment export LANG=en_US.UTF-8 export EDITOR='vim' From 09dcde1504fc5b759a009c1dcc5db5da57d9df66 Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Sat, 10 Jan 2015 17:12:36 +0100 Subject: [PATCH 038/144] Ignore local vimrc files --- gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/gitignore b/gitignore index f222fba7dd..06f7b694b0 100644 --- a/gitignore +++ b/gitignore @@ -7,3 +7,4 @@ db/*.sqlite3 .netrwhist project-notes.txt .ruby-gemset +.vimrc From ccb7fb91569ce0c6643fa2588c598931558a1eea Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Sat, 10 Jan 2015 17:12:56 +0100 Subject: [PATCH 039/144] Show 80'th colum ruler --- vimrc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/vimrc b/vimrc index 84d69176ab..2e9812802b 100644 --- a/vimrc +++ b/vimrc @@ -113,8 +113,7 @@ autocmd BufNewFile,BufReadPost *.md set filetype=markdown " au BufRead,BufNewFile *.fsx set filetype=fs " Read upon: -" Better? completion on command line -set wildmenu +set cc=80 " Show ruler at 80 character column " What to do when I press 'wildchar'. Worth tweaking to see what feels right. set wildmode=list:full set nowrap From edc4177bf3bb8ce6c5547a0ff55012425a3b3939 Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Wed, 11 Feb 2015 10:56:34 +0100 Subject: [PATCH 040/144] Autosqash --- gitconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gitconfig b/gitconfig index 1412c221fd..5e95d5aad3 100644 --- a/gitconfig +++ b/gitconfig @@ -11,8 +11,8 @@ cob = checkout -b dc = diff --cached db = delete-branch - ri = rebase --interactive - rim = rebase --interactive master + ri = rebase --interactive --autosquash + rim = rebase --interactive --autosquash master [color] status = auto diff = auto From 55a8881967699f25bf3b6b07d6e6d0fde7c37d8a Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Wed, 11 Feb 2015 10:56:46 +0100 Subject: [PATCH 041/144] Mustache syntax highlighting --- vimrc | 1 + 1 file changed, 1 insertion(+) diff --git a/vimrc b/vimrc index 2e9812802b..c04eb26cb4 100644 --- a/vimrc +++ b/vimrc @@ -21,6 +21,7 @@ Plugin 'LaTeX-Box-Team/LaTeX-Box' Plugin 'kien/ctrlp.vim' Plugin 'kongo2002/fsharp-vim' Plugin 'kchmck/vim-coffee-script' +Plugin 'mustache/vim-mustache-handlebars' " Ben Orenstein plugins " Plugin 'kchmck/vim-coffee-script' " Plugin 'skwp/greplace.vim' From e9e2faef2a2304b2c19b8eb1dbf493511aecf787 Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Wed, 11 Feb 2015 10:56:54 +0100 Subject: [PATCH 042/144] Slim syntax highlihgting --- vimrc | 1 + 1 file changed, 1 insertion(+) diff --git a/vimrc b/vimrc index c04eb26cb4..43873ab5c7 100644 --- a/vimrc +++ b/vimrc @@ -35,6 +35,7 @@ Plugin 'mustache/vim-mustache-handlebars' " Plugin 'tpope/vim-repeat' Plugin 'tpope/vim-surround' Plugin 'tpope/vim-fugitive' +Plugin 'slim-template/vim-slim' " Plugin 'tpope/vim-unimpaired' " nelstrom's plugin depends on kana's From f8c6ef4dcb8c6ec5992c653c9548184a6b253614 Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Wed, 11 Feb 2015 10:57:11 +0100 Subject: [PATCH 043/144] Do not search node bower and dist folder with ctrl-p --- vimrc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/vimrc b/vimrc index 43873ab5c7..089b04ef95 100644 --- a/vimrc +++ b/vimrc @@ -61,6 +61,10 @@ Plugin 'bling/vim-airline' " UI statusbar niceties let g:airline_paste_symbol = '∥' let g:airline#extensions#tabline#enabled = 0 +" Ctrl-p configurations +let g:ctrlp_custom_ignore = { + \ 'dir': '\v(node_modules|bower_components|dist)' + \ } " Colors Plugin 'nanotech/jellybeans.vim' From ba4b3d2b4fa76d23a7cb73d0ace08b2e805a0f49 Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Wed, 11 Feb 2015 10:57:23 +0100 Subject: [PATCH 044/144] Display line at 80 chars --- vimrc | 1 + 1 file changed, 1 insertion(+) diff --git a/vimrc b/vimrc index 089b04ef95..998df59d83 100644 --- a/vimrc +++ b/vimrc @@ -90,6 +90,7 @@ set nohlsearch " Stop highlihgt search after something -... set backupdir=~/.tmp set directory=~/.tmp set timeoutlen=500 " Less leader timeout +set cc=80 " Display line at 80 chars " Don't add the comment prefix when I hit enter or o/O on a comment line. set formatoptions-=or From 023b32e4473b950973f5665a066da6d1a0fabb10 Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Wed, 11 Feb 2015 10:57:36 +0100 Subject: [PATCH 045/144] Ignore stuff when searching --- vimrc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vimrc b/vimrc index 998df59d83..c7baace86a 100644 --- a/vimrc +++ b/vimrc @@ -94,6 +94,8 @@ set cc=80 " Display line at 80 chars " Don't add the comment prefix when I hit enter or o/O on a comment line. set formatoptions-=or +set wildignore+=*/tmp/*,*.so,*.swp,*.zip + " Readable highlight text :highlight PmenuSel ctermfg=black From 45ab8188a2366ff18bed09f617909fbccca54b97 Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Wed, 11 Feb 2015 10:57:50 +0100 Subject: [PATCH 046/144] Use vimgrep --- vimrc | 1 + 1 file changed, 1 insertion(+) diff --git a/vimrc b/vimrc index c7baace86a..7a9fa3e2e9 100644 --- a/vimrc +++ b/vimrc @@ -105,6 +105,7 @@ highlight SignColumn ctermbg=black " Use Silver Searcher for 'grepping' set grepprg=ag +let g:ackprg = 'ag --vimgrep' set list listchars=tab:»·,trail:· syntax on " syntax highlighting From d44cb2146c25137c7815392a500cabfec7bb3143 Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Wed, 25 Mar 2015 14:13:36 +0100 Subject: [PATCH 047/144] Rubocop --- vimrc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/vimrc b/vimrc index 7a9fa3e2e9..8da9811527 100644 --- a/vimrc +++ b/vimrc @@ -22,6 +22,7 @@ Plugin 'kien/ctrlp.vim' Plugin 'kongo2002/fsharp-vim' Plugin 'kchmck/vim-coffee-script' Plugin 'mustache/vim-mustache-handlebars' +Plugin 'ngmy/vim-rubocop' " Ben Orenstein plugins " Plugin 'kchmck/vim-coffee-script' " Plugin 'skwp/greplace.vim' @@ -174,6 +175,10 @@ map c i_r imap $ imap ^ +" Rubocop +let g:vimrubocop_keymap = 0 +map rc :RuboCop + """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Strip Trailing Whitespaces (from VimCast.org) From 0dcc5b1185b8ff58be2c2484e4d7049a493363e8 Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Wed, 25 Mar 2015 14:13:49 +0100 Subject: [PATCH 048/144] Make ctrl p ignore folders --- vimrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vimrc b/vimrc index 8da9811527..cca312f1ad 100644 --- a/vimrc +++ b/vimrc @@ -64,7 +64,7 @@ Plugin 'bling/vim-airline' " UI statusbar niceties " Ctrl-p configurations let g:ctrlp_custom_ignore = { - \ 'dir': '\v(node_modules|bower_components|dist)' + \ 'dir': '\v(node_modules|bower_components|dist|deps|_build)' \ } " Colors Plugin 'nanotech/jellybeans.vim' From b6c7e68d1a0501228fe2978f8e811edf975d3a2d Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Wed, 25 Mar 2015 14:13:59 +0100 Subject: [PATCH 049/144] Better completion somehow --- vimrc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vimrc b/vimrc index cca312f1ad..433ee64135 100644 --- a/vimrc +++ b/vimrc @@ -124,7 +124,8 @@ autocmd BufNewFile,BufReadPost *.md set filetype=markdown " au BufRead,BufNewFile *.fsx set filetype=fs " Read upon: -set cc=80 " Show ruler at 80 character column +" Better? completion on command line +set wildmenu " What to do when I press 'wildchar'. Worth tweaking to see what feels right. set wildmode=list:full set nowrap From 5c0bd552f572b7778260ffb0bfed5eebe87fd1a1 Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Wed, 25 Mar 2015 14:14:07 +0100 Subject: [PATCH 050/144] Command for running elixir tests --- vimrc | 1 + 1 file changed, 1 insertion(+) diff --git a/vimrc b/vimrc index 433ee64135..a4a3192c5e 100644 --- a/vimrc +++ b/vimrc @@ -162,6 +162,7 @@ map sv :source .vimrc map d orequire 'pry'binding.pry:w map ra :%s/ map rd :!bundle exec rspec % --format documentation +map mt :!mix test % map rf :CommandTFlush:CommandT map rw :%s/\s\+$//:w map :NERDTreeToggle From 9e3fee61b98af24d51f7f0fcf2bff118cce18781 Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Wed, 25 Mar 2015 14:14:26 +0100 Subject: [PATCH 051/144] Stt fixes tabs/spaces --- vimrc | 1 + 1 file changed, 1 insertion(+) diff --git a/vimrc b/vimrc index a4a3192c5e..a65746a6fd 100644 --- a/vimrc +++ b/vimrc @@ -172,6 +172,7 @@ map e :e =escape(expand("%:p:h"),' ') . '/' map s :split =escape(expand("%:p:h"), ' ') . '/' map v :vnew =escape(expand("%:p:h"), ' ') . '/' map c i_r +map stt :%retab! " Beginning and end of files as in terminal imap $ From b218f1fef1bc0d59a01d1316a96ccccff6a0c4b8 Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Wed, 25 Mar 2015 14:14:37 +0100 Subject: [PATCH 052/144] Some helpful aliases --- zsh/aliases | 38 ++++++++++++++++++++++++++++++-------- 1 file changed, 30 insertions(+), 8 deletions(-) diff --git a/zsh/aliases b/zsh/aliases index 8410c7303e..f9e2206093 100644 --- a/zsh/aliases +++ b/zsh/aliases @@ -1,15 +1,9 @@ # Handle the fact that this file will be used with multiple OSs alias amend="git commit --amend" alias aliases='vim ~/.dotfiles/zsh/aliases' -alias bake='bundle exec rake' -alias be='bundle exec' -alias bu='bundle update' alias code='cd ~/code' alias d='cd ~/.dotfiles' alias drop='cd ~/Dropbox' -alias gad='git add --all .' -alias gcm="git commit -m" -alias gco='git checkout' alias gd='git diff' alias gdc='git diff --cached' alias gdm='git diff master' @@ -19,19 +13,40 @@ alias startpostgres='pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgre alias startredis='redis-server /usr/local/etc/redis.conf &' alias stoppostgres='pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log stop' alias sync='git add -u . && git commit -m "Minor changes. Commit message skipped." && gpo' -alias tail-logs='heroku logs -t' alias undeployed='git fetch --multiple production origin && git log production/master..origin/master' alias v='vim' alias vi='vim' +alias gemconsole="irb -rubygems -I lib -r ${PWD##*/}.rb" + +# Bundler +alias bake='bundle exec rake' +alias be='bundle exec' +alias bu='bundle update' +alias bus='bundle update --source=' + +# Boot2docker +alias b2d='boot2docker' +# Heroku +alias hlogs='heroku logs -t' # Git alias gp="git add . -p" alias gn="git add . -N" -alias gaa="git add . -A" +alias gf="git commit --fixup" +alias gad='git add --all .' alias tmp="git add . -A && git commit -m 'TMP'" alias wip="git add . -A && git commit -m 'WIP'" +alias gcall="git add . -A && git commit -m" alias gpo="git push origin master" +alias glo="git pull origin master" alias gpu="git push upstream master" +alias glu="git pull upstream master" +alias gcm="git commit -m" +alias gco='git checkout' +alias gcom='git co master' +alias gca="git commit --amend" +alias gcon='git checkout -b' +alias grm="git ri master" # Fsharp alias cwhile="fslex Lexer.fsl && fsyacc --module Parser Parser.fsy" @@ -40,3 +55,10 @@ alias fswhile="cwhile && whilerun" # Rails alias devlog="tail -f log/development.log" +alias rc="rails c" + +# Pow +alias pr="powder -r" + +# Ember +alias es="ember serve" From b2ae454a151f2cfea73cfab34744aca86c9f8f7d Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Wed, 25 Mar 2015 14:15:12 +0100 Subject: [PATCH 053/144] Docker creds --- zshrc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/zshrc b/zshrc index 661b2ec31e..f50b5fbb39 100644 --- a/zshrc +++ b/zshrc @@ -30,6 +30,9 @@ export PATH=$HOME/bin:$HOME/.dotfiles/bin:/usr/local/bin:$PATH # Loklaebase stuff export PATH=$HOME/code/lb/bin:$PATH +export DOCKER_HOST=tcp://192.168.59.103:2376 +export DOCKER_CERT_PATH=/Users/anderslime/.boot2docker/certs/boot2docker-vm +export DOCKER_TLS_VERIFY=1 # You may need to manually set your language environment export LANG=en_US.UTF-8 From 5b4f4a07304119398306f274166c383b04623a43 Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Wed, 25 Mar 2015 14:15:30 +0100 Subject: [PATCH 054/144] Source credentials --- zshrc | 1 + 1 file changed, 1 insertion(+) diff --git a/zshrc b/zshrc index f50b5fbb39..417332b79c 100644 --- a/zshrc +++ b/zshrc @@ -39,5 +39,6 @@ export LANG=en_US.UTF-8 export EDITOR='vim' source /Users/anderslime/.dotfiles/zsh/aliases +source /Users/anderslime/.dotfiles/zsh/credentials # source /Users/anderslime/.dotfiles/zsh/prompt alias gs="git status" From f7cc76ee751d6725472115f87f27eef88a9a37dd Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Wed, 25 Mar 2015 14:15:58 +0100 Subject: [PATCH 055/144] Do not push credentials --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 018078aae3..806af5e6da 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ vim/.netrwhist vim/bundle vim/doc/tags-ja +zsh/credentials From b3e0ffa8d7d627d61276fbc48e45f237d7366e65 Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Thu, 26 Mar 2015 11:04:58 +0100 Subject: [PATCH 056/144] Tmux completion --- bin/tmuxinator.zsh | 30 ++++++++++++++++++++++++++++++ zshrc | 1 + 2 files changed, 31 insertions(+) create mode 100644 bin/tmuxinator.zsh diff --git a/bin/tmuxinator.zsh b/bin/tmuxinator.zsh new file mode 100644 index 0000000000..4c76c94a8c --- /dev/null +++ b/bin/tmuxinator.zsh @@ -0,0 +1,30 @@ +#compdef tmuxinator mux + +_tmuxinator() { + local commands projects + commands=(${(f)"$(tmuxinator commands zsh)"}) + projects=(${(f)"$(tmuxinator completions start)"}) + + if (( CURRENT == 2 )); then + _describe -t commands "tmuxinator subcommands" commands + _describe -t projects "tmuxinator projects" projects + elif (( CURRENT == 3)); then + case $words[2] in + copy|debug|delete|open|start) + _arguments '*:projects:($projects)' + ;; + esac + fi + + return +} + +_tmuxinator + +# Local Variables: +# mode: Shell-Script +# sh-indentation: 2 +# indent-tabs-mode: nil +# sh-basic-offset: 2 +# End: +# vim: ft=zsh sw=2 ts=2 et diff --git a/zshrc b/zshrc index 417332b79c..a463e3e626 100644 --- a/zshrc +++ b/zshrc @@ -41,4 +41,5 @@ export EDITOR='vim' source /Users/anderslime/.dotfiles/zsh/aliases source /Users/anderslime/.dotfiles/zsh/credentials # source /Users/anderslime/.dotfiles/zsh/prompt +source ~/.bin/tmuxinator.zsh alias gs="git status" From c579067911be4ec739001a20463f0d81c15bcb20 Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Tue, 14 Apr 2015 20:31:02 +0200 Subject: [PATCH 057/144] Align tabs --- vimrc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/vimrc b/vimrc index a65746a6fd..21868db0e6 100644 --- a/vimrc +++ b/vimrc @@ -23,6 +23,7 @@ Plugin 'kongo2002/fsharp-vim' Plugin 'kchmck/vim-coffee-script' Plugin 'mustache/vim-mustache-handlebars' Plugin 'ngmy/vim-rubocop' +Plugin 'godlygeek/tabular' " Ben Orenstein plugins " Plugin 'kchmck/vim-coffee-script' " Plugin 'skwp/greplace.vim' @@ -182,6 +183,12 @@ imap ^ let g:vimrubocop_keymap = 0 map rc :RuboCop +" Tabularize +nmap a= :Tabularize /= +vmap a= :Tabularize /= +" nmap a: :Tabularize /:\zs +" vmap a: :Tabularize /:\zs + """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Strip Trailing Whitespaces (from VimCast.org) From bc9a1589c7e265d78cea630ca973560740269b23 Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Tue, 14 Apr 2015 20:31:10 +0200 Subject: [PATCH 058/144] Tmux stuff --- zsh/aliases | 5 +++++ zshrc | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/zsh/aliases b/zsh/aliases index f9e2206093..6bdd423455 100644 --- a/zsh/aliases +++ b/zsh/aliases @@ -62,3 +62,8 @@ alias pr="powder -r" # Ember alias es="ember serve" + +# Tmux +alias ts="tmux list-sessions" +alias ta="tmux attach -t" +alias tkill="tmux kill-session -t" diff --git a/zshrc b/zshrc index a463e3e626..45698ebe60 100644 --- a/zshrc +++ b/zshrc @@ -41,5 +41,5 @@ export EDITOR='vim' source /Users/anderslime/.dotfiles/zsh/aliases source /Users/anderslime/.dotfiles/zsh/credentials # source /Users/anderslime/.dotfiles/zsh/prompt -source ~/.bin/tmuxinator.zsh +# source ~/.bin/tmuxinator.zsh alias gs="git status" From 656db9ece2e24d148492c4c2581a78280edd0617 Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Tue, 14 Apr 2015 20:31:34 +0200 Subject: [PATCH 059/144] Ignore bitbucket config --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 806af5e6da..a4d4509014 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ vim/.netrwhist vim/bundle vim/doc/tags-ja zsh/credentials +.bitbucket From d01cce4a554cf14d52c2a398bb37805c3a047be6 Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Tue, 19 May 2015 16:50:46 +0200 Subject: [PATCH 060/144] Alignment and heroku --- vimrc | 1 + zsh/aliases | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/vimrc b/vimrc index 21868db0e6..9c62e0f9aa 100644 --- a/vimrc +++ b/vimrc @@ -38,6 +38,7 @@ Plugin 'godlygeek/tabular' Plugin 'tpope/vim-surround' Plugin 'tpope/vim-fugitive' Plugin 'slim-template/vim-slim' +Plugin 'rizzatti/dash.vim' " Plugin 'tpope/vim-unimpaired' " nelstrom's plugin depends on kana's diff --git a/zsh/aliases b/zsh/aliases index 6bdd423455..b1bf606847 100644 --- a/zsh/aliases +++ b/zsh/aliases @@ -63,6 +63,11 @@ alias pr="powder -r" # Ember alias es="ember serve" +# Heroku +alias hd="git push origin master && git push heroku master" +alias hdr="hd && heroku run rake db:migrate" +alias hdr="hd && rake db:migrate" + # Tmux alias ts="tmux list-sessions" alias ta="tmux attach -t" From 43179984a0343df07f43ad117dca8aa2b85da90e Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Sat, 22 Aug 2015 09:00:38 +0200 Subject: [PATCH 061/144] Updated tmux config --- tmux.conf | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/tmux.conf b/tmux.conf index c373dc2a1c..937839f9e2 100644 --- a/tmux.conf +++ b/tmux.conf @@ -6,13 +6,13 @@ set -g default-terminal "screen-256color" # increase scroll-back history -set -g history-limit 5000 +set -g history-limit 15000 # use vim key bindings setw -g mode-keys vi # disable mouse -setw -g mode-mouse off +setw -g mode-mouse on # decrease command delay (increases vim responsiveness) set -sg escape-time 1 @@ -23,19 +23,27 @@ set -g repeat-time 1000 # re-number windows when one is closed set -g renumber-windows on +# Start window numbering at 1 +set -g base-index 1 + ########################### # Key Bindings ########################### # tmux prefix +# Use the backtix ` +# Type backtix twice to type the actual character unbind C-b -set -g prefix C-a +set -g prefix ` +bind ` send-prefix + +bind-key L last-window -# resize panes -bind -r H resize-pane -L 5 -bind -r J resize-pane -D 5 -bind -r K resize-pane -U 5 -bind -r L resize-pane -R 5 +# Move around panes in VIM style +bind h select-pane -L +bind j select-pane -D +bind k select-pane -U +bind l select-pane -R # force a reload of the config kile unbind r @@ -58,6 +66,7 @@ set -g status-interval 30 # center the status bar set -g status-justify left +set -g status-right "%m-%d-%Y %H-%M #(whoami)" ########################### # Colors From a14cee01bd256394447ef0d4cc9aa3599f42ae1f Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Sat, 22 Aug 2015 09:00:45 +0200 Subject: [PATCH 062/144] Use vim-rails --- vimrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vimrc b/vimrc index 9c62e0f9aa..6de342af8c 100644 --- a/vimrc +++ b/vimrc @@ -32,7 +32,7 @@ Plugin 'godlygeek/tabular' " Plugin 'tpope/vim-dispatch' " Plugin 'tpope/vim-endwise' " Plugin 'tpope/vim-fugitive' -" Plugin 'tpope/vim-rails' +Plugin 'tpope/vim-rails' " Plugin 'tpope/vim-commentary' " Plugin 'tpope/vim-repeat' Plugin 'tpope/vim-surround' From 54f33ac45e322c0c47640c9828a982b0bde88e06 Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Sat, 22 Aug 2015 09:01:11 +0200 Subject: [PATCH 063/144] Som new aliases and travis --- zsh/aliases | 17 ++++++++++++++--- zshrc | 6 ++++-- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/zsh/aliases b/zsh/aliases index b1bf606847..8a9aaabe44 100644 --- a/zsh/aliases +++ b/zsh/aliases @@ -26,10 +26,9 @@ alias bus='bundle update --source=' # Boot2docker alias b2d='boot2docker' -# Heroku -alias hlogs='heroku logs -t' # Git +alias gs="git status" alias gp="git add . -p" alias gn="git add . -N" alias gf="git commit --fixup" @@ -62,13 +61,25 @@ alias pr="powder -r" # Ember alias es="ember serve" +alias ges="ember server --proxy http://goodiepack.dev" # Heroku -alias hd="git push origin master && git push heroku master" +alias gphm="git push heroku master" +alias hd="git push origin master && gphm" alias hdr="hd && heroku run rake db:migrate" alias hdr="hd && rake db:migrate" +alias hlogs='heroku logs -t' # Tmux alias ts="tmux list-sessions" alias ta="tmux attach -t" alias tkill="tmux kill-session -t" + +# Misc +alias uuid="uuidgen | tr '[:upper:]' '[:lower:]'" +alias cuuid="uuid | pbcopy" + +# Latex +alias lx="pdflatex" +alias lxr="lx report && open report.pdf" +alias lxbr="lx report && bibtex report && lx report && lx report && open report.pdf" diff --git a/zshrc b/zshrc index 45698ebe60..af78dbc8b8 100644 --- a/zshrc +++ b/zshrc @@ -26,7 +26,7 @@ alias fsyacc="mono ~/code/FSharpPowerPack-4.0.0.0/bin/fsyacc.exe" source $ZSH/oh-my-zsh.sh # PATH -export PATH=$HOME/bin:$HOME/.dotfiles/bin:/usr/local/bin:$PATH +export PATH=$HOME/bin:$HOME/.dotfiles/bin:/usr/local/bin:/usr/local/sbin:$PATH # Loklaebase stuff export PATH=$HOME/code/lb/bin:$PATH @@ -42,4 +42,6 @@ source /Users/anderslime/.dotfiles/zsh/aliases source /Users/anderslime/.dotfiles/zsh/credentials # source /Users/anderslime/.dotfiles/zsh/prompt # source ~/.bin/tmuxinator.zsh -alias gs="git status" + +# added by travis gem +[ -f /Users/anderslime/.travis/travis.sh ] && source /Users/anderslime/.travis/travis.sh From a84d74579bc7a4f74bc3c74b6cb9b260aa1b621e Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Sat, 22 Aug 2015 09:58:00 +0200 Subject: [PATCH 064/144] Update airline to new version --- vimrc | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/vimrc b/vimrc index 6de342af8c..5fdce2861c 100644 --- a/vimrc +++ b/vimrc @@ -47,22 +47,20 @@ Plugin 'nelstrom/vim-textobj-rubyblock' " UI Plugins Plugin 'bling/vim-airline' " UI statusbar niceties - set laststatus=2 " enable airline even if no splits - let g:airline_theme='luna' - let g:airline_powerline_fonts=1 - let g:airline_enable_branch=1 - let g:airline_enable_syntastic=1 - let g:airline_powerline_fonts = 1 - let g:airline_left_sep = '' - let g:airline_right_sep = '' - let g:airline_linecolumn_prefix = '␊ ' - let g:airline_linecolumn_prefix = '␤ ' - let g:airline_linecolumn_prefix = '¶ ' - let g:airline_branch_prefix = '⎇ ' - let g:airline_paste_symbol = 'ρ' - let g:airline_paste_symbol = 'Þ' - let g:airline_paste_symbol = '∥' - let g:airline#extensions#tabline#enabled = 0 +set laststatus=2 " enable airline even if no splits +let g:airline_theme='luna' +let g:airline_powerline_fonts=1 +let g:airline_powerline_fonts = 1 +let g:airline_left_sep = '' +let g:airline_right_sep = '' +let g:airline_symbols = { + \ 'branch': '⎇ ', + \ 'linenr': '¶ ', + \ 'paste': 'ρ' + \ } +let g:airline#extensions#tabline#enabled = 1 +let g:airline#extensions#syntastic#enabled = 1 +let g:airline#branch#enabled = 1 " Ctrl-p configurations let g:ctrlp_custom_ignore = { From b433bac1e4eb23a51bf44ae4d0ab01872467fb50 Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Tue, 6 Oct 2015 10:52:09 +0200 Subject: [PATCH 065/144] Stuff --- gitignore | 1 + tmux.conf | 13 +++++++++++++ vimrc | 1 + zsh/aliases | 6 ++++++ zsh/functions | 5 +++++ zshrc | 1 + 6 files changed, 27 insertions(+) diff --git a/gitignore b/gitignore index 06f7b694b0..cd781d1564 100644 --- a/gitignore +++ b/gitignore @@ -8,3 +8,4 @@ db/*.sqlite3 project-notes.txt .ruby-gemset .vimrc +Guardfile diff --git a/tmux.conf b/tmux.conf index 937839f9e2..ec7adc3295 100644 --- a/tmux.conf +++ b/tmux.conf @@ -68,6 +68,19 @@ set -g status-interval 30 set -g status-justify left set -g status-right "%m-%d-%Y %H-%M #(whoami)" +########################### +# Copying +########################### +set-option -g status-key vi +set-window-option -g mode-keys vi + +bind-key -t vi-copy v begin-selection +bind-key -t vi-copy y copy-pipe "reattach-to-user-namespace pbcopy" + +# Update default binding of `Enter` to also use copy-pipe +unbind -t vi-copy Enter +bind-key -t vi-copy Enter copy-pipe "reattach-to-user-namespace pbcopy" + ########################### # Colors ########################### diff --git a/vimrc b/vimrc index 5fdce2861c..7b14814ea9 100644 --- a/vimrc +++ b/vimrc @@ -122,6 +122,7 @@ autocmd BufNewFile,BufReadPost *.md set filetype=markdown " Set FSharp Filetype " au BufRead,BufNewFile *.fs set filetype=fs " au BufRead,BufNewFile *.fsx set filetype=fs +au BufRead,BufNewFile *.skim setfiletype slim " Read upon: " Better? completion on command line diff --git a/zsh/aliases b/zsh/aliases index 8a9aaabe44..dd3be4b483 100644 --- a/zsh/aliases +++ b/zsh/aliases @@ -27,6 +27,11 @@ alias bus='bundle update --source=' # Boot2docker alias b2d='boot2docker' +# Tmux/mux +alias tmk="tmux kill-session -t" +alias tma="tmux attach -t" +alias tms="mux start" + # Git alias gs="git status" alias gp="git add . -p" @@ -46,6 +51,7 @@ alias gcom='git co master' alias gca="git commit --amend" alias gcon='git checkout -b' alias grm="git ri master" +alias gitres="git add . -A && git rebase --continue" # Fsharp alias cwhile="fslex Lexer.fsl && fsyacc --module Parser Parser.fsy" diff --git a/zsh/functions b/zsh/functions index a026050fcb..b2bc6508fb 100644 --- a/zsh/functions +++ b/zsh/functions @@ -56,3 +56,8 @@ function gem_from_path { powder -r # Restart pow } alias gfp=gem_from_path + +function note { + vim ~/notes/$1.txt +} +alias en=note diff --git a/zshrc b/zshrc index af78dbc8b8..5c0e453acf 100644 --- a/zshrc +++ b/zshrc @@ -39,6 +39,7 @@ export LANG=en_US.UTF-8 export EDITOR='vim' source /Users/anderslime/.dotfiles/zsh/aliases +source /Users/anderslime/.dotfiles/zsh/functions source /Users/anderslime/.dotfiles/zsh/credentials # source /Users/anderslime/.dotfiles/zsh/prompt # source ~/.bin/tmuxinator.zsh From 3c1164b95a9824dfab0db47a2c53c563907f6a94 Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Mon, 9 Nov 2015 11:06:57 +0100 Subject: [PATCH 066/144] Much new stuff --- gitignore | 1 + vimrc | 23 +++++++++++++++++------ zsh/aliases | 16 +++++++++++++--- zsh/functions | 4 ++++ zshrc | 3 +++ 5 files changed, 38 insertions(+), 9 deletions(-) diff --git a/gitignore b/gitignore index cd781d1564..44a1aad24c 100644 --- a/gitignore +++ b/gitignore @@ -9,3 +9,4 @@ project-notes.txt .ruby-gemset .vimrc Guardfile +.powenv diff --git a/vimrc b/vimrc index 7b14814ea9..9c842e9253 100644 --- a/vimrc +++ b/vimrc @@ -24,6 +24,7 @@ Plugin 'kchmck/vim-coffee-script' Plugin 'mustache/vim-mustache-handlebars' Plugin 'ngmy/vim-rubocop' Plugin 'godlygeek/tabular' +Plugin 'ecomba/vim-ruby-refactoring' " Ben Orenstein plugins " Plugin 'kchmck/vim-coffee-script' " Plugin 'skwp/greplace.vim' @@ -39,6 +40,7 @@ Plugin 'tpope/vim-surround' Plugin 'tpope/vim-fugitive' Plugin 'slim-template/vim-slim' Plugin 'rizzatti/dash.vim' +Plugin 'geoffharcourt/vim-matchit' " Plugin 'tpope/vim-unimpaired' " nelstrom's plugin depends on kana's @@ -53,11 +55,6 @@ let g:airline_powerline_fonts=1 let g:airline_powerline_fonts = 1 let g:airline_left_sep = '' let g:airline_right_sep = '' -let g:airline_symbols = { - \ 'branch': '⎇ ', - \ 'linenr': '¶ ', - \ 'paste': 'ρ' - \ } let g:airline#extensions#tabline#enabled = 1 let g:airline#extensions#syntastic#enabled = 1 let g:airline#branch#enabled = 1 @@ -72,6 +69,7 @@ Plugin 'nanotech/jellybeans.vim' " All of your Plugins must be added before the following line call vundle#end() " required filetype plugin indent on " required +filetype plugin on " Use the colorscheme from above colorscheme jellybeans @@ -159,13 +157,15 @@ vmap b :!git blame =expand("%:p") \| sed -n =line("' map bb :!bundle install nmap bi :source ~/.vimrc:PluginInstall map st :source % -map sv :source .vimrc +map sv :source ~/.vimrc map d orequire 'pry'binding.pry:w map ra :%s/ map rd :!bundle exec rspec % --format documentation map mt :!mix test % +map np :set nopaste :retab map rf :CommandTFlush:CommandT map rw :%s/\s\+$//:w +map :%s/\s\+$//:w map :NERDTreeToggle " Edit another file in the same directory as the current file " uses expression to extract path from current file's path @@ -179,6 +179,17 @@ map stt :%retab! imap $ imap ^ +" Ruby refactoring +nnoremap rap :RAddParameter +nnoremap rcpc :RConvertPostConditional +nnoremap rel :RExtractLet +vnoremap rec :RExtractConstant +vnoremap relv :RExtractLocalVariable +nnoremap rit :RInlineTemp +vnoremap rrlv :RRenameLocalVariable +vnoremap rriv :RRenameInstanceVariable +vnoremap rem :RExtractMethod + " Rubocop let g:vimrubocop_keymap = 0 map rc :RuboCop diff --git a/zsh/aliases b/zsh/aliases index dd3be4b483..5502515a66 100644 --- a/zsh/aliases +++ b/zsh/aliases @@ -24,14 +24,22 @@ alias be='bundle exec' alias bu='bundle update' alias bus='bundle update --source=' -# Boot2docker -alias b2d='boot2docker' +# Docker +alias dc='docker-compose' # Tmux/mux alias tmk="tmux kill-session -t" alias tma="tmux attach -t" alias tms="mux start" +## Tmux GoodiePack +alias msg="tms goodiepack" +alias msgo="tms goodiepack-organization" +alias msgs="tms goodiepack_showroom" +alias ksg="tmk goodiepack" +alias ksgo="tmk goodiepack-organization" +alias ksgs="tmk goodiepack_showroom" + # Git alias gs="git status" alias gp="git add . -p" @@ -70,11 +78,13 @@ alias es="ember serve" alias ges="ember server --proxy http://goodiepack.dev" # Heroku -alias gphm="git push heroku master" +alias gphm="git push production master && hp rake db:migrate" alias hd="git push origin master && gphm" alias hdr="hd && heroku run rake db:migrate" alias hdr="hd && rake db:migrate" alias hlogs='heroku logs -t' +alias hs="h staging" +alias hp="h production" # Tmux alias ts="tmux list-sessions" diff --git a/zsh/functions b/zsh/functions index b2bc6508fb..3481e6645d 100644 --- a/zsh/functions +++ b/zsh/functions @@ -61,3 +61,7 @@ function note { vim ~/notes/$1.txt } alias en=note + +function h { + heroku $2 --remote=$1 ${@:3} +} diff --git a/zshrc b/zshrc index 5c0e453acf..9f3d6dd250 100644 --- a/zshrc +++ b/zshrc @@ -34,6 +34,9 @@ export DOCKER_HOST=tcp://192.168.59.103:2376 export DOCKER_CERT_PATH=/Users/anderslime/.boot2docker/certs/boot2docker-vm export DOCKER_TLS_VERIFY=1 +# Section CLI +export PATH=$HOME/code/section.cli:$PATH + # You may need to manually set your language environment export LANG=en_US.UTF-8 export EDITOR='vim' From fb50fd47ed0ff8172271db63c055e600f23e89df Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Fri, 4 Dec 2015 11:28:22 +0100 Subject: [PATCH 067/144] Fixed mouse scroll in tmux for new tmux version gs --- tmux.conf | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tmux.conf b/tmux.conf index ec7adc3295..7fa009ce73 100644 --- a/tmux.conf +++ b/tmux.conf @@ -12,7 +12,10 @@ set -g history-limit 15000 setw -g mode-keys vi # disable mouse -setw -g mode-mouse on +set -g mouse-utf8 on +set -g mouse on +bind -n WheelUpPane select-pane -t= \; copy-mode -e \; send-keys -M +bind -n WheelDownPane select-pane -t= \; send-keys -M # decrease command delay (increases vim responsiveness) set -sg escape-time 1 From 77eb472729d6c85e5fce2bd92904884d27177b97 Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Fri, 4 Dec 2015 11:28:30 +0100 Subject: [PATCH 068/144] Remove comments from old plugins --- vimrc | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/vimrc b/vimrc index 9c842e9253..c834e7c1c7 100644 --- a/vimrc +++ b/vimrc @@ -25,23 +25,12 @@ Plugin 'mustache/vim-mustache-handlebars' Plugin 'ngmy/vim-rubocop' Plugin 'godlygeek/tabular' Plugin 'ecomba/vim-ruby-refactoring' -" Ben Orenstein plugins -" Plugin 'kchmck/vim-coffee-script' -" Plugin 'skwp/greplace.vim' -" Plugin 'tpope/vim-bundler' -" Plugin 'tpope/vim-cucumber' -" Plugin 'tpope/vim-dispatch' -" Plugin 'tpope/vim-endwise' -" Plugin 'tpope/vim-fugitive' Plugin 'tpope/vim-rails' -" Plugin 'tpope/vim-commentary' -" Plugin 'tpope/vim-repeat' Plugin 'tpope/vim-surround' Plugin 'tpope/vim-fugitive' Plugin 'slim-template/vim-slim' Plugin 'rizzatti/dash.vim' Plugin 'geoffharcourt/vim-matchit' -" Plugin 'tpope/vim-unimpaired' " nelstrom's plugin depends on kana's Plugin 'kana/vim-textobj-user' From 991f25ed0e0b88034e6d73dfdc7503cde882b121 Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Fri, 4 Dec 2015 11:28:43 +0100 Subject: [PATCH 069/144] New heroku aliases --- zsh/aliases | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/zsh/aliases b/zsh/aliases index 5502515a66..98d0c2e797 100644 --- a/zsh/aliases +++ b/zsh/aliases @@ -78,10 +78,10 @@ alias es="ember serve" alias ges="ember server --proxy http://goodiepack.dev" # Heroku -alias gphm="git push production master && hp rake db:migrate" -alias hd="git push origin master && gphm" -alias hdr="hd && heroku run rake db:migrate" -alias hdr="hd && rake db:migrate" +alias gpp="git push production master && hp rake db:migrate" +alias gps="git push staging master && hs rake db:migrate" +alias hdp="git push origin master && gpp" +alias hds="git push origin master && gps" alias hlogs='heroku logs -t' alias hs="h staging" alias hp="h production" From c90744e70a517bdf735e6c736f4ed936b09169a3 Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Fri, 4 Dec 2015 11:28:57 +0100 Subject: [PATCH 070/144] Node version manager initialization --- zshrc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/zshrc b/zshrc index 9f3d6dd250..f4fb1146ac 100644 --- a/zshrc +++ b/zshrc @@ -22,6 +22,10 @@ export MONO_GAC_PREFIX="/usr/local" alias fslex="mono ~/code/FSharpPowerPack-4.0.0.0/bin/fslex.exe" alias fsyacc="mono ~/code/FSharpPowerPack-4.0.0.0/bin/fsyacc.exe" +# Node Version Manager +export NVM_DIR=~/.nvm +source $(brew --prefix nvm)/nvm.sh + # Load oh my zsh source $ZSH/oh-my-zsh.sh From dfece564ab736409ede2e9c902e83276463abcb1 Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Sat, 2 Apr 2016 11:25:31 +0200 Subject: [PATCH 071/144] Make it possible to use notifications inside tmux --- tmux.conf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tmux.conf b/tmux.conf index 7fa009ce73..0f0f31e134 100644 --- a/tmux.conf +++ b/tmux.conf @@ -29,6 +29,10 @@ set -g renumber-windows on # Start window numbering at 1 set -g base-index 1 +# This is to make some commands (such as terminal-notifier) to work inside tmux +# https://github.com/julienXX/terminal-notifier/issues/115#issuecomment-104214742 +set -g default-command "which reattach-to-user-namespace > /dev/null && reattach-to-user-namespace -l $SHELL || $SHELL -l" + ########################### # Key Bindings ########################### From 328cd222465d974d05472d68d6d383ad849c61e9 Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Sat, 2 Apr 2016 11:25:38 +0200 Subject: [PATCH 072/144] Cleanup snippets --- vim/plugin/snipMate.vim | 271 ----------------- vim/snippets/_.snippets | 9 - vim/snippets/autoit.snippets | 66 ----- vim/snippets/c.snippets | 113 ------- vim/snippets/cpp.snippets | 34 --- vim/snippets/erlang.snippets | 39 --- vim/snippets/eruby.snippets | 12 - vim/snippets/html.snippets | 190 ------------ vim/snippets/java.snippets | 95 ------ vim/snippets/javascript.snippets | 74 ----- vim/snippets/mako.snippets | 54 ---- vim/snippets/objc.snippets | 247 ---------------- vim/snippets/perl.snippets | 97 ------ vim/snippets/php.snippets | 216 -------------- vim/snippets/python.snippets | 86 ------ vim/snippets/ruby.snippets | 490 ------------------------------- vim/snippets/sh.snippets | 28 -- vim/snippets/snippet.snippets | 7 - vim/snippets/tcl.snippets | 92 ------ vim/snippets/tex.snippets | 115 -------- vim/snippets/vim.snippets | 32 -- vim/snippets/zsh.snippets | 58 ---- 22 files changed, 2425 deletions(-) delete mode 100644 vim/plugin/snipMate.vim delete mode 100644 vim/snippets/_.snippets delete mode 100644 vim/snippets/autoit.snippets delete mode 100644 vim/snippets/c.snippets delete mode 100644 vim/snippets/cpp.snippets delete mode 100644 vim/snippets/erlang.snippets delete mode 100644 vim/snippets/eruby.snippets delete mode 100644 vim/snippets/html.snippets delete mode 100644 vim/snippets/java.snippets delete mode 100644 vim/snippets/javascript.snippets delete mode 100644 vim/snippets/mako.snippets delete mode 100644 vim/snippets/objc.snippets delete mode 100644 vim/snippets/perl.snippets delete mode 100644 vim/snippets/php.snippets delete mode 100644 vim/snippets/python.snippets delete mode 100644 vim/snippets/ruby.snippets delete mode 100644 vim/snippets/sh.snippets delete mode 100644 vim/snippets/snippet.snippets delete mode 100644 vim/snippets/tcl.snippets delete mode 100644 vim/snippets/tex.snippets delete mode 100644 vim/snippets/vim.snippets delete mode 100644 vim/snippets/zsh.snippets diff --git a/vim/plugin/snipMate.vim b/vim/plugin/snipMate.vim deleted file mode 100644 index ef03b12b58..0000000000 --- a/vim/plugin/snipMate.vim +++ /dev/null @@ -1,271 +0,0 @@ -" File: snipMate.vim -" Author: Michael Sanders -" Version: 0.84 -" Description: snipMate.vim implements some of TextMate's snippets features in -" Vim. A snippet is a piece of often-typed text that you can -" insert into your document using a trigger word followed by a "". -" -" For more help see snipMate.txt; you can do this by using: -" :helptags ~/.vim/doc -" :h snipMate.txt - -if exists('loaded_snips') || &cp || version < 700 - finish -endif -let loaded_snips = 1 -if !exists('snips_author') | let snips_author = 'Me' | endif - -au BufRead,BufNewFile *.snippets\= set ft=snippet -au FileType snippet setl noet fdm=indent - -let s:snippets = {} | let s:multi_snips = {} - -if !exists('snippets_dir') - let snippets_dir = substitute(globpath(&rtp, 'snippets/'), "\n", ',', 'g') -endif - -fun! MakeSnip(scope, trigger, content, ...) - let multisnip = a:0 && a:1 != '' - let var = multisnip ? 's:multi_snips' : 's:snippets' - if !has_key({var}, a:scope) | let {var}[a:scope] = {} | endif - if !has_key({var}[a:scope], a:trigger) - let {var}[a:scope][a:trigger] = multisnip ? [[a:1, a:content]] : a:content - elseif multisnip | let {var}[a:scope][a:trigger] += [[a:1, a:content]] - else - echom 'Warning in snipMate.vim: Snippet '.a:trigger.' is already defined.' - \ .' See :h multi_snip for help on snippets with multiple matches.' - endif -endf - -fun! ExtractSnips(dir, ft) - for path in split(globpath(a:dir, '*'), "\n") - if isdirectory(path) - let pathname = fnamemodify(path, ':t') - for snipFile in split(globpath(path, '*.snippet'), "\n") - call s:ProcessFile(snipFile, a:ft, pathname) - endfor - elseif fnamemodify(path, ':e') == 'snippet' - call s:ProcessFile(path, a:ft) - endif - endfor -endf - -" Processes a single-snippet file; optionally add the name of the parent -" directory for a snippet with multiple matches. -fun s:ProcessFile(file, ft, ...) - let keyword = fnamemodify(a:file, ':t:r') - if keyword == '' | return | endif - try - let text = join(readfile(a:file), "\n") - catch /E484/ - echom "Error in snipMate.vim: couldn't read file: ".a:file - endtry - return a:0 ? MakeSnip(a:ft, a:1, text, keyword) - \ : MakeSnip(a:ft, keyword, text) -endf - -fun! ExtractSnipsFile(file, ft) - if !filereadable(a:file) | return | endif - let text = readfile(a:file) - let inSnip = 0 - for line in text + ["\n"] - if inSnip && (line[0] == "\t" || line == '') - let content .= strpart(line, 1)."\n" - continue - elseif inSnip - call MakeSnip(a:ft, trigger, content[:-2], name) - let inSnip = 0 - endif - - if line[:6] == 'snippet' - let inSnip = 1 - let trigger = strpart(line, 8) - let name = '' - let space = stridx(trigger, ' ') + 1 - if space " Process multi snip - let name = strpart(trigger, space) - let trigger = strpart(trigger, 0, space - 1) - endif - let content = '' - endif - endfor -endf - -" Reset snippets for filetype. -fun! ResetSnippets(ft) - let ft = a:ft == '' ? '_' : a:ft - for dict in [s:snippets, s:multi_snips, g:did_ft] - if has_key(dict, ft) - unlet dict[ft] - endif - endfor -endf - -" Reset snippets for all filetypes. -fun! ResetAllSnippets() - let s:snippets = {} | let s:multi_snips = {} | let g:did_ft = {} -endf - -" Reload snippets for filetype. -fun! ReloadSnippets(ft) - let ft = a:ft == '' ? '_' : a:ft - call ResetSnippets(ft) - call GetSnippets(g:snippets_dir, ft) -endf - -" Reload snippets for all filetypes. -fun! ReloadAllSnippets() - for ft in keys(g:did_ft) - call ReloadSnippets(ft) - endfor -endf - -let g:did_ft = {} -fun! GetSnippets(dir, filetypes) - for ft in split(a:filetypes, '\.') - if has_key(g:did_ft, ft) | continue | endif - call s:DefineSnips(a:dir, ft, ft) - if ft == 'objc' || ft == 'cpp' || ft == 'cs' - call s:DefineSnips(a:dir, 'c', ft) - elseif ft == 'xhtml' - call s:DefineSnips(a:dir, 'html', 'xhtml') - endif - let g:did_ft[ft] = 1 - endfor -endf - -" Define "aliasft" snippets for the filetype "realft". -fun s:DefineSnips(dir, aliasft, realft) - for path in split(globpath(a:dir, a:aliasft.'/')."\n". - \ globpath(a:dir, a:aliasft.'-*/'), "\n") - call ExtractSnips(path, a:realft) - endfor - for path in split(globpath(a:dir, a:aliasft.'.snippets')."\n". - \ globpath(a:dir, a:aliasft.'-*.snippets'), "\n") - call ExtractSnipsFile(path, a:realft) - endfor -endf - -fun! TriggerSnippet() - if exists('g:SuperTabMappingForward') - if g:SuperTabMappingForward == "" - let SuperTabKey = "\" - elseif g:SuperTabMappingBackward == "" - let SuperTabKey = "\" - endif - endif - - if pumvisible() " Update snippet if completion is used, or deal with supertab - if exists('SuperTabKey') - call feedkeys(SuperTabKey) | return '' - endif - call feedkeys("\a", 'n') " Close completion menu - call feedkeys("\") | return '' - endif - - if exists('g:snipPos') | return snipMate#jumpTabStop(0) | endif - - let word = matchstr(getline('.'), '\S\+\%'.col('.').'c') - for scope in [bufnr('%')] + split(&ft, '\.') + ['_'] - let [trigger, snippet] = s:GetSnippet(word, scope) - " If word is a trigger for a snippet, delete the trigger & expand - " the snippet. - if snippet != '' - let col = col('.') - len(trigger) - sil exe 's/\V'.escape(trigger, '/\.').'\%#//' - return snipMate#expandSnip(snippet, col) - endif - endfor - - if exists('SuperTabKey') - call feedkeys(SuperTabKey) - return '' - endif - return "\" -endf - -fun! BackwardsSnippet() - if exists('g:snipPos') | return snipMate#jumpTabStop(1) | endif - - if exists('g:SuperTabMappingForward') - if g:SuperTabMappingBackward == "" - let SuperTabKey = "\" - elseif g:SuperTabMappingForward == "" - let SuperTabKey = "\" - endif - endif - if exists('SuperTabKey') - call feedkeys(SuperTabKey) - return '' - endif - return "\" -endf - -" Check if word under cursor is snippet trigger; if it isn't, try checking if -" the text after non-word characters is (e.g. check for "foo" in "bar.foo") -fun s:GetSnippet(word, scope) - let word = a:word | let snippet = '' - while snippet == '' - if exists('s:snippets["'.a:scope.'"]["'.escape(word, '\"').'"]') - let snippet = s:snippets[a:scope][word] - elseif exists('s:multi_snips["'.a:scope.'"]["'.escape(word, '\"').'"]') - let snippet = s:ChooseSnippet(a:scope, word) - if snippet == '' | break | endif - else - if match(word, '\W') == -1 | break | endif - let word = substitute(word, '.\{-}\W', '', '') - endif - endw - if word == '' && a:word != '.' && stridx(a:word, '.') != -1 - let [word, snippet] = s:GetSnippet('.', a:scope) - endif - return [word, snippet] -endf - -fun s:ChooseSnippet(scope, trigger) - let snippet = [] - let i = 1 - for snip in s:multi_snips[a:scope][a:trigger] - let snippet += [i.'. '.snip[0]] - let i += 1 - endfor - if i == 2 | return s:multi_snips[a:scope][a:trigger][0][1] | endif - let num = inputlist(snippet) - 1 - return num == -1 ? '' : s:multi_snips[a:scope][a:trigger][num][1] -endf - -fun! ShowAvailableSnips() - let line = getline('.') - let col = col('.') - let word = matchstr(getline('.'), '\S\+\%'.col.'c') - let words = [word] - if stridx(word, '.') - let words += split(word, '\.', 1) - endif - let matchlen = 0 - let matches = [] - for scope in [bufnr('%')] + split(&ft, '\.') + ['_'] - let triggers = has_key(s:snippets, scope) ? keys(s:snippets[scope]) : [] - if has_key(s:multi_snips, scope) - let triggers += keys(s:multi_snips[scope]) - endif - for trigger in triggers - for word in words - if word == '' - let matches += [trigger] " Show all matches if word is empty - elseif trigger =~ '^'.word - let matches += [trigger] - let len = len(word) - if len > matchlen | let matchlen = len | endif - endif - endfor - endfor - endfor - - " This is to avoid a bug with Vim when using complete(col - matchlen, matches) - " (Issue#46 on the Google Code snipMate issue tracker). - call setline(line('.'), substitute(line, repeat('.', matchlen).'\%'.col.'c', '', '')) - call complete(col, matches) - return '' -endf -" vim:noet:sw=4:ts=4:ft=vim diff --git a/vim/snippets/_.snippets b/vim/snippets/_.snippets deleted file mode 100644 index d3ee355272..0000000000 --- a/vim/snippets/_.snippets +++ /dev/null @@ -1,9 +0,0 @@ -# Global snippets - -# (c) holds no legal value ;) -snippet c) - Copyright `&enc[:2] == "utf" ? "©" : "(c)"` `strftime("%Y")` ${1:`g:snips_author`}. All Rights Reserved.${2} -snippet date - `strftime("%Y-%m-%d")` -snippet ddate - `strftime("%B %d, %Y")` diff --git a/vim/snippets/autoit.snippets b/vim/snippets/autoit.snippets deleted file mode 100644 index 690018ce9f..0000000000 --- a/vim/snippets/autoit.snippets +++ /dev/null @@ -1,66 +0,0 @@ -snippet if - If ${1:condition} Then - ${2:; True code} - EndIf -snippet el - Else - ${1} -snippet elif - ElseIf ${1:condition} Then - ${2:; True code} -# If/Else block -snippet ifel - If ${1:condition} Then - ${2:; True code} - Else - ${3:; Else code} - EndIf -# If/ElseIf/Else block -snippet ifelif - If ${1:condition 1} Then - ${2:; True code} - ElseIf ${3:condition 2} Then - ${4:; True code} - Else - ${5:; Else code} - EndIf -# Switch block -snippet switch - Switch (${1:condition}) - Case {$2:case1}: - {$3:; Case 1 code} - Case Else: - {$4:; Else code} - EndSwitch -# Select block -snippet select - Select (${1:condition}) - Case {$2:case1}: - {$3:; Case 1 code} - Case Else: - {$4:; Else code} - EndSelect -# While loop -snippet while - While (${1:condition}) - ${2:; code...} - WEnd -# For loop -snippet for - For ${1:n} = ${3:1} to ${2:count} - ${4:; code...} - Next -# New Function -snippet func - Func ${1:fname}(${2:`indent('.') ? 'self' : ''`}): - ${4:Return} - EndFunc -# Message box -snippet msg - MsgBox(${3:MsgType}, ${1:"Title"}, ${2:"Message Text"}) -# Debug Message -snippet debug - MsgBox(0, "Debug", ${1:"Debug Message"}) -# Show Variable Debug Message -snippet showvar - MsgBox(0, "${1:VarName}", $1) diff --git a/vim/snippets/c.snippets b/vim/snippets/c.snippets deleted file mode 100644 index e1c4f0500a..0000000000 --- a/vim/snippets/c.snippets +++ /dev/null @@ -1,113 +0,0 @@ -# main() -snippet main - int main(int argc, const char *argv[]) - { - ${1} - return 0; - } -snippet mainn - int main(void) - { - ${1} - return 0; - } -# #include <...> -snippet inc - #include <${1:stdio}.h>${2} -# #include "..." -snippet Inc - #include "${1:`Filename("$1.h")`}"${2} -# #ifndef ... #define ... #endif -snippet Def - #ifndef $1 - #define ${1:SYMBOL} ${2:value} - #endif${3} -snippet def - #define -snippet ifdef - #ifdef ${1:FOO} - ${2:#define } - #endif -snippet #if - #if ${1:FOO} - ${2} - #endif -# Header Include-Guard -snippet once - #ifndef ${1:`toupper(Filename('$1_H', 'UNTITLED_H'))`} - - #define $1 - - ${2} - - #endif /* end of include guard: $1 */ -# If Condition -snippet if - if (${1:/* condition */}) { - ${2:/* code */} - } -snippet el - else { - ${1} - } -# Ternary conditional -snippet t - ${1:/* condition */} ? ${2:a} : ${3:b} -# Do While Loop -snippet do - do { - ${2:/* code */} - } while (${1:/* condition */}); -# While Loop -snippet wh - while (${1:/* condition */}) { - ${2:/* code */} - } -# For Loop -snippet for - for (${2:i} = 0; $2 < ${1:count}; $2${3:++}) { - ${4:/* code */} - } -# Custom For Loop -snippet forr - for (${1:i} = ${2:0}; ${3:$1 < 10}; $1${4:++}) { - ${5:/* code */} - } -# Function -snippet fun - ${1:void} ${2:function_name}(${3}) - { - ${4:/* code */} - } -# Function Declaration -snippet fund - ${1:void} ${2:function_name}(${3});${4} -# Typedef -snippet td - typedef ${1:int} ${2:MyCustomType};${3} -# Struct -snippet st - struct ${1:`Filename('$1_t', 'name')`} { - ${2:/* data */} - }${3: /* optional variable list */};${4} -# Typedef struct -snippet tds - typedef struct ${2:_$1 }{ - ${3:/* data */} - } ${1:`Filename('$1_t', 'name')`}; -# Typdef enum -snippet tde - typedef enum { - ${1:/* data */} - } ${2:foo}; -# printf -# unfortunately version this isn't as nice as TextMates's, given the lack of a -# dynamic `...` -snippet pr - printf("${1:%s}\n"${2});${3} -# fprintf (again, this isn't as nice as TextMate's version, but it works) -snippet fpr - fprintf(${1:stderr}, "${2:%s}\n"${3});${4} -# This is kind of convenient -snippet . - [${1}]${2} diff --git a/vim/snippets/cpp.snippets b/vim/snippets/cpp.snippets deleted file mode 100644 index fdabd634ba..0000000000 --- a/vim/snippets/cpp.snippets +++ /dev/null @@ -1,34 +0,0 @@ -# Read File Into Vector -snippet readfile - std::vector v; - if (FILE *${2:fp} = fopen(${1:"filename"}, "r")) { - char buf[1024]; - while (size_t len = fread(buf, 1, sizeof(buf), $2)) - v.insert(v.end(), buf, buf + len); - fclose($2); - }${3} -# std::map -snippet map - std::map<${1:key}, ${2:value}> map${3}; -# std::vector -snippet vector - std::vector<${1:char}> v${2}; -# Namespace -snippet ns - namespace ${1:`Filename('', 'my')`} { - ${2} - } /* $1 */ -# Class -snippet cl - class ${1:`Filename('$1_t', 'name')`} { - public: - $1 (${2:arguments}); - virtual ~$1 (); - - private: - ${3:/* data */} - }; -snippet fori - for (int ${2:i} = 0; $2 < ${1:count}; $2${3:++}) { - ${4:/* code */} - } diff --git a/vim/snippets/erlang.snippets b/vim/snippets/erlang.snippets deleted file mode 100644 index 7238149130..0000000000 --- a/vim/snippets/erlang.snippets +++ /dev/null @@ -1,39 +0,0 @@ -# module and export all -snippet mod - -module(${1:`Filename('', 'my')`}). - - -compile([export_all]). - - start() -> - ${2} - - stop() -> - ok. -# define directive -snippet def - -define(${1:macro}, ${2:body}).${3} -# export directive -snippet exp - -export([${1:function}/${2:arity}]). -# include directive -snippet inc - -include("${1:file}").${2} -# behavior directive -snippet beh - -behaviour(${1:behaviour}).${2} -# if expression -snippet if - if - ${1:guard} -> - ${2:body} - end -# case expression -snippet case - case ${1:expression} of - ${2:pattern} -> - ${3:body}; - end -# record directive -snippet rec - -record(${1:record}, { - ${2:field}=${3:value}}).${4} diff --git a/vim/snippets/eruby.snippets b/vim/snippets/eruby.snippets deleted file mode 100644 index 01ebe65961..0000000000 --- a/vim/snippets/eruby.snippets +++ /dev/null @@ -1,12 +0,0 @@ -snippet p - <% ${1} %> -snippet pe - <%= ${1} %> -snippet end - <% end %> -snippet else - <% else %> -snippet prot - protocol${1} -snippet acti - activation_group${1} diff --git a/vim/snippets/html.snippets b/vim/snippets/html.snippets deleted file mode 100644 index 302cea2645..0000000000 --- a/vim/snippets/html.snippets +++ /dev/null @@ -1,190 +0,0 @@ -# Some useful Unicode entities -# Non-Breaking Space -snippet nbs -   -# ← -snippet left - ← -# → -snippet right - → -# ↑ -snippet up - ↑ -# ↓ -snippet down - ↓ -# ↩ -snippet return - ↩ -# ⇤ -snippet backtab - ⇤ -# ⇥ -snippet tab - ⇥ -# ⇧ -snippet shift - ⇧ -# ⌃ -snippet control - ⌃ -# ⌅ -snippet enter - ⌅ -# ⌘ -snippet command - ⌘ -# ⌥ -snippet option - ⌥ -# ⌦ -snippet delete - ⌦ -# ⌫ -snippet backspace - ⌫ -# ⎋ -snippet escape - ⎋ -# Generic Doctype -snippet doctype HTML 4.01 Strict - -snippet doctype HTML 4.01 Transitional - -snippet doctype HTML 5 - -snippet doctype XHTML 1.0 Frameset - -snippet doctype XHTML 1.0 Strict - -snippet doctype XHTML 1.0 Transitional - -snippet doctype XHTML 1.1 - -# HTML Doctype 4.01 Strict -snippet docts - -# HTML Doctype 4.01 Transitional -snippet doct - -# HTML Doctype 5 -snippet doct5 - -# XHTML Doctype 1.0 Frameset -snippet docxf - -# XHTML Doctype 1.0 Strict -snippet docxs - -# XHTML Doctype 1.0 Transitional -snippet docxt - -# XHTML Doctype 1.1 -snippet docx - -snippet html - - ${1} - -snippet xhtml - - ${1} - -snippet body - - ${1} - -snippet head - - - - Codestin Search App - ${2} - -snippet title - Codestin Search App${2} -snippet script - ${2} -snippet scriptsrc - ${2} -snippet style - ${3} -snippet base - -snippet r - -snippet div -

- ${2} -
-# Embed QT Movie -snippet movie - - - - - - ${6} -snippet fieldset -
- ${1:name} - - ${3} -
-snippet form -
- ${3} - - -

-
-snippet h1 -

${2:$1}

-snippet input - ${4} -snippet label - ${7} -snippet link - ${4} -snippet mailto - ${3:email me} -snippet meta - ${3} -snippet opt - ${3} -snippet optt - ${2} -snippet select - ${5} -snippet table - - - -
${2:Header}
${3:Data}
${4} -snippet textarea - ${5} diff --git a/vim/snippets/java.snippets b/vim/snippets/java.snippets deleted file mode 100644 index dd96b790a0..0000000000 --- a/vim/snippets/java.snippets +++ /dev/null @@ -1,95 +0,0 @@ -snippet main - public static void main (String [] args) - { - ${1:/* code */} - } -snippet pu - public -snippet po - protected -snippet pr - private -snippet st - static -snippet fi - final -snippet ab - abstract -snippet re - return -snippet br - break; -snippet de - default: - ${1} -snippet ca - catch(${1:Exception} ${2:e}) ${3} -snippet th - throw -snippet sy - synchronized -snippet im - import -snippet imp - implements -snippet ext - extends -snippet j.u - java.util -snippet j.i - java.io. -snippet j.b - java.beans. -snippet j.n - java.net. -snippet j.m - java.math. -snippet if - if (${1}) ${2} -snippet el - else -snippet elif - else if (${1}) ${2} -snippet wh - while (${1}) ${2} -snippet for - for (${1}; ${2}; ${3}) ${4} -snippet fore - for (${1} : ${2}) ${3} -snippet sw - switch (${1}) ${2} -snippet cs - case ${1}: - ${2} - ${3} -snippet tc - public class ${1:`Filename()`} extends ${2:TestCase} -snippet t - public void test${1:Name}() throws Exception ${2} -snippet cl - class ${1:`Filename("", "untitled")`} ${2} -snippet in - interface ${1:`Filename("", "untitled")`} ${2:extends Parent}${3} -snippet m - ${1:void} ${2:method}(${3}) ${4:throws }${5} -snippet v - ${1:String} ${2:var}${3: = null}${4};${5} -snippet co - static public final ${1:String} ${2:var} = ${3};${4} -snippet cos - static public final String ${1:var} = "${2}";${3} -snippet as - assert ${1:test} : "${2:Failure message}";${3} -snippet try - try { - ${3} - } catch(${1:Exception} ${2:e}) { - } -snippet tryf - try { - ${3} - } catch(${1:Exception} ${2:e}) { - } finally { - } -snippet rst - ResultSet ${1:rst}${2: = null}${3};${4} diff --git a/vim/snippets/javascript.snippets b/vim/snippets/javascript.snippets deleted file mode 100644 index f869e2f6b4..0000000000 --- a/vim/snippets/javascript.snippets +++ /dev/null @@ -1,74 +0,0 @@ -# Prototype -snippet proto - ${1:class_name}.prototype.${2:method_name} = - function(${3:first_argument}) { - ${4:// body...} - }; -# Function -snippet fun - function ${1:function_name} (${2:argument}) { - ${3:// body...} - } -# Anonymous Function -snippet f - function(${1}) {${2}}; -# if -snippet if - if (${1:true}) {${2}} -# if ... else -snippet ife - if (${1:true}) {${2}} - else{${3}} -# tertiary conditional -snippet t - ${1:/* condition */} ? ${2:a} : ${3:b} -# switch -snippet switch - switch(${1:expression}) { - case '${3:case}': - ${4:// code} - break; - ${5} - default: - ${2:// code} - } -# case -snippet case - case '${1:case}': - ${2:// code} - break; - ${3} -# for (...) {...} -snippet for - for (var ${2:i} = 0; $2 < ${1:Things}.length; $2${3:++}) { - ${4:$1[$2]} - }; -# for (...) {...} (Improved Native For-Loop) -snippet forr - for (var ${2:i} = ${1:Things}.length - 1; $2 >= 0; $2${3:--}) { - ${4:$1[$2]} - }; -# while (...) {...} -snippet wh - while (${1:/* condition */}) { - ${2:/* code */} - } -# do...while -snippet do - do { - ${2:/* code */} - } while (${1:/* condition */}); -# Object Method -snippet :f - ${1:method_name}: function(${2:attribute}) { - ${4} - }${3:,} -# setTimeout function -snippet timeout - setTimeout(function() {${3}}${2}, ${1:10}; -# Get Elements -snippet get - getElementsBy${1:TagName}('${2}')${3} -# Get Element -snippet gett - getElementBy${1:Id}('${2}')${3} diff --git a/vim/snippets/mako.snippets b/vim/snippets/mako.snippets deleted file mode 100644 index 2a0aef9ce5..0000000000 --- a/vim/snippets/mako.snippets +++ /dev/null @@ -1,54 +0,0 @@ -snippet def - <%def name="${1:name}"> - ${2:} - -snippet call - <%call expr="${1:name}"> - ${2:} - -snippet doc - <%doc> - ${1:} - -snippet text - <%text> - ${1:} - -snippet for - % for ${1:i} in ${2:iter}: - ${3:} - % endfor -snippet if if - % if ${1:condition}: - ${2:} - % endif -snippet if if/else - % if ${1:condition}: - ${2:} - % else: - ${3:} - % endif -snippet try - % try: - ${1:} - % except${2:}: - ${3:pass} - % endtry -snippet wh - % while ${1:}: - ${2:} - % endwhile -snippet $ - ${ ${1:} } -snippet <% - <% ${1:} %> -snippet -snippet inherit - <%inherit file="${1:filename}" /> -snippet include - <%include file="${1:filename}" /> -snippet namespace - <%namespace file="${1:name}" /> -snippet page - <%page args="${1:}" /> diff --git a/vim/snippets/objc.snippets b/vim/snippets/objc.snippets deleted file mode 100644 index 85b80d9e6c..0000000000 --- a/vim/snippets/objc.snippets +++ /dev/null @@ -1,247 +0,0 @@ -# #import <...> -snippet Imp - #import <${1:Cocoa/Cocoa.h}>${2} -# #import "..." -snippet imp - #import "${1:`Filename()`.h}"${2} -# @selector(...) -snippet sel - @selector(${1:method}:)${3} -# @"..." string -snippet s - @"${1}"${2} -# Object -snippet o - ${1:NSObject} *${2:foo} = [${3:$1 alloc}]${4};${5} -# NSLog(...) -snippet log - NSLog(@"${1:%@}"${2});${3} -# Class -snippet objc - @interface ${1:`Filename('', 'someClass')`} : ${2:NSObject} - { - } - @end - - @implementation $1 - ${3} - @end -# Class Interface -snippet int - @interface ${1:`Filename('', 'someClass')`} : ${2:NSObject} - {${3} - } - ${4} - @end -snippet @interface - @interface ${1:`Filename('', 'someClass')`} : ${2:NSObject} - {${3} - } - ${4} - @end -# Class Implementation -snippet impl - @implementation ${1:`Filename('', 'someClass')`} - ${2} - @end -snippet @implementation - @implementation ${1:`Filename('', 'someClass')`} - ${2} - @end -# Protocol -snippet pro - @protocol ${1:`Filename('$1Delegate', 'MyProtocol')`} ${2:} - ${3} - @end -snippet @protocol - @protocol ${1:`Filename('$1Delegate', 'MyProtocol')`} ${2:} - ${3} - @end -# init Definition -snippet init - - (id)init - { - if (self = [super init]) { - ${1} - } - return self; - } -# dealloc Definition -snippet dealloc - - (void) dealloc - { - ${1:deallocations} - [super dealloc]; - } -snippet su - [super ${1:init}]${2} -snippet ibo - IBOutlet ${1:NSSomeClass} *${2:$1};${3} -# Category -snippet cat - @interface ${1:NSObject} (${2:MyCategory}) - @end - - @implementation $1 ($2) - ${3} - @end -# Category Interface -snippet cath - @interface ${1:`Filename('$1', 'NSObject')`} (${2:MyCategory}) - ${3} - @end -# Method -snippet m - - (${1:id})${2:method} - { - ${3} - } -# Method declaration -snippet md - - (${1:id})${2:method};${3} -# IBAction declaration -snippet ibad - - (IBAction)${1:method}:(${2:id})sender;${3} -# IBAction method -snippet iba - - (IBAction)${1:method}:(${2:id})sender - { - ${3} - } -# awakeFromNib method -snippet wake - - (void)awakeFromNib - { - ${1} - } -# Class Method -snippet M - + (${1:id})${2:method} - { - ${3:return nil;} - } -# Sub-method (Call super) -snippet sm - - (${1:id})${2:method} - { - [super $2];${3} - return self; - } -# Accessor Methods For: -# Object -snippet objacc - - (${1:id})${2:thing} - { - return $2; - } - - - (void)set$2:($1)${3:new$2} - { - [$3 retain]; - [$2 release]; - $2 = $3; - }${4} -# for (object in array) -snippet forin - for (${1:Class} *${2:some$1} in ${3:array}) { - ${4} - } -snippet fore - for (${1:object} in ${2:array}) { - ${3:statements} - } -snippet forarray - unsigned int ${1:object}Count = [${2:array} count]; - - for (unsigned int index = 0; index < $1Count; index++) { - ${3:id} $1 = [$2 $1AtIndex:index]; - ${4} - } -snippet fora - unsigned int ${1:object}Count = [${2:array} count]; - - for (unsigned int index = 0; index < $1Count; index++) { - ${3:id} $1 = [$2 $1AtIndex:index]; - ${4} - } -# Try / Catch Block -snippet @try - @try { - ${1:statements} - } - @catch (NSException * e) { - ${2:handler} - } - @finally { - ${3:statements} - } -snippet @catch - @catch (${1:exception}) { - ${2:handler} - } -snippet @finally - @finally { - ${1:statements} - } -# IBOutlet -# @property (Objective-C 2.0) -snippet prop - @property (${1:retain}) ${2:NSSomeClass} ${3:*$2};${4} -# @synthesize (Objective-C 2.0) -snippet syn - @synthesize ${1:property};${2} -# [[ alloc] init] -snippet alloc - [[${1:foo} alloc] init${2}];${3} -snippet a - [[${1:foo} alloc] init${2}];${3} -# retain -snippet ret - [${1:foo} retain];${2} -# release -snippet rel - [${1:foo} release]; -# autorelease -snippet arel - [${1:foo} autorelease]; -# autorelease pool -snippet pool - NSAutoreleasePool *${1:pool} = [[NSAutoreleasePool alloc] init]; - ${2:/* code */} - [$1 drain]; -# Throw an exception -snippet except - NSException *${1:badness}; - $1 = [NSException exceptionWithName:@"${2:$1Name}" - reason:@"${3}" - userInfo:nil]; - [$1 raise]; -snippet prag - #pragma mark ${1:-} -snippet cl - @class ${1:Foo};${2} -snippet color - [[NSColor ${1:blackColor}] set]; -# NSArray -snippet array - NSMutableArray *${1:array} = [NSMutable array];${2} -snippet nsa - NSArray ${1} -snippet nsma - NSMutableArray ${1} -snippet aa - NSArray * array;${1} -snippet ma - NSMutableArray * array;${1} -# NSDictionary -snippet dict - NSMutableDictionary *${1:dict} = [NSMutableDictionary dictionary];${2} -snippet nsd - NSDictionary ${1} -snippet nsmd - NSMutableDictionary ${1} -# NSString -snippet nss - NSString ${1} -snippet nsms - NSMutableString ${1} diff --git a/vim/snippets/perl.snippets b/vim/snippets/perl.snippets deleted file mode 100644 index c85ff11359..0000000000 --- a/vim/snippets/perl.snippets +++ /dev/null @@ -1,97 +0,0 @@ -# #!/usr/bin/perl -snippet #! - #!/usr/bin/perl - -# Hash Pointer -snippet . - => -# Function -snippet sub - sub ${1:function_name} { - ${2:#body ...} - } -# Conditional -snippet if - if (${1}) { - ${2:# body...} - } -# Conditional if..else -snippet ife - if (${1}) { - ${2:# body...} - } - else { - ${3:# else...} - } -# Conditional if..elsif..else -snippet ifee - if (${1}) { - ${2:# body...} - } - elsif (${3}) { - ${4:# elsif...} - } - else { - ${5:# else...} - } -# Conditional One-line -snippet xif - ${1:expression} if ${2:condition};${3} -# Unless conditional -snippet unless - unless (${1}) { - ${2:# body...} - } -# Unless conditional One-line -snippet xunless - ${1:expression} unless ${2:condition};${3} -# Try/Except -snippet eval - eval { - ${1:# do something risky...} - }; - if ($@) { - ${2:# handle failure...} - } -# While Loop -snippet wh - while (${1}) { - ${2:# body...} - } -# While Loop One-line -snippet xwh - ${1:expression} while ${2:condition};${3} -# C-style For Loop -snippet cfor - for (my $${2:var} = 0; $$2 < ${1:count}; $$2${3:++}) { - ${4:# body...} - } -# For loop one-line -snippet xfor - ${1:expression} for @${2:array};${3} -# Foreach Loop -snippet for - foreach my $${1:x} (@${2:array}) { - ${3:# body...} - } -# Foreach Loop One-line -snippet fore - ${1:expression} foreach @${2:array};${3} -# Package -snippet cl - package ${1:ClassName}; - - use base qw(${2:ParentClass}); - - sub new { - my $class = shift; - $class = ref $class if ref $class; - my $self = bless {}, $class; - $self; - } - - 1;${3} -# Read File -snippet slurp - my $${1:var}; - { local $/ = undef; local *FILE; open FILE, "<${2:file}"; $$1 = ; close FILE }${3} diff --git a/vim/snippets/php.snippets b/vim/snippets/php.snippets deleted file mode 100644 index 3ce9e26cc4..0000000000 --- a/vim/snippets/php.snippets +++ /dev/null @@ -1,216 +0,0 @@ -snippet php - -snippet ec - echo "${1:string}"${2}; -snippet inc - include '${1:file}';${2} -snippet inc1 - include_once '${1:file}';${2} -snippet req - require '${1:file}';${2} -snippet req1 - require_once '${1:file}';${2} -# $GLOBALS['...'] -snippet globals - $GLOBALS['${1:variable}']${2: = }${3:something}${4:;}${5} -snippet $_ COOKIE['...'] - $_COOKIE['${1:variable}']${2} -snippet $_ ENV['...'] - $_ENV['${1:variable}']${2} -snippet $_ FILES['...'] - $_FILES['${1:variable}']${2} -snippet $_ Get['...'] - $_GET['${1:variable}']${2} -snippet $_ POST['...'] - $_POST['${1:variable}']${2} -snippet $_ REQUEST['...'] - $_REQUEST['${1:variable}']${2} -snippet $_ SERVER['...'] - $_SERVER['${1:variable}']${2} -snippet $_ SESSION['...'] - $_SESSION['${1:variable}']${2} -# Start Docblock -snippet /* - /** - * ${1} - **/ -# Class - post doc -snippet doc_cp - /** - * ${1:undocumented class} - * - * @package ${2:default} - * @author ${3:`g:snips_author`} - **/${4} -# Class Variable - post doc -snippet doc_vp - /** - * ${1:undocumented class variable} - * - * @var ${2:string} - **/${3} -# Class Variable -snippet doc_v - /** - * ${3:undocumented class variable} - * - * @var ${4:string} - **/ - ${1:var} $${2};${5} -# Class -snippet doc_c - /** - * ${3:undocumented class} - * - * @packaged ${4:default} - * @author ${5:`g:snips_author`} - **/ - ${1:}class ${2:} - {${6} - } // END $1class $2 -# Constant Definition - post doc -snippet doc_dp - /** - * ${1:undocumented constant} - **/${2} -# Constant Definition -snippet doc_d - /** - * ${3:undocumented constant} - **/ - define(${1}, ${2});${4} -# Function - post doc -snippet doc_fp - /** - * ${1:undocumented function} - * - * @return ${2:void} - * @author ${3:`g:snips_author`} - **/${4} -# Function signature -snippet doc_s - /** - * ${4:undocumented function} - * - * @return ${5:void} - * @author ${6:`g:snips_author`} - **/ - ${1}function ${2}(${3});${7} -# Function -snippet doc_f - /** - * ${4:undocumented function} - * - * @return ${5:void} - * @author ${6:`g:snips_author`} - **/ - ${1}function ${2}(${3}) - {${7} - } -# Header -snippet doc_h - /** - * ${1} - * - * @author ${2:`g:snips_author`} - * @version ${3:$Id$} - * @copyright ${4:$2}, `strftime('%d %B, %Y')` - * @package ${5:default} - **/ - - /** - * Define DocBlock - *// -# Interface -snippet doc_i - /** - * ${2:undocumented class} - * - * @package ${3:default} - * @author ${4:`g:snips_author`} - **/ - interface ${1:} - {${5} - } // END interface $1 -# class ... -snippet class - /** - * ${1} - **/ - class ${2:ClassName} - { - ${3} - function ${4:__construct}(${5:argument}) - { - ${6:// code...} - } - } -# define(...) -snippet def - define('${1}'${2});${3} -# defined(...) -snippet def? - ${1}defined('${2}')${3} -snippet wh - while (${1:/* condition */}) { - ${2:// code...} - } -# do ... while -snippet do - do { - ${2:// code... } - } while (${1:/* condition */}); -snippet if - if (${1:/* condition */}) { - ${2:// code...} - } -snippet ife - if (${1:/* condition */}) { - ${2:// code...} - } else { - ${3:// code...} - } - ${4} -snippet else - else { - ${1:// code...} - } -snippet elseif - elseif (${1:/* condition */}) { - ${2:// code...} - } -# Tertiary conditional -snippet t - $${1:retVal} = (${2:condition}) ? ${3:a} : ${4:b};${5} -snippet switch - switch ($${1:variable}) { - case '${2:value}': - ${3:// code...} - break; - ${5} - default: - ${4:// code...} - break; - } -snippet case - case '${1:value}': - ${2:// code...} - break;${3} -snippet for - for ($${2:i} = 0; $$2 < ${1:count}; $$2${3:++}) { - ${4: // code...} - } -snippet foreach - foreach ($${1:variable} as $${2:key}) { - ${3:// code...} - } -snippet fun - ${1:public }function ${2:FunctionName}(${3}) - { - ${4:// code...} - } -# $... = array (...) -snippet array - $${1:arrayName} = array('${2}' => ${3});${4} diff --git a/vim/snippets/python.snippets b/vim/snippets/python.snippets deleted file mode 100644 index 28a2948a07..0000000000 --- a/vim/snippets/python.snippets +++ /dev/null @@ -1,86 +0,0 @@ -snippet #! - #!/usr/bin/env python - -snippet imp - import ${1:module} -# Module Docstring -snippet docs - ''' - File: ${1:`Filename('$1.py', 'foo.py')`} - Author: ${2:`g:snips_author`} - Description: ${3} - ''' -snippet wh - while ${1:condition}: - ${2:# code...} -snippet for - for ${1:needle} in ${2:haystack}: - ${3:# code...} -# New Class -snippet cl - class ${1:ClassName}(${2:object}): - """${3:docstring for $1}""" - def __init__(self, ${4:arg}): - ${5:super($1, self).__init__()} - self.$4 = $4 - ${6} -# New Function -snippet def - def ${1:fname}(${2:`indent('.') ? 'self' : ''`}): - """${3:docstring for $1}""" - ${4:pass} -snippet deff - def ${1:fname}(${2:`indent('.') ? 'self' : ''`}): - ${3} -# New Method -snippet defs - def ${1:mname}(self, ${2:arg}): - ${3:pass} -# New Property -snippet property - def ${1:foo}(): - doc = "${2:The $1 property.}" - def fget(self): - ${3:return self._$1} - def fset(self, value): - ${4:self._$1 = value} -# Lambda -snippet ld - ${1:var} = lambda ${2:vars} : ${3:action} -snippet . - self. -snippet try Try/Except - try: - ${1:pass} - except ${2:Exception}, ${3:e}: - ${4:raise $3} -snippet try Try/Except/Else - try: - ${1:pass} - except ${2:Exception}, ${3:e}: - ${4:raise $3} - else: - ${5:pass} -snippet try Try/Except/Finally - try: - ${1:pass} - except ${2:Exception}, ${3:e}: - ${4:raise $3} - finally: - ${5:pass} -snippet try Try/Except/Else/Finally - try: - ${1:pass} - except ${2:Exception}, ${3:e}: - ${4:raise $3} - else: - ${5:pass} - finally: - ${6:pass} -# if __name__ == '__main__': -snippet ifmain - if __name__ == '__main__': - ${1:main()} -# __magic__ -snippet _ - __${1:init}__${2} diff --git a/vim/snippets/ruby.snippets b/vim/snippets/ruby.snippets deleted file mode 100644 index 764668f743..0000000000 --- a/vim/snippets/ruby.snippets +++ /dev/null @@ -1,490 +0,0 @@ -# #!/usr/bin/ruby -snippet #! - #!/usr/bin/ruby - -# New Block -snippet =b - =begin rdoc - ${1} - =end -snippet y - :yields: ${1:arguments} -snippet rb - #!/usr/bin/env ruby -wKU - -snippet req - require "${1}"${2} -snippet # - # => -snippet end - __END__ -snippet case - case ${1:object} - when ${2:condition} - ${3} - end -snippet when - when ${1:condition} - ${2} -snippet def - def ${1:method_name} - ${2} - end -snippet deft - def test_${1:case_name} - ${2} - end -snippet if - if ${1:condition} - ${2} - end -snippet ife - if ${1:condition} - ${2} - else - ${3} - end -snippet elsif - elsif ${1:condition} - ${2} -snippet unless - unless ${1:condition} - ${2} - end -snippet while - while ${1:condition} - ${2} - end -snippet until - until ${1:condition} - ${2} - end -snippet cla class .. end - class ${1:`substitute(Filename(), '^.', '\u&', '')`} - ${2} - end -snippet cla class .. initialize .. end - class ${1:`substitute(Filename(), '^.', '\u&', '')`} - def initialize(${2:args}) - ${3} - end - - - end -snippet cla class .. < ParentClass .. initialize .. end - class ${1:`substitute(Filename(), '^.', '\u&', '')`} < ${2:ParentClass} - def initialize(${3:args}) - ${4} - end - - - end -snippet cla ClassName = Struct .. do .. end - ${1:`substitute(Filename(), '^.', '\u&', '')`} = Struct.new(:${2:attr_names}) do - def ${3:method_name} - ${4} - end - - - end -snippet cla class BlankSlate .. initialize .. end - class ${1:BlankSlate} - instance_methods.each { |meth| undef_method(meth) unless meth =~ /\A__/ } -snippet cla class << self .. end - class << ${1:self} - ${2} - end -# class .. < DelegateClass .. initialize .. end -snippet cla- - class ${1:`substitute(Filename(), '^.', '\u&', '')`} < DelegateClass(${2:ParentClass}) - def initialize(${3:args}) - super(${4:del_obj}) - - ${5} - end - - - end -snippet mod module .. end - module ${1:`substitute(Filename(), '^.', '\u&', '')`} - ${2} - end -snippet mod module .. module_function .. end - module ${1:`substitute(Filename(), '^.', '\u&', '')`} - module_function - - ${2} - end -snippet mod module .. ClassMethods .. end - module ${1:`substitute(Filename(), '^.', '\u&', '')`} - module ClassMethods - ${2} - end - - module InstanceMethods - - end - - def self.included(receiver) - receiver.extend ClassMethods - receiver.send :include, InstanceMethods - end - end -# attr_reader -snippet r - attr_reader :${1:attr_names} -# attr_writer -snippet w - attr_writer :${1:attr_names} -# attr_accessor -snippet rw - attr_accessor :${1:attr_names} -# include Enumerable -snippet Enum - include Enumerable - - def each(&block) - ${1} - end -# include Comparable -snippet Comp - include Comparable - - def <=>(other) - ${1} - end -# extend Forwardable -snippet Forw- - extend Forwardable -# def self -snippet defs - def self.${1:class_method_name} - ${2} - end -# def method_missing -snippet defmm - def method_missing(meth, *args, &blk) - ${1} - end -snippet defd - def_delegator :${1:@del_obj}, :${2:del_meth}, :${3:new_name} -snippet defds - def_delegators :${1:@del_obj}, :${2:del_methods} -snippet am - alias_method :${1:new_name}, :${2:old_name} -snippet app - if __FILE__ == $PROGRAM_NAME - ${1} - end -# usage_if() -snippet usai - if ARGV.${1} - abort "Usage: #{$PROGRAM_NAME} ${2:ARGS_GO_HERE}"${3} - end -# usage_unless() -snippet usau - unless ARGV.${1} - abort "Usage: #{$PROGRAM_NAME} ${2:ARGS_GO_HERE}"${3} - end -snippet array - Array.new(${1:10}) { |${2:i}| ${3} } -snippet hash - Hash.new { |${1:hash}, ${2:key}| $1[$2] = ${3} } -snippet file File.foreach() { |line| .. } - File.foreach(${1:"path/to/file"}) { |${2:line}| ${3} } -snippet file File.read() - File.read(${1:"path/to/file"})${2} -snippet Dir Dir.global() { |file| .. } - Dir.glob(${1:"dir/glob/*"}) { |${2:file}| ${3} } -snippet Dir Dir[".."] - Dir[${1:"glob/**/*.rb"}]${2} -snippet dir - Filename.dirname(__FILE__) -snippet deli - delete_if { |${1:e}| ${2} } -snippet fil - fill(${1:range}) { |${2:i}| ${3} } -# flatten_once() -snippet flao - inject(Array.new) { |${1:arr}, ${2:a}| $1.push(*$2)}${3} -snippet zip - zip(${1:enums}) { |${2:row}| ${3} } -# downto(0) { |n| .. } -snippet dow - downto(${1:0}) { |${2:n}| ${3} } -snippet ste - step(${1:2}) { |${2:n}| ${3} } -snippet tim - times { |${1:n}| ${2} } -snippet upt - upto(${1:1.0/0.0}) { |${2:n}| ${3} } -snippet loo - loop { ${1} } -snippet ea - each { |${1:e}| ${2} } -snippet eab - each_byte { |${1:byte}| ${2} } -snippet eac- each_char { |chr| .. } - each_char { |${1:chr}| ${2} } -snippet eac- each_cons(..) { |group| .. } - each_cons(${1:2}) { |${2:group}| ${3} } -snippet eai - each_index { |${1:i}| ${2} } -snippet eak - each_key { |${1:key}| ${2} } -snippet eal - each_line { |${1:line}| ${2} } -snippet eap - each_pair { |${1:name}, ${2:val}| ${3} } -snippet eas- - each_slice(${1:2}) { |${2:group}| ${3} } -snippet eav - each_value { |${1:val}| ${2} } -snippet eawi - each_with_index { |${1:e}, ${2:i}| ${3} } -snippet reve - reverse_each { |${1:e}| ${2} } -snippet inj - inject(${1:init}) { |${2:mem}, ${3:var}| ${4} } -snippet map - map { |${1:e}| ${2} } -snippet mapwi- - enum_with_index.map { |${1:e}, ${2:i}| ${3} } -snippet sor - sort { |a, b| ${1} } -snippet sorb - sort_by { |${1:e}| ${2} } -snippet ran - sort_by { rand } -snippet all - all? { |${1:e}| ${2} } -snippet any - any? { |${1:e}| ${2} } -snippet cl - classify { |${1:e}| ${2} } -snippet col - collect { |${1:e}| ${2} } -snippet det - detect { |${1:e}| ${2} } -snippet fet - fetch(${1:name}) { |${2:key}| ${3} } -snippet fin - find { |${1:e}| ${2} } -snippet fina - find_all { |${1:e}| ${2} } -snippet gre - grep(${1:/pattern/}) { |${2:match}| ${3} } -snippet sub - ${1:g}sub(${2:/pattern/}) { |${3:match}| ${4} } -snippet sca - scan(${1:/pattern/}) { |${2:match}| ${3} } -snippet max - max { |a, b| ${1} } -snippet min - min { |a, b| ${1} } -snippet par - partition { |${1:e}| ${2} } -snippet rej - reject { |${1:e}| ${2} } -snippet sel - select { |${1:e}| ${2} } -snippet lam - lambda { |${1:args}| ${2} } -snippet do - do |${1:variable}| - ${2} - end -snippet : - :${1:key} => ${2:"value"}${3} -snippet ope - open(${1:"path/or/url/or/pipe"}, "${2:w}") { |${3:io}| ${4} } -# path_from_here() -snippet patfh - File.join(File.dirname(__FILE__), *%2[${1:rel path here}])${2} -# unix_filter {} -snippet unif - ARGF.each_line${1} do |${2:line}| - ${3} - end -# option_parse {} -snippet optp - require "optparse" - - options = {${1:default => "args"}} - - ARGV.options do |opts| - opts.banner = "Usage: #{File.basename($PROGRAM_NAME)} -snippet opt - opts.on( "-${1:o}", "--${2:long-option-name}", ${3:String}, - "${4:Option description.}") do |${5:opt}| - ${6} - end -snippet ts - require "test/unit" - - require "tc_${1:test_case_file}" - require "tc_${2:test_case_file}"${3} -snippet as - assert(${1:test}, "${2:Failure message.}")${3} -snippet ase - assert_equal(${1:expected}, ${2:actual})${3} -snippet asne - assert_not_equal(${1:unexpected}, ${2:actual})${3} -snippet asid - assert_in_delta(${1:expected_float}, ${2:actual_float}, ${3:2 ** -20})${4} -snippet asio - assert_instance_of(${1:ExpectedClass}, ${2:actual_instance})${3} -snippet asko - assert_kind_of(${1:ExpectedKind}, ${2:actual_instance})${3} -snippet asn - assert_nil(${1:instance})${2} -snippet asnn - assert_not_nil(${1:instance})${2} -snippet asm - assert_match(/${1:expected_pattern}/, ${2:actual_string})${3} -snippet asnm - assert_no_match(/${1:unexpected_pattern}/, ${2:actual_string})${3} -snippet aso - assert_operator(${1:left}, :${2:operator}, ${3:right})${4} -snippet asr - assert_raise(${1:Exception}) { ${2} } -snippet asnr - assert_nothing_raised(${1:Exception}) { ${2} } -snippet asrt - assert_respond_to(${1:object}, :${2:method})${3} -snippet ass assert_same(..) - assert_same(${1:expected}, ${2:actual})${3} -snippet ass assert_send(..) - assert_send([${1:object}, :${2:message}, ${3:args}])${4} -snippet asns - assert_not_same(${1:unexpected}, ${2:actual})${3} -snippet ast - assert_throws(:${1:expected}) { ${2} } -snippet asnt - assert_nothing_thrown { ${1} } -snippet fl - flunk("${1:Failure message.}")${2} -# Benchmark.bmbm do .. end -snippet bm- - TESTS = ${1:10_000} - Benchmark.bmbm do |results| - ${2} - end -snippet rep - results.report("${1:name}:") { TESTS.times { ${2} }} -# Marshal.dump(.., file) -snippet Md - File.open(${1:"path/to/file.dump"}, "wb") { |${2:file}| Marshal.dump(${3:obj}, $2) }${4} -# Mashal.load(obj) -snippet Ml - File.open(${1:"path/to/file.dump"}, "rb") { |${2:file}| Marshal.load($2) }${3} -# deep_copy(..) -snippet deec - Marshal.load(Marshal.dump(${1:obj_to_copy}))${2} -snippet Pn- - PStore.new(${1:"file_name.pstore"})${2} -snippet tra - transaction(${1:true}) { ${2} } -# xmlread(..) -snippet xml- - REXML::Document.new(File.read(${1:"path/to/file"}))${2} -# xpath(..) { .. } -snippet xpa - elements.each(${1:"//Xpath"}) do |${2:node}| - ${3} - end -# class_from_name() -snippet clafn - split("::").inject(Object) { |par, const| par.const_get(const) } -# singleton_class() -snippet sinc - class << self; self end -snippet nam - namespace :${1:`Filename()`} do - ${2} - end -snippet tas - desc "${1:Task description\}" - task :${2:task_name => [:dependent, :tasks]} do - ${3} - end - -# My additions -snippet ed - each do |${1:e}| - ${2} - end -snippet defp - def ${1:method_name}(${2:params}) - ${3} - end -snippet inst - institution${1} -snippet acti - activation_group${1} -snippet prot - protocol${1} -# -# For rspec -snippet desc - describe "${1}" do - ${2} - end -snippet it - it "${1}" do - ${2} - end -snippet con - context "${1}" do - ${2} - end -snippet bed - before do - ${1} - end -snippet cont - context "${1}" do - ${2} - end -snippet spec - require "rails_helper" - - describe ${1} do - ${2} - end -snippet hc - expect(page).to have_content(${1}) -snippet F - Factory(:${1}) -snippet cuke - "([^"]*)" ${1} -snippet let - let(:${1}) { ${2} } -snippet letb - let!(:${1}) { ${2} } -snippet puts - puts "\n\n************ #{${1}} **************\n\n" -snippet mm - def method_missing(method, *args, &block) - @target.send(method, *args, &block) - end -snippet defi - def initialize(${1}) - ${2} - end -snippet ex - expect(${1}).to ${2} -snippet scen - scenario "${1}" do - ${2} - end -snippet save - save_and_open_page -snippet rrh - require "rails_helper" -snippet feat - feature "${1}" do - scenario "${2}" do - ${3} - end - end diff --git a/vim/snippets/sh.snippets b/vim/snippets/sh.snippets deleted file mode 100644 index f035126eec..0000000000 --- a/vim/snippets/sh.snippets +++ /dev/null @@ -1,28 +0,0 @@ -# #!/bin/bash -snippet #! - #!/bin/bash - -snippet if - if [[ ${1:condition} ]]; then - ${2:#statements} - fi -snippet elif - elif [[ ${1:condition} ]]; then - ${2:#statements} -snippet for - for (( ${2:i} = 0; $2 < ${1:count}; $2++ )); do - ${3:#statements} - done -snippet wh - while [[ ${1:condition} ]]; do - ${2:#statements} - done -snippet until - until [[ ${1:condition} ]]; do - ${2:#statements} - done -snippet case - case ${1:word} in - ${2:pattern}) - ${3};; - esac diff --git a/vim/snippets/snippet.snippets b/vim/snippets/snippet.snippets deleted file mode 100644 index 854c058202..0000000000 --- a/vim/snippets/snippet.snippets +++ /dev/null @@ -1,7 +0,0 @@ -# snippets for making snippets :) -snippet snip - snippet ${1:trigger} - ${2} -snippet msnip - snippet ${1:trigger} ${2:description} - ${3} diff --git a/vim/snippets/tcl.snippets b/vim/snippets/tcl.snippets deleted file mode 100644 index 1fe1cb960e..0000000000 --- a/vim/snippets/tcl.snippets +++ /dev/null @@ -1,92 +0,0 @@ -# #!/usr/bin/env tclsh -snippet #! - #!/usr/bin/env tclsh - -# Process -snippet pro - proc ${1:function_name} {${2:args}} { - ${3:#body ...} - } -#xif -snippet xif - ${1:expr}? ${2:true} : ${3:false} -# Conditional -snippet if - if {${1}} { - ${2:# body...} - } -# Conditional if..else -snippet ife - if {${1}} { - ${2:# body...} - } else { - ${3:# else...} - } -# Conditional if..elsif..else -snippet ifee - if {${1}} { - ${2:# body...} - } elseif {${3}} { - ${4:# elsif...} - } else { - ${5:# else...} - } -# If catch then -snippet ifc - if { [catch {${1:#do something...}} ${2:err}] } { - ${3:# handle failure...} - } -# Catch -snippet catch - catch {${1}} ${2:err} ${3:options} -# While Loop -snippet wh - while {${1}} { - ${2:# body...} - } -# For Loop -snippet for - for {set ${2:var} 0} {$$2 < ${1:count}} {${3:incr} $2} { - ${4:# body...} - } -# Foreach Loop -snippet fore - foreach ${1:x} {${2:#list}} { - ${3:# body...} - } -# after ms script... -snippet af - after ${1:ms} ${2:#do something} -# after cancel id -snippet afc - after cancel ${1:id or script} -# after idle -snippet afi - after idle ${1:script} -# after info id -snippet afin - after info ${1:id} -# Expr -snippet exp - expr {${1:#expression here}} -# Switch -snippet sw - switch ${1:var} { - ${3:pattern 1} { - ${4:#do something} - } - default { - ${2:#do something} - } - } -# Case -snippet ca - ${1:pattern} { - ${2:#do something} - }${3} -# Namespace eval -snippet ns - namespace eval ${1:path} {${2:#script...}} -# Namespace current -snippet nsc - namespace current diff --git a/vim/snippets/tex.snippets b/vim/snippets/tex.snippets deleted file mode 100644 index 22f7316532..0000000000 --- a/vim/snippets/tex.snippets +++ /dev/null @@ -1,115 +0,0 @@ -# \begin{}...\end{} -snippet begin - \begin{${1:env}} - ${2} - \end{$1} -# Tabular -snippet tab - \begin{${1:tabular}}{${2:c}} - ${3} - \end{$1} -# Align(ed) -snippet ali - \begin{align${1:ed}} - ${2} - \end{align$1} -# Gather(ed) -snippet gat - \begin{gather${1:ed}} - ${2} - \end{gather$1} -# Equation -snippet eq - \begin{equation} - ${1} - \end{equation} -# Unnumbered Equation -snippet \ - \\[ - ${1} - \\] -# Enumerate -snippet enum - \begin{enumerate} - \item ${1} - \end{enumerate} -# Itemize -snippet item - \begin{itemize} - \item ${1} - \end{itemize} -# Description -snippet desc - \begin{description} - \item[${1}] ${2} - \end{description} -# Matrix -snippet mat - \begin{${1:p/b/v/V/B/small}matrix} - ${2} - \end{$1matrix} -# Cases -snippet cas - \begin{cases} - ${1:equation}, &\text{ if }${2:case}\\ - ${3} - \end{cases} -# Split -snippet spl - \begin{split} - ${1} - \end{split} -# Part -snippet part - \part{${1:part name}} % (fold) - \label{prt:${2:$1}} - ${3} - % part $2 (end) -# Chapter -snippet cha - \chapter{${1:chapter name}} % (fold) - \label{cha:${2:$1}} - ${3} - % chapter $2 (end) -# Section -snippet sec - \section{${1:section name}} % (fold) - \label{sec:${2:$1}} - ${3} - % section $2 (end) -# Sub Section -snippet sub - \subsection{${1:subsection name}} % (fold) - \label{sub:${2:$1}} - ${3} - % subsection $2 (end) -# Sub Sub Section -snippet subs - \subsubsection{${1:subsubsection name}} % (fold) - \label{ssub:${2:$1}} - ${3} - % subsubsection $2 (end) -# Paragraph -snippet par - \paragraph{${1:paragraph name}} % (fold) - \label{par:${2:$1}} - ${3} - % paragraph $2 (end) -# Sub Paragraph -snippet subp - \subparagraph{${1:subparagraph name}} % (fold) - \label{subp:${2:$1}} - ${3} - % subparagraph $2 (end) -snippet itd - \item[${1:description}] ${2:item} -snippet figure - ${1:Figure}~\ref{${2:fig:}}${3} -snippet table - ${1:Table}~\ref{${2:tab:}}${3} -snippet listing - ${1:Listing}~\ref{${2:list}}${3} -snippet section - ${1:Section}~\ref{${2:sec:}}${3} -snippet page - ${1:page}~\pageref{${2}}${3} diff --git a/vim/snippets/vim.snippets b/vim/snippets/vim.snippets deleted file mode 100644 index 64e7807eb4..0000000000 --- a/vim/snippets/vim.snippets +++ /dev/null @@ -1,32 +0,0 @@ -snippet header - " File: ${1:`expand('%:t')`} - " Author: ${2:`g:snips_author`} - " Description: ${3} - ${4:" Last Modified: `strftime("%B %d, %Y")`} -snippet guard - if exists('${1:did_`Filename()`}') || &cp${2: || version < 700} - finish - endif - let $1 = 1${3} -snippet f - fun ${1:function_name}(${2}) - ${3:" code} - endf -snippet for - for ${1:needle} in ${2:haystack} - ${3:" code} - endfor -snippet wh - while ${1:condition} - ${2:" code} - endw -snippet if - if ${1:condition} - ${2:" code} - endif -snippet ife - if ${1:condition} - ${2} - else - ${3} - endif diff --git a/vim/snippets/zsh.snippets b/vim/snippets/zsh.snippets deleted file mode 100644 index 7aee05bd24..0000000000 --- a/vim/snippets/zsh.snippets +++ /dev/null @@ -1,58 +0,0 @@ -# #!/bin/zsh -snippet #! - #!/bin/zsh - -snippet if - if ${1:condition}; then - ${2:# statements} - fi -snippet ife - if ${1:condition}; then - ${2:# statements} - else - ${3:# statements} - fi -snippet elif - elif ${1:condition} ; then - ${2:# statements} -snippet for - for (( ${2:i} = 0; $2 < ${1:count}; $2++ )); do - ${3:# statements} - done -snippet fore - for ${1:item} in ${2:list}; do - ${3:# statements} - done -snippet wh - while ${1:condition}; do - ${2:# statements} - done -snippet until - until ${1:condition}; do - ${2:# statements} - done -snippet repeat - repeat ${1:integer}; do - ${2:# statements} - done -snippet case - case ${1:word} in - ${2:pattern}) - ${3};; - esac -snippet select - select ${1:answer} in ${2:choices}; do - ${3:# statements} - done -snippet ( - ( ${1:#statements} ) -snippet { - { ${1:#statements} } -snippet [ - [[ ${1:test} ]] -snippet always - { ${1:try} } always { ${2:always} } -snippet fun - function ${1:name} (${2:args}) { - ${3:# body} - } From 9b76167861dfb45bc9d6e0203f6a098530fbf5e6 Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Sat, 2 Apr 2016 11:25:49 +0200 Subject: [PATCH 073/144] Javascript woho --- vimrc | 1 + 1 file changed, 1 insertion(+) diff --git a/vimrc b/vimrc index c834e7c1c7..044b08568d 100644 --- a/vimrc +++ b/vimrc @@ -15,6 +15,7 @@ Plugin 'ervandew/supertab' Plugin 'koron/nyancat-vim' Plugin 'tomtom/tcomment_vim' Plugin 'vim-ruby/vim-ruby' +Plugin 'pangloss/vim-javascript' " Plugin 'wincent/Command-T' Plugin 'scrooloose/nerdtree' Plugin 'LaTeX-Box-Team/LaTeX-Box' From 8a21c680c3e7be91eec4938563889ce90452f303 Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Sat, 2 Apr 2016 11:26:33 +0200 Subject: [PATCH 074/144] Some foo --- vimrc | 36 ++++++++++++++++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) diff --git a/vimrc b/vimrc index 044b08568d..20841bb899 100644 --- a/vimrc +++ b/vimrc @@ -32,6 +32,10 @@ Plugin 'tpope/vim-fugitive' Plugin 'slim-template/vim-slim' Plugin 'rizzatti/dash.vim' Plugin 'geoffharcourt/vim-matchit' +Plugin 'Townk/vim-autoclose' + +Plugin 'SirVer/ultisnips' +Plugin 'honza/vim-snippets' " nelstrom's plugin depends on kana's Plugin 'kana/vim-textobj-user' @@ -51,8 +55,15 @@ let g:airline#branch#enabled = 1 " Ctrl-p configurations let g:ctrlp_custom_ignore = { - \ 'dir': '\v(node_modules|bower_components|dist|deps|_build)' + \ 'dir': '\v(node_modules|bower_components|dist|deps|_build)', + \ 'file': '\v\.(pyc)$', \ } + +" NERDTree configuration +let NERDTreeIgnore = ['\.pyc$', '*.egg-info', '__pycache__/*'] +let NERDTreeRespectWildIgnore=1 + + " Colors Plugin 'nanotech/jellybeans.vim' @@ -83,7 +94,27 @@ set cc=80 " Display line at 80 chars " Don't add the comment prefix when I hit enter or o/O on a comment line. set formatoptions-=or -set wildignore+=*/tmp/*,*.so,*.swp,*.zip +set wildignore+=*/tmp/*,*.so,*.swp,*.zip,*.egg-info, + +" LaTeX ignores +set wildignore+=*.aux,*.blg,*.out,*.toc,*.bbl + +" Snippes +" let g:ycm_key_list_select_completion = ['', ''] +" let g:ycm_key_list_previous_completion = ['', ''] +" let g:SuperTabDefaultCompletionType = '' + +" let g:UltiSnipsExpandTrigger="" +" let g:UltiSnipsJumpForwardTrigger="" +" let g:UltiSnipsJumpBackwardTrigger="" +" let g:UltiSnipsEditSplit="vertical" +" Trigger configuration. Do not use if you use +" let g:UltiSnipsExpandTrigger="" +" let g:UltiSnipsJumpForwardTrigger="" +" let g:UltiSnipsJumpBackwardTrigger="" + +" " If you want :UltiSnipsEdit to split your window. +let g:UltiSnipsEditSplit="vertical" " Readable highlight text @@ -106,6 +137,7 @@ hi MatchParen cterm=none ctermbg=black ctermfg=yellow " By default, vim thinks .md is Modula-2. autocmd BufNewFile,BufReadPost *.md set filetype=markdown +autocmd BufNewFile,BufReadPost *.es6 set filetype=javascript " Set FSharp Filetype " au BufRead,BufNewFile *.fs set filetype=fs From 8f513712dc560621846f69eb05a32b19a3f54f6f Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Sat, 2 Apr 2016 11:26:49 +0200 Subject: [PATCH 075/144] Script to check current wifi password --- bin/wifi-pass | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 bin/wifi-pass diff --git a/bin/wifi-pass b/bin/wifi-pass new file mode 100755 index 0000000000..2e8d7cd2b3 --- /dev/null +++ b/bin/wifi-pass @@ -0,0 +1,12 @@ +#!/bin/bash +# Show SSID and password for the currently connected network. Requires sudo. +set -e + +ssid="$(/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -I | sed -n "/ SSID:/s/^.\\{2,\\}: //p")" +if [ -n "$ssid" ]; then + echo "$ssid" + security find-generic-password -ga "$ssid" 2>&1 >/dev/null | cut -d\" -f2 +else + echo "No current wifi network name detected" >&2 + exit 1 +fi From 9aa4b0e0d5b19e1502b7cee053658cce5bc334e7 Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Sat, 2 Apr 2016 11:26:58 +0200 Subject: [PATCH 076/144] Some ultisnippet foo --- vim/UltiSnips/javascript.snippets | 8 +++++ vim/UltiSnips/plaintex.snippets | 52 +++++++++++++++++++++++++++++++ vim/UltiSnips/python.snippets | 4 +++ vim/UltiSnips/tex.snippets | 46 +++++++++++++++++++++++++++ 4 files changed, 110 insertions(+) create mode 100644 vim/UltiSnips/javascript.snippets create mode 100644 vim/UltiSnips/plaintex.snippets create mode 100644 vim/UltiSnips/python.snippets create mode 100644 vim/UltiSnips/tex.snippets diff --git a/vim/UltiSnips/javascript.snippets b/vim/UltiSnips/javascript.snippets new file mode 100644 index 0000000000..f2e670a1c4 --- /dev/null +++ b/vim/UltiSnips/javascript.snippets @@ -0,0 +1,8 @@ +snippet i18n +i18n: Ember.inject.service(), +$0 +endsnippet + +snippet tran +import { translationMacro as t } from "ember-i18n"; +endsnippet diff --git a/vim/UltiSnips/plaintex.snippets b/vim/UltiSnips/plaintex.snippets new file mode 100644 index 0000000000..d895e5fcb2 --- /dev/null +++ b/vim/UltiSnips/plaintex.snippets @@ -0,0 +1,52 @@ +snippet chap +\chapter{${1:chapter name}} +\label{subsec:${2:${1/\\\+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:_:\L$1$2$3\E)/g}}} + +% chapter ${1/\\\+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:_:\L$1$2$3\E)/g} end +$0 +endsnippet + +snippet sec +\section{${1:section name}} +\label{sec:${2:${1/\\\+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:_:\L$1$2$3\E)/g}}} + +% section ${1/\\\+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:_:\L$1$2$3\E)/g} end +$0 +endsnippet + +snippet sub +\subsection{${1:section name}} +\label{subsec:${2:${1/\\\+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:_:\L$1$2$3\E)/g}}} + +% subsection ${1/\\\+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:_:\L$1$2$3\E)/g} end +$0 +endsnippet + +snippet fig +\begin{figure*}[ht!] + \centering + \includegraphics[width=1.0\linewidth]{${1:filename}} + \caption{${2:caption}} + \label{fig:${3:label}} +\end{figure*} + +$0 +endsnippet + +snippet code +\begin{lstlisting} +$1 +\end{lstlisting} +endsnippet + +snippet item +\begin{itemize} + \item $1 +\end{itemize} +endsnippet + +snippet enum +\begin{enumerate} + \item $1 +\end{enumerate} +endsnippet diff --git a/vim/UltiSnips/python.snippets b/vim/UltiSnips/python.snippets new file mode 100644 index 0000000000..79c4e4a505 --- /dev/null +++ b/vim/UltiSnips/python.snippets @@ -0,0 +1,4 @@ +snippet pry +import code; code.interact(local=locals()) +$0 +endsnippet diff --git a/vim/UltiSnips/tex.snippets b/vim/UltiSnips/tex.snippets new file mode 100644 index 0000000000..f7e26ab041 --- /dev/null +++ b/vim/UltiSnips/tex.snippets @@ -0,0 +1,46 @@ +snippet chap +\chapter{${1:chapter name}} +\label{chapter:${2:${1/\\\+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:_:\L$1$2$3\E)/g}}} + +% chapter ${1/\\\+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:_:\L$1$2$3\E)/g} end +$0 +endsnippet + +snippet sec +\section{${1:section name}} +\label{sec:${2:${1/\\\+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:_:\L$1$2$3\E)/g}}} + +% section ${1/\\\+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:_:\L$1$2$3\E)/g} end +$0 +endsnippet + +snippet sub +\subsection{${1:section name}} +\label{subsec:${2:${1/\\\+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:_:\L$1$2$3\E)/g}}} + +% subsection ${1/\\\+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:_:\L$1$2$3\E)/g} end +$0 +endsnippet + +snippet fig +\begin{figure*}[ht!] + \centering + \includegraphics[width=1.0\linewidth]{${1:filename}} + \caption{${2:caption}} + \label{fig:${3:label}} +\end{figure*} + +$0 +endsnippet + +snippet code +\begin{lstlisting} +$1 +\end{lstlisting} +endsnippet + +snippet item +\begin{itemize} + \item $1 +\end{itemize} +endsnippet From dc5c099eafa1f910a36abcf632a3991acf93de0a Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Sat, 2 Apr 2016 11:27:19 +0200 Subject: [PATCH 077/144] Test command for py.test --- vimrc | 1 + 1 file changed, 1 insertion(+) diff --git a/vimrc b/vimrc index 20841bb899..af1bdeeaaf 100644 --- a/vimrc +++ b/vimrc @@ -183,6 +183,7 @@ map sv :source ~/.vimrc map d orequire 'pry'binding.pry:w map ra :%s/ map rd :!bundle exec rspec % --format documentation +map pt :!py.test map mt :!mix test % map np :set nopaste :retab map rf :CommandTFlush:CommandT From 069027d294f48b04d08532de14a3716f10b681fe Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Sat, 2 Apr 2016 11:27:26 +0200 Subject: [PATCH 078/144] New aliases --- zsh/aliases | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/zsh/aliases b/zsh/aliases index 98d0c2e797..7d13afec28 100644 --- a/zsh/aliases +++ b/zsh/aliases @@ -36,10 +36,16 @@ alias tms="mux start" alias msg="tms goodiepack" alias msgo="tms goodiepack-organization" alias msgs="tms goodiepack_showroom" +alias mst="tms thesis" +alias mspg="tms peergrade" + alias ksg="tmk goodiepack" alias ksgo="tmk goodiepack-organization" alias ksgs="tmk goodiepack_showroom" +# Python +alias kpg="pkill -f run_debug.py" + # Git alias gs="git status" alias gp="git add . -p" From 6997c11cf03d66e4759f7bd00f78deafd37d3f62 Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Sat, 2 Apr 2016 11:27:34 +0200 Subject: [PATCH 079/144] Simplified git promt And removed the time since last commit since it was slow --- zsh/anderslime.zsh-theme | 116 +-------------------------------------- 1 file changed, 3 insertions(+), 113 deletions(-) diff --git a/zsh/anderslime.zsh-theme b/zsh/anderslime.zsh-theme index 30c318a6c3..cc28ef4f50 100644 --- a/zsh/anderslime.zsh-theme +++ b/zsh/anderslime.zsh-theme @@ -1,11 +1,11 @@ -PROMPT=$'%F{114}%m%{$reset_color%}:%c$(git_time_since_commit)$(git_prompt_info) %F{222}$ %{$reset_color%}' +PROMPT=$'%F{114}%m%{$reset_color%}:%c$(git_prompt_info) %F{222}$ %{$reset_color%}' local return_status="%{$fg[red]%}%(?..⏎)%{$reset_color%}" -RPROMPT='${return_status}$(git_prompt_status)%{$reset_color%}' +RPROMPT='${return_status}%{$reset_color%}' DIRTY_YELLOW_COLOR="%F{220}" LONG_SINCE_COMMIT_RED="%F{9}" -ZSH_THEME_GIT_PROMPT_PREFIX="%F{110}" +ZSH_THEME_GIT_PROMPT_PREFIX="(%F{110}" ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%})" ZSH_THEME_GIT_PROMPT_DIRTY="$LONG_SINCE_COMMIT_RED!" ZSH_THEME_GIT_PROMPT_CLEAN="" @@ -25,113 +25,3 @@ ZSH_THEME_GIT_TIME_SHORT_COMMIT_MEDIUM=$DIRTY_YELLOW_COLOR ZSH_THEME_GIT_TIME_SINCE_COMMIT_LONG=$LONG_SINCE_COMMIT_RED ZSH_THEME_GIT_TIME_SINCE_COMMIT_NEUTRAL=$reset_color -# Determine the time since last commit. If branch is clean, -# use a neutral color, otherwise colors will vary according to time. -# Modified version inspired from: -# https://github.com/robbyrussell/oh-my-zsh/blob/master/themes/Soliah.zsh-theme -function git_time_since_commit() { - if git rev-parse --git-dir > /dev/null 2>&1; then - # Only proceed if there is actually a commit. - if [[ $(git log 2>&1 > /dev/null | grep -c "^fatal: bad default revision") == 0 ]]; then - # Get the last commit. - last_commit=`git log --pretty=format:'%at' -1 2> /dev/null` - now=`date +%s` - seconds_since_last_commit=$((now-last_commit)) - - # Totals - MINUTES=$((seconds_since_last_commit / 60)) - HOURS=$((seconds_since_last_commit/3600)) - - # Sub-hours and sub-minutes - DAYS=$((seconds_since_last_commit / 86400)) - SUB_HOURS=$((HOURS % 24)) - SUB_MINUTES=$((MINUTES % 60)) - - if [ "$MINUTES" -gt 30 ]; then - COLOR="$ZSH_THEME_GIT_TIME_SINCE_COMMIT_LONG" - elif [ "$MINUTES" -gt 10 ]; then - COLOR="$ZSH_THEME_GIT_TIME_SHORT_COMMIT_MEDIUM" - else - COLOR="$ZSH_THEME_GIT_TIME_SINCE_COMMIT_SHORT" - fi - - if [ "$HOURS" -gt 24 ]; then - echo "($COLOR${DAYS}d${SUB_HOURS}h${SUB_MINUTES}m%{$reset_color%}|" - elif [ "$MINUTES" -gt 60 ]; then - echo "($COLOR${HOURS}h${SUB_MINUTES}m%{$reset_color%}|" - else - echo "($COLOR${MINUTES}m%{$reset_color%}|" - fi - else - COLOR="$ZSH_THEME_GIT_TIME_SINCE_COMMIT_NEUTRAL" - echo "($COLOR~|" - fi - fi -} - -function git_prompt_status { - INDEX=$(command git status --porcelain -b 2> /dev/null) - STATUS="" - if $(echo "$INDEX" | grep -E '^\?\? ' &> /dev/null); then - STATUS="$ZSH_THEME_GIT_PROMPT_UNTRACKED$STATUS" - fi - if $(echo "$INDEX" | grep '^A ' &> /dev/null); then - STATUS="$ZSH_THEME_GIT_PROMPT_ADDED$STATUS" - elif $(echo "$INDEX" | grep '^M ' &> /dev/null); then - STATUS="$ZSH_THEME_GIT_PROMPT_ADDED$STATUS" - fi - if $(echo "$INDEX" | grep '^ M ' &> /dev/null); then - STATUS="$ZSH_THEME_GIT_PROMPT_MODIFIED$STATUS" - elif $(echo "$INDEX" | grep '^AM ' &> /dev/null); then - STATUS="$ZSH_THEME_GIT_PROMPT_MODIFIED$STATUS" - elif $(echo "$INDEX" | grep '^ T ' &> /dev/null); then - STATUS="$ZSH_THEME_GIT_PROMPT_MODIFIED$STATUS" - fi - if $(echo "$INDEX" | grep '^R ' &> /dev/null); then - STATUS="$ZSH_THEME_GIT_PROMPT_RENAMED$STATUS" - fi - if $(echo "$INDEX" | grep '^ D ' &> /dev/null); then - STATUS="$ZSH_THEME_GIT_PROMPT_DELETED$STATUS" - elif $(echo "$INDEX" | grep '^D ' &> /dev/null); then - STATUS="$ZSH_THEME_GIT_PROMPT_DELETED$STATUS" - elif $(echo "$INDEX" | grep '^AD ' &> /dev/null); then - STATUS="$ZSH_THEME_GIT_PROMPT_DELETED$STATUS" - fi - if $(command git rev-parse --verify refs/stash >/dev/null 2>&1); then - STATUS="$ZSH_THEME_GIT_PROMPT_STASHED$STATUS" - fi - if $(echo "$INDEX" | grep '^UU ' &> /dev/null); then - STATUS="$ZSH_THEME_GIT_PROMPT_UNMERGED$STATUS" - fi - if $(echo "$INDEX" | grep '^## .*ahead' &> /dev/null); then - STATUS="$ZSH_THEME_GIT_PROMPT_AHEAD$STATUS" - fi - if $(echo "$INDEX" | grep '^## .*behind' &> /dev/null); then - STATUS="$ZSH_THEME_GIT_PROMPT_BEHIND$STATUS" - fi - if $(echo "$INDEX" | grep '^## .*diverged' &> /dev/null); then - STATUS="$ZSH_THEME_GIT_PROMPT_DIVERGED$STATUS" - fi - echo $STATUS -} - -# Checks if working tree is dirty -function parse_rprompt_git_dirty { - local STATUS='' - local FLAGS - FLAGS=('--porcelain') - if [[ "$(command git config --get oh-my-zsh.hide-dirty)" != "1" ]]; then - if [[ $POST_1_7_2_GIT -gt 0 ]]; then - FLAGS+='--ignore-submodules=dirty' - fi - if [[ "$DISABLE_UNTRACKED_FILES_DIRTY" == "true" ]]; then - FLAGS+='--untracked-files=no' - fi - STATUS=$(command git status ${FLAGS} 2> /dev/null | tail -n1) - fi - if [[ -n $STATUS ]]; then - echo "$GIT_RPROMPT_DIRTY" - else - echo "$GIT_RPROMPT_CLEAN" - fi -} From 764c406b369100b535cf6f06d556005a964dbf77 Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Tue, 10 May 2016 13:56:35 +0200 Subject: [PATCH 080/144] Battery and wifi in tmux --- tmux.conf | 10 +++++++++- vimrc | 3 +-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/tmux.conf b/tmux.conf index 0f0f31e134..c949988a26 100644 --- a/tmux.conf +++ b/tmux.conf @@ -73,7 +73,7 @@ set -g status-interval 30 # center the status bar set -g status-justify left -set -g status-right "%m-%d-%Y %H-%M #(whoami)" +set -g status-right 'B: #{battery_icon} #{battery_percentage} #{battery_remain} | I: #{online_status} | %a %d/%h %H:%M' ########################### # Copying @@ -105,3 +105,11 @@ set -g pane-border-fg colour235 set -g pane-border-bg black set -g pane-active-border-fg green set -g pane-active-border-bg black + +# List of plugins +set -g @plugin 'tmux-plugins/tpm' +set -g @plugin 'tmux-plugins/tmux-battery' +set -g @plugin 'tmux-plugins/tmux-online-status' + +# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) +run '~/.tmux/plugins/tpm/tpm' diff --git a/vimrc b/vimrc index af1bdeeaaf..f3551fadec 100644 --- a/vimrc +++ b/vimrc @@ -45,7 +45,6 @@ Plugin 'nelstrom/vim-textobj-rubyblock' Plugin 'bling/vim-airline' " UI statusbar niceties set laststatus=2 " enable airline even if no splits let g:airline_theme='luna' -let g:airline_powerline_fonts=1 let g:airline_powerline_fonts = 1 let g:airline_left_sep = '' let g:airline_right_sep = '' @@ -94,7 +93,7 @@ set cc=80 " Display line at 80 chars " Don't add the comment prefix when I hit enter or o/O on a comment line. set formatoptions-=or -set wildignore+=*/tmp/*,*.so,*.swp,*.zip,*.egg-info, +set wildignore+=*/tmp/*,*.so,*.swp,*.zip,*.egg-info,*.git " LaTeX ignores set wildignore+=*.aux,*.blg,*.out,*.toc,*.bbl From c3a3c26e5d966c5e9cdc3ebbca13acb0b25d3ad2 Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Tue, 10 May 2016 13:56:53 +0200 Subject: [PATCH 081/144] Python and thesis stuff --- vim/UltiSnips/plaintex.snippets | 2 +- vim/spell/en.utf-8.add | 4 ++++ vimrc | 7 +++++++ zsh/aliases | 4 ++++ zshrc | 3 +++ 5 files changed, 19 insertions(+), 1 deletion(-) diff --git a/vim/UltiSnips/plaintex.snippets b/vim/UltiSnips/plaintex.snippets index d895e5fcb2..2852a3aac0 100644 --- a/vim/UltiSnips/plaintex.snippets +++ b/vim/UltiSnips/plaintex.snippets @@ -1,6 +1,6 @@ snippet chap \chapter{${1:chapter name}} -\label{subsec:${2:${1/\\\+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:_:\L$1$2$3\E)/g}}} +\label{chapter:${2:${1/\\\+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:_:\L$1$2$3\E)/g}}} % chapter ${1/\\\+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:_:\L$1$2$3\E)/g} end $0 diff --git a/vim/spell/en.utf-8.add b/vim/spell/en.utf-8.add index fe1c23d866..53d45b6563 100644 --- a/vim/spell/en.utf-8.add +++ b/vim/spell/en.utf-8.add @@ -2,3 +2,7 @@ Upcase www screenshot UX +scalability +scalable +precompute +precomputation diff --git a/vimrc b/vimrc index f3551fadec..5ff8250d1f 100644 --- a/vimrc +++ b/vimrc @@ -58,6 +58,12 @@ let g:ctrlp_custom_ignore = { \ 'file': '\v\.(pyc)$', \ } +" Cache in Ctrl-p +" let g:ctrlp_cache_dir = $HOME . '/.cache/ctrlp' +" if executable('ag') +" let g:ctrlp_user_command = 'ag %s -l --nocolor -g ""' +" endif + " NERDTree configuration let NERDTreeIgnore = ['\.pyc$', '*.egg-info', '__pycache__/*'] let NERDTreeRespectWildIgnore=1 @@ -183,6 +189,7 @@ map d orequire 'pry'binding.pry:w map ra :%s/ map rd :!bundle exec rspec % --format documentation map pt :!py.test +map ptf :!py.test -c pytest-fast.ini map mt :!mix test % map np :set nopaste :retab map rf :CommandTFlush:CommandT diff --git a/zsh/aliases b/zsh/aliases index 7d13afec28..a3d0c2b5a8 100644 --- a/zsh/aliases +++ b/zsh/aliases @@ -28,6 +28,7 @@ alias bus='bundle update --source=' alias dc='docker-compose' # Tmux/mux +alias mux="tmuxinator" alias tmk="tmux kill-session -t" alias tma="tmux attach -t" alias tms="mux start" @@ -105,3 +106,6 @@ alias cuuid="uuid | pbcopy" alias lx="pdflatex" alias lxr="lx report && open report.pdf" alias lxbr="lx report && bibtex report && lx report && lx report && open report.pdf" + +# Thesis +alias is="pip uninstall smache | yes | pip install ../smache" diff --git a/zshrc b/zshrc index f4fb1146ac..be9831396c 100644 --- a/zshrc +++ b/zshrc @@ -29,6 +29,9 @@ source $(brew --prefix nvm)/nvm.sh # Load oh my zsh source $ZSH/oh-my-zsh.sh +# Python +export PYTHONIOENCODING=utf-8 + # PATH export PATH=$HOME/bin:$HOME/.dotfiles/bin:/usr/local/bin:/usr/local/sbin:$PATH From 039922cdb46f839d5c2c96b95fce437a50a7fea4 Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Tue, 23 Aug 2016 09:26:22 +0200 Subject: [PATCH 082/144] Ignore Intellij stuff --- gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gitignore b/gitignore index 44a1aad24c..860ff9033d 100644 --- a/gitignore +++ b/gitignore @@ -10,3 +10,5 @@ project-notes.txt .vimrc Guardfile .powenv +.idea +.iml From 1efca1b8cc6c1a38e45d803a1013e25eda154364 Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Tue, 23 Aug 2016 09:27:18 +0200 Subject: [PATCH 083/144] Latex stuff --- vim/UltiSnips/plaintex.snippets | 53 +------------------------------- vim/UltiSnips/tex.snippets | 26 ++++++++++++---- vim/spell/en.utf-8.add | 1 + vim/spell/en.utf-8.add.spl | Bin 72 -> 155 bytes 4 files changed, 22 insertions(+), 58 deletions(-) mode change 100644 => 120000 vim/UltiSnips/plaintex.snippets diff --git a/vim/UltiSnips/plaintex.snippets b/vim/UltiSnips/plaintex.snippets deleted file mode 100644 index 2852a3aac0..0000000000 --- a/vim/UltiSnips/plaintex.snippets +++ /dev/null @@ -1,52 +0,0 @@ -snippet chap -\chapter{${1:chapter name}} -\label{chapter:${2:${1/\\\+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:_:\L$1$2$3\E)/g}}} - -% chapter ${1/\\\+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:_:\L$1$2$3\E)/g} end -$0 -endsnippet - -snippet sec -\section{${1:section name}} -\label{sec:${2:${1/\\\+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:_:\L$1$2$3\E)/g}}} - -% section ${1/\\\+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:_:\L$1$2$3\E)/g} end -$0 -endsnippet - -snippet sub -\subsection{${1:section name}} -\label{subsec:${2:${1/\\\+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:_:\L$1$2$3\E)/g}}} - -% subsection ${1/\\\+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:_:\L$1$2$3\E)/g} end -$0 -endsnippet - -snippet fig -\begin{figure*}[ht!] - \centering - \includegraphics[width=1.0\linewidth]{${1:filename}} - \caption{${2:caption}} - \label{fig:${3:label}} -\end{figure*} - -$0 -endsnippet - -snippet code -\begin{lstlisting} -$1 -\end{lstlisting} -endsnippet - -snippet item -\begin{itemize} - \item $1 -\end{itemize} -endsnippet - -snippet enum -\begin{enumerate} - \item $1 -\end{enumerate} -endsnippet diff --git a/vim/UltiSnips/plaintex.snippets b/vim/UltiSnips/plaintex.snippets new file mode 120000 index 0000000000..bb265dfc08 --- /dev/null +++ b/vim/UltiSnips/plaintex.snippets @@ -0,0 +1 @@ +tex.snippets \ No newline at end of file diff --git a/vim/UltiSnips/tex.snippets b/vim/UltiSnips/tex.snippets index f7e26ab041..efcc906ee8 100644 --- a/vim/UltiSnips/tex.snippets +++ b/vim/UltiSnips/tex.snippets @@ -1,24 +1,32 @@ snippet chap \chapter{${1:chapter name}} -\label{chapter:${2:${1/\\\+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:_:\L$1$2$3\E)/g}}} +\label{chapter:${2:${1/\\\+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:-:\L$1$2$3\E)/g}}} -% chapter ${1/\\\+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:_:\L$1$2$3\E)/g} end +% chapter ${1/\\\+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:-:\L$1$2$3\E)/g} end $0 endsnippet snippet sec \section{${1:section name}} -\label{sec:${2:${1/\\\+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:_:\L$1$2$3\E)/g}}} +\label{sec:${2:${1/\\\+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:-:\L$1$2$3\E)/g}}} -% section ${1/\\\+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:_:\L$1$2$3\E)/g} end +% section ${1/\\\+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:-:\L$1$2$3\E)/g} end $0 endsnippet snippet sub \subsection{${1:section name}} -\label{subsec:${2:${1/\\\+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:_:\L$1$2$3\E)/g}}} +\label{subsec:${2:${1/\\\+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:-:\L$1$2$3\E)/g}}} -% subsection ${1/\\\+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:_:\L$1$2$3\E)/g} end +% subsection ${1/\\\+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:-:\L$1$2$3\E)/g} end +$0 +endsnippet + +snippet subs +\subsubsection{${1:section name}} +\label{subsubsec:${2:${1/\\\+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:-:\L$1$2$3\E)/g}}} + +% subsubsection ${1/\\\+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:-:\L$1$2$3\E)/g} end $0 endsnippet @@ -44,3 +52,9 @@ snippet item \item $1 \end{itemize} endsnippet + +snippet enum +\begin{enumerate} + \item $1 +\end{enumerate} +endsnippet diff --git a/vim/spell/en.utf-8.add b/vim/spell/en.utf-8.add index 53d45b6563..0c4f9d636a 100644 --- a/vim/spell/en.utf-8.add +++ b/vim/spell/en.utf-8.add @@ -6,3 +6,4 @@ scalability scalable precompute precomputation +lifecycle diff --git a/vim/spell/en.utf-8.add.spl b/vim/spell/en.utf-8.add.spl index 626be424c444617d5df6fc37eae318184891dd9a..08cb9658d1caf8929ff38be078a7c7e572ac9f8b 100644 GIT binary patch literal 155 zcmXYrK@P$&3iP zX(n+e(y^$slre68;6-7gdBE%#X+j59-P3s(MF(!4lpL~560uGftw(w)k3ZkMymdV& Oin!xD<_(?o$FIIcAsj^j delta 45 zcmbQu=%E(o>04Zonv-MnpMilvo4L5OoH3cPh%pri^B9X6GZ^z3OBfj@Rw@AiB;O0x From 73252506a775fd822a1792f93d609f3bfb4b9e7f Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Tue, 23 Aug 2016 09:27:35 +0200 Subject: [PATCH 084/144] Various vim stuff --- vimrc | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/vimrc b/vimrc index 5ff8250d1f..11efc98162 100644 --- a/vimrc +++ b/vimrc @@ -30,9 +30,9 @@ Plugin 'tpope/vim-rails' Plugin 'tpope/vim-surround' Plugin 'tpope/vim-fugitive' Plugin 'slim-template/vim-slim' -Plugin 'rizzatti/dash.vim' Plugin 'geoffharcourt/vim-matchit' Plugin 'Townk/vim-autoclose' +Plugin 'rizzatti/dash.vim' Plugin 'SirVer/ultisnips' Plugin 'honza/vim-snippets' @@ -132,7 +132,7 @@ highlight SignColumn ctermbg=black set grepprg=ag let g:ackprg = 'ag --vimgrep' -set list listchars=tab:»·,trail:· +" set list listchars=tab:»·,trail:· syntax on " syntax highlighting colorscheme jellybeans @@ -144,6 +144,11 @@ hi MatchParen cterm=none ctermbg=black ctermfg=yellow autocmd BufNewFile,BufReadPost *.md set filetype=markdown autocmd BufNewFile,BufReadPost *.es6 set filetype=javascript +" Spell checker on these files +autocmd BufRead,BufNewFile *.md setlocal spell +autocmd BufRead,BufNewFile *.tex setlocal spell +set complete+=kspell + " Set FSharp Filetype " au BufRead,BufNewFile *.fs set filetype=fs " au BufRead,BufNewFile *.fsx set filetype=fs @@ -183,15 +188,17 @@ let mapleader = "," vmap b :!git blame =expand("%:p") \| sed -n =line("'<") ,=line("'>") p map bb :!bundle install nmap bi :source ~/.vimrc:PluginInstall +nmap d DashSearch map st :source % map sv :source ~/.vimrc -map d orequire 'pry'binding.pry:w +" map d orequire 'pry'binding.pry:w map ra :%s/ map rd :!bundle exec rspec % --format documentation map pt :!py.test map ptf :!py.test -c pytest-fast.ini map mt :!mix test % map np :set nopaste :retab +map p :set paste map rf :CommandTFlush:CommandT map rw :%s/\s\+$//:w map :%s/\s\+$//:w @@ -201,7 +208,6 @@ map :NERDTreeToggle map e :e =escape(expand("%:p:h"),' ') . '/' map s :split =escape(expand("%:p:h"), ' ') . '/' map v :vnew =escape(expand("%:p:h"), ' ') . '/' -map c i_r map stt :%retab! " Beginning and end of files as in terminal @@ -218,6 +224,7 @@ nnoremap rit :RInlineTemp vnoremap rrlv :RRenameLocalVariable vnoremap rriv :RRenameInstanceVariable vnoremap rem :RExtractMethod +vnoremap // y/"" " Rubocop let g:vimrubocop_keymap = 0 From e8ffaa74c31dfccb3d7335e2eaa6a7c11d0c869d Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Tue, 23 Aug 2016 09:27:43 +0200 Subject: [PATCH 085/144] Cleaned up aliases --- zsh/aliases | 104 +++++++++++++++++++++------------------------------- 1 file changed, 41 insertions(+), 63 deletions(-) diff --git a/zsh/aliases b/zsh/aliases index a3d0c2b5a8..78e189aa9a 100644 --- a/zsh/aliases +++ b/zsh/aliases @@ -1,51 +1,52 @@ -# Handle the fact that this file will be used with multiple OSs -alias amend="git commit --amend" +# UNIX alias aliases='vim ~/.dotfiles/zsh/aliases' alias code='cd ~/code' -alias d='cd ~/.dotfiles' +alias dot='cd ~/.dotfiles' alias drop='cd ~/Dropbox' -alias gd='git diff' -alias gdc='git diff --cached' -alias gdm='git diff master' -alias gg='git lg' -alias so='source ~/.dotfiles/zsh/aliases' -alias startpostgres='pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start' -alias startredis='redis-server /usr/local/etc/redis.conf &' -alias stoppostgres='pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log stop' -alias sync='git add -u . && git commit -m "Minor changes. Commit message skipped." && gpo' -alias undeployed='git fetch --multiple production origin && git log production/master..origin/master' +alias so='source ~/.zshrc' +alias uuid="uuidgen | tr '[:upper:]' '[:lower:]'" +alias cuuid="uuid | pbcopy" +alias prettyjson='python -m json.tool' +alias jsonvim='prettyjson | vim -c "set syntax=json" -' +alias jsonless='prettyjson | less' + +# Vim alias v='vim' alias vi='vim' -alias gemconsole="irb -rubygems -I lib -r ${PWD##*/}.rb" -# Bundler +# Tmux +alias ts="tmux list-sessions" +alias ta="tmux attach -t" +alias tkill="tmux kill-session -t" +alias mux="tmuxinator" +alias tmk="tmux kill-session -t" +alias tma="tmux attach -t" +alias ms="mux start" + +# Ruby +alias gemconsole="irb -rubygems -I lib -r ${PWD##*/}.rb" alias bake='bundle exec rake' alias be='bundle exec' alias bu='bundle update' alias bus='bundle update --source=' -# Docker -alias dc='docker-compose' +# Rails +alias devlog="tail -f log/development.log" +alias rc="rails c" -# Tmux/mux -alias mux="tmuxinator" -alias tmk="tmux kill-session -t" -alias tma="tmux attach -t" -alias tms="mux start" +# Ember +alias es="ember serve" -## Tmux GoodiePack -alias msg="tms goodiepack" -alias msgo="tms goodiepack-organization" -alias msgs="tms goodiepack_showroom" -alias mst="tms thesis" -alias mspg="tms peergrade" +# PostgreSQL +alias stoppostgres='pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log stop' +alias startpostgres='pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start' -alias ksg="tmk goodiepack" -alias ksgo="tmk goodiepack-organization" -alias ksgs="tmk goodiepack_showroom" +# Redis +alias startredis='redis-server /usr/local/etc/redis.conf &' -# Python -alias kpg="pkill -f run_debug.py" +# Docker +alias dc='docker-compose' +alias dinit='eval $(docker-machine env)' # Git alias gs="git status" @@ -67,23 +68,17 @@ alias gca="git commit --amend" alias gcon='git checkout -b' alias grm="git ri master" alias gitres="git add . -A && git rebase --continue" - -# Fsharp -alias cwhile="fslex Lexer.fsl && fsyacc --module Parser Parser.fsy" -alias whilerun="fsharpi --use:Script.fsx" -alias fswhile="cwhile && whilerun" - -# Rails -alias devlog="tail -f log/development.log" -alias rc="rails c" +alias gclean="remove_untracked_files" +alias amend="git commit --amend" +alias gd='git diff' +alias gdc='git diff --cached' +alias gdm='git diff master' +alias gg='git lg' +alias undeployed='git fetch --multiple production origin && git log production/master..origin/master' # Pow alias pr="powder -r" -# Ember -alias es="ember serve" -alias ges="ember server --proxy http://goodiepack.dev" - # Heroku alias gpp="git push production master && hp rake db:migrate" alias gps="git push staging master && hs rake db:migrate" @@ -92,20 +87,3 @@ alias hds="git push origin master && gps" alias hlogs='heroku logs -t' alias hs="h staging" alias hp="h production" - -# Tmux -alias ts="tmux list-sessions" -alias ta="tmux attach -t" -alias tkill="tmux kill-session -t" - -# Misc -alias uuid="uuidgen | tr '[:upper:]' '[:lower:]'" -alias cuuid="uuid | pbcopy" - -# Latex -alias lx="pdflatex" -alias lxr="lx report && open report.pdf" -alias lxbr="lx report && bibtex report && lx report && lx report && open report.pdf" - -# Thesis -alias is="pip uninstall smache | yes | pip install ../smache" From 7188c68c52441ecfcd16414fce0a8db7717e7753 Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Tue, 23 Aug 2016 09:27:54 +0200 Subject: [PATCH 086/144] Speed up terminal upstart --- zsh/functions | 10 ++++++++++ zshrc | 22 +++------------------- 2 files changed, 13 insertions(+), 19 deletions(-) diff --git a/zsh/functions b/zsh/functions index 3481e6645d..2734df36a7 100644 --- a/zsh/functions +++ b/zsh/functions @@ -65,3 +65,13 @@ alias en=note function h { heroku $2 --remote=$1 ${@:3} } + +function remove_untracked_files { + git clean -f -n + read -q "REPLY?Above files will be removed. Are you sure?" -r 1 -n + echo + if [[ $REPLY =~ ^[Yy]$ ]] + then + git clean -f + fi +} diff --git a/zshrc b/zshrc index be9831396c..482d114977 100644 --- a/zshrc +++ b/zshrc @@ -17,33 +17,19 @@ chpwd() { ls -lrthG } -# Fsharp stuf -export MONO_GAC_PREFIX="/usr/local" -alias fslex="mono ~/code/FSharpPowerPack-4.0.0.0/bin/fslex.exe" -alias fsyacc="mono ~/code/FSharpPowerPack-4.0.0.0/bin/fsyacc.exe" - # Node Version Manager -export NVM_DIR=~/.nvm -source $(brew --prefix nvm)/nvm.sh +# export NVM_DIR=~/.nvm +# source $(brew --prefix nvm)/nvm.sh # Load oh my zsh source $ZSH/oh-my-zsh.sh # Python -export PYTHONIOENCODING=utf-8 +# export PYTHONIOENCODING=utf-8 # PATH export PATH=$HOME/bin:$HOME/.dotfiles/bin:/usr/local/bin:/usr/local/sbin:$PATH -# Loklaebase stuff -export PATH=$HOME/code/lb/bin:$PATH -export DOCKER_HOST=tcp://192.168.59.103:2376 -export DOCKER_CERT_PATH=/Users/anderslime/.boot2docker/certs/boot2docker-vm -export DOCKER_TLS_VERIFY=1 - -# Section CLI -export PATH=$HOME/code/section.cli:$PATH - # You may need to manually set your language environment export LANG=en_US.UTF-8 export EDITOR='vim' @@ -51,8 +37,6 @@ export EDITOR='vim' source /Users/anderslime/.dotfiles/zsh/aliases source /Users/anderslime/.dotfiles/zsh/functions source /Users/anderslime/.dotfiles/zsh/credentials -# source /Users/anderslime/.dotfiles/zsh/prompt -# source ~/.bin/tmuxinator.zsh # added by travis gem [ -f /Users/anderslime/.travis/travis.sh ] && source /Users/anderslime/.travis/travis.sh From 08328aa3f097a90c3e1954c6812fe7988f732b21 Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Tue, 23 Aug 2016 09:30:55 +0200 Subject: [PATCH 087/144] More tmux aliases --- zsh/aliases | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/zsh/aliases b/zsh/aliases index 78e189aa9a..d3de1c9b7e 100644 --- a/zsh/aliases +++ b/zsh/aliases @@ -87,3 +87,8 @@ alias hds="git push origin master && gps" alias hlogs='heroku logs -t' alias hs="h staging" alias hp="h production" + +# Projects +alias cargo="mux start cargoflux" +alias oddset="mux start oddset" +alias mitid="mux start mitid" From 574aae98e393e7395f36053ff260e668933cf76c Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Thu, 25 Aug 2016 13:06:32 +0200 Subject: [PATCH 088/144] Set LC_ALL for saws to work --- zshrc | 1 + 1 file changed, 1 insertion(+) diff --git a/zshrc b/zshrc index 482d114977..7dd70b6f75 100644 --- a/zshrc +++ b/zshrc @@ -31,6 +31,7 @@ source $ZSH/oh-my-zsh.sh export PATH=$HOME/bin:$HOME/.dotfiles/bin:/usr/local/bin:/usr/local/sbin:$PATH # You may need to manually set your language environment +export LC_ALL=en_US.UTF-8 export LANG=en_US.UTF-8 export EDITOR='vim' From a1f4307e715bcb4b89f60d1b3f7fa60c4e3d1285 Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Sun, 25 Sep 2016 12:16:22 +0200 Subject: [PATCH 089/144] More dotfiles --- tmux.conf | 4 ---- vimrc | 3 ++- zsh/aliases | 11 ++++++----- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/tmux.conf b/tmux.conf index c949988a26..ea687eb98c 100644 --- a/tmux.conf +++ b/tmux.conf @@ -12,7 +12,6 @@ set -g history-limit 15000 setw -g mode-keys vi # disable mouse -set -g mouse-utf8 on set -g mouse on bind -n WheelUpPane select-pane -t= \; copy-mode -e \; send-keys -M bind -n WheelDownPane select-pane -t= \; send-keys -M @@ -65,9 +64,6 @@ bind a send-prefix # Status Bar ########################### -# enable UTF-8 support in status bar -set -g status-utf8 on - # set refresh interval for status bar set -g status-interval 30 diff --git a/vimrc b/vimrc index 11efc98162..df0317dadd 100644 --- a/vimrc +++ b/vimrc @@ -33,6 +33,7 @@ Plugin 'slim-template/vim-slim' Plugin 'geoffharcourt/vim-matchit' Plugin 'Townk/vim-autoclose' Plugin 'rizzatti/dash.vim' +Plugin 'keith/swift.vim' Plugin 'SirVer/ultisnips' Plugin 'honza/vim-snippets' @@ -99,7 +100,7 @@ set cc=80 " Display line at 80 chars " Don't add the comment prefix when I hit enter or o/O on a comment line. set formatoptions-=or -set wildignore+=*/tmp/*,*.so,*.swp,*.zip,*.egg-info,*.git +set wildignore+=*/tmp/*,*.so,*.swp,*.zip,*.egg-info,*.git,/node_modules/*,/bower_components/* " LaTeX ignores set wildignore+=*.aux,*.blg,*.out,*.toc,*.bbl diff --git a/zsh/aliases b/zsh/aliases index d3de1c9b7e..6feac068cf 100644 --- a/zsh/aliases +++ b/zsh/aliases @@ -33,6 +33,7 @@ alias bus='bundle update --source=' # Rails alias devlog="tail -f log/development.log" alias rc="rails c" +alias rdbm="rake db:migrate" # Ember alias es="ember serve" @@ -41,12 +42,10 @@ alias es="ember serve" alias stoppostgres='pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log stop' alias startpostgres='pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start' -# Redis -alias startredis='redis-server /usr/local/etc/redis.conf &' - # Docker alias dc='docker-compose' -alias dinit='eval $(docker-machine env)' +alias dockload='eval $(docker-machine env default)' +alias docklog="docker logs --follow" # Git alias gs="git status" @@ -59,7 +58,7 @@ alias wip="git add . -A && git commit -m 'WIP'" alias gcall="git add . -A && git commit -m" alias gpo="git push origin master" alias glo="git pull origin master" -alias gpu="git push upstream master" +alias gpu="git push upstream" alias glu="git pull upstream master" alias gcm="git commit -m" alias gco='git checkout' @@ -87,6 +86,8 @@ alias hds="git push origin master && gps" alias hlogs='heroku logs -t' alias hs="h staging" alias hp="h production" +alias hpc="hp run rails c" +alias hsc="hs run rails c" # Projects alias cargo="mux start cargoflux" From e4981ec5e50f168cad10bd9a5025c1e42b31f11b Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Mon, 26 Sep 2016 08:31:09 +0200 Subject: [PATCH 090/144] Stuff --- credentials | 0 vimrc | 1 + 2 files changed, 1 insertion(+) create mode 100644 credentials diff --git a/credentials b/credentials new file mode 100644 index 0000000000..e69de29bb2 diff --git a/vimrc b/vimrc index df0317dadd..a2888efaa0 100644 --- a/vimrc +++ b/vimrc @@ -44,6 +44,7 @@ Plugin 'nelstrom/vim-textobj-rubyblock' " UI Plugins Plugin 'bling/vim-airline' " UI statusbar niceties +Plugin 'vim-airline/vim-airline-themes' set laststatus=2 " enable airline even if no splits let g:airline_theme='luna' let g:airline_powerline_fonts = 1 From f2095dced6164e04fee37ab68999f5fd11d32290 Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Mon, 26 Sep 2016 09:02:50 +0200 Subject: [PATCH 091/144] Removes commented stuff --- vimrc | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/vimrc b/vimrc index a2888efaa0..536657f080 100644 --- a/vimrc +++ b/vimrc @@ -106,19 +106,6 @@ set wildignore+=*/tmp/*,*.so,*.swp,*.zip,*.egg-info,*.git,/node_modules/*,/bower " LaTeX ignores set wildignore+=*.aux,*.blg,*.out,*.toc,*.bbl -" Snippes -" let g:ycm_key_list_select_completion = ['', ''] -" let g:ycm_key_list_previous_completion = ['', ''] -" let g:SuperTabDefaultCompletionType = '' - -" let g:UltiSnipsExpandTrigger="" -" let g:UltiSnipsJumpForwardTrigger="" -" let g:UltiSnipsJumpBackwardTrigger="" -" let g:UltiSnipsEditSplit="vertical" -" Trigger configuration. Do not use if you use -" let g:UltiSnipsExpandTrigger="" -" let g:UltiSnipsJumpForwardTrigger="" -" let g:UltiSnipsJumpBackwardTrigger="" " " If you want :UltiSnipsEdit to split your window. let g:UltiSnipsEditSplit="vertical" From 94a4113b9c6c659a6bab20cf31db0e2e1ab5c821 Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Mon, 26 Sep 2016 09:02:58 +0200 Subject: [PATCH 092/144] Fix syntax error --- vimrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vimrc b/vimrc index 536657f080..ba9a2f19c0 100644 --- a/vimrc +++ b/vimrc @@ -112,7 +112,7 @@ let g:UltiSnipsEditSplit="vertical" " Readable highlight text -:highlight PmenuSel ctermfg=black +highlight PmenuSel ctermfg=black " Set gutter background to black highlight SignColumn ctermbg=black From 38901ebc797b084e72c6d184007703d5ca535349 Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Mon, 26 Sep 2016 09:03:14 +0200 Subject: [PATCH 093/144] Removes thing that overwrites colorscheme --- vimrc | 3 --- 1 file changed, 3 deletions(-) diff --git a/vimrc b/vimrc index ba9a2f19c0..03629171d0 100644 --- a/vimrc +++ b/vimrc @@ -124,8 +124,6 @@ let g:ackprg = 'ag --vimgrep' " set list listchars=tab:»·,trail:· syntax on " syntax highlighting -colorscheme jellybeans - " Make it more obvious which paren I'm on hi MatchParen cterm=none ctermbg=black ctermfg=yellow @@ -163,7 +161,6 @@ set laststatus=2 " Always show status line. set number set gdefault " assume the /g flag on :s substitutions to replace all matches in a line set autoindent " always set autoindenting on -set bg=light set tags=./tags; highlight StatusLine ctermfg=blue ctermbg=yellow au FileType xml exe ":silent 1,$!xmllint --format --recover - 2>/dev/null" From 72883ffb121340c5c8865b8ddd48f18fd5a7d3c3 Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Mon, 26 Sep 2016 09:03:26 +0200 Subject: [PATCH 094/144] Brew install start --- brewinstall | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 brewinstall diff --git a/brewinstall b/brewinstall new file mode 100644 index 0000000000..081a9d3f4a --- /dev/null +++ b/brewinstall @@ -0,0 +1,27 @@ +#!/usr/bin/env bash + +brew update + +brew upgrade --all + +# From github: mathiasbynens/dotfiles +brew install bash +brew tap homebrew/versions +brew install bash-completion2 + +if ! fgrep -q '/usr/local/bin/bash' /etc/shells; then + echo '/usr/local/bin/bash' | sudo tee -a /etc/shells; + chsh -s /usr/local/bin/bash; +fi; + +brew install wget --with-iri +brew install vim --override-system-vi +brew install homebrew/dupes/grep +brew install homebrew/dupes/openssh +brew install homebrew/dupes/screen + +# Install font tools. +brew tap bramstein/webfonttools +brew install sfnt2woff +brew install sfnt2woff-zopfli +brew install woff2 From 3de75683a1e9c5d003d5b1e922ab9ce80282c786 Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Mon, 26 Sep 2016 09:08:36 +0200 Subject: [PATCH 095/144] Install trash --- brewinstall | 1 + 1 file changed, 1 insertion(+) diff --git a/brewinstall b/brewinstall index 081a9d3f4a..61d9fa94c3 100644 --- a/brewinstall +++ b/brewinstall @@ -25,3 +25,4 @@ brew tap bramstein/webfonttools brew install sfnt2woff brew install sfnt2woff-zopfli brew install woff2 +brew install trash From c8a6ecc4e762503f5a357ed35a186f7543c7d07c Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Mon, 26 Sep 2016 15:23:08 +0200 Subject: [PATCH 096/144] Some things for brew and rvm --- brewinstall | 4 ++++ tmux.conf | 2 ++ zsh/functions | 5 +++++ zshrc | 2 ++ 4 files changed, 13 insertions(+) diff --git a/brewinstall b/brewinstall index 61d9fa94c3..d9b920a098 100644 --- a/brewinstall +++ b/brewinstall @@ -26,3 +26,7 @@ brew install sfnt2woff brew install sfnt2woff-zopfli brew install woff2 brew install trash +brew install hub +brew install postgresql +brew install imagemagick +brew install reattach-to-user-namespace --with-wrap-pbcopy-and-pbpaste diff --git a/tmux.conf b/tmux.conf index ea687eb98c..1c2a0b0da5 100644 --- a/tmux.conf +++ b/tmux.conf @@ -1,6 +1,8 @@ ########################### # Configuration ########################### +# +set-window-option -g xterm-keys on # use 256 term for pretty colors set -g default-terminal "screen-256color" diff --git a/zsh/functions b/zsh/functions index 2734df36a7..f58f7535f8 100644 --- a/zsh/functions +++ b/zsh/functions @@ -75,3 +75,8 @@ function remove_untracked_files { git clean -f fi } + +function brew_install { + brew install $1 + echo "brew install $1" >> ~/.dotfiles/brewinstall +} diff --git a/zshrc b/zshrc index 7dd70b6f75..26506fca08 100644 --- a/zshrc +++ b/zshrc @@ -41,3 +41,5 @@ source /Users/anderslime/.dotfiles/zsh/credentials # added by travis gem [ -f /Users/anderslime/.travis/travis.sh ] && source /Users/anderslime/.travis/travis.sh + +export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting From 7455b17a3a6ed414433b524ffd12b23f5d9a3bb6 Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Sat, 1 Oct 2016 15:26:14 +0200 Subject: [PATCH 097/144] .macos script and other stuff --- .macos | 866 ++++++++++++++++++++++++++++++++++++++++++++++++++++ brewinstall | 9 + zsh/aliases | 8 +- zshrc | 9 +- 4 files changed, 886 insertions(+), 6 deletions(-) create mode 100644 .macos diff --git a/.macos b/.macos new file mode 100644 index 0000000000..28df1261c2 --- /dev/null +++ b/.macos @@ -0,0 +1,866 @@ +#!/usr/bin/env bash + +# ~/.macos — https://mths.be/macos + +# Close any open System Preferences panes, to prevent them from overriding +# settings we’re about to change +osascript -e 'tell application "System Preferences" to quit' + +# Ask for the administrator password upfront +sudo -v + +# Keep-alive: update existing `sudo` time stamp until `.macos` has finished +while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null & + +############################################################################### +# General UI/UX # +############################################################################### + +# Set computer name (as done via System Preferences → Sharing) +#sudo scutil --set ComputerName "0x6D746873" +#sudo scutil --set HostName "0x6D746873" +#sudo scutil --set LocalHostName "0x6D746873" +#sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.smb.server NetBIOSName -string "0x6D746873" + +# Set standby delay to 24 hours (default is 1 hour) +sudo pmset -a standbydelay 86400 + +# Disable the sound effects on boot +sudo nvram SystemAudioVolume=" " + +# Disable transparency in the menu bar and elsewhere on Yosemite +defaults write com.apple.universalaccess reduceTransparency -bool true + +# Menu bar: hide the Time Machine, Volume, and User icons +for domain in ~/Library/Preferences/ByHost/com.apple.systemuiserver.*; do + defaults write "${domain}" dontAutoLoad -array \ + "/System/Library/CoreServices/Menu Extras/TimeMachine.menu" \ + "/System/Library/CoreServices/Menu Extras/Volume.menu" \ + "/System/Library/CoreServices/Menu Extras/User.menu" +done +defaults write com.apple.systemuiserver menuExtras -array \ + "/System/Library/CoreServices/Menu Extras/Bluetooth.menu" \ + "/System/Library/CoreServices/Menu Extras/AirPort.menu" \ + "/System/Library/CoreServices/Menu Extras/Battery.menu" \ + "/System/Library/CoreServices/Menu Extras/Clock.menu" + +# Set highlight color to green +defaults write NSGlobalDomain AppleHighlightColor -string "0.764700 0.976500 0.568600" + +# Set sidebar icon size to medium +defaults write NSGlobalDomain NSTableViewDefaultSizeMode -int 2 + +# Always show scrollbars +defaults write NSGlobalDomain AppleShowScrollBars -string "Always" +# Possible values: `WhenScrolling`, `Automatic` and `Always` + +# Disable the over-the-top focus ring animation +defaults write NSGlobalDomain NSUseAnimatedFocusRing -bool false + +# Disable smooth scrolling +# (Uncomment if you’re on an older Mac that messes up the animation) +#defaults write NSGlobalDomain NSScrollAnimationEnabled -bool false + +# Increase window resize speed for Cocoa applications +defaults write NSGlobalDomain NSWindowResizeTime -float 0.001 + +# Expand save panel by default +defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true +defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode2 -bool true + +# Expand print panel by default +defaults write NSGlobalDomain PMPrintingExpandedStateForPrint -bool true +defaults write NSGlobalDomain PMPrintingExpandedStateForPrint2 -bool true + +# Save to disk (not to iCloud) by default +defaults write NSGlobalDomain NSDocumentSaveNewDocumentsToCloud -bool false + +# Automatically quit printer app once the print jobs complete +defaults write com.apple.print.PrintingPrefs "Quit When Finished" -bool true + +# Disable the “Are you sure you want to open this application?” dialog +defaults write com.apple.LaunchServices LSQuarantine -bool false + +# Remove duplicates in the “Open With” menu (also see `lscleanup` alias) +/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user + +# Display ASCII control characters using caret notation in standard text views +# Try e.g. `cd /tmp; unidecode "\x{0000}" > cc.txt; open -e cc.txt` +defaults write NSGlobalDomain NSTextShowsControlCharacters -bool true + +# Disable Resume system-wide +defaults write com.apple.systempreferences NSQuitAlwaysKeepsWindows -bool false + +# Disable automatic termination of inactive apps +defaults write NSGlobalDomain NSDisableAutomaticTermination -bool true + +# Disable the crash reporter +#defaults write com.apple.CrashReporter DialogType -string "none" + +# Set Help Viewer windows to non-floating mode +defaults write com.apple.helpviewer DevMode -bool true + +# Fix for the ancient UTF-8 bug in QuickLook (https://mths.be/bbo) +# Commented out, as this is known to cause problems in various Adobe apps :( +# See https://github.com/mathiasbynens/dotfiles/issues/237 +#echo "0x08000100:0" > ~/.CFUserTextEncoding + +# Reveal IP address, hostname, OS version, etc. when clicking the clock +# in the login window +sudo defaults write /Library/Preferences/com.apple.loginwindow AdminHostInfo HostName + +# Restart automatically if the computer freezes +sudo systemsetup -setrestartfreeze on + +# Never go into computer sleep mode +sudo systemsetup -setcomputersleep Off > /dev/null + +# Disable Notification Center and remove the menu bar icon +# launchctl unload -w /System/Library/LaunchAgents/com.apple.notificationcenterui.plist 2> /dev/null + +# 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 + +############################################################################### +# SSD-specific tweaks # +############################################################################### + +# 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 the sudden motion sensor as it’s not useful for SSDs +sudo pmset -a sms 0 + +############################################################################### +# Trackpad, mouse, keyboard, Bluetooth accessories, and input # +############################################################################### + +# Trackpad: enable tap to click for this user and for the login screen +defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad Clicking -bool true +defaults -currentHost write NSGlobalDomain com.apple.mouse.tapBehavior -int 1 +defaults write NSGlobalDomain com.apple.mouse.tapBehavior -int 1 + +# Trackpad: map bottom right corner to right-click +defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadCornerSecondaryClick -int 2 +defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadRightClick -bool true +defaults -currentHost write NSGlobalDomain com.apple.trackpad.trackpadCornerClickBehavior -int 1 +defaults -currentHost write NSGlobalDomain com.apple.trackpad.enableSecondaryClick -bool true + +# Disable “natural” (Lion-style) scrolling +# defaults write NSGlobalDomain com.apple.swipescrolldirection -bool false + +# Increase sound quality for Bluetooth headphones/headsets +defaults write com.apple.BluetoothAudioAgent "Apple Bitpool Min (editable)" -int 40 + +# Enable full keyboard access for all controls +# (e.g. enable Tab in modal dialogs) +defaults write NSGlobalDomain AppleKeyboardUIMode -int 3 + +# Use scroll gesture with the Ctrl (^) modifier key to zoom +defaults write com.apple.universalaccess closeViewScrollWheelToggle -bool true +defaults write com.apple.universalaccess HIDScrollZoomModifierMask -int 262144 +# Follow the keyboard focus while zoomed in +defaults write com.apple.universalaccess closeViewZoomFollowsFocus -bool true + +# Disable press-and-hold for keys in favor of key repeat +defaults write NSGlobalDomain ApplePressAndHoldEnabled -bool false + +# Set a blazingly fast keyboard repeat rate +defaults write NSGlobalDomain KeyRepeat -int 1 +defaults write NSGlobalDomain InitialKeyRepeat -int 10 + +# Set language and text formats +# Note: if you’re in the US, replace `EUR` with `USD`, `Centimeters` with +# `Inches`, `en_GB` with `en_US`, and `true` with `false`. +defaults write NSGlobalDomain AppleLanguages -array "en" "da" +defaults write NSGlobalDomain AppleLocale -string "en_US@currency=DKK" +defaults write NSGlobalDomain AppleMeasurementUnits -string "Centimeters" +defaults write NSGlobalDomain AppleMetricUnits -bool true + +# Set the timezone; see `sudo systemsetup -listtimezones` for other values +sudo systemsetup -settimezone "Europe/Copenhagen" > /dev/null + +# Disable auto-correct +defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false + +# Stop iTunes from responding to the keyboard media keys +#launchctl unload -w /System/Library/LaunchAgents/com.apple.rcd.plist 2> /dev/null + +############################################################################### +# Screen # +############################################################################### + +# Require password immediately after sleep or screen saver begins +defaults write com.apple.screensaver askForPassword -int 1 +defaults write com.apple.screensaver askForPasswordDelay -int 60 + +# Save screenshots to the desktop +defaults write com.apple.screencapture location -string "${HOME}/Desktop" + +# Save screenshots in PNG format (other options: BMP, GIF, JPG, PDF, TIFF) +defaults write com.apple.screencapture type -string "png" + +# Disable shadow in screenshots +defaults write com.apple.screencapture disable-shadow -bool true + +# Enable subpixel font rendering on non-Apple LCDs +defaults write NSGlobalDomain AppleFontSmoothing -int 2 + +# Enable HiDPI display modes (requires restart) +sudo defaults write /Library/Preferences/com.apple.windowserver DisplayResolutionEnabled -bool true + +############################################################################### +# Finder # +############################################################################### + +# Finder: allow quitting via ⌘ + Q; doing so will also hide desktop icons +defaults write com.apple.finder QuitMenuItem -bool true + +# Finder: disable window animations and Get Info animations +defaults write com.apple.finder DisableAllAnimations -bool true + +# Set Desktop as the default location for new Finder windows +# For other paths, use `PfLo` and `file:///full/path/here/` +defaults write com.apple.finder NewWindowTarget -string "PfDe" +defaults write com.apple.finder NewWindowTargetPath -string "file://${HOME}/Desktop/" + +# 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 ShowHardDrivesOnDesktop -bool false +defaults write com.apple.finder ShowMountedServersOnDesktop -bool true +defaults write com.apple.finder ShowRemovableMediaOnDesktop -bool true + +# Finder: show hidden files by default +#defaults write com.apple.finder AppleShowAllFiles -bool true + +# Finder: show all filename extensions +defaults write NSGlobalDomain AppleShowAllExtensions -bool true + +# Finder: show status bar +defaults write com.apple.finder ShowStatusBar -bool true + +# Finder: show path bar +defaults write com.apple.finder ShowPathbar -bool true + +# Display full POSIX path as Finder window title +defaults write com.apple.finder _FXShowPosixPathInTitle -bool true + +# When performing a search, search the current folder by default +defaults write com.apple.finder FXDefaultSearchScope -string "SCcf" + +# Disable the warning when changing a file extension +defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false + +# Enable spring loading for directories +defaults write NSGlobalDomain com.apple.springing.enabled -bool true + +# Remove the spring loading delay for directories +defaults write NSGlobalDomain com.apple.springing.delay -float 0 + +# Avoid creating .DS_Store files on network volumes +defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true + +# 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 + +# Show item info near icons on the desktop and in other icon views +/usr/libexec/PlistBuddy -c "Set :DesktopViewSettings:IconViewSettings:showItemInfo true" ~/Library/Preferences/com.apple.finder.plist +/usr/libexec/PlistBuddy -c "Set :FK_StandardViewSettings:IconViewSettings:showItemInfo true" ~/Library/Preferences/com.apple.finder.plist +/usr/libexec/PlistBuddy -c "Set :StandardViewSettings:IconViewSettings:showItemInfo true" ~/Library/Preferences/com.apple.finder.plist + +# Show item info to the right of the icons on the desktop +/usr/libexec/PlistBuddy -c "Set DesktopViewSettings:IconViewSettings:labelOnBottom false" ~/Library/Preferences/com.apple.finder.plist + +# Enable snap-to-grid for icons on the desktop and in other icon views +/usr/libexec/PlistBuddy -c "Set :DesktopViewSettings:IconViewSettings:arrangeBy grid" ~/Library/Preferences/com.apple.finder.plist +/usr/libexec/PlistBuddy -c "Set :FK_StandardViewSettings:IconViewSettings:arrangeBy grid" ~/Library/Preferences/com.apple.finder.plist +/usr/libexec/PlistBuddy -c "Set :StandardViewSettings:IconViewSettings:arrangeBy grid" ~/Library/Preferences/com.apple.finder.plist + +# Increase grid spacing for icons on the desktop and in other icon views +/usr/libexec/PlistBuddy -c "Set :DesktopViewSettings:IconViewSettings:gridSpacing 100" ~/Library/Preferences/com.apple.finder.plist +/usr/libexec/PlistBuddy -c "Set :FK_StandardViewSettings:IconViewSettings:gridSpacing 100" ~/Library/Preferences/com.apple.finder.plist +/usr/libexec/PlistBuddy -c "Set :StandardViewSettings:IconViewSettings:gridSpacing 100" ~/Library/Preferences/com.apple.finder.plist + +# Increase the size of icons on the desktop and in other icon views +/usr/libexec/PlistBuddy -c "Set :DesktopViewSettings:IconViewSettings:iconSize 80" ~/Library/Preferences/com.apple.finder.plist +/usr/libexec/PlistBuddy -c "Set :FK_StandardViewSettings:IconViewSettings:iconSize 80" ~/Library/Preferences/com.apple.finder.plist +/usr/libexec/PlistBuddy -c "Set :StandardViewSettings:IconViewSettings:iconSize 80" ~/Library/Preferences/com.apple.finder.plist + +# Use list view in all Finder windows by default +# Four-letter codes for the other view modes: `icnv`, `clmv`, `Flwv` +defaults write com.apple.finder FXPreferredViewStyle -string "Nlsv" + +# Disable the warning before emptying the Trash +defaults write com.apple.finder WarnOnEmptyTrash -bool false + +# Enable AirDrop over Ethernet and on unsupported Macs running Lion +defaults write com.apple.NetworkBrowser BrowseAllInterfaces -bool true + +# Enable the MacBook Air SuperDrive on any Mac +sudo nvram boot-args="mbasd=1" + +# Show the ~/Library folder +chflags nohidden ~/Library + +# Show the /Volumes folder +sudo chflags nohidden /Volumes + +# Remove Dropbox’s green checkmark icons in Finder +file=/Applications/Dropbox.app/Contents/Resources/emblem-dropbox-uptodate.icns +[ -e "${file}" ] && mv -f "${file}" "${file}.bak" + +# Expand the following File Info panes: +# “General”, “Open with”, and “Sharing & Permissions” +defaults write com.apple.finder FXInfoPanesExpanded -dict \ + General -bool true \ + OpenWith -bool true \ + Privileges -bool true + +############################################################################### +# Dock, Dashboard, and hot corners # +############################################################################### + +# Enable highlight hover effect for the grid view of a stack (Dock) +defaults write com.apple.dock mouse-over-hilite-stack -bool true + +# Set the icon size of Dock items to 36 pixels +defaults write com.apple.dock tilesize -int 36 + +# Change minimize/maximize window effect +defaults write com.apple.dock mineffect -string "scale" + +# Minimize windows into their application’s icon +defaults write com.apple.dock minimize-to-application -bool true + +# Enable spring loading for all Dock items +defaults write com.apple.dock enable-spring-load-actions-on-all-items -bool true + +# Show indicator lights for open applications in the Dock +defaults write com.apple.dock show-process-indicators -bool true + +# Wipe all (default) app icons from the Dock +# This is only really useful when setting up a new Mac, or if you don’t use +# the Dock to launch apps. +#defaults write com.apple.dock persistent-apps -array + +# Show only open applications in the Dock +#defaults write com.apple.dock static-only -bool true + +# Don’t animate opening applications from the Dock +defaults write com.apple.dock launchanim -bool false + +# Speed up Mission Control animations +defaults write com.apple.dock expose-animation-duration -float 0.1 + +# Don’t group windows by application in Mission Control +# (i.e. use the old Exposé behavior instead) +defaults write com.apple.dock expose-group-by-app -bool false + +# Disable Dashboard +defaults write com.apple.dashboard mcx-disabled -bool true + +# Don’t show Dashboard as a Space +defaults write com.apple.dock dashboard-in-overlay -bool true + +# Don’t automatically rearrange Spaces based on most recent use +defaults write com.apple.dock mru-spaces -bool false + +# Remove the auto-hiding Dock delay +defaults write com.apple.dock autohide-delay -float 0 +# Remove the animation when hiding/showing the Dock +defaults write com.apple.dock autohide-time-modifier -float 0 + +# Automatically hide and show the Dock +defaults write com.apple.dock autohide -bool true + +# Make Dock icons of hidden applications translucent +defaults write com.apple.dock showhidden -bool true + +# Disable the Launchpad gesture (pinch with thumb and three fingers) +#defaults write com.apple.dock showLaunchpadGestureEnabled -int 0 + +# Reset Launchpad, but keep the desktop wallpaper intact +find "${HOME}/Library/Application Support/Dock" -name "*-*.db" -maxdepth 1 -delete + +# Add iOS & Watch Simulator to Launchpad +sudo ln -sf "/Applications/Xcode.app/Contents/Developer/Applications/Simulator.app" "/Applications/Simulator.app" +sudo ln -sf "/Applications/Xcode.app/Contents/Developer/Applications/Simulator (Watch).app" "/Applications/Simulator (Watch).app" + +# Add a spacer to the left side of the Dock (where the applications are) +#defaults write com.apple.dock persistent-apps -array-add '{tile-data={}; tile-type="spacer-tile";}' +# Add a spacer to the right side of the Dock (where the Trash is) +#defaults write com.apple.dock persistent-others -array-add '{tile-data={}; tile-type="spacer-tile";}' + +# Hot corners +# Possible values: +# 0: no-op +# 2: Mission Control +# 3: Show application windows +# 4: Desktop +# 5: Start screen saver +# 6: Disable screen saver +# 7: Dashboard +# 10: Put display to sleep +# 11: Launchpad +# 12: Notification Center +# Top left screen corner → Mission Control +defaults write com.apple.dock wvous-tl-corner -int 2 +defaults write com.apple.dock wvous-tl-modifier -int 0 +# Top right screen corner → Desktop +defaults write com.apple.dock wvous-tr-corner -int 4 +defaults write com.apple.dock wvous-tr-modifier -int 0 +# Bottom left screen corner → Start screen saver +defaults write com.apple.dock wvous-bl-corner -int 5 +defaults write com.apple.dock wvous-bl-modifier -int 0 + +############################################################################### +# Safari & WebKit # +############################################################################### + +# Privacy: don’t send search queries to Apple +defaults write com.apple.Safari UniversalSearchEnabled -bool false +defaults write com.apple.Safari SuppressSearchSuggestions -bool true + +# Press Tab to highlight each item on a web page +defaults write com.apple.Safari WebKitTabToLinksPreferenceKey -bool true +defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2TabsToLinks -bool true + +# Show the full URL in the address bar (note: this still hides the scheme) +defaults write com.apple.Safari ShowFullURLInSmartSearchField -bool true + +# Set Safari’s home page to `about:blank` for faster loading +defaults write com.apple.Safari HomePage -string "about:blank" + +# Prevent Safari from opening ‘safe’ files automatically after downloading +defaults write com.apple.Safari AutoOpenSafeDownloads -bool false + +# Allow hitting the Backspace key to go to the previous page in history +defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2BackspaceKeyNavigationEnabled -bool true + +# Hide Safari’s bookmarks bar by default +defaults write com.apple.Safari ShowFavoritesBar -bool false + +# Hide Safari’s sidebar in Top Sites +defaults write com.apple.Safari ShowSidebarInTopSites -bool false + +# Disable Safari’s thumbnail cache for History and Top Sites +defaults write com.apple.Safari DebugSnapshotsUpdatePolicy -int 2 + +# Enable Safari’s debug menu +defaults write com.apple.Safari IncludeInternalDebugMenu -bool true + +# Make Safari’s search banners default to Contains instead of Starts With +defaults write com.apple.Safari FindOnPageMatchesWordStartsOnly -bool false + +# Remove useless icons from Safari’s bookmarks bar +defaults write com.apple.Safari ProxiesInBookmarksBar "()" + +# Enable the Develop menu and the Web Inspector in Safari +defaults write com.apple.Safari IncludeDevelopMenu -bool true +defaults write com.apple.Safari WebKitDeveloperExtrasEnabledPreferenceKey -bool true +defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2DeveloperExtrasEnabled -bool true + +# Add a context menu item for showing the Web Inspector in web views +defaults write NSGlobalDomain WebKitDeveloperExtras -bool true + +# Enable continuous spellchecking +defaults write com.apple.Safari WebContinuousSpellCheckingEnabled -bool true +# Disable auto-correct +defaults write com.apple.Safari WebAutomaticSpellingCorrectionEnabled -bool false + +# Disable AutoFill +defaults write com.apple.Safari AutoFillFromAddressBook -bool false +defaults write com.apple.Safari AutoFillPasswords -bool false +defaults write com.apple.Safari AutoFillCreditCardData -bool false +defaults write com.apple.Safari AutoFillMiscellaneousForms -bool false + +# Warn about fraudulent websites +defaults write com.apple.Safari WarnAboutFraudulentWebsites -bool true + +# Disable plug-ins +defaults write com.apple.Safari WebKitPluginsEnabled -bool false +defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2PluginsEnabled -bool false + +# Disable Java +defaults write com.apple.Safari WebKitJavaEnabled -bool false +defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2JavaEnabled -bool false + +# Block pop-up windows +defaults write com.apple.Safari WebKitJavaScriptCanOpenWindowsAutomatically -bool false +defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2JavaScriptCanOpenWindowsAutomatically -bool false + +# Enable “Do Not Track” +defaults write com.apple.Safari SendDoNotTrackHTTPHeader -bool true + +# Update extensions automatically +defaults write com.apple.Safari InstallExtensionUpdatesAutomatically -bool true + +############################################################################### +# Mail # +############################################################################### + +# Disable send and reply animations in Mail.app +defaults write com.apple.mail DisableReplyAnimations -bool true +defaults write com.apple.mail DisableSendAnimations -bool true + +# Copy email addresses as `foo@example.com` instead of `Foo Bar ` in Mail.app +defaults write com.apple.mail AddressesIncludeNameOnPasteboard -bool false + +# Add the keyboard shortcut ⌘ + Enter to send an email in Mail.app +defaults write com.apple.mail NSUserKeyEquivalents -dict-add "Send" "@\U21a9" + +# Display emails in threaded mode, sorted by date (oldest at the top) +defaults write com.apple.mail DraftsViewerAttributes -dict-add "DisplayInThreadedMode" -string "yes" +defaults write com.apple.mail DraftsViewerAttributes -dict-add "SortedDescending" -string "yes" +defaults write com.apple.mail DraftsViewerAttributes -dict-add "SortOrder" -string "received-date" + +# Disable inline attachments (just show the icons) +defaults write com.apple.mail DisableInlineAttachmentViewing -bool true + +# Disable automatic spell checking +defaults write com.apple.mail SpellCheckingBehavior -string "NoSpellCheckingEnabled" + +############################################################################### +# Spotlight # +############################################################################### + +# Hide Spotlight tray-icon (and subsequent helper) +#sudo chmod 600 /System/Library/CoreServices/Search.bundle/Contents/MacOS/Search +# Disable Spotlight indexing for any volume that gets mounted and has not yet +# been indexed before. +# Use `sudo mdutil -i off "/Volumes/foo"` to stop indexing any volume. +sudo defaults write /.Spotlight-V100/VolumeConfiguration Exclusions -array "/Volumes" +# Change indexing order and disable some search results +# Yosemite-specific search results (remove them if you are using macOS 10.9 or older): +# MENU_DEFINITION +# MENU_CONVERSION +# MENU_EXPRESSION +# MENU_SPOTLIGHT_SUGGESTIONS (send search queries to Apple) +# MENU_WEBSEARCH (send search queries to Apple) +# MENU_OTHER +defaults write com.apple.spotlight orderedItems -array \ + '{"enabled" = 1;"name" = "APPLICATIONS";}' \ + '{"enabled" = 1;"name" = "SYSTEM_PREFS";}' \ + '{"enabled" = 1;"name" = "DIRECTORIES";}' \ + '{"enabled" = 1;"name" = "PDF";}' \ + '{"enabled" = 1;"name" = "FONTS";}' \ + '{"enabled" = 0;"name" = "DOCUMENTS";}' \ + '{"enabled" = 0;"name" = "MESSAGES";}' \ + '{"enabled" = 0;"name" = "CONTACT";}' \ + '{"enabled" = 0;"name" = "EVENT_TODO";}' \ + '{"enabled" = 0;"name" = "IMAGES";}' \ + '{"enabled" = 0;"name" = "BOOKMARKS";}' \ + '{"enabled" = 0;"name" = "MUSIC";}' \ + '{"enabled" = 0;"name" = "MOVIES";}' \ + '{"enabled" = 0;"name" = "PRESENTATIONS";}' \ + '{"enabled" = 0;"name" = "SPREADSHEETS";}' \ + '{"enabled" = 0;"name" = "SOURCE";}' \ + '{"enabled" = 0;"name" = "MENU_DEFINITION";}' \ + '{"enabled" = 0;"name" = "MENU_OTHER";}' \ + '{"enabled" = 0;"name" = "MENU_CONVERSION";}' \ + '{"enabled" = 0;"name" = "MENU_EXPRESSION";}' \ + '{"enabled" = 0;"name" = "MENU_WEBSEARCH";}' \ + '{"enabled" = 0;"name" = "MENU_SPOTLIGHT_SUGGESTIONS";}' +# Load new settings before rebuilding the index +killall mds > /dev/null 2>&1 +# Make sure indexing is enabled for the main volume +sudo mdutil -i on / > /dev/null +# Rebuild the index from scratch +sudo mdutil -E / > /dev/null + +############################################################################### +# Terminal & iTerm 2 # +############################################################################### + +# Only use UTF-8 in Terminal.app +defaults write com.apple.terminal StringEncodings -array 4 + +# Use a modified version of the Solarized Dark theme by default in Terminal.app +osascript < /dev/null && sudo tmutil disablelocal + +############################################################################### +# Activity Monitor # +############################################################################### + +# Show the main window when launching Activity Monitor +defaults write com.apple.ActivityMonitor OpenMainWindow -bool true + +# Visualize CPU usage in the Activity Monitor Dock icon +defaults write com.apple.ActivityMonitor IconType -int 5 + +# Show all processes in Activity Monitor +defaults write com.apple.ActivityMonitor ShowCategory -int 0 + +# Sort Activity Monitor results by CPU usage +defaults write com.apple.ActivityMonitor SortColumn -string "CPUUsage" +defaults write com.apple.ActivityMonitor SortDirection -int 0 + +############################################################################### +# Address Book, Dashboard, iCal, TextEdit, and Disk Utility # +############################################################################### + +# Enable the debug menu in Address Book +defaults write com.apple.addressbook ABShowDebugMenu -bool true + +# Enable Dashboard dev mode (allows keeping widgets on the desktop) +defaults write com.apple.dashboard devmode -bool true + +# Enable the debug menu in iCal (pre-10.8) +defaults write com.apple.iCal IncludeDebugMenu -bool true + +# 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 + +# Enable the debug menu in Disk Utility +defaults write com.apple.DiskUtility DUDebugMenuEnabled -bool true +defaults write com.apple.DiskUtility advanced-image-options -bool true + +# Auto-play videos when opened with QuickTime Player +defaults write com.apple.QuickTimePlayerX MGPlayMovieOnOpen -bool true + +############################################################################### +# Mac App Store # +############################################################################### + +# Enable the WebKit Developer Tools in the Mac App Store +defaults write com.apple.appstore WebKitDeveloperExtras -bool true + +# Enable Debug Menu in the Mac App Store +defaults write com.apple.appstore ShowDebugMenu -bool true + +# Enable the automatic update check +defaults write com.apple.SoftwareUpdate AutomaticCheckEnabled -bool true + +# Check for software updates daily, not just once per week +defaults write com.apple.SoftwareUpdate ScheduleFrequency -int 1 + +# Download newly available updates in background +defaults write com.apple.SoftwareUpdate AutomaticDownload -int 1 + +# Install System data files & security updates +defaults write com.apple.SoftwareUpdate CriticalUpdateInstall -int 1 + +# Automatically download apps purchased on other Macs +defaults write com.apple.SoftwareUpdate ConfigDataInstall -int 1 + +# Turn on app auto-update +defaults write com.apple.commerce AutoUpdate -bool true + +# Allow the App Store to reboot machine on macOS updates +defaults write com.apple.commerce AutoUpdateRestartRequired -bool true + +############################################################################### +# Photos # +############################################################################### + +# Prevent Photos from opening automatically when devices are plugged in +defaults -currentHost write com.apple.ImageCapture disableHotPlug -bool true + +############################################################################### +# Messages # +############################################################################### + +# Disable automatic emoji substitution (i.e. use plain text smileys) +defaults write com.apple.messageshelper.MessageController SOInputLineSettings -dict-add "automaticEmojiSubstitutionEnablediMessage" -bool false + +# Disable smart quotes as it’s annoying for messages that contain code +defaults write com.apple.messageshelper.MessageController SOInputLineSettings -dict-add "automaticQuoteSubstitutionEnabled" -bool false + +# Disable continuous spell checking +defaults write com.apple.messageshelper.MessageController SOInputLineSettings -dict-add "continuousSpellCheckingEnabled" -bool false + +############################################################################### +# Google Chrome & Google Chrome Canary # +############################################################################### + +# Allow installing user scripts via GitHub Gist or Userscripts.org +defaults write com.google.Chrome ExtensionInstallSources -array "https://gist.githubusercontent.com/" "http://userscripts.org/*" +defaults write com.google.Chrome.canary ExtensionInstallSources -array "https://gist.githubusercontent.com/" "http://userscripts.org/*" + +# Disable the all too sensitive backswipe on trackpads +defaults write com.google.Chrome AppleEnableSwipeNavigateWithScrolls -bool false +defaults write com.google.Chrome.canary AppleEnableSwipeNavigateWithScrolls -bool false + +# Disable the all too sensitive backswipe on Magic Mouse +defaults write com.google.Chrome AppleEnableMouseSwipeNavigateWithScrolls -bool false +defaults write com.google.Chrome.canary AppleEnableMouseSwipeNavigateWithScrolls -bool false + +# Use the system-native print preview dialog +defaults write com.google.Chrome DisablePrintPreview -bool true +defaults write com.google.Chrome.canary DisablePrintPreview -bool true + +# Expand the print dialog by default +defaults write com.google.Chrome PMPrintingExpandedStateForPrint2 -bool true +defaults write com.google.Chrome.canary PMPrintingExpandedStateForPrint2 -bool true + +############################################################################### +# GPGMail 2 # +############################################################################### + +# Disable signing emails by default +defaults write ~/Library/Preferences/org.gpgtools.gpgmail SignNewEmailsByDefault -bool false + +############################################################################### +# Opera & Opera Developer # +############################################################################### + +# Expand the print dialog by default +defaults write com.operasoftware.Opera PMPrintingExpandedStateForPrint2 -boolean true +defaults write com.operasoftware.OperaDeveloper PMPrintingExpandedStateForPrint2 -boolean true + +############################################################################### +# SizeUp.app # +############################################################################### + +# Start SizeUp at login +defaults write com.irradiatedsoftware.SizeUp StartAtLogin -bool true + +# Don’t show the preferences window on next start +defaults write com.irradiatedsoftware.SizeUp ShowPrefsOnNextStart -bool false + +############################################################################### +# Sublime Text # +############################################################################### + +# Install Sublime Text settings +cp -r init/Preferences.sublime-settings ~/Library/Application\ Support/Sublime\ Text*/Packages/User/Preferences.sublime-settings 2> /dev/null + +############################################################################### +# Transmission.app # +############################################################################### + +# Use `~/Documents/Torrents` to store incomplete downloads +defaults write org.m0k.transmission UseIncompleteDownloadFolder -bool true +defaults write org.m0k.transmission IncompleteDownloadFolder -string "${HOME}/Documents/Torrents" + +# Don’t prompt for confirmation before downloading +defaults write org.m0k.transmission DownloadAsk -bool false +defaults write org.m0k.transmission MagnetOpenAsk -bool false + +# Trash original torrent files +defaults write org.m0k.transmission DeleteOriginalTorrent -bool true + +# Hide the donate message +defaults write org.m0k.transmission WarningDonate -bool false +# Hide the legal disclaimer +defaults write org.m0k.transmission WarningLegal -bool false + +# IP block list. +# Source: https://giuliomac.wordpress.com/2014/02/19/best-blocklist-for-transmission/ +defaults write org.m0k.transmission BlocklistNew -bool true +defaults write org.m0k.transmission BlocklistURL -string "http://john.bitsurge.net/public/biglist.p2p.gz" +defaults write org.m0k.transmission BlocklistAutoUpdate -bool true + +############################################################################### +# Twitter.app # +############################################################################### + +# Disable smart quotes as it’s annoying for code tweets +defaults write com.twitter.twitter-mac AutomaticQuoteSubstitutionEnabled -bool false + +# Show the app window when clicking the menu bar icon +defaults write com.twitter.twitter-mac MenuItemBehavior -int 1 + +# Enable the hidden ‘Develop’ menu +defaults write com.twitter.twitter-mac ShowDevelopMenu -bool true + +# Open links in the background +defaults write com.twitter.twitter-mac openLinksInBackground -bool true + +# Allow closing the ‘new tweet’ window by pressing `Esc` +defaults write com.twitter.twitter-mac ESCClosesComposeWindow -bool true + +# Show full names rather than Twitter handles +defaults write com.twitter.twitter-mac ShowFullNames -bool true + +# Hide the app in the background if it’s not the front-most window +defaults write com.twitter.twitter-mac HideInBackground -bool true diff --git a/brewinstall b/brewinstall index d9b920a098..7b2e845271 100644 --- a/brewinstall +++ b/brewinstall @@ -30,3 +30,12 @@ brew install hub brew install postgresql brew install imagemagick brew install reattach-to-user-namespace --with-wrap-pbcopy-and-pbpaste +brew install httpie +brew install jq +brew install redis +brew install trash +brew install amazon-ecs-cli +brew install git-extras +brew install the_silver_searcher +brew install aws +brew install awscli diff --git a/zsh/aliases b/zsh/aliases index 6feac068cf..a9a98c839f 100644 --- a/zsh/aliases +++ b/zsh/aliases @@ -90,6 +90,8 @@ alias hpc="hp run rails c" alias hsc="hs run rails c" # Projects -alias cargo="mux start cargoflux" -alias oddset="mux start oddset" -alias mitid="mux start mitid" +alias start_cargo="mux start cargoflux" +alias start_oddset="mux start oddset" +alias start_mitid="mux start mitid" + +alias rm="trash" diff --git a/zshrc b/zshrc index 26506fca08..2bc82a375b 100644 --- a/zshrc +++ b/zshrc @@ -35,9 +35,12 @@ export LC_ALL=en_US.UTF-8 export LANG=en_US.UTF-8 export EDITOR='vim' -source /Users/anderslime/.dotfiles/zsh/aliases -source /Users/anderslime/.dotfiles/zsh/functions -source /Users/anderslime/.dotfiles/zsh/credentials +source $HOME/.dotfiles/zsh/aliases +source $HOME/.dotfiles/zsh/functions +source $HOME/.dotfiles/zsh/credentials + +# Oddset CLI +eval "$($HOME/code/oddset-cli/bin/oddset init -)" # added by travis gem [ -f /Users/anderslime/.travis/travis.sh ] && source /Users/anderslime/.travis/travis.sh From 78b88e2f1f5ef81b5dc7d7fb2a09cb8d84e62cbe Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Sun, 2 Oct 2016 11:48:50 +0200 Subject: [PATCH 098/144] Categorized and add brew packages --- brewinstall | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/brewinstall b/brewinstall index 7b2e845271..709598f166 100644 --- a/brewinstall +++ b/brewinstall @@ -25,17 +25,32 @@ brew tap bramstein/webfonttools brew install sfnt2woff brew install sfnt2woff-zopfli brew install woff2 + +# Misc tools brew install trash -brew install hub -brew install postgresql -brew install imagemagick -brew install reattach-to-user-namespace --with-wrap-pbcopy-and-pbpaste brew install httpie brew install jq -brew install redis +brew install the_silver_searcher brew install trash -brew install amazon-ecs-cli + +# Dev tools +brew install hub brew install git-extras -brew install the_silver_searcher +brew install reattach-to-user-namespace --with-wrap-pbcopy-and-pbpaste brew install aws brew install awscli +brew install amazon-ecs-cli +brew install foreman +brew install node + +# Databases +brew install postgresql +brew install redis +brew install mongodb + +# Server tools +brew install imagemagick +brew install libsass +brew install libxmlsec1 + +# Ad hoc (not categorized stuff) From 1912f4b7f0bcb1f69cfc492acbb56f6a498c44f0 Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Sun, 2 Oct 2016 11:52:12 +0200 Subject: [PATCH 099/144] Make brewinstall executable --- brewinstall => bin/brewinstall | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename brewinstall => bin/brewinstall (100%) mode change 100644 => 100755 diff --git a/brewinstall b/bin/brewinstall old mode 100644 new mode 100755 similarity index 100% rename from brewinstall rename to bin/brewinstall From ca8a7d2aa0d1082c2872f37dbe3a6adca181c63a Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Sun, 2 Oct 2016 13:42:59 +0200 Subject: [PATCH 100/144] Configured macos preferences script --- .macos => macos | 59 +++--------------------------------------- osx | 69 ------------------------------------------------- 2 files changed, 3 insertions(+), 125 deletions(-) rename .macos => macos (95%) mode change 100644 => 100755 delete mode 100644 osx diff --git a/.macos b/macos old mode 100644 new mode 100755 similarity index 95% rename from .macos rename to macos index 28df1261c2..2743c21217 --- a/.macos +++ b/macos @@ -313,9 +313,6 @@ defaults write com.apple.finder WarnOnEmptyTrash -bool false # Enable AirDrop over Ethernet and on unsupported Macs running Lion defaults write com.apple.NetworkBrowser BrowseAllInterfaces -bool true -# Enable the MacBook Air SuperDrive on any Mac -sudo nvram boot-args="mbasd=1" - # Show the ~/Library folder chflags nohidden ~/Library @@ -421,13 +418,13 @@ sudo ln -sf "/Applications/Xcode.app/Contents/Developer/Applications/Simulator ( # 11: Launchpad # 12: Notification Center # Top left screen corner → Mission Control -defaults write com.apple.dock wvous-tl-corner -int 2 +defaults write com.apple.dock wvous-tl-corner -int 0 defaults write com.apple.dock wvous-tl-modifier -int 0 # Top right screen corner → Desktop -defaults write com.apple.dock wvous-tr-corner -int 4 +defaults write com.apple.dock wvous-tr-corner -int 0 defaults write com.apple.dock wvous-tr-modifier -int 0 # Bottom left screen corner → Start screen saver -defaults write com.apple.dock wvous-bl-corner -int 5 +defaults write com.apple.dock wvous-bl-corner -int 0 defaults write com.apple.dock wvous-bl-modifier -int 0 ############################################################################### @@ -592,53 +589,6 @@ sudo mdutil -E / > /dev/null # Only use UTF-8 in Terminal.app defaults write com.apple.terminal StringEncodings -array 4 -# Use a modified version of the Solarized Dark theme by default in Terminal.app -osascript </dev/null & - -############################################################################### -# General UI/UX # -############################################################################### - -# Disable the sound effects on boot -sudo nvram SystemAudioVolume=" " - -# Disable transparency in the menu bar and elsewhere on Yosemite -defaults write com.apple.universalaccess reduceTransparency -bool true - -# Disable the “Are you sure you want to open this application?” dialog -defaults write com.apple.LaunchServices LSQuarantine -bool false - -# Check for software updates daily, not just once per week -defaults write com.apple.SoftwareUpdate ScheduleFrequency -int 1 - -############################################################################### -# Finder # -############################################################################### - -# Finder: show all filename extensions -defaults write NSGlobalDomain AppleShowAllExtensions -bool true - -# Finder: allow text selection in Quick Look -defaults write com.apple.finder QLEnableTextSelection -bool true - -# When performing a search, search the current folder by default -defaults write com.apple.finder FXDefaultSearchScope -string "SCcf" - -# Avoid creating .DS_Store files on network volumes -defaults write com.apple.desktopservices DSDontWriteNetworkStores -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 - -# Enable snap-to-grid for icons on the desktop and in other icon views -/usr/libexec/PlistBuddy -c "Set :DesktopViewSettings:IconViewSettings:arrangeBy grid" ~/Library/Preferences/com.apple.finder.plist -/usr/libexec/PlistBuddy -c "Set :FK_StandardViewSettings:IconViewSettings:arrangeBy grid" ~/Library/Preferences/com.apple.finder.plist -/usr/libexec/PlistBuddy -c "Set :StandardViewSettings:IconViewSettings:arrangeBy grid" ~/Library/Preferences/com.apple.finder.plist - -# Use list view in all Finder windows by default -# Four-letter codes for the other view modes: `icnv`, `clmv`, `Flwv` -defaults write com.apple.finder FXPreferredViewStyle -string "Nlsv" - -# Disable the warning before emptying the Trash -defaults write com.apple.finder WarnOnEmptyTrash -bool false - -# Empty Trash securely by default -defaults write com.apple.finder EmptyTrashSecurely -bool true - -# Set the icon size of Dock items to 36 pixels -defaults write com.apple.dock tilesize -int 36 - -# Speed up Mission Control animations -defaults write com.apple.dock expose-animation-duration -float 0.1 - -# Remove the animation when hiding/showing the Dock -defaults write com.apple.dock autohide-time-modifier -float 0.2 - From fa0b4481a3f093187b2b0949cc1c849236aba2e3 Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Sun, 2 Oct 2016 15:30:23 +0200 Subject: [PATCH 101/144] Moved setup related stuff into folder --- setup/brew_cask_install | 38 +++++++++++++++++++++++++++ bin/brewinstall => setup/brew_install | 0 macos => setup/macos | 0 zsh/functions | 7 ++++- 4 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 setup/brew_cask_install rename bin/brewinstall => setup/brew_install (100%) mode change 100755 => 100644 rename macos => setup/macos (100%) diff --git a/setup/brew_cask_install b/setup/brew_cask_install new file mode 100644 index 0000000000..889cd10a89 --- /dev/null +++ b/setup/brew_cask_install @@ -0,0 +1,38 @@ +#!/usr/env/bin bash +brew update + +# Productivity +brew cask install 1password +brew cask install alfred +brew cask install appcleaner +brew cask install caffeine +brew cask install keybase +brew cask install spectacle + +# Entertainment +brew cask install transmission +brew cask install vlc + +# Communication +brew cask install skype +brew cask install slack + +# Development +brew cask install docker-toolbox +brew cask install java +brew cask install rowanj-gitx +brew cask install sublime-text + +# Files +brew cask install dropbox +brew cask install google-drive +brew cask install fantastical + +# Browsers +brew cask install google-chrome +brew cask install firefox + +# Shape +brew cask install harvest + +# Ad hoc / non-categorized stuff diff --git a/bin/brewinstall b/setup/brew_install old mode 100755 new mode 100644 similarity index 100% rename from bin/brewinstall rename to setup/brew_install diff --git a/macos b/setup/macos similarity index 100% rename from macos rename to setup/macos diff --git a/zsh/functions b/zsh/functions index f58f7535f8..7f9d3475e3 100644 --- a/zsh/functions +++ b/zsh/functions @@ -78,5 +78,10 @@ function remove_untracked_files { function brew_install { brew install $1 - echo "brew install $1" >> ~/.dotfiles/brewinstall + echo "brew install $1" >> ~/.dotfiles/setup/brew_install +} + +function get_app { + brew cask install $1 + echo "brew cask install $1" >> ~/.dotfiles/setup/brew_cask_install } From ac530169b82a04f03413e2d8a65490daf891188e Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Sun, 2 Oct 2016 15:30:45 +0200 Subject: [PATCH 102/144] Removed unused credentials --- credentials | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 credentials diff --git a/credentials b/credentials deleted file mode 100644 index e69de29bb2..0000000000 From c61a9fc921df3d62779fed88b3a4926d6f72fa75 Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Sun, 2 Oct 2016 15:34:05 +0200 Subject: [PATCH 103/144] Removed unused things --- ackrc | 7 ------- gvimrc | 2 ++ rdebugrc | 2 -- zshrcr00k | 31 ------------------------------- 4 files changed, 2 insertions(+), 40 deletions(-) delete mode 100644 ackrc delete mode 100644 rdebugrc delete mode 100644 zshrcr00k diff --git a/ackrc b/ackrc deleted file mode 100644 index 8e3ea8e174..0000000000 --- a/ackrc +++ /dev/null @@ -1,7 +0,0 @@ ---type-add -ruby=.haml,.feature,.scss,.coffee ---ignore-dir=vendor ---ignore-dir=log ---ignore-dir=tmp ---ignore-dir=doc ---ignore-dir=coverage diff --git a/gvimrc b/gvimrc index 20f585b39a..760afa3041 100644 --- a/gvimrc +++ b/gvimrc @@ -2,3 +2,5 @@ set lbr set lines=99999 set columns=99999 + +colorscheme jellybeans diff --git a/rdebugrc b/rdebugrc deleted file mode 100644 index 8940138873..0000000000 --- a/rdebugrc +++ /dev/null @@ -1,2 +0,0 @@ -set autoeval on - diff --git a/zshrcr00k b/zshrcr00k deleted file mode 100644 index 66d4c305f4..0000000000 --- a/zshrcr00k +++ /dev/null @@ -1,31 +0,0 @@ -# Allow completing of the remainder of a command -bindkey "^N" insert-last-word - -# Show contents of directory after cd-ing into it -chpwd() { - ls -lrthG -} - -# Save a ton of history -HISTSIZE=20000 -HISTFILE=~/.zsh_history -SAVEHIST=20000 - -# Enable completion -autoload -U compinit -compinit - -# Disable flow control commands (keeps C-s from freezing everything) -stty start undef -stty stop undef - -# RVM -[[ -s "/Users/ben/.rvm/scripts/rvm" ]] && source "/Users/ben/.rvm/scripts/rvm" - -# Sourcing of other files -source $HOME/.dotfiles/zsh/aliases -source $HOME/.dotfiles/zsh/functions -source $HOME/.dotfiles/zsh/prompt -source $HOME/.dotfiles/zsh/z - -export PATH=$PATH:bin:~/bin:/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:/usr/local/git/bin:/usr/bin:/bin:/usr/sbin:/sbin:$HOME/.rvm/bin From 0706f5d04d8f6d14602b27e97ff69ea8d5038a5a Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Sun, 2 Oct 2016 17:42:16 +0200 Subject: [PATCH 104/144] Do not use bash as shell --- setup/brew_cask_install | 0 setup/brew_install | 7 ------- 2 files changed, 7 deletions(-) mode change 100644 => 100755 setup/brew_cask_install mode change 100644 => 100755 setup/brew_install diff --git a/setup/brew_cask_install b/setup/brew_cask_install old mode 100644 new mode 100755 diff --git a/setup/brew_install b/setup/brew_install old mode 100644 new mode 100755 index 709598f166..62918fb3a3 --- a/setup/brew_install +++ b/setup/brew_install @@ -4,16 +4,9 @@ brew update brew upgrade --all -# From github: mathiasbynens/dotfiles -brew install bash brew tap homebrew/versions brew install bash-completion2 -if ! fgrep -q '/usr/local/bin/bash' /etc/shells; then - echo '/usr/local/bin/bash' | sudo tee -a /etc/shells; - chsh -s /usr/local/bin/bash; -fi; - brew install wget --with-iri brew install vim --override-system-vi brew install homebrew/dupes/grep From fc327eece81f9d4e92cea461c0498228f46215e9 Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Mon, 3 Oct 2016 09:27:04 +0200 Subject: [PATCH 105/144] Removes nvm stuff --- zshrc | 4 ---- 1 file changed, 4 deletions(-) diff --git a/zshrc b/zshrc index 2bc82a375b..62eff283da 100644 --- a/zshrc +++ b/zshrc @@ -17,10 +17,6 @@ chpwd() { ls -lrthG } -# Node Version Manager -# export NVM_DIR=~/.nvm -# source $(brew --prefix nvm)/nvm.sh - # Load oh my zsh source $ZSH/oh-my-zsh.sh From ca35ab8ce267d8001c487adcd6b2c3f23185e029 Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Mon, 3 Oct 2016 09:27:12 +0200 Subject: [PATCH 106/144] Use new private-dotfiles --- zshrc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/zshrc b/zshrc index 62eff283da..bf74df908b 100644 --- a/zshrc +++ b/zshrc @@ -33,7 +33,9 @@ export EDITOR='vim' source $HOME/.dotfiles/zsh/aliases source $HOME/.dotfiles/zsh/functions -source $HOME/.dotfiles/zsh/credentials + +# Secret stuff +[ -f $HOME/.private-dotfiles/shell-init ] && source $HOME/.private-dotfiles/shell-init # Oddset CLI eval "$($HOME/code/oddset-cli/bin/oddset init -)" From 76e7e1f2017b2d0e4b968147727a0103dcd6578c Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Thu, 6 Oct 2016 07:40:41 +0200 Subject: [PATCH 107/144] Awesome productivity --- gitconfig | 3 ++- setup/brew_cask_install | 1 + setup/brew_install | 1 + vimrc | 1 + zsh/functions | 2 +- 5 files changed, 6 insertions(+), 2 deletions(-) diff --git a/gitconfig b/gitconfig index 5e95d5aad3..5a300d5b81 100644 --- a/gitconfig +++ b/gitconfig @@ -19,7 +19,8 @@ branch = auto [core] editor = vim --noplugin - excludesfile = /Users/anderslime/.gitignore + excludesfile = /Users/anderslime/.gitignore + ignorecase = false [credential] helper = osxkeychain [push] diff --git a/setup/brew_cask_install b/setup/brew_cask_install index 889cd10a89..459d4befab 100755 --- a/setup/brew_cask_install +++ b/setup/brew_cask_install @@ -36,3 +36,4 @@ brew cask install firefox brew cask install harvest # Ad hoc / non-categorized stuff +brew cask install flux diff --git a/setup/brew_install b/setup/brew_install index 62918fb3a3..fa4d530d0d 100755 --- a/setup/brew_install +++ b/setup/brew_install @@ -47,3 +47,4 @@ brew install libsass brew install libxmlsec1 # Ad hoc (not categorized stuff) +brew install elixir diff --git a/vimrc b/vimrc index 03629171d0..aa8a2a688d 100644 --- a/vimrc +++ b/vimrc @@ -173,6 +173,7 @@ let mapleader = "," vmap b :!git blame =expand("%:p") \| sed -n =line("'<") ,=line("'>") p map bb :!bundle install +map eb :!mix deps.get nmap bi :source ~/.vimrc:PluginInstall nmap d DashSearch map st :source % diff --git a/zsh/functions b/zsh/functions index 7f9d3475e3..42e4de5a80 100644 --- a/zsh/functions +++ b/zsh/functions @@ -81,7 +81,7 @@ function brew_install { echo "brew install $1" >> ~/.dotfiles/setup/brew_install } -function get_app { +function getapp { brew cask install $1 echo "brew cask install $1" >> ~/.dotfiles/setup/brew_cask_install } From 861b5fd36866991f16336aa9334e7afbe15bb183 Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Sun, 16 Oct 2016 16:10:43 +0200 Subject: [PATCH 108/144] Updated newly installed applications --- setup/brew_cask_install | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/setup/brew_cask_install b/setup/brew_cask_install index 459d4befab..35e5aeb9ad 100755 --- a/setup/brew_cask_install +++ b/setup/brew_cask_install @@ -37,3 +37,7 @@ brew cask install harvest # Ad hoc / non-categorized stuff brew cask install flux +brew cask install sketch +brew cask install garmin-express +brew cask install charles +brew cask install sektch From 634f131641d2aab8a3aad93ff9809c6fb4bebab6 Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Sun, 16 Oct 2016 16:11:56 +0200 Subject: [PATCH 109/144] Fixed mouse in tmux --- tmux.conf | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tmux.conf b/tmux.conf index 1c2a0b0da5..47dcecd0ad 100644 --- a/tmux.conf +++ b/tmux.conf @@ -13,10 +13,12 @@ set -g history-limit 15000 # use vim key bindings setw -g mode-keys vi -# disable mouse +# Enable mouse set -g mouse on -bind -n WheelUpPane select-pane -t= \; copy-mode -e \; send-keys -M -bind -n WheelDownPane select-pane -t= \; send-keys -M +set -g mode-mouse on +set -g mouse-resize-pane on +set -g mouse-select-pane on +set -g mouse-select-window on # decrease command delay (increases vim responsiveness) set -sg escape-time 1 From 1b1e76d2a28105a03330dd4b75fe3e8992bfbab4 Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Sun, 16 Oct 2016 16:12:03 +0200 Subject: [PATCH 110/144] Some aliases to run java test --- zsh/aliases | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/zsh/aliases b/zsh/aliases index a9a98c839f..c8edf6c0a7 100644 --- a/zsh/aliases +++ b/zsh/aliases @@ -95,3 +95,7 @@ alias start_oddset="mux start oddset" alias start_mitid="mux start mitid" alias rm="trash" + +# Gradle +alias jtest="./gradlew test -PmaxParallelForks=10" +alias jclean="./gradlew clean" From bb6032eabee0d348df9bd62eaae1e87ab9b700d6 Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Sun, 16 Oct 2016 16:42:20 +0200 Subject: [PATCH 111/144] Pretty formatting of log --- gitconfig | 15 +++++++++++++ githelpers | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 81 insertions(+) create mode 100644 githelpers diff --git a/gitconfig b/gitconfig index 5a300d5b81..957dfbbb59 100644 --- a/gitconfig +++ b/gitconfig @@ -13,6 +13,21 @@ db = delete-branch ri = rebase --interactive --autosquash rim = rebase --interactive --autosquash master + + # Fancy logging. + # h = head + # hp = head with patch + # r = recent commits, only current branch + # ra = recent commits, all reachable refs + # l = all commits, only current branch + # la = all commits, all reachable refs + head = !git r -1 + h = !git head + hp = "!. ~/.githelpers && show_git_head" + r = !GIT_NO_PAGER=1 git l -30 + ra = !git r --all + l = "!. ~/.githelpers && pretty_git_log" + la = !git l --all [color] status = auto diff = auto diff --git a/githelpers b/githelpers new file mode 100644 index 0000000000..5fe8b6eba3 --- /dev/null +++ b/githelpers @@ -0,0 +1,66 @@ +#!/bin/bash + +# Log output: +# +# * 51c333e (12 days) add vim-eunuch +# +# The time massaging regexes start with ^[^<]* because that ensures that they +# only operate before the first "<". That "<" will be the beginning of the +# author name, ensuring that we don't destroy anything in the commit message +# that looks like time. +# +# The log format uses } characters between each field, and `column` is later +# used to split on them. A } in the commit subject or any other field will +# break this. + +HASH="%C(yellow)%h%Creset" +RELATIVE_TIME="%Cgreen(%ar)%Creset" +AUTHOR="%C(bold blue)<%an>%Creset" +REFS="%C(bold red)%d%Creset" +SUBJECT="%s" + +FORMAT="$HASH}$RELATIVE_TIME}$AUTHOR}$REFS $SUBJECT" + +ANSI_BLACK='\033[30m' +ANSI_BLACK_BOLD='\033[0;30;1m' +ANSI_RED='\033[31m' +ANSI_RED_BOLD='\033[0;31;1m' +ANSI_GREEN='\033[32m' +ANSI_GREEN_BOLD='\033[0;32;1m' +ANSI_YELLOW='\033[33m' +ANSI_YELLOW_BOLD='\033[0;33;1m' +ANSI_BLUE='\033[34m' +ANSI_BLUE_BOLD='\033[0;34;1m' +ANSI_MAGENTA='\033[35m' +ANSI_MAGENTA_BOLD='\033[0;35;1m' +ANSI_CYAN='\033[36m' +ANSI_CYAN_BOLD='\033[0;36;1m' +ANSI_WHITE='\033[37m' +ANSI_WHITE_BOLD='\033[0;37;1m' +ANSI_RESET='\033[0m' + + +show_git_head() { + pretty_git_log -1 + git show -p --pretty="tformat:" +} + +pretty_git_log() { + git log --graph --pretty="tformat:${FORMAT}" $* | + # Replace (2 years ago) with (2 years) + sed -Ee 's/(^[^<]*) ago\)/\1)/' | + # Replace (2 years, 5 months) with (2 years) + sed -Ee 's/(^[^<]*), [[:digit:]]+ .*months?\)/\1)/' | + # Line columns up based on } delimiter + column -s '}' -t | + # Color merge commits specially + sed -Ee "s/(Merge (branch|remote-tracking branch|pull request) .*$)/$(printf $ANSI_RED)\1$(printf $ANSI_RESET)/" | + # Page only if we're asked to. + if [ -n "$GIT_NO_PAGER" ]; then + cat + else + # Page only if needed. + less --quit-if-one-screen --no-init --RAW-CONTROL-CHARS --chop-long-lines + fi +} + From cf1767f9047b696a62860dbbb0a85db60a679bea Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Tue, 25 Oct 2016 10:31:16 +0200 Subject: [PATCH 112/144] Great stuff --- setup/brew_install | 2 ++ zsh/aliases | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/setup/brew_install b/setup/brew_install index fa4d530d0d..6d644a2557 100755 --- a/setup/brew_install +++ b/setup/brew_install @@ -35,6 +35,8 @@ brew install awscli brew install amazon-ecs-cli brew install foreman brew install node +brew install heroku +heroku plugins:install heroku-accounts # Support multiple accounts # Databases brew install postgresql diff --git a/zsh/aliases b/zsh/aliases index c8edf6c0a7..0e2d01811e 100644 --- a/zsh/aliases +++ b/zsh/aliases @@ -46,6 +46,7 @@ alias startpostgres='pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgre alias dc='docker-compose' alias dockload='eval $(docker-machine env default)' alias docklog="docker logs --follow" +alias dockstart='docker-machine start default' # Git alias gs="git status" @@ -88,12 +89,13 @@ alias hs="h staging" alias hp="h production" alias hpc="hp run rails c" alias hsc="hs run rails c" +alias hap="heroku accounts:set personal" +alias has="heroku accounts:set shape" # Projects alias start_cargo="mux start cargoflux" alias start_oddset="mux start oddset" alias start_mitid="mux start mitid" - alias rm="trash" # Gradle From 25999a592b941261b62ebe11953a237b635d679c Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Tue, 13 Jun 2017 10:33:07 +0200 Subject: [PATCH 113/144] Removed unltisnippets --- vim/UltiSnips/javascript.snippets | 8 ----- vim/UltiSnips/plaintex.snippets | 1 - vim/UltiSnips/python.snippets | 4 --- vim/UltiSnips/tex.snippets | 60 ------------------------------- 4 files changed, 73 deletions(-) delete mode 100644 vim/UltiSnips/javascript.snippets delete mode 120000 vim/UltiSnips/plaintex.snippets delete mode 100644 vim/UltiSnips/python.snippets delete mode 100644 vim/UltiSnips/tex.snippets diff --git a/vim/UltiSnips/javascript.snippets b/vim/UltiSnips/javascript.snippets deleted file mode 100644 index f2e670a1c4..0000000000 --- a/vim/UltiSnips/javascript.snippets +++ /dev/null @@ -1,8 +0,0 @@ -snippet i18n -i18n: Ember.inject.service(), -$0 -endsnippet - -snippet tran -import { translationMacro as t } from "ember-i18n"; -endsnippet diff --git a/vim/UltiSnips/plaintex.snippets b/vim/UltiSnips/plaintex.snippets deleted file mode 120000 index bb265dfc08..0000000000 --- a/vim/UltiSnips/plaintex.snippets +++ /dev/null @@ -1 +0,0 @@ -tex.snippets \ No newline at end of file diff --git a/vim/UltiSnips/python.snippets b/vim/UltiSnips/python.snippets deleted file mode 100644 index 79c4e4a505..0000000000 --- a/vim/UltiSnips/python.snippets +++ /dev/null @@ -1,4 +0,0 @@ -snippet pry -import code; code.interact(local=locals()) -$0 -endsnippet diff --git a/vim/UltiSnips/tex.snippets b/vim/UltiSnips/tex.snippets deleted file mode 100644 index efcc906ee8..0000000000 --- a/vim/UltiSnips/tex.snippets +++ /dev/null @@ -1,60 +0,0 @@ -snippet chap -\chapter{${1:chapter name}} -\label{chapter:${2:${1/\\\+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:-:\L$1$2$3\E)/g}}} - -% chapter ${1/\\\+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:-:\L$1$2$3\E)/g} end -$0 -endsnippet - -snippet sec -\section{${1:section name}} -\label{sec:${2:${1/\\\+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:-:\L$1$2$3\E)/g}}} - -% section ${1/\\\+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:-:\L$1$2$3\E)/g} end -$0 -endsnippet - -snippet sub -\subsection{${1:section name}} -\label{subsec:${2:${1/\\\+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:-:\L$1$2$3\E)/g}}} - -% subsection ${1/\\\+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:-:\L$1$2$3\E)/g} end -$0 -endsnippet - -snippet subs -\subsubsection{${1:section name}} -\label{subsubsec:${2:${1/\\\+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:-:\L$1$2$3\E)/g}}} - -% subsubsection ${1/\\\+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:-:\L$1$2$3\E)/g} end -$0 -endsnippet - -snippet fig -\begin{figure*}[ht!] - \centering - \includegraphics[width=1.0\linewidth]{${1:filename}} - \caption{${2:caption}} - \label{fig:${3:label}} -\end{figure*} - -$0 -endsnippet - -snippet code -\begin{lstlisting} -$1 -\end{lstlisting} -endsnippet - -snippet item -\begin{itemize} - \item $1 -\end{itemize} -endsnippet - -snippet enum -\begin{enumerate} - \item $1 -\end{enumerate} -endsnippet From 403d7c589363c3aee20e0f9279b6f82d8374343f Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Tue, 13 Jun 2017 10:33:36 +0200 Subject: [PATCH 114/144] Different cool stuff --- gitconfig | 8 ++++++-- setup/brew_cask_install | 1 + setup/brew_install | 2 ++ vimrc | 7 ++----- zsh/aliases | 6 +++++- zsh/functions | 4 ++++ zshrc | 7 ++++++- 7 files changed, 26 insertions(+), 9 deletions(-) diff --git a/gitconfig b/gitconfig index 957dfbbb59..65e5cb9900 100644 --- a/gitconfig +++ b/gitconfig @@ -4,11 +4,12 @@ [alias] ap = add -p cm = commit -m - remove-merged = !sh -c 'git checkout master && git branch --merged | egrep -v \"production|master\" | xargs -L1 git delete-branch' + remove-merged = !sh -c 'git checkout master && git branch --merged | egrep -v \"production|master\" | xargs -L1 git delete-branch' + remove-merged-v2 = !sh -c 'git checkout feature/backend-v2 && git branch --merged | egrep -v \"production|backend-v2|master|modules\" | xargs -L1 git delete-branch' tmp = commit -a -m 'tmp' wip = commit -a -m 'wip' co = checkout - cob = checkout -b + cob = checkout -b dc = diff --cached db = delete-branch ri = rebase --interactive --autosquash @@ -40,3 +41,6 @@ helper = osxkeychain [push] default = current +[diff] + indentHeuristic = on + compactionHeuristic = on diff --git a/setup/brew_cask_install b/setup/brew_cask_install index 35e5aeb9ad..5498f92b0d 100755 --- a/setup/brew_cask_install +++ b/setup/brew_cask_install @@ -22,6 +22,7 @@ brew cask install docker-toolbox brew cask install java brew cask install rowanj-gitx brew cask install sublime-text +brew cask install wkhtmltopdf # Files brew cask install dropbox diff --git a/setup/brew_install b/setup/brew_install index 6d644a2557..d5e111ac2b 100755 --- a/setup/brew_install +++ b/setup/brew_install @@ -36,6 +36,8 @@ brew install amazon-ecs-cli brew install foreman brew install node brew install heroku +brew tap eddieantonio/eddieantonio +brew install imgcat heroku plugins:install heroku-accounts # Support multiple accounts # Databases diff --git a/vimrc b/vimrc index aa8a2a688d..b8304dc14e 100644 --- a/vimrc +++ b/vimrc @@ -41,6 +41,7 @@ Plugin 'honza/vim-snippets' " nelstrom's plugin depends on kana's Plugin 'kana/vim-textobj-user' Plugin 'nelstrom/vim-textobj-rubyblock' +Plugin 'andreshazard/vim-freemarker' " UI Plugins Plugin 'bling/vim-airline' " UI statusbar niceties @@ -106,11 +107,6 @@ set wildignore+=*/tmp/*,*.so,*.swp,*.zip,*.egg-info,*.git,/node_modules/*,/bower " LaTeX ignores set wildignore+=*.aux,*.blg,*.out,*.toc,*.bbl - -" " If you want :UltiSnipsEdit to split your window. -let g:UltiSnipsEditSplit="vertical" - - " Readable highlight text highlight PmenuSel ctermfg=black @@ -181,6 +177,7 @@ map sv :source ~/.vimrc " map d orequire 'pry'binding.pry:w map ra :%s/ map rd :!bundle exec rspec % --format documentation +map rt :!ruby -Ilib:test % map pt :!py.test map ptf :!py.test -c pytest-fast.ini map mt :!mix test % diff --git a/zsh/aliases b/zsh/aliases index 0e2d01811e..c72953f081 100644 --- a/zsh/aliases +++ b/zsh/aliases @@ -9,6 +9,8 @@ alias cuuid="uuid | pbcopy" alias prettyjson='python -m json.tool' alias jsonvim='prettyjson | vim -c "set syntax=json" -' alias jsonless='prettyjson | less' +alias cleardns="sudo killall -HUP mDNSResponder" +alias jobdone="terminal-notifier -message \"Job's done\"" # Vim alias v='vim' @@ -47,6 +49,7 @@ alias dc='docker-compose' alias dockload='eval $(docker-machine env default)' alias docklog="docker logs --follow" alias dockstart='docker-machine start default' +alias dconsole='docker_console' # Git alias gs="git status" @@ -75,6 +78,7 @@ alias gdc='git diff --cached' alias gdm='git diff master' alias gg='git lg' alias undeployed='git fetch --multiple production origin && git log production/master..origin/master' +alias gpcb='git push origin HEAD' # Pow alias pr="powder -r" @@ -96,7 +100,7 @@ alias has="heroku accounts:set shape" alias start_cargo="mux start cargoflux" alias start_oddset="mux start oddset" alias start_mitid="mux start mitid" -alias rm="trash" +# alias rm="trash" # Gradle alias jtest="./gradlew test -PmaxParallelForks=10" diff --git a/zsh/functions b/zsh/functions index 42e4de5a80..d35d45bacc 100644 --- a/zsh/functions +++ b/zsh/functions @@ -85,3 +85,7 @@ function getapp { brew cask install $1 echo "brew cask install $1" >> ~/.dotfiles/setup/brew_cask_install } + +function docker_console { + docker exec -it $1 /bin/bash +} diff --git a/zshrc b/zshrc index bf74df908b..cb81ecbe67 100644 --- a/zshrc +++ b/zshrc @@ -22,18 +22,23 @@ source $ZSH/oh-my-zsh.sh # Python # export PYTHONIOENCODING=utf-8 +export PATH=~/Library/Python/2.7/bin:$PATH # PATH export PATH=$HOME/bin:$HOME/.dotfiles/bin:/usr/local/bin:/usr/local/sbin:$PATH # You may need to manually set your language environment export LC_ALL=en_US.UTF-8 -export LANG=en_US.UTF-8 +export LANG=da_DK.UTF-8 export EDITOR='vim' source $HOME/.dotfiles/zsh/aliases source $HOME/.dotfiles/zsh/functions +# NVM +export NVM_DIR="$HOME/.nvm" +. "/usr/local/opt/nvm/nvm.sh" + # Secret stuff [ -f $HOME/.private-dotfiles/shell-init ] && source $HOME/.private-dotfiles/shell-init From 118f742e47a6dcab099611b163a50626473353a8 Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Tue, 13 Jun 2017 10:41:25 +0200 Subject: [PATCH 115/144] Fixed tmux conf vi copy mode for new version --- tmux.conf | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/tmux.conf b/tmux.conf index 47dcecd0ad..643d5c38d8 100644 --- a/tmux.conf +++ b/tmux.conf @@ -15,10 +15,6 @@ setw -g mode-keys vi # Enable mouse set -g mouse on -set -g mode-mouse on -set -g mouse-resize-pane on -set -g mouse-select-pane on -set -g mouse-select-window on # decrease command delay (increases vim responsiveness) set -sg escape-time 1 @@ -81,12 +77,9 @@ set -g status-right 'B: #{battery_icon} #{battery_percentage} #{battery_remain} set-option -g status-key vi set-window-option -g mode-keys vi -bind-key -t vi-copy v begin-selection -bind-key -t vi-copy y copy-pipe "reattach-to-user-namespace pbcopy" - -# Update default binding of `Enter` to also use copy-pipe -unbind -t vi-copy Enter -bind-key -t vi-copy Enter copy-pipe "reattach-to-user-namespace pbcopy" +bind-key -Tcopy-mode-vi 'v' send -X begin-selection +bind-key -Tcopy-mode-vi 'V' send -X begin-selection +bind-key -Tcopy-mode-vi 'y' send -X copy-pipe-and-cancel pbcopy ########################### # Colors From ee1880aa21d414c9164724d14819850738f71124 Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Wed, 6 Sep 2017 09:35:53 +0200 Subject: [PATCH 116/144] Do not run travis and nvm to optimize shell startup a bit --- zshrc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/zshrc b/zshrc index cb81ecbe67..afdab8bc2b 100644 --- a/zshrc +++ b/zshrc @@ -36,8 +36,8 @@ source $HOME/.dotfiles/zsh/aliases source $HOME/.dotfiles/zsh/functions # NVM -export NVM_DIR="$HOME/.nvm" -. "/usr/local/opt/nvm/nvm.sh" +# export NVM_DIR="$HOME/.nvm" +# . "/usr/local/opt/nvm/nvm.sh" # Secret stuff [ -f $HOME/.private-dotfiles/shell-init ] && source $HOME/.private-dotfiles/shell-init @@ -46,6 +46,6 @@ export NVM_DIR="$HOME/.nvm" eval "$($HOME/code/oddset-cli/bin/oddset init -)" # added by travis gem -[ -f /Users/anderslime/.travis/travis.sh ] && source /Users/anderslime/.travis/travis.sh +# [ -f /Users/anderslime/.travis/travis.sh ] && source /Users/anderslime/.travis/travis.sh export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting From 228acd443baa831f65031554200aab6c65651801 Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Wed, 6 Sep 2017 09:36:04 +0200 Subject: [PATCH 117/144] Various new syntaxeees --- vimrc | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/vimrc b/vimrc index b8304dc14e..b2769a1357 100644 --- a/vimrc +++ b/vimrc @@ -16,6 +16,7 @@ Plugin 'koron/nyancat-vim' Plugin 'tomtom/tcomment_vim' Plugin 'vim-ruby/vim-ruby' Plugin 'pangloss/vim-javascript' +Plugin 'udalov/kotlin-vim' " Plugin 'wincent/Command-T' Plugin 'scrooloose/nerdtree' Plugin 'LaTeX-Box-Team/LaTeX-Box' @@ -34,8 +35,8 @@ Plugin 'geoffharcourt/vim-matchit' Plugin 'Townk/vim-autoclose' Plugin 'rizzatti/dash.vim' Plugin 'keith/swift.vim' +Plugin 'vim-scripts/groovy.vim' -Plugin 'SirVer/ultisnips' Plugin 'honza/vim-snippets' " nelstrom's plugin depends on kana's @@ -132,10 +133,8 @@ autocmd BufRead,BufNewFile *.md setlocal spell autocmd BufRead,BufNewFile *.tex setlocal spell set complete+=kspell -" Set FSharp Filetype -" au BufRead,BufNewFile *.fs set filetype=fs -" au BufRead,BufNewFile *.fsx set filetype=fs -au BufRead,BufNewFile *.skim setfiletype slim +" Set Gradle syntax +au BufNewFile,BufRead *.gradle setf groovy " Read upon: " Better? completion on command line From 90fc8117615fd68b2ab730218d7fa520367b9210 Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Mon, 23 Oct 2017 17:05:51 +0200 Subject: [PATCH 118/144] Search and replace in vim help --- vimrc | 1 + 1 file changed, 1 insertion(+) diff --git a/vimrc b/vimrc index b2769a1357..cc815375a0 100644 --- a/vimrc +++ b/vimrc @@ -36,6 +36,7 @@ Plugin 'Townk/vim-autoclose' Plugin 'rizzatti/dash.vim' Plugin 'keith/swift.vim' Plugin 'vim-scripts/groovy.vim' +Plugin 'tpope/tpope-vim-abolish' Plugin 'honza/vim-snippets' From cbe8c9a5788b0af7c5b683af906381208dab977d Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Mon, 23 Oct 2017 17:06:04 +0200 Subject: [PATCH 119/144] Set docker ip when loading docker env --- zsh/aliases | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zsh/aliases b/zsh/aliases index c72953f081..32411b8270 100644 --- a/zsh/aliases +++ b/zsh/aliases @@ -46,7 +46,7 @@ alias startpostgres='pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgre # Docker alias dc='docker-compose' -alias dockload='eval $(docker-machine env default)' +alias dockload='eval $(docker-machine env default) && DOCKER_IP=$(docker-machine ip default)' alias docklog="docker logs --follow" alias dockstart='docker-machine start default' alias dconsole='docker_console' From 2003d1924e08a05a7899145d154375dd82cd19ef Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Mon, 23 Oct 2017 17:06:24 +0200 Subject: [PATCH 120/144] Gradle test aliases --- zsh/aliases | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zsh/aliases b/zsh/aliases index 32411b8270..c95a9a6002 100644 --- a/zsh/aliases +++ b/zsh/aliases @@ -103,5 +103,5 @@ alias start_mitid="mux start mitid" # alias rm="trash" # Gradle -alias jtest="./gradlew test -PmaxParallelForks=10" -alias jclean="./gradlew clean" +alias jt="./gradlew test --parallel" +alias jc="./gradlew clean" From f206153648f622ad90c125cb32a27498d2e4010c Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Mon, 23 Oct 2017 17:06:32 +0200 Subject: [PATCH 121/144] Convert json file to pretty json file --- zsh/functions | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/zsh/functions b/zsh/functions index d35d45bacc..438d570262 100644 --- a/zsh/functions +++ b/zsh/functions @@ -89,3 +89,8 @@ function getapp { function docker_console { docker exec -it $1 /bin/bash } + +function prettyjsonfile { + cat "$1" | prettyjson > "$1-pretty" + mv "$1-pretty" "$1" +} From 7bab884355b5271fa44c1ce6437d4bd0bc2f2aa0 Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Mon, 23 Oct 2017 17:32:53 +0200 Subject: [PATCH 122/144] Updated brew install --- setup/brew_install | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/setup/brew_install b/setup/brew_install index d5e111ac2b..d00f52694d 100755 --- a/setup/brew_install +++ b/setup/brew_install @@ -5,19 +5,15 @@ brew update brew upgrade --all brew tap homebrew/versions +brew install bash brew install bash-completion2 brew install wget --with-iri brew install vim --override-system-vi -brew install homebrew/dupes/grep -brew install homebrew/dupes/openssh -brew install homebrew/dupes/screen - -# Install font tools. -brew tap bramstein/webfonttools -brew install sfnt2woff -brew install sfnt2woff-zopfli -brew install woff2 +brew install tmux +berw install zsh +brew install grep +brew install openssh # Misc tools brew install trash @@ -27,28 +23,25 @@ brew install the_silver_searcher brew install trash # Dev tools +brew install git +brew install git-lfs +brew install gradle +brew install python +brew install python-3 brew install hub brew install git-extras -brew install reattach-to-user-namespace --with-wrap-pbcopy-and-pbpaste brew install aws brew install awscli brew install amazon-ecs-cli brew install foreman brew install node brew install heroku -brew tap eddieantonio/eddieantonio -brew install imgcat -heroku plugins:install heroku-accounts # Support multiple accounts # Databases brew install postgresql brew install redis -brew install mongodb # Server tools brew install imagemagick brew install libsass brew install libxmlsec1 - -# Ad hoc (not categorized stuff) -brew install elixir From 956752a0f531ba552ab85e5aa13fa85b3c546282 Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Mon, 23 Oct 2017 18:18:43 +0200 Subject: [PATCH 123/144] New macos file --- setup/macos | 280 +++++++++++++++++++++++++++------------------------- 1 file changed, 146 insertions(+), 134 deletions(-) diff --git a/setup/macos b/setup/macos index 2743c21217..0fe14063fb 100755 --- a/setup/macos +++ b/setup/macos @@ -31,19 +31,6 @@ sudo nvram SystemAudioVolume=" " # Disable transparency in the menu bar and elsewhere on Yosemite defaults write com.apple.universalaccess reduceTransparency -bool true -# Menu bar: hide the Time Machine, Volume, and User icons -for domain in ~/Library/Preferences/ByHost/com.apple.systemuiserver.*; do - defaults write "${domain}" dontAutoLoad -array \ - "/System/Library/CoreServices/Menu Extras/TimeMachine.menu" \ - "/System/Library/CoreServices/Menu Extras/Volume.menu" \ - "/System/Library/CoreServices/Menu Extras/User.menu" -done -defaults write com.apple.systemuiserver menuExtras -array \ - "/System/Library/CoreServices/Menu Extras/Bluetooth.menu" \ - "/System/Library/CoreServices/Menu Extras/AirPort.menu" \ - "/System/Library/CoreServices/Menu Extras/Battery.menu" \ - "/System/Library/CoreServices/Menu Extras/Clock.menu" - # Set highlight color to green defaults write NSGlobalDomain AppleHighlightColor -string "0.764700 0.976500 0.568600" @@ -89,7 +76,7 @@ defaults write com.apple.LaunchServices LSQuarantine -bool false defaults write NSGlobalDomain NSTextShowsControlCharacters -bool true # Disable Resume system-wide -defaults write com.apple.systempreferences NSQuitAlwaysKeepsWindows -bool false +# defaults write com.apple.systempreferences NSQuitAlwaysKeepsWindows -bool false # Disable automatic termination of inactive apps defaults write NSGlobalDomain NSDisableAutomaticTermination -bool true @@ -110,7 +97,7 @@ defaults write com.apple.helpviewer DevMode -bool true sudo defaults write /Library/Preferences/com.apple.loginwindow AdminHostInfo HostName # Restart automatically if the computer freezes -sudo systemsetup -setrestartfreeze on +# sudo systemsetup -setrestartfreeze on # Never go into computer sleep mode sudo systemsetup -setcomputersleep Off > /dev/null @@ -118,11 +105,26 @@ sudo systemsetup -setcomputersleep Off > /dev/null # Disable Notification Center and remove the menu bar icon # launchctl unload -w /System/Library/LaunchAgents/com.apple.notificationcenterui.plist 2> /dev/null -# Disable smart quotes as they’re annoying when typing code -defaults write NSGlobalDomain NSAutomaticQuoteSubstitutionEnabled -bool false +# Disable automatic capitalization as it’s annoying when typing code +# defaults write NSGlobalDomain NSAutomaticCapitalizationEnabled -bool false # Disable smart dashes as they’re annoying when typing code -defaults write NSGlobalDomain NSAutomaticDashSubstitutionEnabled -bool false +# defaults write NSGlobalDomain NSAutomaticDashSubstitutionEnabled -bool false + +# Disable automatic period substitution as it’s annoying when typing code +# defaults write NSGlobalDomain NSAutomaticPeriodSubstitutionEnabled -bool false + +# Disable smart quotes as they’re annoying when typing code +# defaults write NSGlobalDomain NSAutomaticQuoteSubstitutionEnabled -bool false + +# Disable auto-correct +# defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false + +# Set a custom wallpaper image. `DefaultDesktop.jpg` is already a symlink, and +# all wallpapers are in `/Library/Desktop Pictures/`. The default is `Wave.jpg`. +#rm -rf ~/Library/Application Support/Dock/desktoppicture.db +#sudo rm -rf /System/Library/CoreServices/DefaultDesktop.jpg +#sudo ln -s /path/to/your/image /System/Library/CoreServices/DefaultDesktop.jpg ############################################################################### # SSD-specific tweaks # @@ -138,9 +140,6 @@ sudo touch /private/var/vm/sleepimage # …and make sure it can’t be rewritten sudo chflags uchg /private/var/vm/sleepimage -# Disable the sudden motion sensor as it’s not useful for SSDs -sudo pmset -a sms 0 - ############################################################################### # Trackpad, mouse, keyboard, Bluetooth accessories, and input # ############################################################################### @@ -173,7 +172,7 @@ defaults write com.apple.universalaccess HIDScrollZoomModifierMask -int 262144 defaults write com.apple.universalaccess closeViewZoomFollowsFocus -bool true # Disable press-and-hold for keys in favor of key repeat -defaults write NSGlobalDomain ApplePressAndHoldEnabled -bool false +# defaults write NSGlobalDomain ApplePressAndHoldEnabled -bool false # Set a blazingly fast keyboard repeat rate defaults write NSGlobalDomain KeyRepeat -int 1 @@ -187,12 +186,12 @@ defaults write NSGlobalDomain AppleLocale -string "en_US@currency=DKK" defaults write NSGlobalDomain AppleMeasurementUnits -string "Centimeters" defaults write NSGlobalDomain AppleMetricUnits -bool true +# Show language menu in the top right corner of the boot screen +sudo defaults write /Library/Preferences/com.apple.loginwindow showInputMenu -bool true + # Set the timezone; see `sudo systemsetup -listtimezones` for other values sudo systemsetup -settimezone "Europe/Copenhagen" > /dev/null -# Disable auto-correct -defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false - # Stop iTunes from responding to the keyboard media keys #launchctl unload -w /System/Library/LaunchAgents/com.apple.rcd.plist 2> /dev/null @@ -202,7 +201,7 @@ defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false # Require password immediately after sleep or screen saver begins defaults write com.apple.screensaver askForPassword -int 1 -defaults write com.apple.screensaver askForPasswordDelay -int 60 +defaults write com.apple.screensaver askForPasswordDelay -int 0 # Save screenshots to the desktop defaults write com.apple.screencapture location -string "${HOME}/Desktop" @@ -214,7 +213,8 @@ defaults write com.apple.screencapture type -string "png" defaults write com.apple.screencapture disable-shadow -bool true # Enable subpixel font rendering on non-Apple LCDs -defaults write NSGlobalDomain AppleFontSmoothing -int 2 +# Reference: https://github.com/kevinSuttle/macOS-Defaults/issues/17#issuecomment-266633501 +defaults write NSGlobalDomain AppleFontSmoothing -int 1 # Enable HiDPI display modes (requires restart) sudo defaults write /Library/Preferences/com.apple.windowserver DisplayResolutionEnabled -bool true @@ -234,11 +234,11 @@ defaults write com.apple.finder DisableAllAnimations -bool true defaults write com.apple.finder NewWindowTarget -string "PfDe" defaults write com.apple.finder NewWindowTargetPath -string "file://${HOME}/Desktop/" -# Show icons for hard drives, servers, and removable media on the desktop +# Show icons for removable media on the desktop defaults write com.apple.finder ShowExternalHardDrivesOnDesktop -bool true -defaults write com.apple.finder ShowHardDrivesOnDesktop -bool false -defaults write com.apple.finder ShowMountedServersOnDesktop -bool true defaults write com.apple.finder ShowRemovableMediaOnDesktop -bool true +defaults write com.apple.finder ShowHardDrivesOnDesktop -bool false +defaults write com.apple.finder ShowMountedServersOnDesktop -bool false # Finder: show hidden files by default #defaults write com.apple.finder AppleShowAllFiles -bool true @@ -253,13 +253,16 @@ defaults write com.apple.finder ShowStatusBar -bool true defaults write com.apple.finder ShowPathbar -bool true # Display full POSIX path as Finder window title -defaults write com.apple.finder _FXShowPosixPathInTitle -bool true +# defaults write com.apple.finder _FXShowPosixPathInTitle -bool true + +# Keep folders on top when sorting by name +defaults write com.apple.finder _FXSortFoldersFirst -bool true # When performing a search, search the current folder by default defaults write com.apple.finder FXDefaultSearchScope -string "SCcf" # Disable the warning when changing a file extension -defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false +# defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false # Enable spring loading for directories defaults write NSGlobalDomain com.apple.springing.enabled -bool true @@ -267,8 +270,9 @@ defaults write NSGlobalDomain com.apple.springing.enabled -bool true # Remove the spring loading delay for directories defaults write NSGlobalDomain com.apple.springing.delay -float 0 -# Avoid creating .DS_Store files on network volumes +# Avoid creating .DS_Store files on network or USB volumes defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true +defaults write com.apple.desktopservices DSDontWriteUSBStores -bool true # Disable disk image verification defaults write com.apple.frameworks.diskimages skip-verify -bool true @@ -281,12 +285,12 @@ defaults write com.apple.frameworks.diskimages auto-open-rw-root -bool true defaults write com.apple.finder OpenWindowForNewRemovableDisk -bool true # Show item info near icons on the desktop and in other icon views -/usr/libexec/PlistBuddy -c "Set :DesktopViewSettings:IconViewSettings:showItemInfo true" ~/Library/Preferences/com.apple.finder.plist -/usr/libexec/PlistBuddy -c "Set :FK_StandardViewSettings:IconViewSettings:showItemInfo true" ~/Library/Preferences/com.apple.finder.plist -/usr/libexec/PlistBuddy -c "Set :StandardViewSettings:IconViewSettings:showItemInfo true" ~/Library/Preferences/com.apple.finder.plist +# /usr/libexec/PlistBuddy -c "Set :DesktopViewSettings:IconViewSettings:showItemInfo true" ~/Library/Preferences/com.apple.finder.plist +# /usr/libexec/PlistBuddy -c "Set :FK_StandardViewSettings:IconViewSettings:showItemInfo true" ~/Library/Preferences/com.apple.finder.plist +# /usr/libexec/PlistBuddy -c "Set :StandardViewSettings:IconViewSettings:showItemInfo true" ~/Library/Preferences/com.apple.finder.plist # Show item info to the right of the icons on the desktop -/usr/libexec/PlistBuddy -c "Set DesktopViewSettings:IconViewSettings:labelOnBottom false" ~/Library/Preferences/com.apple.finder.plist +# /usr/libexec/PlistBuddy -c "Set DesktopViewSettings:IconViewSettings:labelOnBottom false" ~/Library/Preferences/com.apple.finder.plist # Enable snap-to-grid for icons on the desktop and in other icon views /usr/libexec/PlistBuddy -c "Set :DesktopViewSettings:IconViewSettings:arrangeBy grid" ~/Library/Preferences/com.apple.finder.plist @@ -294,14 +298,14 @@ defaults write com.apple.finder OpenWindowForNewRemovableDisk -bool true /usr/libexec/PlistBuddy -c "Set :StandardViewSettings:IconViewSettings:arrangeBy grid" ~/Library/Preferences/com.apple.finder.plist # Increase grid spacing for icons on the desktop and in other icon views -/usr/libexec/PlistBuddy -c "Set :DesktopViewSettings:IconViewSettings:gridSpacing 100" ~/Library/Preferences/com.apple.finder.plist -/usr/libexec/PlistBuddy -c "Set :FK_StandardViewSettings:IconViewSettings:gridSpacing 100" ~/Library/Preferences/com.apple.finder.plist -/usr/libexec/PlistBuddy -c "Set :StandardViewSettings:IconViewSettings:gridSpacing 100" ~/Library/Preferences/com.apple.finder.plist +# /usr/libexec/PlistBuddy -c "Set :DesktopViewSettings:IconViewSettings:gridSpacing 100" ~/Library/Preferences/com.apple.finder.plist +# /usr/libexec/PlistBuddy -c "Set :FK_StandardViewSettings:IconViewSettings:gridSpacing 100" ~/Library/Preferences/com.apple.finder.plist +# /usr/libexec/PlistBuddy -c "Set :StandardViewSettings:IconViewSettings:gridSpacing 100" ~/Library/Preferences/com.apple.finder.plist # Increase the size of icons on the desktop and in other icon views -/usr/libexec/PlistBuddy -c "Set :DesktopViewSettings:IconViewSettings:iconSize 80" ~/Library/Preferences/com.apple.finder.plist -/usr/libexec/PlistBuddy -c "Set :FK_StandardViewSettings:IconViewSettings:iconSize 80" ~/Library/Preferences/com.apple.finder.plist -/usr/libexec/PlistBuddy -c "Set :StandardViewSettings:IconViewSettings:iconSize 80" ~/Library/Preferences/com.apple.finder.plist +# /usr/libexec/PlistBuddy -c "Set :DesktopViewSettings:IconViewSettings:iconSize 80" ~/Library/Preferences/com.apple.finder.plist +# /usr/libexec/PlistBuddy -c "Set :FK_StandardViewSettings:IconViewSettings:iconSize 80" ~/Library/Preferences/com.apple.finder.plist +# /usr/libexec/PlistBuddy -c "Set :StandardViewSettings:IconViewSettings:iconSize 80" ~/Library/Preferences/com.apple.finder.plist # Use list view in all Finder windows by default # Four-letter codes for the other view modes: `icnv`, `clmv`, `Flwv` @@ -326,9 +330,8 @@ file=/Applications/Dropbox.app/Contents/Resources/emblem-dropbox-uptodate.icns # Expand the following File Info panes: # “General”, “Open with”, and “Sharing & Permissions” defaults write com.apple.finder FXInfoPanesExpanded -dict \ - General -bool true \ - OpenWith -bool true \ - Privileges -bool true + General -bool true \ + Privileges -bool true ############################################################################### # Dock, Dashboard, and hot corners # @@ -355,10 +358,10 @@ defaults write com.apple.dock show-process-indicators -bool true # Wipe all (default) app icons from the Dock # This is only really useful when setting up a new Mac, or if you don’t use # the Dock to launch apps. -#defaults write com.apple.dock persistent-apps -array +defaults write com.apple.dock persistent-apps -array # Show only open applications in the Dock -#defaults write com.apple.dock static-only -bool true +defaults write com.apple.dock static-only -bool true # Don’t animate opening applications from the Dock defaults write com.apple.dock launchanim -bool false @@ -371,13 +374,13 @@ defaults write com.apple.dock expose-animation-duration -float 0.1 defaults write com.apple.dock expose-group-by-app -bool false # Disable Dashboard -defaults write com.apple.dashboard mcx-disabled -bool true +# defaults write com.apple.dashboard mcx-disabled -bool true # Don’t show Dashboard as a Space -defaults write com.apple.dock dashboard-in-overlay -bool true +# defaults write com.apple.dock dashboard-in-overlay -bool true # Don’t automatically rearrange Spaces based on most recent use -defaults write com.apple.dock mru-spaces -bool false +# defaults write com.apple.dock mru-spaces -bool false # Remove the auto-hiding Dock delay defaults write com.apple.dock autohide-delay -float 0 @@ -394,11 +397,11 @@ defaults write com.apple.dock showhidden -bool true #defaults write com.apple.dock showLaunchpadGestureEnabled -int 0 # Reset Launchpad, but keep the desktop wallpaper intact -find "${HOME}/Library/Application Support/Dock" -name "*-*.db" -maxdepth 1 -delete +# find "${HOME}/Library/Application Support/Dock" -name "*-*.db" -maxdepth 1 -delete # Add iOS & Watch Simulator to Launchpad -sudo ln -sf "/Applications/Xcode.app/Contents/Developer/Applications/Simulator.app" "/Applications/Simulator.app" -sudo ln -sf "/Applications/Xcode.app/Contents/Developer/Applications/Simulator (Watch).app" "/Applications/Simulator (Watch).app" +# sudo ln -sf "/Applications/Xcode.app/Contents/Developer/Applications/Simulator.app" "/Applications/Simulator.app" +# sudo ln -sf "/Applications/Xcode.app/Contents/Developer/Applications/Simulator (Watch).app" "/Applications/Simulator (Watch).app" # Add a spacer to the left side of the Dock (where the applications are) #defaults write com.apple.dock persistent-apps -array-add '{tile-data={}; tile-type="spacer-tile";}' @@ -418,13 +421,13 @@ sudo ln -sf "/Applications/Xcode.app/Contents/Developer/Applications/Simulator ( # 11: Launchpad # 12: Notification Center # Top left screen corner → Mission Control -defaults write com.apple.dock wvous-tl-corner -int 0 +defaults write com.apple.dock wvous-tl-corner -int 2 defaults write com.apple.dock wvous-tl-modifier -int 0 # Top right screen corner → Desktop -defaults write com.apple.dock wvous-tr-corner -int 0 +defaults write com.apple.dock wvous-tr-corner -int 4 defaults write com.apple.dock wvous-tr-modifier -int 0 # Bottom left screen corner → Start screen saver -defaults write com.apple.dock wvous-bl-corner -int 0 +defaults write com.apple.dock wvous-bl-corner -int 5 defaults write com.apple.dock wvous-bl-modifier -int 0 ############################################################################### @@ -496,13 +499,19 @@ defaults write com.apple.Safari WebKitPluginsEnabled -bool false defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2PluginsEnabled -bool false # Disable Java -defaults write com.apple.Safari WebKitJavaEnabled -bool false -defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2JavaEnabled -bool false +# defaults write com.apple.Safari WebKitJavaEnabled -bool false +# defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2JavaEnabled -bool false # Block pop-up windows defaults write com.apple.Safari WebKitJavaScriptCanOpenWindowsAutomatically -bool false defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2JavaScriptCanOpenWindowsAutomatically -bool false +# Disable auto-playing video +#defaults write com.apple.Safari WebKitMediaPlaybackAllowsInline -bool false +#defaults write com.apple.SafariTechnologyPreview WebKitMediaPlaybackAllowsInline -bool false +#defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2AllowsInlineMediaPlayback -bool false +#defaults write com.apple.SafariTechnologyPreview com.apple.Safari.ContentPageGroupIdentifier.WebKit2AllowsInlineMediaPlayback -bool false + # Enable “Do Not Track” defaults write com.apple.Safari SendDoNotTrackHTTPHeader -bool true @@ -546,35 +555,35 @@ defaults write com.apple.mail SpellCheckingBehavior -string "NoSpellCheckingEnab sudo defaults write /.Spotlight-V100/VolumeConfiguration Exclusions -array "/Volumes" # Change indexing order and disable some search results # Yosemite-specific search results (remove them if you are using macOS 10.9 or older): -# MENU_DEFINITION -# MENU_CONVERSION -# MENU_EXPRESSION -# MENU_SPOTLIGHT_SUGGESTIONS (send search queries to Apple) -# MENU_WEBSEARCH (send search queries to Apple) -# MENU_OTHER +# MENU_DEFINITION +# MENU_CONVERSION +# MENU_EXPRESSION +# MENU_SPOTLIGHT_SUGGESTIONS (send search queries to Apple) +# MENU_WEBSEARCH (send search queries to Apple) +# MENU_OTHER defaults write com.apple.spotlight orderedItems -array \ - '{"enabled" = 1;"name" = "APPLICATIONS";}' \ - '{"enabled" = 1;"name" = "SYSTEM_PREFS";}' \ - '{"enabled" = 1;"name" = "DIRECTORIES";}' \ - '{"enabled" = 1;"name" = "PDF";}' \ - '{"enabled" = 1;"name" = "FONTS";}' \ - '{"enabled" = 0;"name" = "DOCUMENTS";}' \ - '{"enabled" = 0;"name" = "MESSAGES";}' \ - '{"enabled" = 0;"name" = "CONTACT";}' \ - '{"enabled" = 0;"name" = "EVENT_TODO";}' \ - '{"enabled" = 0;"name" = "IMAGES";}' \ - '{"enabled" = 0;"name" = "BOOKMARKS";}' \ - '{"enabled" = 0;"name" = "MUSIC";}' \ - '{"enabled" = 0;"name" = "MOVIES";}' \ - '{"enabled" = 0;"name" = "PRESENTATIONS";}' \ - '{"enabled" = 0;"name" = "SPREADSHEETS";}' \ - '{"enabled" = 0;"name" = "SOURCE";}' \ - '{"enabled" = 0;"name" = "MENU_DEFINITION";}' \ - '{"enabled" = 0;"name" = "MENU_OTHER";}' \ - '{"enabled" = 0;"name" = "MENU_CONVERSION";}' \ - '{"enabled" = 0;"name" = "MENU_EXPRESSION";}' \ - '{"enabled" = 0;"name" = "MENU_WEBSEARCH";}' \ - '{"enabled" = 0;"name" = "MENU_SPOTLIGHT_SUGGESTIONS";}' + '{"enabled" = 1;"name" = "APPLICATIONS";}' \ + '{"enabled" = 1;"name" = "SYSTEM_PREFS";}' \ + '{"enabled" = 1;"name" = "DIRECTORIES";}' \ + '{"enabled" = 1;"name" = "PDF";}' \ + '{"enabled" = 1;"name" = "FONTS";}' \ + '{"enabled" = 0;"name" = "DOCUMENTS";}' \ + '{"enabled" = 0;"name" = "MESSAGES";}' \ + '{"enabled" = 0;"name" = "CONTACT";}' \ + '{"enabled" = 0;"name" = "EVENT_TODO";}' \ + '{"enabled" = 0;"name" = "IMAGES";}' \ + '{"enabled" = 0;"name" = "BOOKMARKS";}' \ + '{"enabled" = 0;"name" = "MUSIC";}' \ + '{"enabled" = 0;"name" = "MOVIES";}' \ + '{"enabled" = 0;"name" = "PRESENTATIONS";}' \ + '{"enabled" = 0;"name" = "SPREADSHEETS";}' \ + '{"enabled" = 0;"name" = "SOURCE";}' + # '{"enabled" = 0;"name" = "MENU_DEFINITION";}' \ + # '{"enabled" = 0;"name" = "MENU_OTHER";}' \ + # '{"enabled" = 0;"name" = "MENU_CONVERSION";}' \ + # '{"enabled" = 0;"name" = "MENU_EXPRESSION";}' \ + # '{"enabled" = 0;"name" = "MENU_WEBSEARCH";}' \ + # '{"enabled" = 0;"name" = "MENU_SPOTLIGHT_SUGGESTIONS";}' # Load new settings before rebuilding the index killall mds > /dev/null 2>&1 # Make sure indexing is enabled for the main volume @@ -598,6 +607,12 @@ defaults write com.apple.terminal StringEncodings -array 4 # See: https://security.stackexchange.com/a/47786/8918 defaults write com.apple.terminal SecureKeyboardEntry -bool true +# Disable the annoying line marks +defaults write com.apple.Terminal ShowLineMarks -int 0 + +# Install the Solarized Dark theme for iTerm +# open "${HOME}/init/Solarized Dark.itermcolors" + # Don’t display the annoying prompt when quitting iTerm defaults write com.googlecode.iterm2 PromptOnQuit -bool false @@ -700,7 +715,7 @@ defaults -currentHost write com.apple.ImageCapture disableHotPlug -bool true defaults write com.apple.messageshelper.MessageController SOInputLineSettings -dict-add "automaticEmojiSubstitutionEnablediMessage" -bool false # Disable smart quotes as it’s annoying for messages that contain code -defaults write com.apple.messageshelper.MessageController SOInputLineSettings -dict-add "automaticQuoteSubstitutionEnabled" -bool false +# defaults write com.apple.messageshelper.MessageController SOInputLineSettings -dict-add "automaticQuoteSubstitutionEnabled" -bool false # Disable continuous spell checking defaults write com.apple.messageshelper.MessageController SOInputLineSettings -dict-add "continuousSpellCheckingEnabled" -bool false @@ -709,10 +724,6 @@ defaults write com.apple.messageshelper.MessageController SOInputLineSettings -d # Google Chrome & Google Chrome Canary # ############################################################################### -# Allow installing user scripts via GitHub Gist or Userscripts.org -defaults write com.google.Chrome ExtensionInstallSources -array "https://gist.githubusercontent.com/" "http://userscripts.org/*" -defaults write com.google.Chrome.canary ExtensionInstallSources -array "https://gist.githubusercontent.com/" "http://userscripts.org/*" - # Disable the all too sensitive backswipe on trackpads defaults write com.google.Chrome AppleEnableSwipeNavigateWithScrolls -bool false defaults write com.google.Chrome.canary AppleEnableSwipeNavigateWithScrolls -bool false @@ -729,37 +740,29 @@ defaults write com.google.Chrome.canary DisablePrintPreview -bool true defaults write com.google.Chrome PMPrintingExpandedStateForPrint2 -bool true defaults write com.google.Chrome.canary PMPrintingExpandedStateForPrint2 -bool true -############################################################################### -# GPGMail 2 # -############################################################################### - -# Disable signing emails by default -defaults write ~/Library/Preferences/org.gpgtools.gpgmail SignNewEmailsByDefault -bool false - -############################################################################### -# Opera & Opera Developer # -############################################################################### - -# Expand the print dialog by default -defaults write com.operasoftware.Opera PMPrintingExpandedStateForPrint2 -boolean true -defaults write com.operasoftware.OperaDeveloper PMPrintingExpandedStateForPrint2 -boolean true - ############################################################################### # SizeUp.app # ############################################################################### # Start SizeUp at login -defaults write com.irradiatedsoftware.SizeUp StartAtLogin -bool true +# defaults write com.irradiatedsoftware.SizeUp StartAtLogin -bool true # Don’t show the preferences window on next start -defaults write com.irradiatedsoftware.SizeUp ShowPrefsOnNextStart -bool false +# defaults write com.irradiatedsoftware.SizeUp ShowPrefsOnNextStart -bool false ############################################################################### # Sublime Text # ############################################################################### # Install Sublime Text settings -cp -r init/Preferences.sublime-settings ~/Library/Application\ Support/Sublime\ Text*/Packages/User/Preferences.sublime-settings 2> /dev/null +# cp -r init/Preferences.sublime-settings ~/Library/Application\ Support/Sublime\ Text*/Packages/User/Preferences.sublime-settings 2> /dev/null + +############################################################################### +# Spectacle.app # +############################################################################### + +# Set up my preferred keyboard shortcuts +cp -r init/spectacle.json ~/Library/Application\ Support/Spectacle/Shortcuts.json 2> /dev/null ############################################################################### # Transmission.app # @@ -769,10 +772,16 @@ cp -r init/Preferences.sublime-settings ~/Library/Application\ Support/Sublime\ defaults write org.m0k.transmission UseIncompleteDownloadFolder -bool true defaults write org.m0k.transmission IncompleteDownloadFolder -string "${HOME}/Documents/Torrents" +# Use `~/Downloads` to store completed downloads +defaults write org.m0k.transmission DownloadLocationConstant -bool true + # Don’t prompt for confirmation before downloading defaults write org.m0k.transmission DownloadAsk -bool false defaults write org.m0k.transmission MagnetOpenAsk -bool false +# Don’t prompt for confirmation before removing non-downloading active transfers +defaults write org.m0k.transmission CheckRemoveDownloading -bool true + # Trash original torrent files defaults write org.m0k.transmission DeleteOriginalTorrent -bool true @@ -787,27 +796,30 @@ defaults write org.m0k.transmission BlocklistNew -bool true defaults write org.m0k.transmission BlocklistURL -string "http://john.bitsurge.net/public/biglist.p2p.gz" defaults write org.m0k.transmission BlocklistAutoUpdate -bool true -############################################################################### -# Twitter.app # -############################################################################### - -# Disable smart quotes as it’s annoying for code tweets -defaults write com.twitter.twitter-mac AutomaticQuoteSubstitutionEnabled -bool false - -# Show the app window when clicking the menu bar icon -defaults write com.twitter.twitter-mac MenuItemBehavior -int 1 - -# Enable the hidden ‘Develop’ menu -defaults write com.twitter.twitter-mac ShowDevelopMenu -bool true - -# Open links in the background -defaults write com.twitter.twitter-mac openLinksInBackground -bool true - -# Allow closing the ‘new tweet’ window by pressing `Esc` -defaults write com.twitter.twitter-mac ESCClosesComposeWindow -bool true - -# Show full names rather than Twitter handles -defaults write com.twitter.twitter-mac ShowFullNames -bool true - -# Hide the app in the background if it’s not the front-most window -defaults write com.twitter.twitter-mac HideInBackground -bool true +# Randomize port on launch +defaults write org.m0k.transmission RandomPort -bool true + +############################################################################### +# Kill affected applications # +############################################################################### + +for app in "Activity Monitor" \ + "Address Book" \ + "Calendar" \ + "cfprefsd" \ + "Contacts" \ + "Dock" \ + "Finder" \ + "Google Chrome" \ + "Mail" \ + "Messages" \ + "Photos" \ + "Safari" \ + "Spectacle" \ + "SystemUIServer" \ + "Terminal" \ + "Transmission" \ + "iCal"; do + killall "${app}" &> /dev/null +done +echo "Done. Note that some of these changes require a logout/restart to take effect." From 7668afa6de9f13f54e8b3dbe39e711c9f858a2eb Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Mon, 23 Oct 2017 18:23:06 +0200 Subject: [PATCH 124/144] Updated brew cask install --- setup/brew_cask_install | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/setup/brew_cask_install b/setup/brew_cask_install index 5498f92b0d..c47dc2dbd2 100755 --- a/setup/brew_cask_install +++ b/setup/brew_cask_install @@ -8,10 +8,14 @@ brew cask install appcleaner brew cask install caffeine brew cask install keybase brew cask install spectacle +brew cask install things # Entertainment brew cask install transmission brew cask install vlc +brew cask install spotify +brew cask install spark +brew cask install intellij-idea-ce # Communication brew cask install skype @@ -22,7 +26,6 @@ brew cask install docker-toolbox brew cask install java brew cask install rowanj-gitx brew cask install sublime-text -brew cask install wkhtmltopdf # Files brew cask install dropbox @@ -39,6 +42,5 @@ brew cask install harvest # Ad hoc / non-categorized stuff brew cask install flux brew cask install sketch -brew cask install garmin-express brew cask install charles -brew cask install sektch +brew cask install paw From fad5665105424e2ffcfdaaef65a1095f95e6c59d Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Tue, 24 Oct 2017 08:28:10 +0200 Subject: [PATCH 125/144] Install docker --- setup/brew_cask_install | 2 +- setup/brew_install | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/setup/brew_cask_install b/setup/brew_cask_install index c47dc2dbd2..f2c8daa84e 100755 --- a/setup/brew_cask_install +++ b/setup/brew_cask_install @@ -22,7 +22,7 @@ brew cask install skype brew cask install slack # Development -brew cask install docker-toolbox +brew cask install virtualbox brew cask install java brew cask install rowanj-gitx brew cask install sublime-text diff --git a/setup/brew_install b/setup/brew_install index d00f52694d..28c8ae7ea9 100755 --- a/setup/brew_install +++ b/setup/brew_install @@ -36,6 +36,8 @@ brew install amazon-ecs-cli brew install foreman brew install node brew install heroku +brew install docker +brew install docker-machine # Databases brew install postgresql From ce69c6c41d37cc16bddbb5aa2261735d208f5cb8 Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Tue, 24 Oct 2017 08:28:19 +0200 Subject: [PATCH 126/144] Use more oh my zsh plugins --- zshrc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/zshrc b/zshrc index afdab8bc2b..d5702e3f57 100644 --- a/zshrc +++ b/zshrc @@ -5,7 +5,11 @@ export ZSH=$HOME/.oh-my-zsh ZSH_THEME="anderslime" # oh-my-zsh plugins -plugins=(git) +plugins=( + git + docker + hub +) # User configuration HISTSIZE=20000 From a0e8f69c67b0e400a45f3fbaa0397e7888b55d7f Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Tue, 24 Oct 2017 08:29:45 +0200 Subject: [PATCH 127/144] Install tmuxinator --- setup/gem_install | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 setup/gem_install diff --git a/setup/gem_install b/setup/gem_install new file mode 100644 index 0000000000..0cb541d545 --- /dev/null +++ b/setup/gem_install @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +gem install tmuxinator From 0a4666d1f8afd85039e9f635ff38205a3c0c2ac0 Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Fri, 12 Jan 2018 12:45:33 +0100 Subject: [PATCH 128/144] Syncronizing tool updates --- gitignore | 1 + setup/brew_install | 2 ++ setup/gem_install | 2 +- setup/macos | 8 ++++---- vimrc | 4 +++- zsh/aliases | 4 ++-- zsh/functions | 7 +++++++ zshrc | 7 +++++-- 8 files changed, 25 insertions(+), 10 deletions(-) mode change 100644 => 100755 setup/gem_install diff --git a/gitignore b/gitignore index 860ff9033d..4dfe46154b 100644 --- a/gitignore +++ b/gitignore @@ -12,3 +12,4 @@ Guardfile .powenv .idea .iml +out diff --git a/setup/brew_install b/setup/brew_install index 28c8ae7ea9..43c1a821bb 100755 --- a/setup/brew_install +++ b/setup/brew_install @@ -38,6 +38,8 @@ brew install node brew install heroku brew install docker brew install docker-machine +brew install docker-compose +brew install watchman # for running ember server # Databases brew install postgresql diff --git a/setup/gem_install b/setup/gem_install old mode 100644 new mode 100755 index 0cb541d545..44e837ab9f --- a/setup/gem_install +++ b/setup/gem_install @@ -1,3 +1,3 @@ #!/usr/bin/env bash -gem install tmuxinator +gem install --global tmuxinator diff --git a/setup/macos b/setup/macos index 0fe14063fb..91d5c3fb49 100755 --- a/setup/macos +++ b/setup/macos @@ -17,10 +17,10 @@ while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null & ############################################################################### # Set computer name (as done via System Preferences → Sharing) -#sudo scutil --set ComputerName "0x6D746873" -#sudo scutil --set HostName "0x6D746873" -#sudo scutil --set LocalHostName "0x6D746873" -#sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.smb.server NetBIOSName -string "0x6D746873" +sudo scutil --set ComputerName "andersemil" +sudo scutil --set HostName "andersemil" +sudo scutil --set LocalHostName "andersemil" +sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.smb.server NetBIOSName -string "andersemil" # Set standby delay to 24 hours (default is 1 hour) sudo pmset -a standbydelay 86400 diff --git a/vimrc b/vimrc index cc815375a0..04dc7f4475 100644 --- a/vimrc +++ b/vimrc @@ -59,7 +59,7 @@ let g:airline#branch#enabled = 1 " Ctrl-p configurations let g:ctrlp_custom_ignore = { - \ 'dir': '\v(node_modules|bower_components|dist|deps|_build)', + \ 'dir': '\v(node_modules|bower_components|dist|deps|_build|build)', \ 'file': '\v\.(pyc)$', \ } @@ -127,7 +127,9 @@ hi MatchParen cterm=none ctermbg=black ctermfg=yellow " By default, vim thinks .md is Modula-2. autocmd BufNewFile,BufReadPost *.md set filetype=markdown +autocmd BufNewFile,BufReadPost Jenkinsfile set filetype=groovy autocmd BufNewFile,BufReadPost *.es6 set filetype=javascript +autocmd BufNewFile,BufReadPost *.j2 set filetype=yaml " Spell checker on these files autocmd BufRead,BufNewFile *.md setlocal spell diff --git a/zsh/aliases b/zsh/aliases index c95a9a6002..28df9ebb02 100644 --- a/zsh/aliases +++ b/zsh/aliases @@ -46,9 +46,8 @@ alias startpostgres='pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgre # Docker alias dc='docker-compose' -alias dockload='eval $(docker-machine env default) && DOCKER_IP=$(docker-machine ip default)' +alias dockload='eval $(docker-machine env dev) && DOCKER_IP=$(docker-machine ip dev)' alias docklog="docker logs --follow" -alias dockstart='docker-machine start default' alias dconsole='docker_console' # Git @@ -79,6 +78,7 @@ alias gdm='git diff master' alias gg='git lg' alias undeployed='git fetch --multiple production origin && git log production/master..origin/master' alias gpcb='git push origin HEAD' +alias grom='git co master && git pull origin master && git checkout @{-1} && git rebase master' # Pow alias pr="powder -r" diff --git a/zsh/functions b/zsh/functions index 438d570262..25ff2395ff 100644 --- a/zsh/functions +++ b/zsh/functions @@ -94,3 +94,10 @@ function prettyjsonfile { cat "$1" | prettyjson > "$1-pretty" mv "$1-pretty" "$1" } + +function rebase_all { + for branch in $(git branch --no-merged | xargs); do + git co $branch + git rebase master || git rebase --abort + done +} diff --git a/zshrc b/zshrc index d5702e3f57..b0a13b80da 100644 --- a/zshrc +++ b/zshrc @@ -25,8 +25,8 @@ chpwd() { source $ZSH/oh-my-zsh.sh # Python -# export PYTHONIOENCODING=utf-8 -export PATH=~/Library/Python/2.7/bin:$PATH +export PYTHONIOENCODING=utf-8 +export PATH=~/Library/Python/3.6/bin:$PATH # PATH export PATH=$HOME/bin:$HOME/.dotfiles/bin:/usr/local/bin:/usr/local/sbin:$PATH @@ -49,6 +49,9 @@ source $HOME/.dotfiles/zsh/functions # Oddset CLI eval "$($HOME/code/oddset-cli/bin/oddset init -)" +# Shp Docker CLI +eval "$(/Users/andersemil/code/shpdocker/bin/shpdocker init -)" + # added by travis gem # [ -f /Users/anderslime/.travis/travis.sh ] && source /Users/anderslime/.travis/travis.sh From d88df15b01507ec9185d0780f95c86849a5e0b3e Mon Sep 17 00:00:00 2001 From: Anders Emil Nielsen Date: Fri, 12 Jan 2018 12:45:50 +0100 Subject: [PATCH 129/144] Script for creating a docker machine with registry to act as docker swarm --- bin/create_docker_machine_swarm | 63 +++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100755 bin/create_docker_machine_swarm diff --git a/bin/create_docker_machine_swarm b/bin/create_docker_machine_swarm new file mode 100755 index 0000000000..61aa37a64c --- /dev/null +++ b/bin/create_docker_machine_swarm @@ -0,0 +1,63 @@ +#!/usr/bin/env bash + + +POSITIONAL=() +while [[ $# -gt 0 ]]; do + key="$1" + + case $key in + -s|--skip-create) + SKIP_CREATE="YES" + shift + shift + ;; + *) + POSITIONAL+=("$1") + shift + ;; + esac +done +set -- "${POSITIONAL[@]}" + +machine_name=$1 +last_ip_digit=$2 + +if [ "$#" -ne 2 ]; then + echo "You must pass a and in the command:" + echo "Example:" + echo " create_docker_machine_swarm my-swarm-cluster 60" + exit 1 +fi + +GREEN='\033[0;32m' +NC='\033[0m' + +function tell { + echo -e "${GREEN}${1}${NC}" +} + +docker_host_ip="192.168.99.$last_ip_digit" + +tell "Creating machine with the name '$machine_name' and the ip '$docker_host_ip'" + +if [ "$SKIP_CREATE" != "YES" ]; then + tell "=== Creating docker machine" + docker-machine create $machine_name --driver virtualbox --engine-insecure-registry $docker_host_ip:5000 +fi + +tell "=== Configuring docker machine with IP" +echo "ifconfig eth1 $docker_host_ip netmask 255.255.255.0 broadcast 192.168.99.255 up" | \ + docker-machine ssh $machine_name sudo tee /var/lib/boot2docker/bootsync.sh > /dev/null + +tell "=== Restarting machine" +docker-machine restart $machine_name + +tell "=== Regenerating certificates" +docker-machine regenerate-certs $machine_name -f + +tell "=== Configuring docker machine as cluster" +eval $(docker-machine env $machine_name) +docker swarm init --advertise-addr $docker_host_ip + +tell "=== Creating docker registry" +docker service create --name registry --publish 5000:5000 registry From 8b74ff61b12f868aa416eeb0e8977583be7d8254 Mon Sep 17 00:00:00 2001 From: Anders Emil Pouplier Date: Wed, 19 Jun 2019 09:04:21 +0200 Subject: [PATCH 130/144] Updated gitfiles --- bin/create_docker_machine_swarm | 21 +++++----- gitconfig | 70 ++++++++++++++++----------------- gitignore | 1 + vimrc | 6 ++- zsh/aliases | 4 +- zshrc | 11 +++++- 6 files changed, 63 insertions(+), 50 deletions(-) diff --git a/bin/create_docker_machine_swarm b/bin/create_docker_machine_swarm index 61aa37a64c..c3dd4e931d 100755 --- a/bin/create_docker_machine_swarm +++ b/bin/create_docker_machine_swarm @@ -42,18 +42,21 @@ tell "Creating machine with the name '$machine_name' and the ip '$docker_host_ip if [ "$SKIP_CREATE" != "YES" ]; then tell "=== Creating docker machine" - docker-machine create $machine_name --driver virtualbox --engine-insecure-registry $docker_host_ip:5000 + docker-machine create nf-cluster \ + --driver virtualbox \ + --engine-insecure-registry 192.168.99:5000 \ + --tls-san "$machine_name.dev, IP:$docker_host_ip, IP Address:$docker_host_ip" fi -tell "=== Configuring docker machine with IP" -echo "ifconfig eth1 $docker_host_ip netmask 255.255.255.0 broadcast 192.168.99.255 up" | \ - docker-machine ssh $machine_name sudo tee /var/lib/boot2docker/bootsync.sh > /dev/null +# tell "=== Configuring docker machine with IP" +# echo "ifconfig eth1 $docker_host_ip netmask 255.255.255.0 broadcast 192.168.99.255 up" | \ +# docker-machine ssh $machine_name sudo tee /var/lib/boot2docker/bootsync.sh > /dev/null -tell "=== Restarting machine" -docker-machine restart $machine_name - -tell "=== Regenerating certificates" -docker-machine regenerate-certs $machine_name -f +# tell "=== Restarting machine" +# docker-machine restart $machine_name +# +# tell "=== Regenerating certificates" +# docker-machine regenerate-certs $machine_name -f tell "=== Configuring docker machine as cluster" eval $(docker-machine env $machine_name) diff --git a/gitconfig b/gitconfig index 65e5cb9900..4fcaad1716 100644 --- a/gitconfig +++ b/gitconfig @@ -1,46 +1,46 @@ [user] - name = Anders Emil Nielsen - email = aemilnielsen@gmail.com + name = Anders Emil Pouplier + email = aemilnielsen@gmail.com [alias] - ap = add -p - cm = commit -m + ap = add -p + cm = commit -m remove-merged = !sh -c 'git checkout master && git branch --merged | egrep -v \"production|master\" | xargs -L1 git delete-branch' remove-merged-v2 = !sh -c 'git checkout feature/backend-v2 && git branch --merged | egrep -v \"production|backend-v2|master|modules\" | xargs -L1 git delete-branch' - tmp = commit -a -m 'tmp' - wip = commit -a -m 'wip' - co = checkout + tmp = commit -a -m 'tmp' + wip = commit -a -m 'wip' + co = checkout cob = checkout -b - dc = diff --cached - db = delete-branch - ri = rebase --interactive --autosquash - rim = rebase --interactive --autosquash master + dc = diff --cached + db = delete-branch + ri = rebase --interactive --autosquash + rim = rebase --interactive --autosquash master - # Fancy logging. - # h = head - # hp = head with patch - # r = recent commits, only current branch - # ra = recent commits, all reachable refs - # l = all commits, only current branch - # la = all commits, all reachable refs - head = !git r -1 - h = !git head - hp = "!. ~/.githelpers && show_git_head" - r = !GIT_NO_PAGER=1 git l -30 - ra = !git r --all - l = "!. ~/.githelpers && pretty_git_log" - la = !git l --all + # Fancy logging. + # h = head + # hp = head with patch + # r = recent commits, only current branch + # ra = recent commits, all reachable refs + # l = all commits, only current branch + # la = all commits, all reachable refs + head = !git r -1 + h = !git head + hp = "!. ~/.githelpers && show_git_head" + r = !GIT_NO_PAGER=1 git l -30 + ra = !git r --all + l = "!. ~/.githelpers && pretty_git_log" + la = !git l --all [color] - status = auto - diff = auto - branch = auto + status = auto + diff = auto + branch = auto [core] - editor = vim --noplugin - excludesfile = /Users/anderslime/.gitignore - ignorecase = false + editor = vim --noplugin + excludesfile = /Users/andersemil/.gitignore + ignorecase = false [credential] - helper = osxkeychain + helper = osxkeychain [push] - default = current + default = current [diff] - indentHeuristic = on - compactionHeuristic = on + indentHeuristic = on + compactionHeuristic = on diff --git a/gitignore b/gitignore index 4dfe46154b..74f9852062 100644 --- a/gitignore +++ b/gitignore @@ -13,3 +13,4 @@ Guardfile .idea .iml out +load-env diff --git a/vimrc b/vimrc index 04dc7f4475..d51b428958 100644 --- a/vimrc +++ b/vimrc @@ -9,6 +9,8 @@ set rtp+=~/.vim/bundle/Vundle.vim call vundle#begin() " let Vundle manage Vundle, required +Plugin 'Quramy/tsuquyomi' +Plugin 'leafgarland/typescript-vim' Plugin 'gmarik/Vundle.vim' Plugin 'elixir-lang/vim-elixir' Plugin 'ervandew/supertab' @@ -54,7 +56,7 @@ let g:airline_powerline_fonts = 1 let g:airline_left_sep = '' let g:airline_right_sep = '' let g:airline#extensions#tabline#enabled = 1 -let g:airline#extensions#syntastic#enabled = 1 +" let g:airline#extensions#syntastic#enabled = 1 let g:airline#branch#enabled = 1 " Ctrl-p configurations @@ -161,7 +163,6 @@ set gdefault " assume the /g flag on :s substitutions to replace all matches in set autoindent " always set autoindenting on set tags=./tags; highlight StatusLine ctermfg=blue ctermbg=yellow -au FileType xml exe ":silent 1,$!xmllint --format --recover - 2>/dev/null" set nofoldenable " Say no to code folding... " ======================================================================== @@ -195,6 +196,7 @@ map e :e =escape(expand("%:p:h"),' ') . '/' map s :split =escape(expand("%:p:h"), ' ') . '/' map v :vnew =escape(expand("%:p:h"), ' ') . '/' map stt :%retab! +map j :%!python -m json.tool " Beginning and end of files as in terminal imap $ diff --git a/zsh/aliases b/zsh/aliases index 28df9ebb02..720071bbb5 100644 --- a/zsh/aliases +++ b/zsh/aliases @@ -1,6 +1,5 @@ # UNIX alias aliases='vim ~/.dotfiles/zsh/aliases' -alias code='cd ~/code' alias dot='cd ~/.dotfiles' alias drop='cd ~/Dropbox' alias so='source ~/.zshrc' @@ -46,9 +45,9 @@ alias startpostgres='pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgre # Docker alias dc='docker-compose' -alias dockload='eval $(docker-machine env dev) && DOCKER_IP=$(docker-machine ip dev)' alias docklog="docker logs --follow" alias dconsole='docker_console' +alias dockload='eval $(docker-machine env nf-cluster)' # Git alias gs="git status" @@ -105,3 +104,4 @@ alias start_mitid="mux start mitid" # Gradle alias jt="./gradlew test --parallel" alias jc="./gradlew clean" +alias tpush='./gradlew test --parallel && gpcb' diff --git a/zshrc b/zshrc index b0a13b80da..0b0906d98b 100644 --- a/zshrc +++ b/zshrc @@ -27,9 +27,10 @@ source $ZSH/oh-my-zsh.sh # Python export PYTHONIOENCODING=utf-8 export PATH=~/Library/Python/3.6/bin:$PATH +export PATH=~/code/bat:$PATH # PATH -export PATH=$HOME/bin:$HOME/.dotfiles/bin:/usr/local/bin:/usr/local/sbin:$PATH +# export PATH=$HOME/bin:$HOME/.dotfiles/bin:/usr/local/bin:/usr/local/sbin:$PATH # You may need to manually set your language environment export LC_ALL=en_US.UTF-8 @@ -52,7 +53,13 @@ eval "$($HOME/code/oddset-cli/bin/oddset init -)" # Shp Docker CLI eval "$(/Users/andersemil/code/shpdocker/bin/shpdocker init -)" +# Nordisk Film CLI +eval "$(/Users/andersemil/code/nf-deploy/nf-cli/bin/nf init -)" + +# Danske Spil CLI +eval "$(/Users/andersemil/code/ds-cli/bin/ds init -)" + # added by travis gem -# [ -f /Users/anderslime/.travis/travis.sh ] && source /Users/anderslime/.travis/travis.sh +[ -f /Users/anderslime/.travis/travis.sh ] && source /Users/anderslime/.travis/travis.sh export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting From f1ef58b3b7d5421c346e2342d2426ca772b18d24 Mon Sep 17 00:00:00 2001 From: Anders Emil Pouplier Date: Thu, 12 Dec 2019 21:19:02 +0100 Subject: [PATCH 131/144] Stuff --- gitignore | 1 + zsh/aliases | 1 + zshrc | 9 +++++++++ 3 files changed, 11 insertions(+) diff --git a/gitignore b/gitignore index 74f9852062..2b638f24b0 100644 --- a/gitignore +++ b/gitignore @@ -14,3 +14,4 @@ Guardfile .iml out load-env +.vscode diff --git a/zsh/aliases b/zsh/aliases index 720071bbb5..69c8e96e9a 100644 --- a/zsh/aliases +++ b/zsh/aliases @@ -105,3 +105,4 @@ alias start_mitid="mux start mitid" alias jt="./gradlew test --parallel" alias jc="./gradlew clean" alias tpush='./gradlew test --parallel && gpcb' +alias kotlinlib="gradle init --type kotlin-library && rm -rf .gradle gradle && rm gradlew* && rm settings.gradle.kts .gitignore" diff --git a/zshrc b/zshrc index 0b0906d98b..171d56f7be 100644 --- a/zshrc +++ b/zshrc @@ -40,6 +40,15 @@ export EDITOR='vim' source $HOME/.dotfiles/zsh/aliases source $HOME/.dotfiles/zsh/functions +# Java +export JAVA_8_HOME=$(/usr/libexec/java_home -v1.8) +export JAVA_11_HOME=$(/usr/libexec/java_home -v11) +alias java8='export JAVA_HOME=$JAVA_8_HOME' +alias java11='export JAVA_HOME=$JAVA_11_HOME' + +# Default to java8 +java8 + # NVM # export NVM_DIR="$HOME/.nvm" # . "/usr/local/opt/nvm/nvm.sh" From 084207597da5ba7cd72d00faca365264727ee367 Mon Sep 17 00:00:00 2001 From: Anders Emil Pouplier Date: Thu, 12 Dec 2019 21:37:37 +0100 Subject: [PATCH 132/144] Remove unused brews --- setup/brew_install | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/setup/brew_install b/setup/brew_install index 43c1a821bb..b096772bf9 100755 --- a/setup/brew_install +++ b/setup/brew_install @@ -30,22 +30,11 @@ brew install python brew install python-3 brew install hub brew install git-extras -brew install aws brew install awscli -brew install amazon-ecs-cli -brew install foreman -brew install node -brew install heroku brew install docker brew install docker-machine brew install docker-compose -brew install watchman # for running ember server # Databases brew install postgresql brew install redis - -# Server tools -brew install imagemagick -brew install libsass -brew install libxmlsec1 From f179acca459da4b47e7cae2fef04c9fc5d295fda Mon Sep 17 00:00:00 2001 From: Anders Emil Pouplier Date: Wed, 31 Aug 2022 12:02:15 +0200 Subject: [PATCH 133/144] Update with latest --- gitconfig | 2 ++ setup/Brewfile | 31 +++++++++++++++++++++++++++++++ setup/brew_install | 4 ---- tmux.conf | 12 ++++++------ zsh/aliases | 3 +++ zsh/func/awsso | 10 ++++++++++ zsh/functions | 7 +++++++ zshrc | 27 +++++++++++++++++++++------ 8 files changed, 80 insertions(+), 16 deletions(-) create mode 100644 setup/Brewfile create mode 100644 zsh/func/awsso diff --git a/gitconfig b/gitconfig index 4fcaad1716..b41c04e751 100644 --- a/gitconfig +++ b/gitconfig @@ -44,3 +44,5 @@ [diff] indentHeuristic = on compactionHeuristic = on +[pull] + ff = only diff --git a/setup/Brewfile b/setup/Brewfile new file mode 100644 index 0000000000..458d7bab53 --- /dev/null +++ b/setup/Brewfile @@ -0,0 +1,31 @@ +tap "homebrew/cask" +cask_args appdir: "/Applications" + +cask "google-chrome" + +brew "wget" +brew "vim" +brew "tmux" +brew "zsh" +brew "grep" +brew "openssh" +brew "trash" +brew "httpie" +brew "jq" +brew "the_silver_searcher" +brew "trash" +brew "git" +brew "git-lfs" +brew "gradle" +brew "python" +brew "python-3" +brew "hub" +brew "git-extras" +brew "awscli" +brew "docker" +brew "docker-machine" +brew "docker-compose" +brew "postgresql" +brew "redis" + +mas "1Password", id: 443987910 diff --git a/setup/brew_install b/setup/brew_install index b096772bf9..381598371d 100755 --- a/setup/brew_install +++ b/setup/brew_install @@ -14,15 +14,11 @@ brew install tmux berw install zsh brew install grep brew install openssh - -# Misc tools brew install trash brew install httpie brew install jq brew install the_silver_searcher brew install trash - -# Dev tools brew install git brew install git-lfs brew install gradle diff --git a/tmux.conf b/tmux.conf index 643d5c38d8..edd942b0ff 100644 --- a/tmux.conf +++ b/tmux.conf @@ -90,14 +90,14 @@ set -g status-bg colour235 set -g status-fg white # highlight current window -set-window-option -g window-status-current-fg black -set-window-option -g window-status-current-bg green +# set-window-option -g window-status-current-fg black +# set-window-option -g window-status-current-bg green # set color of active pane -set -g pane-border-fg colour235 -set -g pane-border-bg black -set -g pane-active-border-fg green -set -g pane-active-border-bg black +# set -g pane-border-fg colour235 +# set -g pane-border-bg black +# set -g pane-active-border-fg green +# set -g pane-active-border-bg black # List of plugins set -g @plugin 'tmux-plugins/tpm' diff --git a/zsh/aliases b/zsh/aliases index 69c8e96e9a..d68fec00b7 100644 --- a/zsh/aliases +++ b/zsh/aliases @@ -100,6 +100,9 @@ alias start_cargo="mux start cargoflux" alias start_oddset="mux start oddset" alias start_mitid="mux start mitid" # alias rm="trash" +# +# AWS +alias asso='aws-sso-util' # Gradle alias jt="./gradlew test --parallel" diff --git a/zsh/func/awsso b/zsh/func/awsso new file mode 100644 index 0000000000..dda93c2345 --- /dev/null +++ b/zsh/func/awsso @@ -0,0 +1,10 @@ +_AWS_SSO_UTIL_COMPLETE_SCRIPT_DIR=~/.local/share/aws-sso-util +_AWS_SSO_UTIL_COMPLETE_SCRIPT=$_AWS_SSO_UTIL_COMPLETE_SCRIPT_DIR/complete.sh +if which aws-sso-util > /dev/null; then + mkdir -p $_AWS_SSO_UTIL_COMPLETE_SCRIPT_DIR + ({ _AWS_SSO_UTIL_COMPLETE=source_bash aws-sso-util > $_AWS_SSO_UTIL_COMPLETE_SCRIPT.tmp ; + mv $_AWS_SSO_UTIL_COMPLETE_SCRIPT.tmp $_AWS_SSO_UTIL_COMPLETE_SCRIPT; } &) + if [ -f $_AWS_SSO_UTIL_COMPLETE_SCRIPT ]; then + source $_AWS_SSO_UTIL_COMPLETE_SCRIPT + fi +fi diff --git a/zsh/functions b/zsh/functions index 25ff2395ff..e4fd419d69 100644 --- a/zsh/functions +++ b/zsh/functions @@ -24,6 +24,13 @@ function git-on-master { git rebase master } +function legacy_aws_session_from_sso { + credential=$(aws-sso-util credential-process --profile "$AWS_PROFILE") + echo AWS_ACCESS_KEY_ID=$(jq -r '.AccessKeyId' <<< "$credential") + echo AWS_SECRET_ACCESS_KEY=$(jq -r '.SecretAccessKey' <<< "$credential") + echo AWS_SESSION_TOKEN=$(jq -r '.SessionToken' <<< "$credential") +} + function g { if [[ $# > 0 ]]; then git $@ diff --git a/zshrc b/zshrc index 171d56f7be..84d2ce9da0 100644 --- a/zshrc +++ b/zshrc @@ -8,7 +8,7 @@ ZSH_THEME="anderslime" plugins=( git docker - hub + aws ) # User configuration @@ -26,8 +26,8 @@ source $ZSH/oh-my-zsh.sh # Python export PYTHONIOENCODING=utf-8 -export PATH=~/Library/Python/3.6/bin:$PATH -export PATH=~/code/bat:$PATH +# export PATH=~/Library/Python/3.6/bin:$PATH +# export PATH=~/code/bat:$PATH # PATH # export PATH=$HOME/bin:$HOME/.dotfiles/bin:/usr/local/bin:/usr/local/sbin:$PATH @@ -36,6 +36,7 @@ export PATH=~/code/bat:$PATH export LC_ALL=en_US.UTF-8 export LANG=da_DK.UTF-8 export EDITOR='vim' +export LC_CTYPE="en_US.UTF-8" source $HOME/.dotfiles/zsh/aliases source $HOME/.dotfiles/zsh/functions @@ -68,7 +69,21 @@ eval "$(/Users/andersemil/code/nf-deploy/nf-cli/bin/nf init -)" # Danske Spil CLI eval "$(/Users/andersemil/code/ds-cli/bin/ds init -)" -# added by travis gem -[ -f /Users/anderslime/.travis/travis.sh ] && source /Users/anderslime/.travis/travis.sh +# Brew +export PATH="/usr/local/sbin:$PATH" + +# shp-games-infrastructure tools +export PATH=$PATH:~/code/shp-games-infrastructure/bin/tools:~/code/shp-games-infrastructure/bin + +export PATH="/Users/andersemil/.local/bin:$PATH" + +# Shape Games CLI +eval "$(/Users/andersemil/code/shp-games-backend-cli/bin/sg init -)" + +# AWS +export AWS_SHAPE_GAMES_USER=anders +export AWS_DEFAULT_SSO_REGION=eu-west-1 +export AWS_DEFAULT_SSO_START_URL=https://shapegames.awsapps.com/start + +eval "$(nodenv init -)" -export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting From 1362aed7e003b8c4d65f285b5550e1700a820e07 Mon Sep 17 00:00:00 2001 From: Anders Emil Pouplier Date: Wed, 31 Aug 2022 13:28:54 +0200 Subject: [PATCH 134/144] Updated brewfile --- setup/Brewfile | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/setup/Brewfile b/setup/Brewfile index 458d7bab53..0aa8dc885c 100644 --- a/setup/Brewfile +++ b/setup/Brewfile @@ -2,18 +2,27 @@ tap "homebrew/cask" cask_args appdir: "/Applications" cask "google-chrome" +cask "flux" +cask "charles" +cask "spotify" +cask "visual-studio-code" +cask "fantastical" +cask "harvest" +cask "intellij-idea-ce" +cask "spectacle" +cask "docker" brew "wget" brew "vim" brew "tmux" +brew "tmuxinator" +brew "nodeenv" brew "zsh" +brew "nodenv" brew "grep" brew "openssh" -brew "trash" brew "httpie" brew "jq" -brew "the_silver_searcher" -brew "trash" brew "git" brew "git-lfs" brew "gradle" @@ -22,10 +31,9 @@ brew "python-3" brew "hub" brew "git-extras" brew "awscli" -brew "docker" -brew "docker-machine" brew "docker-compose" brew "postgresql" brew "redis" +brew "java11" mas "1Password", id: 443987910 From b4d7d38bacc53477b9689823052614b3b340fc69 Mon Sep 17 00:00:00 2001 From: Anders Emil Pouplier Date: Wed, 31 Aug 2022 13:42:01 +0200 Subject: [PATCH 135/144] Remove unused files --- agignore | 7 ------- gvimrc | 6 ------ irbrc | 21 ------------------- railsrc | 18 ---------------- screenrc | 18 ---------------- setup/Brewfile | 7 ++++++- setup/brew_cask_install | 46 ----------------------------------------- setup/brew_install | 36 -------------------------------- setup/gem_install | 3 --- zlogin | 7 ------- 10 files changed, 6 insertions(+), 163 deletions(-) delete mode 100644 agignore delete mode 100644 gvimrc delete mode 100644 irbrc delete mode 100644 railsrc delete mode 100644 screenrc delete mode 100755 setup/brew_cask_install delete mode 100755 setup/brew_install delete mode 100755 setup/gem_install delete mode 100644 zlogin diff --git a/agignore b/agignore deleted file mode 100644 index aa4a93031b..0000000000 --- a/agignore +++ /dev/null @@ -1,7 +0,0 @@ -log -vendor -tmp -doc -coverage -public/assets -*.sql diff --git a/gvimrc b/gvimrc deleted file mode 100644 index 760afa3041..0000000000 --- a/gvimrc +++ /dev/null @@ -1,6 +0,0 @@ -set lbr - -set lines=99999 -set columns=99999 - -colorscheme jellybeans diff --git a/irbrc b/irbrc deleted file mode 100644 index 3111782c1a..0000000000 --- a/irbrc +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/ruby -require 'irb/completion' -require 'irb/ext/save-history' - -# IRB.conf[:SAVE_HISTORY] = 1000 -# IRB.conf[:HISTORY_FILE] = "#{ENV['HOME']}/.irb_history" -# -# IRB.conf[:PROMPT_MODE] = :SIMPLE -# -# IRB.conf[:AUTO_INDENT] = true - -class Object - # list methods which aren't in superclass - def local_methods(obj = self) - (obj.methods - obj.class.superclass.instance_methods).sort - end - - def find_ben - User.find_by_email 'ben@thoughtbot.com' - end -end diff --git a/railsrc b/railsrc deleted file mode 100644 index 25028bc713..0000000000 --- a/railsrc +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/ruby - -def change_log(stream) - ActiveRecord::Base.logger = Logger.new(stream) - ActiveRecord::Base.clear_active_connections! -end - -def show_log - change_log(STDOUT) -end - -def hide_log - change_log(nil) -end - -def show_session(session) - Marshal.load(Base64.decode64(session)) -end diff --git a/screenrc b/screenrc deleted file mode 100644 index cce945c094..0000000000 --- a/screenrc +++ /dev/null @@ -1,18 +0,0 @@ - -hardstatus alwayslastline "%{= KW}%-w%{= ck}%50>%n %t%{-}%+w%<%-22=%{w}%c [%l]" - -nonblock 5 - -# detach the screen if we get disconnected -autodetach on - -# Show messages at the bottom for only 0.5s -msgwait 0.5 - -shell -${SHELL} - -# Show the currently-running program -shelltitle '$ |bash' - -# allow for 10,000 lines of scroll back (default 100) -defscrollback 10000 diff --git a/setup/Brewfile b/setup/Brewfile index 0aa8dc885c..42d3f9a3c5 100644 --- a/setup/Brewfile +++ b/setup/Brewfile @@ -7,10 +7,10 @@ cask "charles" cask "spotify" cask "visual-studio-code" cask "fantastical" -cask "harvest" cask "intellij-idea-ce" cask "spectacle" cask "docker" +cask "microsoft-teams" brew "wget" brew "vim" @@ -37,3 +37,8 @@ brew "redis" brew "java11" mas "1Password", id: 443987910 +mas "WhatsApp Desktop", id: 1147396723 +mas "Things 3", id: 904280696 +mas "Bear - Markdown Notes", id: 1091189122 +mas "Harvest", id: 506189836 +mas "Slack", id: 803453959 diff --git a/setup/brew_cask_install b/setup/brew_cask_install deleted file mode 100755 index f2c8daa84e..0000000000 --- a/setup/brew_cask_install +++ /dev/null @@ -1,46 +0,0 @@ -#!/usr/env/bin bash -brew update - -# Productivity -brew cask install 1password -brew cask install alfred -brew cask install appcleaner -brew cask install caffeine -brew cask install keybase -brew cask install spectacle -brew cask install things - -# Entertainment -brew cask install transmission -brew cask install vlc -brew cask install spotify -brew cask install spark -brew cask install intellij-idea-ce - -# Communication -brew cask install skype -brew cask install slack - -# Development -brew cask install virtualbox -brew cask install java -brew cask install rowanj-gitx -brew cask install sublime-text - -# Files -brew cask install dropbox -brew cask install google-drive -brew cask install fantastical - -# Browsers -brew cask install google-chrome -brew cask install firefox - -# Shape -brew cask install harvest - -# Ad hoc / non-categorized stuff -brew cask install flux -brew cask install sketch -brew cask install charles -brew cask install paw diff --git a/setup/brew_install b/setup/brew_install deleted file mode 100755 index 381598371d..0000000000 --- a/setup/brew_install +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/env bash - -brew update - -brew upgrade --all - -brew tap homebrew/versions -brew install bash -brew install bash-completion2 - -brew install wget --with-iri -brew install vim --override-system-vi -brew install tmux -berw install zsh -brew install grep -brew install openssh -brew install trash -brew install httpie -brew install jq -brew install the_silver_searcher -brew install trash -brew install git -brew install git-lfs -brew install gradle -brew install python -brew install python-3 -brew install hub -brew install git-extras -brew install awscli -brew install docker -brew install docker-machine -brew install docker-compose - -# Databases -brew install postgresql -brew install redis diff --git a/setup/gem_install b/setup/gem_install deleted file mode 100755 index 44e837ab9f..0000000000 --- a/setup/gem_install +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash - -gem install --global tmuxinator diff --git a/zlogin b/zlogin deleted file mode 100644 index e027d90fdb..0000000000 --- a/zlogin +++ /dev/null @@ -1,7 +0,0 @@ -# go to saved path if there is one -if [[ -f ~/.current_path~ ]]; then - cd `cat ~/.current_path~` - rm ~/.current_path~ -fi - -[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function* From f6036c389b97c46d8976e6b306dbf70ddd5191d8 Mon Sep 17 00:00:00 2001 From: Anders Emil Pouplier Date: Wed, 31 Aug 2022 15:22:04 +0200 Subject: [PATCH 136/144] Added oh my zsh --- oh-my-zsh | 1 + zshrc | 12 ------------ 2 files changed, 1 insertion(+), 12 deletions(-) create mode 160000 oh-my-zsh diff --git a/oh-my-zsh b/oh-my-zsh new file mode 160000 index 0000000000..e273cf004e --- /dev/null +++ b/oh-my-zsh @@ -0,0 +1 @@ +Subproject commit e273cf004e1ff0510aee61416885f3003bcd15d9 diff --git a/zshrc b/zshrc index 84d2ce9da0..11cbec47b2 100644 --- a/zshrc +++ b/zshrc @@ -57,18 +57,6 @@ java8 # Secret stuff [ -f $HOME/.private-dotfiles/shell-init ] && source $HOME/.private-dotfiles/shell-init -# Oddset CLI -eval "$($HOME/code/oddset-cli/bin/oddset init -)" - -# Shp Docker CLI -eval "$(/Users/andersemil/code/shpdocker/bin/shpdocker init -)" - -# Nordisk Film CLI -eval "$(/Users/andersemil/code/nf-deploy/nf-cli/bin/nf init -)" - -# Danske Spil CLI -eval "$(/Users/andersemil/code/ds-cli/bin/ds init -)" - # Brew export PATH="/usr/local/sbin:$PATH" From 920be0010fc7831acc5582b9b96cb0bfec09655f Mon Sep 17 00:00:00 2001 From: Anders Emil Pouplier Date: Wed, 31 Aug 2022 19:29:29 +0200 Subject: [PATCH 137/144] Updated brewfile --- setup/Brewfile | 6 +- setup/Brewfile.lock.json | 994 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 998 insertions(+), 2 deletions(-) create mode 100644 setup/Brewfile.lock.json diff --git a/setup/Brewfile b/setup/Brewfile index 42d3f9a3c5..c96e679fe4 100644 --- a/setup/Brewfile +++ b/setup/Brewfile @@ -11,7 +11,9 @@ cask "intellij-idea-ce" cask "spectacle" cask "docker" cask "microsoft-teams" +cask "iterm2" +brew "mas" brew "wget" brew "vim" brew "tmux" @@ -27,7 +29,6 @@ brew "git" brew "git-lfs" brew "gradle" brew "python" -brew "python-3" brew "hub" brew "git-extras" brew "awscli" @@ -36,7 +37,8 @@ brew "postgresql" brew "redis" brew "java11" -mas "1Password", id: 443987910 +mas "Spark", id: 1176895641 +mas "1Password", id: 1333542190 mas "WhatsApp Desktop", id: 1147396723 mas "Things 3", id: 904280696 mas "Bear - Markdown Notes", id: 1091189122 diff --git a/setup/Brewfile.lock.json b/setup/Brewfile.lock.json new file mode 100644 index 0000000000..78880bcb2c --- /dev/null +++ b/setup/Brewfile.lock.json @@ -0,0 +1,994 @@ +{ + "entries": { + "tap": { + "homebrew/cask": { + "revision": "830111e1e4e6985bb1e75ecd626793e8c49ed22b" + } + }, + "cask": { + "google-chrome": { + "version": "105.0.5195.52", + "options": { + "full_name": "google-chrome", + "args": { + "appdir": "/Applications" + } + } + }, + "flux": { + "version": "42.1", + "options": { + "full_name": "flux", + "args": { + "appdir": "/Applications" + } + } + }, + "charles": { + "version": "4.6.2", + "options": { + "full_name": "charles", + "args": { + "appdir": "/Applications" + } + } + }, + "spotify": { + "version": "1.1.92.647,a4397eb7,7", + "options": { + "full_name": "spotify", + "args": { + "appdir": "/Applications" + } + } + }, + "visual-studio-code": { + "version": "1.70.2", + "options": { + "full_name": "visual-studio-code", + "args": { + "appdir": "/Applications" + } + } + }, + "fantastical": { + "version": "3.6.10,1478", + "options": { + "full_name": "fantastical", + "args": { + "appdir": "/Applications" + } + } + }, + "intellij-idea-ce": { + "version": "2022.2.1,222.3739.54", + "options": { + "full_name": "intellij-idea-ce", + "args": { + "appdir": "/Applications" + } + } + }, + "spectacle": { + "version": "1.2,672", + "options": { + "full_name": "spectacle", + "args": { + "appdir": "/Applications" + } + } + }, + "docker": { + "version": "4.11.1,84025", + "options": { + "full_name": "docker", + "args": { + "appdir": "/Applications" + } + } + }, + "microsoft-teams": { + "version": "1.5.00.22362", + "options": { + "full_name": "microsoft-teams", + "args": { + "appdir": "/Applications" + } + } + }, + "iterm2": { + "version": "3.4.16", + "options": { + "full_name": "iterm2", + "args": { + "appdir": "/Applications" + } + } + } + }, + "brew": { + "mas": { + "version": "1.8.6", + "bottle": { + "rebuild": 0, + "root_url": "https://ghcr.io/v2/homebrew/core", + "files": { + "arm64_monterey": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/mas/blobs/sha256:379d46e2657be295321f1603dc1df28130ea0b5b264ceb192a9ba488d77c7a98", + "sha256": "379d46e2657be295321f1603dc1df28130ea0b5b264ceb192a9ba488d77c7a98" + }, + "arm64_big_sur": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/mas/blobs/sha256:918a1484de106940f7bebc936e1ded87d7b65652054b09204887ad0651937ec4", + "sha256": "918a1484de106940f7bebc936e1ded87d7b65652054b09204887ad0651937ec4" + }, + "monterey": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/mas/blobs/sha256:6b313f2f66d028cb7782c108d6e502ce73ccb9c08fac3bece0b057fcce5c4689", + "sha256": "6b313f2f66d028cb7782c108d6e502ce73ccb9c08fac3bece0b057fcce5c4689" + }, + "big_sur": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/mas/blobs/sha256:50b50f51219143fcb69c730b52b74011a76104f66348ea727d0200f7b375ae25", + "sha256": "50b50f51219143fcb69c730b52b74011a76104f66348ea727d0200f7b375ae25" + }, + "catalina": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/mas/blobs/sha256:d241d3b9156b033f3d2c31684a44de726297e07fd9bd5e3ccc4c36e4f1c3baf3", + "sha256": "d241d3b9156b033f3d2c31684a44de726297e07fd9bd5e3ccc4c36e4f1c3baf3" + } + } + } + }, + "wget": { + "version": "1.21.3", + "bottle": { + "rebuild": 0, + "root_url": "https://ghcr.io/v2/homebrew/core", + "files": { + "arm64_monterey": { + "cellar": "/opt/homebrew/Cellar", + "url": "https://ghcr.io/v2/homebrew/core/wget/blobs/sha256:fc83eec77acee50d2d7ce3bb0cca08d80acccc148e909921de42e57dd5fc7f3d", + "sha256": "fc83eec77acee50d2d7ce3bb0cca08d80acccc148e909921de42e57dd5fc7f3d" + }, + "arm64_big_sur": { + "cellar": "/opt/homebrew/Cellar", + "url": "https://ghcr.io/v2/homebrew/core/wget/blobs/sha256:a0c491ae7de2b722320efa94704567e36f3a0bd04bd946b1431ecbd1bcbfb899", + "sha256": "a0c491ae7de2b722320efa94704567e36f3a0bd04bd946b1431ecbd1bcbfb899" + }, + "monterey": { + "cellar": "/usr/local/Cellar", + "url": "https://ghcr.io/v2/homebrew/core/wget/blobs/sha256:aa706c58ae7e97abf91be56e785335aff058c431f9973dffac06aacbea558497", + "sha256": "aa706c58ae7e97abf91be56e785335aff058c431f9973dffac06aacbea558497" + }, + "big_sur": { + "cellar": "/usr/local/Cellar", + "url": "https://ghcr.io/v2/homebrew/core/wget/blobs/sha256:b90e0d7a4319ccdb18ee0c2ed097e9cddeeceaaf70dc0a785d96b4ba69dbeb54", + "sha256": "b90e0d7a4319ccdb18ee0c2ed097e9cddeeceaaf70dc0a785d96b4ba69dbeb54" + }, + "catalina": { + "cellar": "/usr/local/Cellar", + "url": "https://ghcr.io/v2/homebrew/core/wget/blobs/sha256:2aadef5aae81ecdd7e28bc9a776adcf0eaa393edae904e0c69740a442b7a3e69", + "sha256": "2aadef5aae81ecdd7e28bc9a776adcf0eaa393edae904e0c69740a442b7a3e69" + }, + "x86_64_linux": { + "cellar": "/home/linuxbrew/.linuxbrew/Cellar", + "url": "https://ghcr.io/v2/homebrew/core/wget/blobs/sha256:b6f20b1f4da03b9ee6a42f9305ee015eae7f80afea198e405c0b775eb2333de1", + "sha256": "b6f20b1f4da03b9ee6a42f9305ee015eae7f80afea198e405c0b775eb2333de1" + } + } + } + }, + "vim": { + "version": "9.0.0300", + "bottle": { + "rebuild": 0, + "root_url": "https://ghcr.io/v2/homebrew/core", + "files": { + "arm64_monterey": { + "cellar": "/opt/homebrew/Cellar", + "url": "https://ghcr.io/v2/homebrew/core/vim/blobs/sha256:ea1ac0517cf598da2b22b8324da9f2c80ec3b10581befbd19f5ac00b419b34d7", + "sha256": "ea1ac0517cf598da2b22b8324da9f2c80ec3b10581befbd19f5ac00b419b34d7" + }, + "arm64_big_sur": { + "cellar": "/opt/homebrew/Cellar", + "url": "https://ghcr.io/v2/homebrew/core/vim/blobs/sha256:631000dad7f168163ebfea0c4a18959f86a2a98b9056ed0fe558151fab65fa42", + "sha256": "631000dad7f168163ebfea0c4a18959f86a2a98b9056ed0fe558151fab65fa42" + }, + "monterey": { + "cellar": "/usr/local/Cellar", + "url": "https://ghcr.io/v2/homebrew/core/vim/blobs/sha256:b0b5d44769d9d928c3ef7f5b59f4db01df314284e4993dd94d3656a9a45b098e", + "sha256": "b0b5d44769d9d928c3ef7f5b59f4db01df314284e4993dd94d3656a9a45b098e" + }, + "big_sur": { + "cellar": "/usr/local/Cellar", + "url": "https://ghcr.io/v2/homebrew/core/vim/blobs/sha256:a37770aa59b3e7a8fd17fd9125e00d58d94268007d889ee5a87d4ef1b6714b9c", + "sha256": "a37770aa59b3e7a8fd17fd9125e00d58d94268007d889ee5a87d4ef1b6714b9c" + }, + "catalina": { + "cellar": "/usr/local/Cellar", + "url": "https://ghcr.io/v2/homebrew/core/vim/blobs/sha256:4bdc4241493954e44e471aac507ce1a09e6d2c6c49891e800bafef1708e9c5a0", + "sha256": "4bdc4241493954e44e471aac507ce1a09e6d2c6c49891e800bafef1708e9c5a0" + }, + "x86_64_linux": { + "cellar": "/home/linuxbrew/.linuxbrew/Cellar", + "url": "https://ghcr.io/v2/homebrew/core/vim/blobs/sha256:d3d17310d60dc79a615610defe06296ee5182654514f8c0a4c72fb3d342f8446", + "sha256": "d3d17310d60dc79a615610defe06296ee5182654514f8c0a4c72fb3d342f8446" + } + } + } + }, + "tmux": { + "version": "3.3a", + "bottle": { + "rebuild": 1, + "root_url": "https://ghcr.io/v2/homebrew/core", + "files": { + "arm64_monterey": { + "cellar": ":any", + "url": "https://ghcr.io/v2/homebrew/core/tmux/blobs/sha256:0ca53c250a3e70d97ca511edd13f2d16660e4e94a41465a8708306e03b231b76", + "sha256": "0ca53c250a3e70d97ca511edd13f2d16660e4e94a41465a8708306e03b231b76" + }, + "arm64_big_sur": { + "cellar": ":any", + "url": "https://ghcr.io/v2/homebrew/core/tmux/blobs/sha256:89a9edfec5e665df5b9e2e0f47e1721c1e074725846705819042a9c691683981", + "sha256": "89a9edfec5e665df5b9e2e0f47e1721c1e074725846705819042a9c691683981" + }, + "monterey": { + "cellar": ":any", + "url": "https://ghcr.io/v2/homebrew/core/tmux/blobs/sha256:c0489c25fa963b14fd5d3c53eb50f681e85bb7a5716883afe77c1efbdea7c882", + "sha256": "c0489c25fa963b14fd5d3c53eb50f681e85bb7a5716883afe77c1efbdea7c882" + }, + "big_sur": { + "cellar": ":any", + "url": "https://ghcr.io/v2/homebrew/core/tmux/blobs/sha256:85eb7ec949aad04ad0a550a4a8151bc4453e229d813fda0be724f17fd8cf40e1", + "sha256": "85eb7ec949aad04ad0a550a4a8151bc4453e229d813fda0be724f17fd8cf40e1" + }, + "catalina": { + "cellar": ":any", + "url": "https://ghcr.io/v2/homebrew/core/tmux/blobs/sha256:3cb3c779b9e62f0f5f5d9204309d194148ee66e3bc930480cabf7bee1b897623", + "sha256": "3cb3c779b9e62f0f5f5d9204309d194148ee66e3bc930480cabf7bee1b897623" + }, + "x86_64_linux": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/tmux/blobs/sha256:b2eed5059099ba7ffeb68260c3163184b5d9b6a09e3b9b80d33ab2bf007513d8", + "sha256": "b2eed5059099ba7ffeb68260c3163184b5d9b6a09e3b9b80d33ab2bf007513d8" + } + } + } + }, + "tmuxinator": { + "version": "3.0.5", + "bottle": { + "rebuild": 0, + "root_url": "https://ghcr.io/v2/homebrew/core", + "files": { + "arm64_monterey": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/tmuxinator/blobs/sha256:462f888a1e5558be4225cabf5becbbb8cfe3462815b993e584b808dbfb5d9fc5", + "sha256": "462f888a1e5558be4225cabf5becbbb8cfe3462815b993e584b808dbfb5d9fc5" + }, + "arm64_big_sur": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/tmuxinator/blobs/sha256:462f888a1e5558be4225cabf5becbbb8cfe3462815b993e584b808dbfb5d9fc5", + "sha256": "462f888a1e5558be4225cabf5becbbb8cfe3462815b993e584b808dbfb5d9fc5" + }, + "monterey": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/tmuxinator/blobs/sha256:3ae191a144fc61ed8f835f09f5d6792fbbfa2180d50568ad8bd625d26a527509", + "sha256": "3ae191a144fc61ed8f835f09f5d6792fbbfa2180d50568ad8bd625d26a527509" + }, + "big_sur": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/tmuxinator/blobs/sha256:3ae191a144fc61ed8f835f09f5d6792fbbfa2180d50568ad8bd625d26a527509", + "sha256": "3ae191a144fc61ed8f835f09f5d6792fbbfa2180d50568ad8bd625d26a527509" + }, + "catalina": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/tmuxinator/blobs/sha256:3ae191a144fc61ed8f835f09f5d6792fbbfa2180d50568ad8bd625d26a527509", + "sha256": "3ae191a144fc61ed8f835f09f5d6792fbbfa2180d50568ad8bd625d26a527509" + }, + "x86_64_linux": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/tmuxinator/blobs/sha256:462f888a1e5558be4225cabf5becbbb8cfe3462815b993e584b808dbfb5d9fc5", + "sha256": "462f888a1e5558be4225cabf5becbbb8cfe3462815b993e584b808dbfb5d9fc5" + } + } + } + }, + "nodeenv": { + "version": "1.7.0_1", + "bottle": { + "rebuild": 0, + "root_url": "https://ghcr.io/v2/homebrew/core", + "files": { + "all": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/nodeenv/blobs/sha256:dfbd40ce1e67ad9d87f4f4fbcee25019bf49957456d5fa6b41e2e9493a6c43a0", + "sha256": "dfbd40ce1e67ad9d87f4f4fbcee25019bf49957456d5fa6b41e2e9493a6c43a0" + } + } + } + }, + "zsh": { + "version": "5.9", + "bottle": { + "rebuild": 0, + "root_url": "https://ghcr.io/v2/homebrew/core", + "files": { + "arm64_monterey": { + "cellar": "/opt/homebrew/Cellar", + "url": "https://ghcr.io/v2/homebrew/core/zsh/blobs/sha256:1c6d208a7aa0601b25d04c5d41a393424b1094cf188e5b0c80fafc6e1e2755ef", + "sha256": "1c6d208a7aa0601b25d04c5d41a393424b1094cf188e5b0c80fafc6e1e2755ef" + }, + "arm64_big_sur": { + "cellar": "/opt/homebrew/Cellar", + "url": "https://ghcr.io/v2/homebrew/core/zsh/blobs/sha256:0a93821dee76829dac49770d4b32d08d0678272c43937e3858d7f901bab86cd6", + "sha256": "0a93821dee76829dac49770d4b32d08d0678272c43937e3858d7f901bab86cd6" + }, + "monterey": { + "cellar": "/usr/local/Cellar", + "url": "https://ghcr.io/v2/homebrew/core/zsh/blobs/sha256:b9a38fa0344b187333771a5585ad2d01c27e69a7e5362ba3fc8d7389aa3279f3", + "sha256": "b9a38fa0344b187333771a5585ad2d01c27e69a7e5362ba3fc8d7389aa3279f3" + }, + "big_sur": { + "cellar": "/usr/local/Cellar", + "url": "https://ghcr.io/v2/homebrew/core/zsh/blobs/sha256:722236bd8c9a094e1eca09263f5e83a94d4c97c2ca797804eef4f9564ef729ec", + "sha256": "722236bd8c9a094e1eca09263f5e83a94d4c97c2ca797804eef4f9564ef729ec" + }, + "catalina": { + "cellar": "/usr/local/Cellar", + "url": "https://ghcr.io/v2/homebrew/core/zsh/blobs/sha256:64c8757cc6db0247fb9f604ff84f61726fb5d91318c566157fa2957782040403", + "sha256": "64c8757cc6db0247fb9f604ff84f61726fb5d91318c566157fa2957782040403" + }, + "x86_64_linux": { + "cellar": "/home/linuxbrew/.linuxbrew/Cellar", + "url": "https://ghcr.io/v2/homebrew/core/zsh/blobs/sha256:fb0b59e7b1407323ea06b7c757de4d75bbcfb0836ce05857b0b2cf7816a231e0", + "sha256": "fb0b59e7b1407323ea06b7c757de4d75bbcfb0836ce05857b0b2cf7816a231e0" + } + } + } + }, + "nodenv": { + "version": "1.4.0", + "bottle": { + "rebuild": 0, + "root_url": "https://ghcr.io/v2/homebrew/core", + "files": { + "arm64_monterey": { + "cellar": ":any", + "url": "https://ghcr.io/v2/homebrew/core/nodenv/blobs/sha256:fece520035f8c55b65005231b038d9748f8bd13dc97a37fa4712a42d00ea6221", + "sha256": "fece520035f8c55b65005231b038d9748f8bd13dc97a37fa4712a42d00ea6221" + }, + "arm64_big_sur": { + "cellar": ":any", + "url": "https://ghcr.io/v2/homebrew/core/nodenv/blobs/sha256:c86512e5a1505eb10c79a4aeb618db66cc08a48ac855e9c0f9fb9fba7868d5e7", + "sha256": "c86512e5a1505eb10c79a4aeb618db66cc08a48ac855e9c0f9fb9fba7868d5e7" + }, + "monterey": { + "cellar": ":any", + "url": "https://ghcr.io/v2/homebrew/core/nodenv/blobs/sha256:a20f7a9c8cee71ba311283d2f518f1f3f52a94d6757a5775021d9eda66a3cb98", + "sha256": "a20f7a9c8cee71ba311283d2f518f1f3f52a94d6757a5775021d9eda66a3cb98" + }, + "big_sur": { + "cellar": ":any", + "url": "https://ghcr.io/v2/homebrew/core/nodenv/blobs/sha256:b6cce4dccc468b49f71f989a3f6f0d505f198e2fa4604a0cd8a24f969901a6d6", + "sha256": "b6cce4dccc468b49f71f989a3f6f0d505f198e2fa4604a0cd8a24f969901a6d6" + }, + "catalina": { + "cellar": ":any", + "url": "https://ghcr.io/v2/homebrew/core/nodenv/blobs/sha256:b5af0ac98407b7d246a41154c4ca9db9cad273b5fa65a487fcb080f3d15704f6", + "sha256": "b5af0ac98407b7d246a41154c4ca9db9cad273b5fa65a487fcb080f3d15704f6" + }, + "mojave": { + "cellar": ":any", + "url": "https://ghcr.io/v2/homebrew/core/nodenv/blobs/sha256:69231fd7b4e38aee64caecb7582969f0abcbeacaaf4ebce6de700b2e20848e11", + "sha256": "69231fd7b4e38aee64caecb7582969f0abcbeacaaf4ebce6de700b2e20848e11" + }, + "x86_64_linux": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/nodenv/blobs/sha256:891254a446324d72656e8e5b041ef5016525fad7afb91aa92a3c5447f3af04aa", + "sha256": "891254a446324d72656e8e5b041ef5016525fad7afb91aa92a3c5447f3af04aa" + } + } + } + }, + "grep": { + "version": "3.7", + "bottle": { + "rebuild": 0, + "root_url": "https://ghcr.io/v2/homebrew/core", + "files": { + "arm64_monterey": { + "cellar": ":any", + "url": "https://ghcr.io/v2/homebrew/core/grep/blobs/sha256:3e5e465a85b9cb0541c0344cfc9a712261f165e6415a7ea11c1cde89aeaf1551", + "sha256": "3e5e465a85b9cb0541c0344cfc9a712261f165e6415a7ea11c1cde89aeaf1551" + }, + "arm64_big_sur": { + "cellar": ":any", + "url": "https://ghcr.io/v2/homebrew/core/grep/blobs/sha256:af56aab63748f26589f0af9fb269df366f526ece09aee13cb73f9705a7664e25", + "sha256": "af56aab63748f26589f0af9fb269df366f526ece09aee13cb73f9705a7664e25" + }, + "monterey": { + "cellar": ":any", + "url": "https://ghcr.io/v2/homebrew/core/grep/blobs/sha256:c71bb5fe05b6dc792ef46eb59b043651ecc6a6bcc5d87c6c529989267363887f", + "sha256": "c71bb5fe05b6dc792ef46eb59b043651ecc6a6bcc5d87c6c529989267363887f" + }, + "big_sur": { + "cellar": ":any", + "url": "https://ghcr.io/v2/homebrew/core/grep/blobs/sha256:0ca6e4d8a78798fa84b9bc96be28efb0f815996a2bc3c291773467f016e874e9", + "sha256": "0ca6e4d8a78798fa84b9bc96be28efb0f815996a2bc3c291773467f016e874e9" + }, + "catalina": { + "cellar": ":any", + "url": "https://ghcr.io/v2/homebrew/core/grep/blobs/sha256:f41a618521eb9f55c50de5e6fe0c0e76df83962236cf076deff2107911fb0bdc", + "sha256": "f41a618521eb9f55c50de5e6fe0c0e76df83962236cf076deff2107911fb0bdc" + }, + "mojave": { + "cellar": ":any", + "url": "https://ghcr.io/v2/homebrew/core/grep/blobs/sha256:180f055eeacb118cd73e2c3dbb0fda9d71fcbe0d4ee613b799a130085d6db76f", + "sha256": "180f055eeacb118cd73e2c3dbb0fda9d71fcbe0d4ee613b799a130085d6db76f" + }, + "x86_64_linux": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/grep/blobs/sha256:b842a12e018e675333c0cfd93602c5ef1c7889e0fa7314610182419cd73327af", + "sha256": "b842a12e018e675333c0cfd93602c5ef1c7889e0fa7314610182419cd73327af" + } + } + } + }, + "openssh": { + "version": "9.0p1_1", + "bottle": { + "rebuild": 0, + "root_url": "https://ghcr.io/v2/homebrew/core", + "files": { + "arm64_monterey": { + "cellar": "/opt/homebrew/Cellar", + "url": "https://ghcr.io/v2/homebrew/core/openssh/blobs/sha256:dc8a68702befc83e394381378cc20c9c5c9440b9f31a8e491ba4605f14c31f44", + "sha256": "dc8a68702befc83e394381378cc20c9c5c9440b9f31a8e491ba4605f14c31f44" + }, + "arm64_big_sur": { + "cellar": "/opt/homebrew/Cellar", + "url": "https://ghcr.io/v2/homebrew/core/openssh/blobs/sha256:6c77da617ec1fdc44037faef2e0242cbef97a9acc26025f2386c884d467865a2", + "sha256": "6c77da617ec1fdc44037faef2e0242cbef97a9acc26025f2386c884d467865a2" + }, + "monterey": { + "cellar": "/usr/local/Cellar", + "url": "https://ghcr.io/v2/homebrew/core/openssh/blobs/sha256:e0ba7d39ae68ecd653bc5bbe73ceb252f148a51bd5e7257ed6316973023bb73c", + "sha256": "e0ba7d39ae68ecd653bc5bbe73ceb252f148a51bd5e7257ed6316973023bb73c" + }, + "big_sur": { + "cellar": "/usr/local/Cellar", + "url": "https://ghcr.io/v2/homebrew/core/openssh/blobs/sha256:2aeab07efa1366184ce592a5c172440a74f4c8ed2b68d6b8c0a70740f274e519", + "sha256": "2aeab07efa1366184ce592a5c172440a74f4c8ed2b68d6b8c0a70740f274e519" + }, + "catalina": { + "cellar": "/usr/local/Cellar", + "url": "https://ghcr.io/v2/homebrew/core/openssh/blobs/sha256:fccb117717bad0d24f7cd48eb3b075299ead1d1153e8dde2a95e0de31a7990d0", + "sha256": "fccb117717bad0d24f7cd48eb3b075299ead1d1153e8dde2a95e0de31a7990d0" + }, + "x86_64_linux": { + "cellar": "/home/linuxbrew/.linuxbrew/Cellar", + "url": "https://ghcr.io/v2/homebrew/core/openssh/blobs/sha256:8e7f4971bbad2e288324a409b473215e582915ef297c34f645b346413c018664", + "sha256": "8e7f4971bbad2e288324a409b473215e582915ef297c34f645b346413c018664" + } + } + } + }, + "httpie": { + "version": "3.2.1", + "bottle": { + "rebuild": 0, + "root_url": "https://ghcr.io/v2/homebrew/core", + "files": { + "arm64_monterey": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/httpie/blobs/sha256:10ce896b2bb6686104fedea658fdaf903c0dd77bfb1f4a889f4bae714f4d9504", + "sha256": "10ce896b2bb6686104fedea658fdaf903c0dd77bfb1f4a889f4bae714f4d9504" + }, + "arm64_big_sur": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/httpie/blobs/sha256:289f01c3a0d275ac15d6a54a742d865b88e1c7597530548db959389e5ae3a2fc", + "sha256": "289f01c3a0d275ac15d6a54a742d865b88e1c7597530548db959389e5ae3a2fc" + }, + "monterey": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/httpie/blobs/sha256:70f95f6fb4c9d8438cf3957d1a206a615f870c69aefb8085976d455971404c26", + "sha256": "70f95f6fb4c9d8438cf3957d1a206a615f870c69aefb8085976d455971404c26" + }, + "big_sur": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/httpie/blobs/sha256:4a2af142a0361da7cd3bced7212f3cecc62ffe8ca0defbe7be2ea7aeed4ec2d5", + "sha256": "4a2af142a0361da7cd3bced7212f3cecc62ffe8ca0defbe7be2ea7aeed4ec2d5" + }, + "catalina": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/httpie/blobs/sha256:6f9196061f4ebb7a2742329e46085f960acf87dcfb45ecb4b7a82ab29db47456", + "sha256": "6f9196061f4ebb7a2742329e46085f960acf87dcfb45ecb4b7a82ab29db47456" + }, + "x86_64_linux": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/httpie/blobs/sha256:2d80c38beeaadd384752dedc669a04fbc6bc59f40e54d5757d36c60e14bd9d8f", + "sha256": "2d80c38beeaadd384752dedc669a04fbc6bc59f40e54d5757d36c60e14bd9d8f" + } + } + } + }, + "jq": { + "version": "1.6", + "bottle": { + "rebuild": 1, + "root_url": "https://ghcr.io/v2/homebrew/core", + "files": { + "arm64_monterey": { + "cellar": ":any", + "url": "https://ghcr.io/v2/homebrew/core/jq/blobs/sha256:f70e1ae8df182b242ca004492cc0a664e2a8195e2e46f30546fe78e265d5eb87", + "sha256": "f70e1ae8df182b242ca004492cc0a664e2a8195e2e46f30546fe78e265d5eb87" + }, + "arm64_big_sur": { + "cellar": ":any", + "url": "https://ghcr.io/v2/homebrew/core/jq/blobs/sha256:674b3ae41c399f1e8e44c271b0e6909babff9fcd2e04a2127d25e2407ea4dd33", + "sha256": "674b3ae41c399f1e8e44c271b0e6909babff9fcd2e04a2127d25e2407ea4dd33" + }, + "monterey": { + "cellar": ":any", + "url": "https://ghcr.io/v2/homebrew/core/jq/blobs/sha256:7fee6ea327062b37d34ef5346a84810a1752cc7146fff1223fab76c9b45686e0", + "sha256": "7fee6ea327062b37d34ef5346a84810a1752cc7146fff1223fab76c9b45686e0" + }, + "big_sur": { + "cellar": ":any", + "url": "https://ghcr.io/v2/homebrew/core/jq/blobs/sha256:bf0f8577632af7b878b6425476f5b1ab9c3bf66d65affb0c455048a173a0b6bf", + "sha256": "bf0f8577632af7b878b6425476f5b1ab9c3bf66d65affb0c455048a173a0b6bf" + }, + "catalina": { + "cellar": ":any", + "url": "https://ghcr.io/v2/homebrew/core/jq/blobs/sha256:820a3c85fcbb63088b160c7edf125d7e55fc2c5c1d51569304499c9cc4b89ce8", + "sha256": "820a3c85fcbb63088b160c7edf125d7e55fc2c5c1d51569304499c9cc4b89ce8" + }, + "mojave": { + "cellar": ":any", + "url": "https://ghcr.io/v2/homebrew/core/jq/blobs/sha256:71f0e76c5b22e5088426c971d5e795fe67abee7af6c2c4ae0cf4c0eb98ed21ff", + "sha256": "71f0e76c5b22e5088426c971d5e795fe67abee7af6c2c4ae0cf4c0eb98ed21ff" + }, + "high_sierra": { + "cellar": ":any", + "url": "https://ghcr.io/v2/homebrew/core/jq/blobs/sha256:dffcffa4ea13e8f0f2b45c5121e529077e135ae9a47254c32182231662ee9b72", + "sha256": "dffcffa4ea13e8f0f2b45c5121e529077e135ae9a47254c32182231662ee9b72" + }, + "sierra": { + "cellar": ":any", + "url": "https://ghcr.io/v2/homebrew/core/jq/blobs/sha256:bb4d19dc026c2d72c53eed78eaa0ab982e9fcad2cd2acc6d13e7a12ff658e877", + "sha256": "bb4d19dc026c2d72c53eed78eaa0ab982e9fcad2cd2acc6d13e7a12ff658e877" + }, + "x86_64_linux": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/jq/blobs/sha256:2beea2c2c372ccf1081e9a5233fc3020470803254284aeecc071249d76b62338", + "sha256": "2beea2c2c372ccf1081e9a5233fc3020470803254284aeecc071249d76b62338" + } + } + } + }, + "git": { + "version": "2.37.3", + "bottle": { + "rebuild": 0, + "root_url": "https://ghcr.io/v2/homebrew/core", + "files": { + "arm64_monterey": { + "cellar": "/opt/homebrew/Cellar", + "url": "https://ghcr.io/v2/homebrew/core/git/blobs/sha256:a8c3e5a517b342d4dbb29c9931cb471b4d11cbe1e6a35d67f0e4d62e81d3dabf", + "sha256": "a8c3e5a517b342d4dbb29c9931cb471b4d11cbe1e6a35d67f0e4d62e81d3dabf" + }, + "arm64_big_sur": { + "cellar": "/opt/homebrew/Cellar", + "url": "https://ghcr.io/v2/homebrew/core/git/blobs/sha256:d3fb7983def6cda8ed2aff9b9b6470de4e1d98aa4669b2630db34639972d8cc4", + "sha256": "d3fb7983def6cda8ed2aff9b9b6470de4e1d98aa4669b2630db34639972d8cc4" + }, + "monterey": { + "cellar": "/usr/local/Cellar", + "url": "https://ghcr.io/v2/homebrew/core/git/blobs/sha256:3388eb9ef80bd4e75a334dcef8d163493aa50f534f850c6a43b46b8c56e6af8f", + "sha256": "3388eb9ef80bd4e75a334dcef8d163493aa50f534f850c6a43b46b8c56e6af8f" + }, + "big_sur": { + "cellar": "/usr/local/Cellar", + "url": "https://ghcr.io/v2/homebrew/core/git/blobs/sha256:eabd8b4a14e9905f9a99d805d4096199f36599a83788bfc65bd71e8849ed0e43", + "sha256": "eabd8b4a14e9905f9a99d805d4096199f36599a83788bfc65bd71e8849ed0e43" + }, + "catalina": { + "cellar": "/usr/local/Cellar", + "url": "https://ghcr.io/v2/homebrew/core/git/blobs/sha256:ef29862303db9c7e172ee398d923ee13d1816afc3daf7f7ffa8192b62a21c8ec", + "sha256": "ef29862303db9c7e172ee398d923ee13d1816afc3daf7f7ffa8192b62a21c8ec" + }, + "x86_64_linux": { + "cellar": "/home/linuxbrew/.linuxbrew/Cellar", + "url": "https://ghcr.io/v2/homebrew/core/git/blobs/sha256:8b546791ebac51c6659c3ade93eca24c8e743d2327ae025572a022918185638a", + "sha256": "8b546791ebac51c6659c3ade93eca24c8e743d2327ae025572a022918185638a" + } + } + } + }, + "git-lfs": { + "version": "3.2.0", + "bottle": { + "rebuild": 0, + "root_url": "https://ghcr.io/v2/homebrew/core", + "files": { + "arm64_monterey": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/git-lfs/blobs/sha256:a81d5b29d1c0203f592e8af7b25ccb95431489ffa8dc595dbb1c39f1c08cfb46", + "sha256": "a81d5b29d1c0203f592e8af7b25ccb95431489ffa8dc595dbb1c39f1c08cfb46" + }, + "arm64_big_sur": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/git-lfs/blobs/sha256:f10c03ed48c4168d8b80164d053040452e772c978344cc485e386183de7d5c24", + "sha256": "f10c03ed48c4168d8b80164d053040452e772c978344cc485e386183de7d5c24" + }, + "monterey": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/git-lfs/blobs/sha256:2ccd239da97286fa2f9702f7c2731202819a6012163906b7e599e8fb218a6c95", + "sha256": "2ccd239da97286fa2f9702f7c2731202819a6012163906b7e599e8fb218a6c95" + }, + "big_sur": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/git-lfs/blobs/sha256:21c75c877159acff82ada003baa3ea7d65e2774a2636f740e4cfad4ae9d2d7b5", + "sha256": "21c75c877159acff82ada003baa3ea7d65e2774a2636f740e4cfad4ae9d2d7b5" + }, + "catalina": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/git-lfs/blobs/sha256:c428d687c3a70defa9178fd0b287cd8766f05bf113eb6ae8ce7bcb7940751b05", + "sha256": "c428d687c3a70defa9178fd0b287cd8766f05bf113eb6ae8ce7bcb7940751b05" + }, + "x86_64_linux": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/git-lfs/blobs/sha256:43e16ee02644936dbf6d2d504b8c66cd3e0c3dd1313436e9bd253c4c051e437c", + "sha256": "43e16ee02644936dbf6d2d504b8c66cd3e0c3dd1313436e9bd253c4c051e437c" + } + } + } + }, + "gradle": { + "version": "7.5.1", + "bottle": { + "rebuild": 0, + "root_url": "https://ghcr.io/v2/homebrew/core", + "files": { + "all": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/gradle/blobs/sha256:022acd562e864e9ffd39dabc3c5c45df19b7ebe9aa0dee25b895ef410a01a3b9", + "sha256": "022acd562e864e9ffd39dabc3c5c45df19b7ebe9aa0dee25b895ef410a01a3b9" + } + } + } + }, + "python": { + "version": "3.10.6_1", + "bottle": { + "rebuild": 0, + "root_url": "https://ghcr.io/v2/homebrew/core", + "files": { + "arm64_monterey": { + "cellar": "/opt/homebrew/Cellar", + "url": "https://ghcr.io/v2/homebrew/core/python/3.10/blobs/sha256:4bf124c1807cc11c15b49916d215734925584f581f1589c85c05ac9f2baa207d", + "sha256": "4bf124c1807cc11c15b49916d215734925584f581f1589c85c05ac9f2baa207d" + }, + "arm64_big_sur": { + "cellar": "/opt/homebrew/Cellar", + "url": "https://ghcr.io/v2/homebrew/core/python/3.10/blobs/sha256:943a7b7b9f09a255eb087de33249c82ff70d091380669446d60c602291cb58f1", + "sha256": "943a7b7b9f09a255eb087de33249c82ff70d091380669446d60c602291cb58f1" + }, + "monterey": { + "cellar": "/usr/local/Cellar", + "url": "https://ghcr.io/v2/homebrew/core/python/3.10/blobs/sha256:b142ca7e72014b64b423f6b7785ff69b3b670b7619aec3684f56d8b622127bbf", + "sha256": "b142ca7e72014b64b423f6b7785ff69b3b670b7619aec3684f56d8b622127bbf" + }, + "big_sur": { + "cellar": "/usr/local/Cellar", + "url": "https://ghcr.io/v2/homebrew/core/python/3.10/blobs/sha256:2a2eb351c779256e78e9e70b72c683726918d16b66c15c8721eea5b3e1d392b1", + "sha256": "2a2eb351c779256e78e9e70b72c683726918d16b66c15c8721eea5b3e1d392b1" + }, + "catalina": { + "cellar": "/usr/local/Cellar", + "url": "https://ghcr.io/v2/homebrew/core/python/3.10/blobs/sha256:9309d4c2f17552321c22b7e8889f2907c2b18716b763004c3aacaf5645fc6c58", + "sha256": "9309d4c2f17552321c22b7e8889f2907c2b18716b763004c3aacaf5645fc6c58" + }, + "x86_64_linux": { + "cellar": "/home/linuxbrew/.linuxbrew/Cellar", + "url": "https://ghcr.io/v2/homebrew/core/python/3.10/blobs/sha256:809db3634bcdc3d3e5f60f9e0e74124fc7cb6f8c52085daa36acf118d2b64039", + "sha256": "809db3634bcdc3d3e5f60f9e0e74124fc7cb6f8c52085daa36acf118d2b64039" + } + } + } + }, + "hub": { + "version": "2.14.2", + "bottle": { + "rebuild": 0, + "root_url": "https://ghcr.io/v2/homebrew/core", + "files": { + "arm64_monterey": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/hub/blobs/sha256:00602733d9a4c8049e34cb20a7c96dbd51f98a60e1cb5fbc9aec72663324ce89", + "sha256": "00602733d9a4c8049e34cb20a7c96dbd51f98a60e1cb5fbc9aec72663324ce89" + }, + "arm64_big_sur": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/hub/blobs/sha256:19d761270350d4c4b6d5118d096dc7c012e7b58b43c0d81f9c6d8bded1888dd9", + "sha256": "19d761270350d4c4b6d5118d096dc7c012e7b58b43c0d81f9c6d8bded1888dd9" + }, + "monterey": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/hub/blobs/sha256:d4c647211cc8a8e9aa9bedfaa4cb079a3a5fafea3f8378c7eaf5c50e2503cd0e", + "sha256": "d4c647211cc8a8e9aa9bedfaa4cb079a3a5fafea3f8378c7eaf5c50e2503cd0e" + }, + "big_sur": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/hub/blobs/sha256:7c480f3de5f449a741f88718194c129d597f0fe0db8b2130c1ccf4daa9a8dfca", + "sha256": "7c480f3de5f449a741f88718194c129d597f0fe0db8b2130c1ccf4daa9a8dfca" + }, + "catalina": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/hub/blobs/sha256:fdf05855839a9d7ec6e7bee6796e3cb5fc473500cffc002366cf98c09a805b69", + "sha256": "fdf05855839a9d7ec6e7bee6796e3cb5fc473500cffc002366cf98c09a805b69" + }, + "mojave": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/hub/blobs/sha256:bcbae9c683d76f3395665467ba0f0c00c60c12c84022f72faba4b8981724b563", + "sha256": "bcbae9c683d76f3395665467ba0f0c00c60c12c84022f72faba4b8981724b563" + }, + "high_sierra": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/hub/blobs/sha256:8800cda4532784bf764ea6116a06c81d8d90bb3d36d8ecf295e64f9dd647c4ad", + "sha256": "8800cda4532784bf764ea6116a06c81d8d90bb3d36d8ecf295e64f9dd647c4ad" + }, + "x86_64_linux": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/hub/blobs/sha256:213636e856404251ffd7897357ab91cc9519d3852e4b28cbb43575988d9bbc1b", + "sha256": "213636e856404251ffd7897357ab91cc9519d3852e4b28cbb43575988d9bbc1b" + } + } + } + }, + "git-extras": { + "version": "6.4.0", + "bottle": { + "rebuild": 1, + "root_url": "https://ghcr.io/v2/homebrew/core", + "files": { + "all": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/git-extras/blobs/sha256:139de676324d68edf3e958adb4806ef20d9a3d4e7f80588b8d21e5b1ff1feb56", + "sha256": "139de676324d68edf3e958adb4806ef20d9a3d4e7f80588b8d21e5b1ff1feb56" + } + } + } + }, + "awscli": { + "version": "2.7.27", + "bottle": { + "rebuild": 0, + "root_url": "https://ghcr.io/v2/homebrew/core", + "files": { + "arm64_monterey": { + "cellar": ":any", + "url": "https://ghcr.io/v2/homebrew/core/awscli/blobs/sha256:728ace6408cf56cb5e8f6b4e798600cf20e787df0e63934a9f79be50e5f4f69f", + "sha256": "728ace6408cf56cb5e8f6b4e798600cf20e787df0e63934a9f79be50e5f4f69f" + }, + "arm64_big_sur": { + "cellar": ":any", + "url": "https://ghcr.io/v2/homebrew/core/awscli/blobs/sha256:756dc564c15f5e75c0d1fc21ed26dae2e480c78b0e553b3989a6eec08e08e138", + "sha256": "756dc564c15f5e75c0d1fc21ed26dae2e480c78b0e553b3989a6eec08e08e138" + }, + "monterey": { + "cellar": ":any", + "url": "https://ghcr.io/v2/homebrew/core/awscli/blobs/sha256:80414c31c3ff246b859298f2d485bbe806e7ce3ce5c9355aca18317dd6c716bf", + "sha256": "80414c31c3ff246b859298f2d485bbe806e7ce3ce5c9355aca18317dd6c716bf" + }, + "big_sur": { + "cellar": ":any", + "url": "https://ghcr.io/v2/homebrew/core/awscli/blobs/sha256:9e2eedf68a976f8bec3564ed830d5efafa842fe6d5251dfa27f4146ca329e14e", + "sha256": "9e2eedf68a976f8bec3564ed830d5efafa842fe6d5251dfa27f4146ca329e14e" + }, + "catalina": { + "cellar": ":any", + "url": "https://ghcr.io/v2/homebrew/core/awscli/blobs/sha256:d9272fbd7320c52cdf93f5e791142cedf8a6df94560c33ac00cb9eed56d71952", + "sha256": "d9272fbd7320c52cdf93f5e791142cedf8a6df94560c33ac00cb9eed56d71952" + }, + "x86_64_linux": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/awscli/blobs/sha256:42025d9b86891e74e03be9bfc223e8cad39e7cbd4aaebd7ddc5356a0e1b79a6f", + "sha256": "42025d9b86891e74e03be9bfc223e8cad39e7cbd4aaebd7ddc5356a0e1b79a6f" + } + } + } + }, + "docker-compose": { + "version": "2.10.2", + "bottle": { + "rebuild": 0, + "root_url": "https://ghcr.io/v2/homebrew/core", + "files": { + "arm64_monterey": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/docker-compose/blobs/sha256:056ab56dbfb2ccf80adfdeade5a2e4d538cf4df94d5cda1d4c5daaf59737f999", + "sha256": "056ab56dbfb2ccf80adfdeade5a2e4d538cf4df94d5cda1d4c5daaf59737f999" + }, + "arm64_big_sur": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/docker-compose/blobs/sha256:056ab56dbfb2ccf80adfdeade5a2e4d538cf4df94d5cda1d4c5daaf59737f999", + "sha256": "056ab56dbfb2ccf80adfdeade5a2e4d538cf4df94d5cda1d4c5daaf59737f999" + }, + "monterey": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/docker-compose/blobs/sha256:e53ad8d98f9cae5bf9d8e2ebe094b9508c693bdad0f727a2f00d05e0d7fdc5e3", + "sha256": "e53ad8d98f9cae5bf9d8e2ebe094b9508c693bdad0f727a2f00d05e0d7fdc5e3" + }, + "big_sur": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/docker-compose/blobs/sha256:e53ad8d98f9cae5bf9d8e2ebe094b9508c693bdad0f727a2f00d05e0d7fdc5e3", + "sha256": "e53ad8d98f9cae5bf9d8e2ebe094b9508c693bdad0f727a2f00d05e0d7fdc5e3" + }, + "catalina": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/docker-compose/blobs/sha256:e53ad8d98f9cae5bf9d8e2ebe094b9508c693bdad0f727a2f00d05e0d7fdc5e3", + "sha256": "e53ad8d98f9cae5bf9d8e2ebe094b9508c693bdad0f727a2f00d05e0d7fdc5e3" + }, + "x86_64_linux": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/docker-compose/blobs/sha256:fad64189a85d45fd75b641ce41961e5e1e6cbb305401b1cfce09e495279fdc05", + "sha256": "fad64189a85d45fd75b641ce41961e5e1e6cbb305401b1cfce09e495279fdc05" + } + } + } + }, + "postgresql": { + "version": "14.5_1", + "bottle": { + "rebuild": 0, + "root_url": "https://ghcr.io/v2/homebrew/core", + "files": { + "arm64_monterey": { + "cellar": "/opt/homebrew/Cellar", + "url": "https://ghcr.io/v2/homebrew/core/postgresql/14/blobs/sha256:7de4e2fa72473ee92a2380496fa0d479b2afa1b500d0db0c48e379ed26506884", + "sha256": "7de4e2fa72473ee92a2380496fa0d479b2afa1b500d0db0c48e379ed26506884" + }, + "arm64_big_sur": { + "cellar": "/opt/homebrew/Cellar", + "url": "https://ghcr.io/v2/homebrew/core/postgresql/14/blobs/sha256:8579858ca521e44777131827f335db0de705aadad6f7fc83fc343572424ab2ef", + "sha256": "8579858ca521e44777131827f335db0de705aadad6f7fc83fc343572424ab2ef" + }, + "monterey": { + "cellar": "/usr/local/Cellar", + "url": "https://ghcr.io/v2/homebrew/core/postgresql/14/blobs/sha256:1f510876b086a7696294298d9c8572813c91745bf706aad06efd3395b8f47505", + "sha256": "1f510876b086a7696294298d9c8572813c91745bf706aad06efd3395b8f47505" + }, + "big_sur": { + "cellar": "/usr/local/Cellar", + "url": "https://ghcr.io/v2/homebrew/core/postgresql/14/blobs/sha256:3af2b8cf4ce3056af9d6ec63bc0fdd40d0132f80f9e58d2b1043cba8e479badd", + "sha256": "3af2b8cf4ce3056af9d6ec63bc0fdd40d0132f80f9e58d2b1043cba8e479badd" + }, + "catalina": { + "cellar": "/usr/local/Cellar", + "url": "https://ghcr.io/v2/homebrew/core/postgresql/14/blobs/sha256:c168e4df71b1d8bd833d9a44d3f2c0fc555597ccf64b3d2e0fa144e53b2cb54d", + "sha256": "c168e4df71b1d8bd833d9a44d3f2c0fc555597ccf64b3d2e0fa144e53b2cb54d" + }, + "x86_64_linux": { + "cellar": "/home/linuxbrew/.linuxbrew/Cellar", + "url": "https://ghcr.io/v2/homebrew/core/postgresql/14/blobs/sha256:c3f08966cb882241078288c3328b63a732038a9168aca9db0f6c7f78f51032e7", + "sha256": "c3f08966cb882241078288c3328b63a732038a9168aca9db0f6c7f78f51032e7" + } + } + } + }, + "redis": { + "version": "7.0.4", + "bottle": { + "rebuild": 0, + "root_url": "https://ghcr.io/v2/homebrew/core", + "files": { + "arm64_monterey": { + "cellar": ":any", + "url": "https://ghcr.io/v2/homebrew/core/redis/blobs/sha256:5fd4a4cdd769fdebc82dc5ea1b06edb2464039b38c09355f29e8e70804eb8477", + "sha256": "5fd4a4cdd769fdebc82dc5ea1b06edb2464039b38c09355f29e8e70804eb8477" + }, + "arm64_big_sur": { + "cellar": ":any", + "url": "https://ghcr.io/v2/homebrew/core/redis/blobs/sha256:203cea84c495237fad2c5b1e172603da5b9f5655a063972d996b45ff83155f10", + "sha256": "203cea84c495237fad2c5b1e172603da5b9f5655a063972d996b45ff83155f10" + }, + "monterey": { + "cellar": ":any", + "url": "https://ghcr.io/v2/homebrew/core/redis/blobs/sha256:58f58d9fe07000a83e54581dd7fbe22747701d84ba78def762ae94b341f41259", + "sha256": "58f58d9fe07000a83e54581dd7fbe22747701d84ba78def762ae94b341f41259" + }, + "big_sur": { + "cellar": ":any", + "url": "https://ghcr.io/v2/homebrew/core/redis/blobs/sha256:a6aaf522bca22031de5bcaeb39ff41f5f1af977967e94a0dac507d2ed8fe769f", + "sha256": "a6aaf522bca22031de5bcaeb39ff41f5f1af977967e94a0dac507d2ed8fe769f" + }, + "catalina": { + "cellar": ":any", + "url": "https://ghcr.io/v2/homebrew/core/redis/blobs/sha256:38c669f105a76cccf7567b4ee32dba6972c63daaf7b4c178e1f79988f846684b", + "sha256": "38c669f105a76cccf7567b4ee32dba6972c63daaf7b4c178e1f79988f846684b" + }, + "x86_64_linux": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/redis/blobs/sha256:dc16cc18a0e19a14fdc2e47bf6244690455795d89af8445abdf7df01542e1581", + "sha256": "dc16cc18a0e19a14fdc2e47bf6244690455795d89af8445abdf7df01542e1581" + } + } + } + }, + "java11": { + "version": "11.0.16.1", + "bottle": { + "rebuild": 0, + "root_url": "https://ghcr.io/v2/homebrew/core", + "files": { + "arm64_monterey": { + "cellar": ":any", + "url": "https://ghcr.io/v2/homebrew/core/openjdk/11/blobs/sha256:9c4b44dbad256cd0b6c90f35722ffe0748f834b0796029dbec1cc768d7affc87", + "sha256": "9c4b44dbad256cd0b6c90f35722ffe0748f834b0796029dbec1cc768d7affc87" + }, + "arm64_big_sur": { + "cellar": ":any", + "url": "https://ghcr.io/v2/homebrew/core/openjdk/11/blobs/sha256:ba5ec5c05afeef4a8d35893c845f493a681c6153aa31ef91e8ad5be2340ef5f7", + "sha256": "ba5ec5c05afeef4a8d35893c845f493a681c6153aa31ef91e8ad5be2340ef5f7" + }, + "monterey": { + "cellar": ":any", + "url": "https://ghcr.io/v2/homebrew/core/openjdk/11/blobs/sha256:b552bd2c8c776b1dc1d8def8b365baed60993f0bfcd580d0bb8aee051e789333", + "sha256": "b552bd2c8c776b1dc1d8def8b365baed60993f0bfcd580d0bb8aee051e789333" + }, + "big_sur": { + "cellar": ":any", + "url": "https://ghcr.io/v2/homebrew/core/openjdk/11/blobs/sha256:ee9ad84f9610a3096b22a5cfe68b00d273e839f3de1bae74380c88ebc0f18192", + "sha256": "ee9ad84f9610a3096b22a5cfe68b00d273e839f3de1bae74380c88ebc0f18192" + }, + "catalina": { + "cellar": ":any", + "url": "https://ghcr.io/v2/homebrew/core/openjdk/11/blobs/sha256:6b9915b84f1d8f2c7ad87fe984b7aefaa6597781ca20586f2ab902bdad8430d3", + "sha256": "6b9915b84f1d8f2c7ad87fe984b7aefaa6597781ca20586f2ab902bdad8430d3" + }, + "x86_64_linux": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/openjdk/11/blobs/sha256:ea25b4dd142c423ef91de19c7b9a82f77ab10e09deb1e5e4332c60af82bd1ff5", + "sha256": "ea25b4dd142c423ef91de19c7b9a82f77ab10e09deb1e5e4332c60af82bd1ff5" + } + } + } + } + }, + "mas": { + "1Password": null, + "WhatsApp Desktop": null, + "Things 3": null, + "Bear - Markdown Notes": null, + "Harvest": { + "id": "506189836", + "version": "2.3.0" + }, + "Slack": { + "id": "803453959", + "version": "4.28.171" + }, + "Spark": { + "id": "1176895641", + "version": "2.11.22" + } + } + }, + "system": { + "macos": { + "monterey": { + "HOMEBREW_VERSION": "3.5.10", + "HOMEBREW_PREFIX": "/opt/homebrew", + "Homebrew/homebrew-core": "6fbe5378667926e396f3048449956914e7a7b356", + "CLT": "13.4.0.0.1.1651278267", + "Xcode": "13.4", + "macOS": "12.3" + } + } + } +} From 2827cc0c4a985a56417229534e71d07c55fba596 Mon Sep 17 00:00:00 2001 From: Anders Emil Pouplier Date: Wed, 31 Aug 2022 21:31:04 +0200 Subject: [PATCH 138/144] Updated brewfile --- setup/Brewfile | 5 +- setup/Brewfile.lock.json | 12 + setup/macos | 802 --------------------------------------- 3 files changed, 16 insertions(+), 803 deletions(-) diff --git a/setup/Brewfile b/setup/Brewfile index c96e679fe4..c07a107ca2 100644 --- a/setup/Brewfile +++ b/setup/Brewfile @@ -1,4 +1,5 @@ tap "homebrew/cask" +tap "adoptopenjdk/openjdk" cask_args appdir: "/Applications" cask "google-chrome" @@ -12,6 +13,8 @@ cask "spectacle" cask "docker" cask "microsoft-teams" cask "iterm2" +cask "adoptopenjdk8" +cask "figma" brew "mas" brew "wget" @@ -33,7 +36,7 @@ brew "hub" brew "git-extras" brew "awscli" brew "docker-compose" -brew "postgresql" +brew "postgresql@14" brew "redis" brew "java11" diff --git a/setup/Brewfile.lock.json b/setup/Brewfile.lock.json index 78880bcb2c..b2ae76f389 100644 --- a/setup/Brewfile.lock.json +++ b/setup/Brewfile.lock.json @@ -3,6 +3,9 @@ "tap": { "homebrew/cask": { "revision": "830111e1e4e6985bb1e75ecd626793e8c49ed22b" + }, + "adoptopenjdk/openjdk": { + "revision": "27915e4ab3856595a8b46d1fd3b6c379c1f02210" } }, "cask": { @@ -104,6 +107,15 @@ "appdir": "/Applications" } } + }, + "adoptopenjdk8": { + "version": "8,292:b10", + "options": { + "full_name": "adoptopenjdk8", + "args": { + "appdir": "/Applications" + } + } } }, "brew": { diff --git a/setup/macos b/setup/macos index 91d5c3fb49..c77aeda4f7 100755 --- a/setup/macos +++ b/setup/macos @@ -21,805 +21,3 @@ sudo scutil --set ComputerName "andersemil" sudo scutil --set HostName "andersemil" sudo scutil --set LocalHostName "andersemil" sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.smb.server NetBIOSName -string "andersemil" - -# Set standby delay to 24 hours (default is 1 hour) -sudo pmset -a standbydelay 86400 - -# Disable the sound effects on boot -sudo nvram SystemAudioVolume=" " - -# Disable transparency in the menu bar and elsewhere on Yosemite -defaults write com.apple.universalaccess reduceTransparency -bool true - -# Set highlight color to green -defaults write NSGlobalDomain AppleHighlightColor -string "0.764700 0.976500 0.568600" - -# Set sidebar icon size to medium -defaults write NSGlobalDomain NSTableViewDefaultSizeMode -int 2 - -# Always show scrollbars -defaults write NSGlobalDomain AppleShowScrollBars -string "Always" -# Possible values: `WhenScrolling`, `Automatic` and `Always` - -# Disable the over-the-top focus ring animation -defaults write NSGlobalDomain NSUseAnimatedFocusRing -bool false - -# Disable smooth scrolling -# (Uncomment if you’re on an older Mac that messes up the animation) -#defaults write NSGlobalDomain NSScrollAnimationEnabled -bool false - -# Increase window resize speed for Cocoa applications -defaults write NSGlobalDomain NSWindowResizeTime -float 0.001 - -# Expand save panel by default -defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true -defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode2 -bool true - -# Expand print panel by default -defaults write NSGlobalDomain PMPrintingExpandedStateForPrint -bool true -defaults write NSGlobalDomain PMPrintingExpandedStateForPrint2 -bool true - -# Save to disk (not to iCloud) by default -defaults write NSGlobalDomain NSDocumentSaveNewDocumentsToCloud -bool false - -# Automatically quit printer app once the print jobs complete -defaults write com.apple.print.PrintingPrefs "Quit When Finished" -bool true - -# Disable the “Are you sure you want to open this application?” dialog -defaults write com.apple.LaunchServices LSQuarantine -bool false - -# Remove duplicates in the “Open With” menu (also see `lscleanup` alias) -/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user - -# Display ASCII control characters using caret notation in standard text views -# Try e.g. `cd /tmp; unidecode "\x{0000}" > cc.txt; open -e cc.txt` -defaults write NSGlobalDomain NSTextShowsControlCharacters -bool true - -# Disable Resume system-wide -# defaults write com.apple.systempreferences NSQuitAlwaysKeepsWindows -bool false - -# Disable automatic termination of inactive apps -defaults write NSGlobalDomain NSDisableAutomaticTermination -bool true - -# Disable the crash reporter -#defaults write com.apple.CrashReporter DialogType -string "none" - -# Set Help Viewer windows to non-floating mode -defaults write com.apple.helpviewer DevMode -bool true - -# Fix for the ancient UTF-8 bug in QuickLook (https://mths.be/bbo) -# Commented out, as this is known to cause problems in various Adobe apps :( -# See https://github.com/mathiasbynens/dotfiles/issues/237 -#echo "0x08000100:0" > ~/.CFUserTextEncoding - -# Reveal IP address, hostname, OS version, etc. when clicking the clock -# in the login window -sudo defaults write /Library/Preferences/com.apple.loginwindow AdminHostInfo HostName - -# Restart automatically if the computer freezes -# sudo systemsetup -setrestartfreeze on - -# Never go into computer sleep mode -sudo systemsetup -setcomputersleep Off > /dev/null - -# Disable Notification Center and remove the menu bar icon -# launchctl unload -w /System/Library/LaunchAgents/com.apple.notificationcenterui.plist 2> /dev/null - -# Disable automatic capitalization as it’s annoying when typing code -# defaults write NSGlobalDomain NSAutomaticCapitalizationEnabled -bool false - -# Disable smart dashes as they’re annoying when typing code -# defaults write NSGlobalDomain NSAutomaticDashSubstitutionEnabled -bool false - -# Disable automatic period substitution as it’s annoying when typing code -# defaults write NSGlobalDomain NSAutomaticPeriodSubstitutionEnabled -bool false - -# Disable smart quotes as they’re annoying when typing code -# defaults write NSGlobalDomain NSAutomaticQuoteSubstitutionEnabled -bool false - -# Disable auto-correct -# defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false - -# Set a custom wallpaper image. `DefaultDesktop.jpg` is already a symlink, and -# all wallpapers are in `/Library/Desktop Pictures/`. The default is `Wave.jpg`. -#rm -rf ~/Library/Application Support/Dock/desktoppicture.db -#sudo rm -rf /System/Library/CoreServices/DefaultDesktop.jpg -#sudo ln -s /path/to/your/image /System/Library/CoreServices/DefaultDesktop.jpg - -############################################################################### -# SSD-specific tweaks # -############################################################################### - -# 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 - -############################################################################### -# Trackpad, mouse, keyboard, Bluetooth accessories, and input # -############################################################################### - -# Trackpad: enable tap to click for this user and for the login screen -defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad Clicking -bool true -defaults -currentHost write NSGlobalDomain com.apple.mouse.tapBehavior -int 1 -defaults write NSGlobalDomain com.apple.mouse.tapBehavior -int 1 - -# Trackpad: map bottom right corner to right-click -defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadCornerSecondaryClick -int 2 -defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadRightClick -bool true -defaults -currentHost write NSGlobalDomain com.apple.trackpad.trackpadCornerClickBehavior -int 1 -defaults -currentHost write NSGlobalDomain com.apple.trackpad.enableSecondaryClick -bool true - -# Disable “natural” (Lion-style) scrolling -# defaults write NSGlobalDomain com.apple.swipescrolldirection -bool false - -# Increase sound quality for Bluetooth headphones/headsets -defaults write com.apple.BluetoothAudioAgent "Apple Bitpool Min (editable)" -int 40 - -# Enable full keyboard access for all controls -# (e.g. enable Tab in modal dialogs) -defaults write NSGlobalDomain AppleKeyboardUIMode -int 3 - -# Use scroll gesture with the Ctrl (^) modifier key to zoom -defaults write com.apple.universalaccess closeViewScrollWheelToggle -bool true -defaults write com.apple.universalaccess HIDScrollZoomModifierMask -int 262144 -# Follow the keyboard focus while zoomed in -defaults write com.apple.universalaccess closeViewZoomFollowsFocus -bool true - -# Disable press-and-hold for keys in favor of key repeat -# defaults write NSGlobalDomain ApplePressAndHoldEnabled -bool false - -# Set a blazingly fast keyboard repeat rate -defaults write NSGlobalDomain KeyRepeat -int 1 -defaults write NSGlobalDomain InitialKeyRepeat -int 10 - -# Set language and text formats -# Note: if you’re in the US, replace `EUR` with `USD`, `Centimeters` with -# `Inches`, `en_GB` with `en_US`, and `true` with `false`. -defaults write NSGlobalDomain AppleLanguages -array "en" "da" -defaults write NSGlobalDomain AppleLocale -string "en_US@currency=DKK" -defaults write NSGlobalDomain AppleMeasurementUnits -string "Centimeters" -defaults write NSGlobalDomain AppleMetricUnits -bool true - -# Show language menu in the top right corner of the boot screen -sudo defaults write /Library/Preferences/com.apple.loginwindow showInputMenu -bool true - -# Set the timezone; see `sudo systemsetup -listtimezones` for other values -sudo systemsetup -settimezone "Europe/Copenhagen" > /dev/null - -# Stop iTunes from responding to the keyboard media keys -#launchctl unload -w /System/Library/LaunchAgents/com.apple.rcd.plist 2> /dev/null - -############################################################################### -# Screen # -############################################################################### - -# Require password immediately after sleep or screen saver begins -defaults write com.apple.screensaver askForPassword -int 1 -defaults write com.apple.screensaver askForPasswordDelay -int 0 - -# Save screenshots to the desktop -defaults write com.apple.screencapture location -string "${HOME}/Desktop" - -# Save screenshots in PNG format (other options: BMP, GIF, JPG, PDF, TIFF) -defaults write com.apple.screencapture type -string "png" - -# Disable shadow in screenshots -defaults write com.apple.screencapture disable-shadow -bool true - -# Enable subpixel font rendering on non-Apple LCDs -# Reference: https://github.com/kevinSuttle/macOS-Defaults/issues/17#issuecomment-266633501 -defaults write NSGlobalDomain AppleFontSmoothing -int 1 - -# Enable HiDPI display modes (requires restart) -sudo defaults write /Library/Preferences/com.apple.windowserver DisplayResolutionEnabled -bool true - -############################################################################### -# Finder # -############################################################################### - -# Finder: allow quitting via ⌘ + Q; doing so will also hide desktop icons -defaults write com.apple.finder QuitMenuItem -bool true - -# Finder: disable window animations and Get Info animations -defaults write com.apple.finder DisableAllAnimations -bool true - -# Set Desktop as the default location for new Finder windows -# For other paths, use `PfLo` and `file:///full/path/here/` -defaults write com.apple.finder NewWindowTarget -string "PfDe" -defaults write com.apple.finder NewWindowTargetPath -string "file://${HOME}/Desktop/" - -# Show icons for removable media on the desktop -defaults write com.apple.finder ShowExternalHardDrivesOnDesktop -bool true -defaults write com.apple.finder ShowRemovableMediaOnDesktop -bool true -defaults write com.apple.finder ShowHardDrivesOnDesktop -bool false -defaults write com.apple.finder ShowMountedServersOnDesktop -bool false - -# Finder: show hidden files by default -#defaults write com.apple.finder AppleShowAllFiles -bool true - -# Finder: show all filename extensions -defaults write NSGlobalDomain AppleShowAllExtensions -bool true - -# Finder: show status bar -defaults write com.apple.finder ShowStatusBar -bool true - -# Finder: show path bar -defaults write com.apple.finder ShowPathbar -bool true - -# Display full POSIX path as Finder window title -# defaults write com.apple.finder _FXShowPosixPathInTitle -bool true - -# Keep folders on top when sorting by name -defaults write com.apple.finder _FXSortFoldersFirst -bool true - -# When performing a search, search the current folder by default -defaults write com.apple.finder FXDefaultSearchScope -string "SCcf" - -# Disable the warning when changing a file extension -# defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false - -# Enable spring loading for directories -defaults write NSGlobalDomain com.apple.springing.enabled -bool true - -# Remove the spring loading delay for directories -defaults write NSGlobalDomain com.apple.springing.delay -float 0 - -# Avoid creating .DS_Store files on network or USB volumes -defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true -defaults write com.apple.desktopservices DSDontWriteUSBStores -bool true - -# 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 - -# Show item info near icons on the desktop and in other icon views -# /usr/libexec/PlistBuddy -c "Set :DesktopViewSettings:IconViewSettings:showItemInfo true" ~/Library/Preferences/com.apple.finder.plist -# /usr/libexec/PlistBuddy -c "Set :FK_StandardViewSettings:IconViewSettings:showItemInfo true" ~/Library/Preferences/com.apple.finder.plist -# /usr/libexec/PlistBuddy -c "Set :StandardViewSettings:IconViewSettings:showItemInfo true" ~/Library/Preferences/com.apple.finder.plist - -# Show item info to the right of the icons on the desktop -# /usr/libexec/PlistBuddy -c "Set DesktopViewSettings:IconViewSettings:labelOnBottom false" ~/Library/Preferences/com.apple.finder.plist - -# Enable snap-to-grid for icons on the desktop and in other icon views -/usr/libexec/PlistBuddy -c "Set :DesktopViewSettings:IconViewSettings:arrangeBy grid" ~/Library/Preferences/com.apple.finder.plist -/usr/libexec/PlistBuddy -c "Set :FK_StandardViewSettings:IconViewSettings:arrangeBy grid" ~/Library/Preferences/com.apple.finder.plist -/usr/libexec/PlistBuddy -c "Set :StandardViewSettings:IconViewSettings:arrangeBy grid" ~/Library/Preferences/com.apple.finder.plist - -# Increase grid spacing for icons on the desktop and in other icon views -# /usr/libexec/PlistBuddy -c "Set :DesktopViewSettings:IconViewSettings:gridSpacing 100" ~/Library/Preferences/com.apple.finder.plist -# /usr/libexec/PlistBuddy -c "Set :FK_StandardViewSettings:IconViewSettings:gridSpacing 100" ~/Library/Preferences/com.apple.finder.plist -# /usr/libexec/PlistBuddy -c "Set :StandardViewSettings:IconViewSettings:gridSpacing 100" ~/Library/Preferences/com.apple.finder.plist - -# Increase the size of icons on the desktop and in other icon views -# /usr/libexec/PlistBuddy -c "Set :DesktopViewSettings:IconViewSettings:iconSize 80" ~/Library/Preferences/com.apple.finder.plist -# /usr/libexec/PlistBuddy -c "Set :FK_StandardViewSettings:IconViewSettings:iconSize 80" ~/Library/Preferences/com.apple.finder.plist -# /usr/libexec/PlistBuddy -c "Set :StandardViewSettings:IconViewSettings:iconSize 80" ~/Library/Preferences/com.apple.finder.plist - -# Use list view in all Finder windows by default -# Four-letter codes for the other view modes: `icnv`, `clmv`, `Flwv` -defaults write com.apple.finder FXPreferredViewStyle -string "Nlsv" - -# Disable the warning before emptying the Trash -defaults write com.apple.finder WarnOnEmptyTrash -bool false - -# Enable AirDrop over Ethernet and on unsupported Macs running Lion -defaults write com.apple.NetworkBrowser BrowseAllInterfaces -bool true - -# Show the ~/Library folder -chflags nohidden ~/Library - -# Show the /Volumes folder -sudo chflags nohidden /Volumes - -# Remove Dropbox’s green checkmark icons in Finder -file=/Applications/Dropbox.app/Contents/Resources/emblem-dropbox-uptodate.icns -[ -e "${file}" ] && mv -f "${file}" "${file}.bak" - -# Expand the following File Info panes: -# “General”, “Open with”, and “Sharing & Permissions” -defaults write com.apple.finder FXInfoPanesExpanded -dict \ - General -bool true \ - Privileges -bool true - -############################################################################### -# Dock, Dashboard, and hot corners # -############################################################################### - -# Enable highlight hover effect for the grid view of a stack (Dock) -defaults write com.apple.dock mouse-over-hilite-stack -bool true - -# Set the icon size of Dock items to 36 pixels -defaults write com.apple.dock tilesize -int 36 - -# Change minimize/maximize window effect -defaults write com.apple.dock mineffect -string "scale" - -# Minimize windows into their application’s icon -defaults write com.apple.dock minimize-to-application -bool true - -# Enable spring loading for all Dock items -defaults write com.apple.dock enable-spring-load-actions-on-all-items -bool true - -# Show indicator lights for open applications in the Dock -defaults write com.apple.dock show-process-indicators -bool true - -# Wipe all (default) app icons from the Dock -# This is only really useful when setting up a new Mac, or if you don’t use -# the Dock to launch apps. -defaults write com.apple.dock persistent-apps -array - -# Show only open applications in the Dock -defaults write com.apple.dock static-only -bool true - -# Don’t animate opening applications from the Dock -defaults write com.apple.dock launchanim -bool false - -# Speed up Mission Control animations -defaults write com.apple.dock expose-animation-duration -float 0.1 - -# Don’t group windows by application in Mission Control -# (i.e. use the old Exposé behavior instead) -defaults write com.apple.dock expose-group-by-app -bool false - -# Disable Dashboard -# defaults write com.apple.dashboard mcx-disabled -bool true - -# Don’t show Dashboard as a Space -# defaults write com.apple.dock dashboard-in-overlay -bool true - -# Don’t automatically rearrange Spaces based on most recent use -# defaults write com.apple.dock mru-spaces -bool false - -# Remove the auto-hiding Dock delay -defaults write com.apple.dock autohide-delay -float 0 -# Remove the animation when hiding/showing the Dock -defaults write com.apple.dock autohide-time-modifier -float 0 - -# Automatically hide and show the Dock -defaults write com.apple.dock autohide -bool true - -# Make Dock icons of hidden applications translucent -defaults write com.apple.dock showhidden -bool true - -# Disable the Launchpad gesture (pinch with thumb and three fingers) -#defaults write com.apple.dock showLaunchpadGestureEnabled -int 0 - -# Reset Launchpad, but keep the desktop wallpaper intact -# find "${HOME}/Library/Application Support/Dock" -name "*-*.db" -maxdepth 1 -delete - -# Add iOS & Watch Simulator to Launchpad -# sudo ln -sf "/Applications/Xcode.app/Contents/Developer/Applications/Simulator.app" "/Applications/Simulator.app" -# sudo ln -sf "/Applications/Xcode.app/Contents/Developer/Applications/Simulator (Watch).app" "/Applications/Simulator (Watch).app" - -# Add a spacer to the left side of the Dock (where the applications are) -#defaults write com.apple.dock persistent-apps -array-add '{tile-data={}; tile-type="spacer-tile";}' -# Add a spacer to the right side of the Dock (where the Trash is) -#defaults write com.apple.dock persistent-others -array-add '{tile-data={}; tile-type="spacer-tile";}' - -# Hot corners -# Possible values: -# 0: no-op -# 2: Mission Control -# 3: Show application windows -# 4: Desktop -# 5: Start screen saver -# 6: Disable screen saver -# 7: Dashboard -# 10: Put display to sleep -# 11: Launchpad -# 12: Notification Center -# Top left screen corner → Mission Control -defaults write com.apple.dock wvous-tl-corner -int 2 -defaults write com.apple.dock wvous-tl-modifier -int 0 -# Top right screen corner → Desktop -defaults write com.apple.dock wvous-tr-corner -int 4 -defaults write com.apple.dock wvous-tr-modifier -int 0 -# Bottom left screen corner → Start screen saver -defaults write com.apple.dock wvous-bl-corner -int 5 -defaults write com.apple.dock wvous-bl-modifier -int 0 - -############################################################################### -# Safari & WebKit # -############################################################################### - -# Privacy: don’t send search queries to Apple -defaults write com.apple.Safari UniversalSearchEnabled -bool false -defaults write com.apple.Safari SuppressSearchSuggestions -bool true - -# Press Tab to highlight each item on a web page -defaults write com.apple.Safari WebKitTabToLinksPreferenceKey -bool true -defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2TabsToLinks -bool true - -# Show the full URL in the address bar (note: this still hides the scheme) -defaults write com.apple.Safari ShowFullURLInSmartSearchField -bool true - -# Set Safari’s home page to `about:blank` for faster loading -defaults write com.apple.Safari HomePage -string "about:blank" - -# Prevent Safari from opening ‘safe’ files automatically after downloading -defaults write com.apple.Safari AutoOpenSafeDownloads -bool false - -# Allow hitting the Backspace key to go to the previous page in history -defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2BackspaceKeyNavigationEnabled -bool true - -# Hide Safari’s bookmarks bar by default -defaults write com.apple.Safari ShowFavoritesBar -bool false - -# Hide Safari’s sidebar in Top Sites -defaults write com.apple.Safari ShowSidebarInTopSites -bool false - -# Disable Safari’s thumbnail cache for History and Top Sites -defaults write com.apple.Safari DebugSnapshotsUpdatePolicy -int 2 - -# Enable Safari’s debug menu -defaults write com.apple.Safari IncludeInternalDebugMenu -bool true - -# Make Safari’s search banners default to Contains instead of Starts With -defaults write com.apple.Safari FindOnPageMatchesWordStartsOnly -bool false - -# Remove useless icons from Safari’s bookmarks bar -defaults write com.apple.Safari ProxiesInBookmarksBar "()" - -# Enable the Develop menu and the Web Inspector in Safari -defaults write com.apple.Safari IncludeDevelopMenu -bool true -defaults write com.apple.Safari WebKitDeveloperExtrasEnabledPreferenceKey -bool true -defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2DeveloperExtrasEnabled -bool true - -# Add a context menu item for showing the Web Inspector in web views -defaults write NSGlobalDomain WebKitDeveloperExtras -bool true - -# Enable continuous spellchecking -defaults write com.apple.Safari WebContinuousSpellCheckingEnabled -bool true -# Disable auto-correct -defaults write com.apple.Safari WebAutomaticSpellingCorrectionEnabled -bool false - -# Disable AutoFill -defaults write com.apple.Safari AutoFillFromAddressBook -bool false -defaults write com.apple.Safari AutoFillPasswords -bool false -defaults write com.apple.Safari AutoFillCreditCardData -bool false -defaults write com.apple.Safari AutoFillMiscellaneousForms -bool false - -# Warn about fraudulent websites -defaults write com.apple.Safari WarnAboutFraudulentWebsites -bool true - -# Disable plug-ins -defaults write com.apple.Safari WebKitPluginsEnabled -bool false -defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2PluginsEnabled -bool false - -# Disable Java -# defaults write com.apple.Safari WebKitJavaEnabled -bool false -# defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2JavaEnabled -bool false - -# Block pop-up windows -defaults write com.apple.Safari WebKitJavaScriptCanOpenWindowsAutomatically -bool false -defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2JavaScriptCanOpenWindowsAutomatically -bool false - -# Disable auto-playing video -#defaults write com.apple.Safari WebKitMediaPlaybackAllowsInline -bool false -#defaults write com.apple.SafariTechnologyPreview WebKitMediaPlaybackAllowsInline -bool false -#defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2AllowsInlineMediaPlayback -bool false -#defaults write com.apple.SafariTechnologyPreview com.apple.Safari.ContentPageGroupIdentifier.WebKit2AllowsInlineMediaPlayback -bool false - -# Enable “Do Not Track” -defaults write com.apple.Safari SendDoNotTrackHTTPHeader -bool true - -# Update extensions automatically -defaults write com.apple.Safari InstallExtensionUpdatesAutomatically -bool true - -############################################################################### -# Mail # -############################################################################### - -# Disable send and reply animations in Mail.app -defaults write com.apple.mail DisableReplyAnimations -bool true -defaults write com.apple.mail DisableSendAnimations -bool true - -# Copy email addresses as `foo@example.com` instead of `Foo Bar ` in Mail.app -defaults write com.apple.mail AddressesIncludeNameOnPasteboard -bool false - -# Add the keyboard shortcut ⌘ + Enter to send an email in Mail.app -defaults write com.apple.mail NSUserKeyEquivalents -dict-add "Send" "@\U21a9" - -# Display emails in threaded mode, sorted by date (oldest at the top) -defaults write com.apple.mail DraftsViewerAttributes -dict-add "DisplayInThreadedMode" -string "yes" -defaults write com.apple.mail DraftsViewerAttributes -dict-add "SortedDescending" -string "yes" -defaults write com.apple.mail DraftsViewerAttributes -dict-add "SortOrder" -string "received-date" - -# Disable inline attachments (just show the icons) -defaults write com.apple.mail DisableInlineAttachmentViewing -bool true - -# Disable automatic spell checking -defaults write com.apple.mail SpellCheckingBehavior -string "NoSpellCheckingEnabled" - -############################################################################### -# Spotlight # -############################################################################### - -# Hide Spotlight tray-icon (and subsequent helper) -#sudo chmod 600 /System/Library/CoreServices/Search.bundle/Contents/MacOS/Search -# Disable Spotlight indexing for any volume that gets mounted and has not yet -# been indexed before. -# Use `sudo mdutil -i off "/Volumes/foo"` to stop indexing any volume. -sudo defaults write /.Spotlight-V100/VolumeConfiguration Exclusions -array "/Volumes" -# Change indexing order and disable some search results -# Yosemite-specific search results (remove them if you are using macOS 10.9 or older): -# MENU_DEFINITION -# MENU_CONVERSION -# MENU_EXPRESSION -# MENU_SPOTLIGHT_SUGGESTIONS (send search queries to Apple) -# MENU_WEBSEARCH (send search queries to Apple) -# MENU_OTHER -defaults write com.apple.spotlight orderedItems -array \ - '{"enabled" = 1;"name" = "APPLICATIONS";}' \ - '{"enabled" = 1;"name" = "SYSTEM_PREFS";}' \ - '{"enabled" = 1;"name" = "DIRECTORIES";}' \ - '{"enabled" = 1;"name" = "PDF";}' \ - '{"enabled" = 1;"name" = "FONTS";}' \ - '{"enabled" = 0;"name" = "DOCUMENTS";}' \ - '{"enabled" = 0;"name" = "MESSAGES";}' \ - '{"enabled" = 0;"name" = "CONTACT";}' \ - '{"enabled" = 0;"name" = "EVENT_TODO";}' \ - '{"enabled" = 0;"name" = "IMAGES";}' \ - '{"enabled" = 0;"name" = "BOOKMARKS";}' \ - '{"enabled" = 0;"name" = "MUSIC";}' \ - '{"enabled" = 0;"name" = "MOVIES";}' \ - '{"enabled" = 0;"name" = "PRESENTATIONS";}' \ - '{"enabled" = 0;"name" = "SPREADSHEETS";}' \ - '{"enabled" = 0;"name" = "SOURCE";}' - # '{"enabled" = 0;"name" = "MENU_DEFINITION";}' \ - # '{"enabled" = 0;"name" = "MENU_OTHER";}' \ - # '{"enabled" = 0;"name" = "MENU_CONVERSION";}' \ - # '{"enabled" = 0;"name" = "MENU_EXPRESSION";}' \ - # '{"enabled" = 0;"name" = "MENU_WEBSEARCH";}' \ - # '{"enabled" = 0;"name" = "MENU_SPOTLIGHT_SUGGESTIONS";}' -# Load new settings before rebuilding the index -killall mds > /dev/null 2>&1 -# Make sure indexing is enabled for the main volume -sudo mdutil -i on / > /dev/null -# Rebuild the index from scratch -sudo mdutil -E / > /dev/null - -############################################################################### -# Terminal & iTerm 2 # -############################################################################### - -# Only use UTF-8 in Terminal.app -defaults write com.apple.terminal StringEncodings -array 4 - -# Enable “focus follows mouse” for Terminal.app and all X11 apps -# i.e. hover over a window and start typing in it without clicking first -#defaults write com.apple.terminal FocusFollowsMouse -bool true -#defaults write org.x.X11 wm_ffm -bool true - -# Enable Secure Keyboard Entry in Terminal.app -# See: https://security.stackexchange.com/a/47786/8918 -defaults write com.apple.terminal SecureKeyboardEntry -bool true - -# Disable the annoying line marks -defaults write com.apple.Terminal ShowLineMarks -int 0 - -# Install the Solarized Dark theme for iTerm -# open "${HOME}/init/Solarized Dark.itermcolors" - -# Don’t display the annoying prompt when quitting iTerm -defaults write com.googlecode.iterm2 PromptOnQuit -bool false - -############################################################################### -# Time Machine # -############################################################################### - -# Prevent Time Machine from prompting to use new hard drives as backup volume -defaults write com.apple.TimeMachine DoNotOfferNewDisksForBackup -bool true - -# Disable local Time Machine backups -hash tmutil &> /dev/null && sudo tmutil disablelocal - -############################################################################### -# Activity Monitor # -############################################################################### - -# Show the main window when launching Activity Monitor -defaults write com.apple.ActivityMonitor OpenMainWindow -bool true - -# Visualize CPU usage in the Activity Monitor Dock icon -defaults write com.apple.ActivityMonitor IconType -int 5 - -# Show all processes in Activity Monitor -defaults write com.apple.ActivityMonitor ShowCategory -int 0 - -# Sort Activity Monitor results by CPU usage -defaults write com.apple.ActivityMonitor SortColumn -string "CPUUsage" -defaults write com.apple.ActivityMonitor SortDirection -int 0 - -############################################################################### -# Address Book, Dashboard, iCal, TextEdit, and Disk Utility # -############################################################################### - -# Enable the debug menu in Address Book -defaults write com.apple.addressbook ABShowDebugMenu -bool true - -# Enable Dashboard dev mode (allows keeping widgets on the desktop) -defaults write com.apple.dashboard devmode -bool true - -# Enable the debug menu in iCal (pre-10.8) -defaults write com.apple.iCal IncludeDebugMenu -bool true - -# 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 - -# Enable the debug menu in Disk Utility -defaults write com.apple.DiskUtility DUDebugMenuEnabled -bool true -defaults write com.apple.DiskUtility advanced-image-options -bool true - -# Auto-play videos when opened with QuickTime Player -defaults write com.apple.QuickTimePlayerX MGPlayMovieOnOpen -bool true - -############################################################################### -# Mac App Store # -############################################################################### - -# Enable the WebKit Developer Tools in the Mac App Store -defaults write com.apple.appstore WebKitDeveloperExtras -bool true - -# Enable Debug Menu in the Mac App Store -defaults write com.apple.appstore ShowDebugMenu -bool true - -# Enable the automatic update check -defaults write com.apple.SoftwareUpdate AutomaticCheckEnabled -bool true - -# Check for software updates daily, not just once per week -defaults write com.apple.SoftwareUpdate ScheduleFrequency -int 1 - -# Download newly available updates in background -defaults write com.apple.SoftwareUpdate AutomaticDownload -int 1 - -# Install System data files & security updates -defaults write com.apple.SoftwareUpdate CriticalUpdateInstall -int 1 - -# Automatically download apps purchased on other Macs -defaults write com.apple.SoftwareUpdate ConfigDataInstall -int 1 - -# Turn on app auto-update -defaults write com.apple.commerce AutoUpdate -bool true - -# Allow the App Store to reboot machine on macOS updates -defaults write com.apple.commerce AutoUpdateRestartRequired -bool true - -############################################################################### -# Photos # -############################################################################### - -# Prevent Photos from opening automatically when devices are plugged in -defaults -currentHost write com.apple.ImageCapture disableHotPlug -bool true - -############################################################################### -# Messages # -############################################################################### - -# Disable automatic emoji substitution (i.e. use plain text smileys) -defaults write com.apple.messageshelper.MessageController SOInputLineSettings -dict-add "automaticEmojiSubstitutionEnablediMessage" -bool false - -# Disable smart quotes as it’s annoying for messages that contain code -# defaults write com.apple.messageshelper.MessageController SOInputLineSettings -dict-add "automaticQuoteSubstitutionEnabled" -bool false - -# Disable continuous spell checking -defaults write com.apple.messageshelper.MessageController SOInputLineSettings -dict-add "continuousSpellCheckingEnabled" -bool false - -############################################################################### -# Google Chrome & Google Chrome Canary # -############################################################################### - -# Disable the all too sensitive backswipe on trackpads -defaults write com.google.Chrome AppleEnableSwipeNavigateWithScrolls -bool false -defaults write com.google.Chrome.canary AppleEnableSwipeNavigateWithScrolls -bool false - -# Disable the all too sensitive backswipe on Magic Mouse -defaults write com.google.Chrome AppleEnableMouseSwipeNavigateWithScrolls -bool false -defaults write com.google.Chrome.canary AppleEnableMouseSwipeNavigateWithScrolls -bool false - -# Use the system-native print preview dialog -defaults write com.google.Chrome DisablePrintPreview -bool true -defaults write com.google.Chrome.canary DisablePrintPreview -bool true - -# Expand the print dialog by default -defaults write com.google.Chrome PMPrintingExpandedStateForPrint2 -bool true -defaults write com.google.Chrome.canary PMPrintingExpandedStateForPrint2 -bool true - -############################################################################### -# SizeUp.app # -############################################################################### - -# Start SizeUp at login -# defaults write com.irradiatedsoftware.SizeUp StartAtLogin -bool true - -# Don’t show the preferences window on next start -# defaults write com.irradiatedsoftware.SizeUp ShowPrefsOnNextStart -bool false - -############################################################################### -# Sublime Text # -############################################################################### - -# Install Sublime Text settings -# cp -r init/Preferences.sublime-settings ~/Library/Application\ Support/Sublime\ Text*/Packages/User/Preferences.sublime-settings 2> /dev/null - -############################################################################### -# Spectacle.app # -############################################################################### - -# Set up my preferred keyboard shortcuts -cp -r init/spectacle.json ~/Library/Application\ Support/Spectacle/Shortcuts.json 2> /dev/null - -############################################################################### -# Transmission.app # -############################################################################### - -# Use `~/Documents/Torrents` to store incomplete downloads -defaults write org.m0k.transmission UseIncompleteDownloadFolder -bool true -defaults write org.m0k.transmission IncompleteDownloadFolder -string "${HOME}/Documents/Torrents" - -# Use `~/Downloads` to store completed downloads -defaults write org.m0k.transmission DownloadLocationConstant -bool true - -# Don’t prompt for confirmation before downloading -defaults write org.m0k.transmission DownloadAsk -bool false -defaults write org.m0k.transmission MagnetOpenAsk -bool false - -# Don’t prompt for confirmation before removing non-downloading active transfers -defaults write org.m0k.transmission CheckRemoveDownloading -bool true - -# Trash original torrent files -defaults write org.m0k.transmission DeleteOriginalTorrent -bool true - -# Hide the donate message -defaults write org.m0k.transmission WarningDonate -bool false -# Hide the legal disclaimer -defaults write org.m0k.transmission WarningLegal -bool false - -# IP block list. -# Source: https://giuliomac.wordpress.com/2014/02/19/best-blocklist-for-transmission/ -defaults write org.m0k.transmission BlocklistNew -bool true -defaults write org.m0k.transmission BlocklistURL -string "http://john.bitsurge.net/public/biglist.p2p.gz" -defaults write org.m0k.transmission BlocklistAutoUpdate -bool true - -# Randomize port on launch -defaults write org.m0k.transmission RandomPort -bool true - -############################################################################### -# Kill affected applications # -############################################################################### - -for app in "Activity Monitor" \ - "Address Book" \ - "Calendar" \ - "cfprefsd" \ - "Contacts" \ - "Dock" \ - "Finder" \ - "Google Chrome" \ - "Mail" \ - "Messages" \ - "Photos" \ - "Safari" \ - "Spectacle" \ - "SystemUIServer" \ - "Terminal" \ - "Transmission" \ - "iCal"; do - killall "${app}" &> /dev/null -done -echo "Done. Note that some of these changes require a logout/restart to take effect." From 2ec7b5ba986e4550c3935c8c9d198b633d0d8295 Mon Sep 17 00:00:00 2001 From: Anders Emil Pouplier Date: Mon, 11 May 2026 10:38:00 +0200 Subject: [PATCH 139/144] Good stuff --- setup/Brewfile => Brewfile | 20 ++++++++++++-------- Rakefile | 13 +------------ gitconfig | 12 +++++++++++- gitignore | 4 ++++ tmux.conf | 4 ++++ zsh/aliases | 4 ++++ zsh/functions | 2 ++ zshrc | 26 +++++++++++++++++++------- 8 files changed, 57 insertions(+), 28 deletions(-) rename setup/Brewfile => Brewfile (70%) diff --git a/setup/Brewfile b/Brewfile similarity index 70% rename from setup/Brewfile rename to Brewfile index c07a107ca2..6c80e6e25d 100644 --- a/setup/Brewfile +++ b/Brewfile @@ -1,7 +1,3 @@ -tap "homebrew/cask" -tap "adoptopenjdk/openjdk" -cask_args appdir: "/Applications" - cask "google-chrome" cask "flux" cask "charles" @@ -9,13 +5,19 @@ cask "spotify" cask "visual-studio-code" cask "fantastical" cask "intellij-idea-ce" -cask "spectacle" cask "docker" +cask "rectangle" cask "microsoft-teams" cask "iterm2" -cask "adoptopenjdk8" cask "figma" +cask "openvpn-connect" +cask "visual-studio-code" +cask "messenger" +cask "backblaze" +cask "alfred" +brew "flyway" +brew "just" brew "mas" brew "wget" brew "vim" @@ -40,10 +42,12 @@ brew "postgresql@14" brew "redis" brew "java11" -mas "Spark", id: 1176895641 mas "1Password", id: 1333542190 -mas "WhatsApp Desktop", id: 1147396723 +mas "WhatsApp Desktop", id: 310633997 mas "Things 3", id: 904280696 mas "Bear - Markdown Notes", id: 1091189122 mas "Harvest", id: 506189836 mas "Slack", id: 803453959 +mas "Spark", id: 6445813049 +/* mas "Fantastical", id: 975937182 */ +mas "Microsoft To Do", id: 1274495053 diff --git a/Rakefile b/Rakefile index c5488c0df4..4ce39e749d 100644 --- a/Rakefile +++ b/Rakefile @@ -5,7 +5,7 @@ task :install do replace_all = false Dir['*'].each do |file| next if %w[Rakefile README.rdoc LICENSE id_dsa.pub].include? file - + if File.exist?(File.join(ENV['HOME'], ".#{file}")) if replace_all replace_file(file) @@ -27,17 +27,6 @@ task :install do link_file(file) end end - - # Handle ssh pubkey on its own - puts "Linking public ssh key" - system %Q{rm "$HOME/.ssh/id_dsa.pub"} - system %Q{ln -s "$PWD/id_dsa.pub" "$HOME/.ssh/id_dsa.pub"} - - # Need to do this to make vim use RVM's ruby version - puts "Moving zshenv to zshrc" - system %Q{sudo mv /etc/zshenv /etc/zshrc} - - system %Q{mkdir ~/.tmp} end def replace_file(file) diff --git a/gitconfig b/gitconfig index b41c04e751..9304efcbb2 100644 --- a/gitconfig +++ b/gitconfig @@ -1,11 +1,17 @@ [user] name = Anders Emil Pouplier email = aemilnielsen@gmail.com + signingkey = /Users/andersemil/.ssh/id_rsa +# +# [includeIf "gitdir:~/code/kambi"] +# name = Anders Emil Pouplier +# email = anders@shapegames.com +# signingkey = /Users/andersemil/.ssh/id_kambi_github + [alias] ap = add -p cm = commit -m remove-merged = !sh -c 'git checkout master && git branch --merged | egrep -v \"production|master\" | xargs -L1 git delete-branch' - remove-merged-v2 = !sh -c 'git checkout feature/backend-v2 && git branch --merged | egrep -v \"production|backend-v2|master|modules\" | xargs -L1 git delete-branch' tmp = commit -a -m 'tmp' wip = commit -a -m 'wip' co = checkout @@ -46,3 +52,7 @@ compactionHeuristic = on [pull] ff = only +[gpg] + format = ssh +[commit] + gpgsign = true diff --git a/gitignore b/gitignore index 2b638f24b0..bb57adffd9 100644 --- a/gitignore +++ b/gitignore @@ -15,3 +15,7 @@ Guardfile out load-env .vscode +__pycache__ +# cached-foggles +# import-cli/data +.github/instructions/* diff --git a/tmux.conf b/tmux.conf index edd942b0ff..29da1ddcc4 100644 --- a/tmux.conf +++ b/tmux.conf @@ -28,6 +28,10 @@ set -g renumber-windows on # Start window numbering at 1 set -g base-index 1 +# Allow notifications to passthrough +set -g allow-passthrough on + + # This is to make some commands (such as terminal-notifier) to work inside tmux # https://github.com/julienXX/terminal-notifier/issues/115#issuecomment-104214742 set -g default-command "which reattach-to-user-namespace > /dev/null && reattach-to-user-namespace -l $SHELL || $SHELL -l" diff --git a/zsh/aliases b/zsh/aliases index d68fec00b7..de5973bb02 100644 --- a/zsh/aliases +++ b/zsh/aliases @@ -10,6 +10,7 @@ alias jsonvim='prettyjson | vim -c "set syntax=json" -' alias jsonless='prettyjson | less' alias cleardns="sudo killall -HUP mDNSResponder" alias jobdone="terminal-notifier -message \"Job's done\"" +alias csvtojson="python -c 'import csv, json, sys; print(json.dumps([dict(r) for r in csv.DictReader(sys.stdin)]))'" # Vim alias v='vim' @@ -30,6 +31,7 @@ alias bake='bundle exec rake' alias be='bundle exec' alias bu='bundle update' alias bus='bundle update --source=' +alias remove_quotes="sed -r 's/\"//g'" # Rails alias devlog="tail -f log/development.log" @@ -109,3 +111,5 @@ alias jt="./gradlew test --parallel" alias jc="./gradlew clean" alias tpush='./gradlew test --parallel && gpcb' alias kotlinlib="gradle init --type kotlin-library && rm -rf .gradle gradle && rm gradlew* && rm settings.gradle.kts .gitignore" + + diff --git a/zsh/functions b/zsh/functions index e4fd419d69..731917d0e7 100644 --- a/zsh/functions +++ b/zsh/functions @@ -108,3 +108,5 @@ function rebase_all { git rebase master || git rebase --abort done } + +function killport { lsof -ti:$1 | xargs kill; } diff --git a/zshrc b/zshrc index 11cbec47b2..5dfedf6785 100644 --- a/zshrc +++ b/zshrc @@ -2,7 +2,7 @@ export ZSH=$HOME/.oh-my-zsh # ZSH Theme -ZSH_THEME="anderslime" +ZSH_THEME="awesomepanda" # oh-my-zsh plugins plugins=( @@ -42,13 +42,14 @@ source $HOME/.dotfiles/zsh/aliases source $HOME/.dotfiles/zsh/functions # Java -export JAVA_8_HOME=$(/usr/libexec/java_home -v1.8) -export JAVA_11_HOME=$(/usr/libexec/java_home -v11) -alias java8='export JAVA_HOME=$JAVA_8_HOME' -alias java11='export JAVA_HOME=$JAVA_11_HOME' +# export JAVA_8_HOME=$(/usr/libexec/java_home -v1.8) +export JAVA_21_HOME=$(/usr/libexec/java_home -v21) +# alias java8='export JAVA_HOME=$JAVA_8_HOME' +# alias java11='export JAVA_HOME=$JAVA_11_HOME' +alias java21='export JAVA_HOME=$JAVA_21_HOME' # Default to java8 -java8 +# java8 # NVM # export NVM_DIR="$HOME/.nvm" @@ -66,12 +67,23 @@ export PATH=$PATH:~/code/shp-games-infrastructure/bin/tools:~/code/shp-games-inf export PATH="/Users/andersemil/.local/bin:$PATH" # Shape Games CLI -eval "$(/Users/andersemil/code/shp-games-backend-cli/bin/sg init -)" +# eval "$(/Users/andersemil/code/shp-games-backend-cli/bin/sg init -)" # AWS export AWS_SHAPE_GAMES_USER=anders export AWS_DEFAULT_SSO_REGION=eu-west-1 export AWS_DEFAULT_SSO_START_URL=https://shapegames.awsapps.com/start +bindkey "^[[1;3D" backward-word +bindkey "^[[1;3C" forward-word + eval "$(nodenv init -)" +export PATH="/opt/homebrew/opt/postgresql@17/bin:$PATH" + +# bun completions +[ -s "/Users/andersemil/.bun/_bun" ] && source "/Users/andersemil/.bun/_bun" + +# bun +export BUN_INSTALL="$HOME/.bun" +export PATH="$BUN_INSTALL/bin:$PATH" From 27041eec00d9caf8c42c515c895b95c0c2b50708 Mon Sep 17 00:00:00 2001 From: Anders Emil Pouplier Date: Mon, 11 May 2026 11:02:28 +0200 Subject: [PATCH 140/144] Updated .dotfiles --- Brewfile | 95 ++-- CLAUDE.md | 42 ++ README.md | 47 +- setup/Brewfile.lock.json | 1006 -------------------------------------- setup/macos | 23 - zsh/aliases | 50 +- zsh/functions | 50 -- zshrc | 43 +- 8 files changed, 142 insertions(+), 1214 deletions(-) create mode 100644 CLAUDE.md delete mode 100644 setup/Brewfile.lock.json delete mode 100755 setup/macos diff --git a/Brewfile b/Brewfile index 6c80e6e25d..d5f029d049 100644 --- a/Brewfile +++ b/Brewfile @@ -1,53 +1,72 @@ -cask "google-chrome" -cask "flux" +# Casks — GUI apps +cask "alfred" +cask "backblaze" cask "charles" -cask "spotify" -cask "visual-studio-code" +cask "chatgpt" +cask "claude" +cask "codex" +cask "copilot-cli" +cask "cursor" +cask "docker-desktop" +cask "expressvpn" cask "fantastical" +cask "figma" +cask "flux-app" +cask "google-chrome" cask "intellij-idea-ce" -cask "docker" -cask "rectangle" -cask "microsoft-teams" cask "iterm2" -cask "figma" +cask "licecap" +cask "ngrok" +cask "obsidian" cask "openvpn-connect" +cask "proxyman" +cask "rectangle" +cask "spotify" cask "visual-studio-code" -cask "messenger" -cask "backblaze" -cask "alfred" +cask "wispr-flow" +# Brews — CLI tools +brew "awscli" +brew "ffmpeg" brew "flyway" +brew "gh" +brew "gifsicle" +brew "git" +brew "git-extras" +brew "git-lfs" +brew "gradle" +brew "grep" +brew "httpie" +brew "jd" +brew "jq" brew "just" +brew "k6" brew "mas" -brew "wget" -brew "vim" -brew "tmux" -brew "tmuxinator" -brew "nodeenv" -brew "zsh" brew "nodenv" -brew "grep" +brew "ollama" +brew "openjdk@11" brew "openssh" -brew "httpie" -brew "jq" -brew "git" -brew "git-lfs" -brew "gradle" -brew "python" -brew "hub" -brew "git-extras" -brew "awscli" -brew "docker-compose" -brew "postgresql@14" +brew "pipx" +brew "postgresql@17" brew "redis" -brew "java11" +brew "ripgrep" +brew "terminal-notifier" +brew "the_silver_searcher" +brew "tmux" +brew "tmuxinator" +brew "uv" +brew "vim" +brew "websocat" +brew "wget" +brew "yarn" +brew "zsh" +# Mac App Store mas "1Password", id: 1333542190 -mas "WhatsApp Desktop", id: 310633997 -mas "Things 3", id: 904280696 -mas "Bear - Markdown Notes", id: 1091189122 -mas "Harvest", id: 506189836 -mas "Slack", id: 803453959 -mas "Spark", id: 6445813049 -/* mas "Fantastical", id: 975937182 */ -mas "Microsoft To Do", id: 1274495053 +mas "WhatsApp", id: 310633997 +mas "Things 3", id: 904280696 +mas "Bear", id: 1091189122 +mas "Harvest", id: 506189836 +mas "Slack", id: 803453959 +mas "Spark", id: 6445813049 +mas "Keynote", id: 409183694 diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000000..72dcdf2f36 --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,42 @@ +# CLAUDE.md + +This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. + +## Repository purpose + +Personal macOS dotfiles. Originally forked from Ben Orenstein's (r00k) dotfiles. Contains shell, editor, git, and tmux configuration plus a Brewfile and a tiny macOS setup script. + +## Layout & install model + +This repo lives at `~/code/dotfiles`. `~/.dotfiles` is a symlink to it, and individual dotfiles in `$HOME` (e.g. `~/.zshrc`, `~/.vimrc`, `~/.gitconfig`, `~/.tmux.conf`, `~/.bin`, `~/.oh-my-zsh`) are symlinks back into this repo. Both paths therefore show identical contents. + +`rake install` (see `Rakefile`) is the installer: it iterates every top-level entry and creates `~/.` → `$PWD/` symlinks, prompting before overwriting. There is no uninstall task — clean up by removing the symlinks manually. + +Consequence for edits: changing a file here changes the live config immediately. Re-run `source ~/.zshrc` (`so` alias) after editing zsh files. Run `` ` `` + `r` inside tmux to reload `tmux.conf`. + +## Key files + +- `zshrc` — entry point. Sources `zsh/aliases` and `zsh/functions`, plus `~/.private-dotfiles/shell-init` if present (private repo at `~/code/private-dotfiles`, symlinked as `~/.private-dotfiles`, for secrets and machine-specific env). Uses oh-my-zsh with theme `awesomepanda` and plugins `git docker aws`. +- `zsh/aliases`, `zsh/functions` — heavy use of short git aliases (`g`, `gs`, `gp`, `gpcb`, `grom`, …). Prefer extending these over adding new shell scripts. +- `zsh/func/` — autoloaded zsh functions (prompt themes, `awsso`, `zgitinit`). +- `vimrc` + `vim/` — Vim config; plugins managed by **Vundle** (not vim-plug). After editing the plugin list, run `:PluginInstall` in vim. Vundle itself is not vendored — bootstrap with `git clone https://github.com/gmarik/Vundle.vim.git ~/.vim/bundle/Vundle.vim`. +- `oh-my-zsh/` — full vendored copy of the oh-my-zsh repo, not a submodule. Don't edit files inside it; put customizations in `oh-my-zsh/custom/` or in `zsh/`. +- `gitconfig` — signs commits via SSH key (`gpg.format = ssh`, `commit.gpgsign = true`); `pull.ff = only`; rich `git l`/`git r`/`git hp` aliases backed by `githelpers`. +- `Brewfile` — `brew bundle --file=Brewfile` to install. +- `bin/` — small one-off scripts, exposed on `$PATH` via the `~/.bin` symlink. + +## Common commands + +- Install/refresh symlinks: `rake install` (from repo root). +- Install Homebrew packages: `brew bundle --file=Brewfile`. +- Reload shell: `so` (alias for `source ~/.zshrc`). +- Jump to repo: `dot` (alias for `cd ~/.dotfiles`). +- Edit aliases quickly: `aliases` (opens `zsh/aliases` in vim). + +There is no test suite, linter, or CI — this is config, not code. + +## Conventions when editing + +- Adding shell aliases or functions: put them in `zsh/aliases` or `zsh/functions`. Don't create new top-level files unless they need to land in `$HOME` as a dotfile (the Rakefile will symlink every top-level entry). +- Secrets, work-specific env vars, and per-machine config belong in `~/.private-dotfiles/shell-init`, not here. The public `zshrc` only sources it if present. +- The `master` branch is the only branch; commit directly. Commits are SSH-signed automatically via `gitconfig`. diff --git a/README.md b/README.md index 65207fa124..2348e45a7b 100644 --- a/README.md +++ b/README.md @@ -1,18 +1,39 @@ -# Ben Orenstein's dot files +# Dotfiles -These are config files to set up a system the way I like it. +Personal macOS dotfiles (Apple Silicon). Shell, vim, git, tmux, and a `Brewfile`. -Vim-users will likely find useful stuff in my [vimrc](vimrc), and also my [Ruby snippets](vim/snippets/ruby.snippets). +## Install on a fresh Mac -I'm also a pretty aggressive aliaser. You might find a few you like in [zsh/aliases](zsh/aliases). +1. Install Xcode Command Line Tools (`xcode-select --install`) and restore SSH keys to `~/.ssh`. +2. Clone the repo and create the `~/.dotfiles` symlink the rest of the config expects: + ```sh + mkdir -p ~/code + git clone git@github.com:/dotfiles.git ~/code/dotfiles + ln -s ~/code/dotfiles ~/.dotfiles + ``` +3. Symlink every dotfile into `$HOME`: + ```sh + cd ~/.dotfiles && rake install + ``` +4. Install Homebrew, then the bundle: + ```sh + /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" + brew bundle --file=~/.dotfiles/Brewfile + ``` + Sign in to the App Store first if `mas` entries fail, then re-run `brew bundle`. +5. (Optional) Restore the private repo for secrets and work-specific env: + ```sh + git clone git@github.com:/private-dotfiles.git ~/code/private-dotfiles + ln -s ~/code/private-dotfiles ~/.private-dotfiles + ``` + `zshrc` sources `~/.private-dotfiles/shell-init` automatically when present. +6. Vim plugins (Vundle): + ```sh + git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim + vim +PluginInstall +qall + ``` -## Installation +## Notes - git clone git://github.com/r00k/dotfiles ~/.dotfiles - cd ~/.dotfiles - rake install - - Vim plugins are managed through vundle. You'll need to install vundle to get them. - - git clone https://github.com/gmarik/Vundle.vim.git ~/.vim/bundle/Vundle.vim - Run :BundleInstall in vim. +- Single branch (`master`), commits are SSH-signed (see `gitconfig`). +- Editing files in this repo updates the live config immediately — they're symlinked into `$HOME`. Run `so` (alias for `source ~/.zshrc`) after editing zsh files. diff --git a/setup/Brewfile.lock.json b/setup/Brewfile.lock.json deleted file mode 100644 index b2ae76f389..0000000000 --- a/setup/Brewfile.lock.json +++ /dev/null @@ -1,1006 +0,0 @@ -{ - "entries": { - "tap": { - "homebrew/cask": { - "revision": "830111e1e4e6985bb1e75ecd626793e8c49ed22b" - }, - "adoptopenjdk/openjdk": { - "revision": "27915e4ab3856595a8b46d1fd3b6c379c1f02210" - } - }, - "cask": { - "google-chrome": { - "version": "105.0.5195.52", - "options": { - "full_name": "google-chrome", - "args": { - "appdir": "/Applications" - } - } - }, - "flux": { - "version": "42.1", - "options": { - "full_name": "flux", - "args": { - "appdir": "/Applications" - } - } - }, - "charles": { - "version": "4.6.2", - "options": { - "full_name": "charles", - "args": { - "appdir": "/Applications" - } - } - }, - "spotify": { - "version": "1.1.92.647,a4397eb7,7", - "options": { - "full_name": "spotify", - "args": { - "appdir": "/Applications" - } - } - }, - "visual-studio-code": { - "version": "1.70.2", - "options": { - "full_name": "visual-studio-code", - "args": { - "appdir": "/Applications" - } - } - }, - "fantastical": { - "version": "3.6.10,1478", - "options": { - "full_name": "fantastical", - "args": { - "appdir": "/Applications" - } - } - }, - "intellij-idea-ce": { - "version": "2022.2.1,222.3739.54", - "options": { - "full_name": "intellij-idea-ce", - "args": { - "appdir": "/Applications" - } - } - }, - "spectacle": { - "version": "1.2,672", - "options": { - "full_name": "spectacle", - "args": { - "appdir": "/Applications" - } - } - }, - "docker": { - "version": "4.11.1,84025", - "options": { - "full_name": "docker", - "args": { - "appdir": "/Applications" - } - } - }, - "microsoft-teams": { - "version": "1.5.00.22362", - "options": { - "full_name": "microsoft-teams", - "args": { - "appdir": "/Applications" - } - } - }, - "iterm2": { - "version": "3.4.16", - "options": { - "full_name": "iterm2", - "args": { - "appdir": "/Applications" - } - } - }, - "adoptopenjdk8": { - "version": "8,292:b10", - "options": { - "full_name": "adoptopenjdk8", - "args": { - "appdir": "/Applications" - } - } - } - }, - "brew": { - "mas": { - "version": "1.8.6", - "bottle": { - "rebuild": 0, - "root_url": "https://ghcr.io/v2/homebrew/core", - "files": { - "arm64_monterey": { - "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/mas/blobs/sha256:379d46e2657be295321f1603dc1df28130ea0b5b264ceb192a9ba488d77c7a98", - "sha256": "379d46e2657be295321f1603dc1df28130ea0b5b264ceb192a9ba488d77c7a98" - }, - "arm64_big_sur": { - "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/mas/blobs/sha256:918a1484de106940f7bebc936e1ded87d7b65652054b09204887ad0651937ec4", - "sha256": "918a1484de106940f7bebc936e1ded87d7b65652054b09204887ad0651937ec4" - }, - "monterey": { - "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/mas/blobs/sha256:6b313f2f66d028cb7782c108d6e502ce73ccb9c08fac3bece0b057fcce5c4689", - "sha256": "6b313f2f66d028cb7782c108d6e502ce73ccb9c08fac3bece0b057fcce5c4689" - }, - "big_sur": { - "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/mas/blobs/sha256:50b50f51219143fcb69c730b52b74011a76104f66348ea727d0200f7b375ae25", - "sha256": "50b50f51219143fcb69c730b52b74011a76104f66348ea727d0200f7b375ae25" - }, - "catalina": { - "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/mas/blobs/sha256:d241d3b9156b033f3d2c31684a44de726297e07fd9bd5e3ccc4c36e4f1c3baf3", - "sha256": "d241d3b9156b033f3d2c31684a44de726297e07fd9bd5e3ccc4c36e4f1c3baf3" - } - } - } - }, - "wget": { - "version": "1.21.3", - "bottle": { - "rebuild": 0, - "root_url": "https://ghcr.io/v2/homebrew/core", - "files": { - "arm64_monterey": { - "cellar": "/opt/homebrew/Cellar", - "url": "https://ghcr.io/v2/homebrew/core/wget/blobs/sha256:fc83eec77acee50d2d7ce3bb0cca08d80acccc148e909921de42e57dd5fc7f3d", - "sha256": "fc83eec77acee50d2d7ce3bb0cca08d80acccc148e909921de42e57dd5fc7f3d" - }, - "arm64_big_sur": { - "cellar": "/opt/homebrew/Cellar", - "url": "https://ghcr.io/v2/homebrew/core/wget/blobs/sha256:a0c491ae7de2b722320efa94704567e36f3a0bd04bd946b1431ecbd1bcbfb899", - "sha256": "a0c491ae7de2b722320efa94704567e36f3a0bd04bd946b1431ecbd1bcbfb899" - }, - "monterey": { - "cellar": "/usr/local/Cellar", - "url": "https://ghcr.io/v2/homebrew/core/wget/blobs/sha256:aa706c58ae7e97abf91be56e785335aff058c431f9973dffac06aacbea558497", - "sha256": "aa706c58ae7e97abf91be56e785335aff058c431f9973dffac06aacbea558497" - }, - "big_sur": { - "cellar": "/usr/local/Cellar", - "url": "https://ghcr.io/v2/homebrew/core/wget/blobs/sha256:b90e0d7a4319ccdb18ee0c2ed097e9cddeeceaaf70dc0a785d96b4ba69dbeb54", - "sha256": "b90e0d7a4319ccdb18ee0c2ed097e9cddeeceaaf70dc0a785d96b4ba69dbeb54" - }, - "catalina": { - "cellar": "/usr/local/Cellar", - "url": "https://ghcr.io/v2/homebrew/core/wget/blobs/sha256:2aadef5aae81ecdd7e28bc9a776adcf0eaa393edae904e0c69740a442b7a3e69", - "sha256": "2aadef5aae81ecdd7e28bc9a776adcf0eaa393edae904e0c69740a442b7a3e69" - }, - "x86_64_linux": { - "cellar": "/home/linuxbrew/.linuxbrew/Cellar", - "url": "https://ghcr.io/v2/homebrew/core/wget/blobs/sha256:b6f20b1f4da03b9ee6a42f9305ee015eae7f80afea198e405c0b775eb2333de1", - "sha256": "b6f20b1f4da03b9ee6a42f9305ee015eae7f80afea198e405c0b775eb2333de1" - } - } - } - }, - "vim": { - "version": "9.0.0300", - "bottle": { - "rebuild": 0, - "root_url": "https://ghcr.io/v2/homebrew/core", - "files": { - "arm64_monterey": { - "cellar": "/opt/homebrew/Cellar", - "url": "https://ghcr.io/v2/homebrew/core/vim/blobs/sha256:ea1ac0517cf598da2b22b8324da9f2c80ec3b10581befbd19f5ac00b419b34d7", - "sha256": "ea1ac0517cf598da2b22b8324da9f2c80ec3b10581befbd19f5ac00b419b34d7" - }, - "arm64_big_sur": { - "cellar": "/opt/homebrew/Cellar", - "url": "https://ghcr.io/v2/homebrew/core/vim/blobs/sha256:631000dad7f168163ebfea0c4a18959f86a2a98b9056ed0fe558151fab65fa42", - "sha256": "631000dad7f168163ebfea0c4a18959f86a2a98b9056ed0fe558151fab65fa42" - }, - "monterey": { - "cellar": "/usr/local/Cellar", - "url": "https://ghcr.io/v2/homebrew/core/vim/blobs/sha256:b0b5d44769d9d928c3ef7f5b59f4db01df314284e4993dd94d3656a9a45b098e", - "sha256": "b0b5d44769d9d928c3ef7f5b59f4db01df314284e4993dd94d3656a9a45b098e" - }, - "big_sur": { - "cellar": "/usr/local/Cellar", - "url": "https://ghcr.io/v2/homebrew/core/vim/blobs/sha256:a37770aa59b3e7a8fd17fd9125e00d58d94268007d889ee5a87d4ef1b6714b9c", - "sha256": "a37770aa59b3e7a8fd17fd9125e00d58d94268007d889ee5a87d4ef1b6714b9c" - }, - "catalina": { - "cellar": "/usr/local/Cellar", - "url": "https://ghcr.io/v2/homebrew/core/vim/blobs/sha256:4bdc4241493954e44e471aac507ce1a09e6d2c6c49891e800bafef1708e9c5a0", - "sha256": "4bdc4241493954e44e471aac507ce1a09e6d2c6c49891e800bafef1708e9c5a0" - }, - "x86_64_linux": { - "cellar": "/home/linuxbrew/.linuxbrew/Cellar", - "url": "https://ghcr.io/v2/homebrew/core/vim/blobs/sha256:d3d17310d60dc79a615610defe06296ee5182654514f8c0a4c72fb3d342f8446", - "sha256": "d3d17310d60dc79a615610defe06296ee5182654514f8c0a4c72fb3d342f8446" - } - } - } - }, - "tmux": { - "version": "3.3a", - "bottle": { - "rebuild": 1, - "root_url": "https://ghcr.io/v2/homebrew/core", - "files": { - "arm64_monterey": { - "cellar": ":any", - "url": "https://ghcr.io/v2/homebrew/core/tmux/blobs/sha256:0ca53c250a3e70d97ca511edd13f2d16660e4e94a41465a8708306e03b231b76", - "sha256": "0ca53c250a3e70d97ca511edd13f2d16660e4e94a41465a8708306e03b231b76" - }, - "arm64_big_sur": { - "cellar": ":any", - "url": "https://ghcr.io/v2/homebrew/core/tmux/blobs/sha256:89a9edfec5e665df5b9e2e0f47e1721c1e074725846705819042a9c691683981", - "sha256": "89a9edfec5e665df5b9e2e0f47e1721c1e074725846705819042a9c691683981" - }, - "monterey": { - "cellar": ":any", - "url": "https://ghcr.io/v2/homebrew/core/tmux/blobs/sha256:c0489c25fa963b14fd5d3c53eb50f681e85bb7a5716883afe77c1efbdea7c882", - "sha256": "c0489c25fa963b14fd5d3c53eb50f681e85bb7a5716883afe77c1efbdea7c882" - }, - "big_sur": { - "cellar": ":any", - "url": "https://ghcr.io/v2/homebrew/core/tmux/blobs/sha256:85eb7ec949aad04ad0a550a4a8151bc4453e229d813fda0be724f17fd8cf40e1", - "sha256": "85eb7ec949aad04ad0a550a4a8151bc4453e229d813fda0be724f17fd8cf40e1" - }, - "catalina": { - "cellar": ":any", - "url": "https://ghcr.io/v2/homebrew/core/tmux/blobs/sha256:3cb3c779b9e62f0f5f5d9204309d194148ee66e3bc930480cabf7bee1b897623", - "sha256": "3cb3c779b9e62f0f5f5d9204309d194148ee66e3bc930480cabf7bee1b897623" - }, - "x86_64_linux": { - "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/tmux/blobs/sha256:b2eed5059099ba7ffeb68260c3163184b5d9b6a09e3b9b80d33ab2bf007513d8", - "sha256": "b2eed5059099ba7ffeb68260c3163184b5d9b6a09e3b9b80d33ab2bf007513d8" - } - } - } - }, - "tmuxinator": { - "version": "3.0.5", - "bottle": { - "rebuild": 0, - "root_url": "https://ghcr.io/v2/homebrew/core", - "files": { - "arm64_monterey": { - "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/tmuxinator/blobs/sha256:462f888a1e5558be4225cabf5becbbb8cfe3462815b993e584b808dbfb5d9fc5", - "sha256": "462f888a1e5558be4225cabf5becbbb8cfe3462815b993e584b808dbfb5d9fc5" - }, - "arm64_big_sur": { - "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/tmuxinator/blobs/sha256:462f888a1e5558be4225cabf5becbbb8cfe3462815b993e584b808dbfb5d9fc5", - "sha256": "462f888a1e5558be4225cabf5becbbb8cfe3462815b993e584b808dbfb5d9fc5" - }, - "monterey": { - "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/tmuxinator/blobs/sha256:3ae191a144fc61ed8f835f09f5d6792fbbfa2180d50568ad8bd625d26a527509", - "sha256": "3ae191a144fc61ed8f835f09f5d6792fbbfa2180d50568ad8bd625d26a527509" - }, - "big_sur": { - "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/tmuxinator/blobs/sha256:3ae191a144fc61ed8f835f09f5d6792fbbfa2180d50568ad8bd625d26a527509", - "sha256": "3ae191a144fc61ed8f835f09f5d6792fbbfa2180d50568ad8bd625d26a527509" - }, - "catalina": { - "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/tmuxinator/blobs/sha256:3ae191a144fc61ed8f835f09f5d6792fbbfa2180d50568ad8bd625d26a527509", - "sha256": "3ae191a144fc61ed8f835f09f5d6792fbbfa2180d50568ad8bd625d26a527509" - }, - "x86_64_linux": { - "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/tmuxinator/blobs/sha256:462f888a1e5558be4225cabf5becbbb8cfe3462815b993e584b808dbfb5d9fc5", - "sha256": "462f888a1e5558be4225cabf5becbbb8cfe3462815b993e584b808dbfb5d9fc5" - } - } - } - }, - "nodeenv": { - "version": "1.7.0_1", - "bottle": { - "rebuild": 0, - "root_url": "https://ghcr.io/v2/homebrew/core", - "files": { - "all": { - "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/nodeenv/blobs/sha256:dfbd40ce1e67ad9d87f4f4fbcee25019bf49957456d5fa6b41e2e9493a6c43a0", - "sha256": "dfbd40ce1e67ad9d87f4f4fbcee25019bf49957456d5fa6b41e2e9493a6c43a0" - } - } - } - }, - "zsh": { - "version": "5.9", - "bottle": { - "rebuild": 0, - "root_url": "https://ghcr.io/v2/homebrew/core", - "files": { - "arm64_monterey": { - "cellar": "/opt/homebrew/Cellar", - "url": "https://ghcr.io/v2/homebrew/core/zsh/blobs/sha256:1c6d208a7aa0601b25d04c5d41a393424b1094cf188e5b0c80fafc6e1e2755ef", - "sha256": "1c6d208a7aa0601b25d04c5d41a393424b1094cf188e5b0c80fafc6e1e2755ef" - }, - "arm64_big_sur": { - "cellar": "/opt/homebrew/Cellar", - "url": "https://ghcr.io/v2/homebrew/core/zsh/blobs/sha256:0a93821dee76829dac49770d4b32d08d0678272c43937e3858d7f901bab86cd6", - "sha256": "0a93821dee76829dac49770d4b32d08d0678272c43937e3858d7f901bab86cd6" - }, - "monterey": { - "cellar": "/usr/local/Cellar", - "url": "https://ghcr.io/v2/homebrew/core/zsh/blobs/sha256:b9a38fa0344b187333771a5585ad2d01c27e69a7e5362ba3fc8d7389aa3279f3", - "sha256": "b9a38fa0344b187333771a5585ad2d01c27e69a7e5362ba3fc8d7389aa3279f3" - }, - "big_sur": { - "cellar": "/usr/local/Cellar", - "url": "https://ghcr.io/v2/homebrew/core/zsh/blobs/sha256:722236bd8c9a094e1eca09263f5e83a94d4c97c2ca797804eef4f9564ef729ec", - "sha256": "722236bd8c9a094e1eca09263f5e83a94d4c97c2ca797804eef4f9564ef729ec" - }, - "catalina": { - "cellar": "/usr/local/Cellar", - "url": "https://ghcr.io/v2/homebrew/core/zsh/blobs/sha256:64c8757cc6db0247fb9f604ff84f61726fb5d91318c566157fa2957782040403", - "sha256": "64c8757cc6db0247fb9f604ff84f61726fb5d91318c566157fa2957782040403" - }, - "x86_64_linux": { - "cellar": "/home/linuxbrew/.linuxbrew/Cellar", - "url": "https://ghcr.io/v2/homebrew/core/zsh/blobs/sha256:fb0b59e7b1407323ea06b7c757de4d75bbcfb0836ce05857b0b2cf7816a231e0", - "sha256": "fb0b59e7b1407323ea06b7c757de4d75bbcfb0836ce05857b0b2cf7816a231e0" - } - } - } - }, - "nodenv": { - "version": "1.4.0", - "bottle": { - "rebuild": 0, - "root_url": "https://ghcr.io/v2/homebrew/core", - "files": { - "arm64_monterey": { - "cellar": ":any", - "url": "https://ghcr.io/v2/homebrew/core/nodenv/blobs/sha256:fece520035f8c55b65005231b038d9748f8bd13dc97a37fa4712a42d00ea6221", - "sha256": "fece520035f8c55b65005231b038d9748f8bd13dc97a37fa4712a42d00ea6221" - }, - "arm64_big_sur": { - "cellar": ":any", - "url": "https://ghcr.io/v2/homebrew/core/nodenv/blobs/sha256:c86512e5a1505eb10c79a4aeb618db66cc08a48ac855e9c0f9fb9fba7868d5e7", - "sha256": "c86512e5a1505eb10c79a4aeb618db66cc08a48ac855e9c0f9fb9fba7868d5e7" - }, - "monterey": { - "cellar": ":any", - "url": "https://ghcr.io/v2/homebrew/core/nodenv/blobs/sha256:a20f7a9c8cee71ba311283d2f518f1f3f52a94d6757a5775021d9eda66a3cb98", - "sha256": "a20f7a9c8cee71ba311283d2f518f1f3f52a94d6757a5775021d9eda66a3cb98" - }, - "big_sur": { - "cellar": ":any", - "url": "https://ghcr.io/v2/homebrew/core/nodenv/blobs/sha256:b6cce4dccc468b49f71f989a3f6f0d505f198e2fa4604a0cd8a24f969901a6d6", - "sha256": "b6cce4dccc468b49f71f989a3f6f0d505f198e2fa4604a0cd8a24f969901a6d6" - }, - "catalina": { - "cellar": ":any", - "url": "https://ghcr.io/v2/homebrew/core/nodenv/blobs/sha256:b5af0ac98407b7d246a41154c4ca9db9cad273b5fa65a487fcb080f3d15704f6", - "sha256": "b5af0ac98407b7d246a41154c4ca9db9cad273b5fa65a487fcb080f3d15704f6" - }, - "mojave": { - "cellar": ":any", - "url": "https://ghcr.io/v2/homebrew/core/nodenv/blobs/sha256:69231fd7b4e38aee64caecb7582969f0abcbeacaaf4ebce6de700b2e20848e11", - "sha256": "69231fd7b4e38aee64caecb7582969f0abcbeacaaf4ebce6de700b2e20848e11" - }, - "x86_64_linux": { - "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/nodenv/blobs/sha256:891254a446324d72656e8e5b041ef5016525fad7afb91aa92a3c5447f3af04aa", - "sha256": "891254a446324d72656e8e5b041ef5016525fad7afb91aa92a3c5447f3af04aa" - } - } - } - }, - "grep": { - "version": "3.7", - "bottle": { - "rebuild": 0, - "root_url": "https://ghcr.io/v2/homebrew/core", - "files": { - "arm64_monterey": { - "cellar": ":any", - "url": "https://ghcr.io/v2/homebrew/core/grep/blobs/sha256:3e5e465a85b9cb0541c0344cfc9a712261f165e6415a7ea11c1cde89aeaf1551", - "sha256": "3e5e465a85b9cb0541c0344cfc9a712261f165e6415a7ea11c1cde89aeaf1551" - }, - "arm64_big_sur": { - "cellar": ":any", - "url": "https://ghcr.io/v2/homebrew/core/grep/blobs/sha256:af56aab63748f26589f0af9fb269df366f526ece09aee13cb73f9705a7664e25", - "sha256": "af56aab63748f26589f0af9fb269df366f526ece09aee13cb73f9705a7664e25" - }, - "monterey": { - "cellar": ":any", - "url": "https://ghcr.io/v2/homebrew/core/grep/blobs/sha256:c71bb5fe05b6dc792ef46eb59b043651ecc6a6bcc5d87c6c529989267363887f", - "sha256": "c71bb5fe05b6dc792ef46eb59b043651ecc6a6bcc5d87c6c529989267363887f" - }, - "big_sur": { - "cellar": ":any", - "url": "https://ghcr.io/v2/homebrew/core/grep/blobs/sha256:0ca6e4d8a78798fa84b9bc96be28efb0f815996a2bc3c291773467f016e874e9", - "sha256": "0ca6e4d8a78798fa84b9bc96be28efb0f815996a2bc3c291773467f016e874e9" - }, - "catalina": { - "cellar": ":any", - "url": "https://ghcr.io/v2/homebrew/core/grep/blobs/sha256:f41a618521eb9f55c50de5e6fe0c0e76df83962236cf076deff2107911fb0bdc", - "sha256": "f41a618521eb9f55c50de5e6fe0c0e76df83962236cf076deff2107911fb0bdc" - }, - "mojave": { - "cellar": ":any", - "url": "https://ghcr.io/v2/homebrew/core/grep/blobs/sha256:180f055eeacb118cd73e2c3dbb0fda9d71fcbe0d4ee613b799a130085d6db76f", - "sha256": "180f055eeacb118cd73e2c3dbb0fda9d71fcbe0d4ee613b799a130085d6db76f" - }, - "x86_64_linux": { - "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/grep/blobs/sha256:b842a12e018e675333c0cfd93602c5ef1c7889e0fa7314610182419cd73327af", - "sha256": "b842a12e018e675333c0cfd93602c5ef1c7889e0fa7314610182419cd73327af" - } - } - } - }, - "openssh": { - "version": "9.0p1_1", - "bottle": { - "rebuild": 0, - "root_url": "https://ghcr.io/v2/homebrew/core", - "files": { - "arm64_monterey": { - "cellar": "/opt/homebrew/Cellar", - "url": "https://ghcr.io/v2/homebrew/core/openssh/blobs/sha256:dc8a68702befc83e394381378cc20c9c5c9440b9f31a8e491ba4605f14c31f44", - "sha256": "dc8a68702befc83e394381378cc20c9c5c9440b9f31a8e491ba4605f14c31f44" - }, - "arm64_big_sur": { - "cellar": "/opt/homebrew/Cellar", - "url": "https://ghcr.io/v2/homebrew/core/openssh/blobs/sha256:6c77da617ec1fdc44037faef2e0242cbef97a9acc26025f2386c884d467865a2", - "sha256": "6c77da617ec1fdc44037faef2e0242cbef97a9acc26025f2386c884d467865a2" - }, - "monterey": { - "cellar": "/usr/local/Cellar", - "url": "https://ghcr.io/v2/homebrew/core/openssh/blobs/sha256:e0ba7d39ae68ecd653bc5bbe73ceb252f148a51bd5e7257ed6316973023bb73c", - "sha256": "e0ba7d39ae68ecd653bc5bbe73ceb252f148a51bd5e7257ed6316973023bb73c" - }, - "big_sur": { - "cellar": "/usr/local/Cellar", - "url": "https://ghcr.io/v2/homebrew/core/openssh/blobs/sha256:2aeab07efa1366184ce592a5c172440a74f4c8ed2b68d6b8c0a70740f274e519", - "sha256": "2aeab07efa1366184ce592a5c172440a74f4c8ed2b68d6b8c0a70740f274e519" - }, - "catalina": { - "cellar": "/usr/local/Cellar", - "url": "https://ghcr.io/v2/homebrew/core/openssh/blobs/sha256:fccb117717bad0d24f7cd48eb3b075299ead1d1153e8dde2a95e0de31a7990d0", - "sha256": "fccb117717bad0d24f7cd48eb3b075299ead1d1153e8dde2a95e0de31a7990d0" - }, - "x86_64_linux": { - "cellar": "/home/linuxbrew/.linuxbrew/Cellar", - "url": "https://ghcr.io/v2/homebrew/core/openssh/blobs/sha256:8e7f4971bbad2e288324a409b473215e582915ef297c34f645b346413c018664", - "sha256": "8e7f4971bbad2e288324a409b473215e582915ef297c34f645b346413c018664" - } - } - } - }, - "httpie": { - "version": "3.2.1", - "bottle": { - "rebuild": 0, - "root_url": "https://ghcr.io/v2/homebrew/core", - "files": { - "arm64_monterey": { - "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/httpie/blobs/sha256:10ce896b2bb6686104fedea658fdaf903c0dd77bfb1f4a889f4bae714f4d9504", - "sha256": "10ce896b2bb6686104fedea658fdaf903c0dd77bfb1f4a889f4bae714f4d9504" - }, - "arm64_big_sur": { - "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/httpie/blobs/sha256:289f01c3a0d275ac15d6a54a742d865b88e1c7597530548db959389e5ae3a2fc", - "sha256": "289f01c3a0d275ac15d6a54a742d865b88e1c7597530548db959389e5ae3a2fc" - }, - "monterey": { - "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/httpie/blobs/sha256:70f95f6fb4c9d8438cf3957d1a206a615f870c69aefb8085976d455971404c26", - "sha256": "70f95f6fb4c9d8438cf3957d1a206a615f870c69aefb8085976d455971404c26" - }, - "big_sur": { - "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/httpie/blobs/sha256:4a2af142a0361da7cd3bced7212f3cecc62ffe8ca0defbe7be2ea7aeed4ec2d5", - "sha256": "4a2af142a0361da7cd3bced7212f3cecc62ffe8ca0defbe7be2ea7aeed4ec2d5" - }, - "catalina": { - "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/httpie/blobs/sha256:6f9196061f4ebb7a2742329e46085f960acf87dcfb45ecb4b7a82ab29db47456", - "sha256": "6f9196061f4ebb7a2742329e46085f960acf87dcfb45ecb4b7a82ab29db47456" - }, - "x86_64_linux": { - "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/httpie/blobs/sha256:2d80c38beeaadd384752dedc669a04fbc6bc59f40e54d5757d36c60e14bd9d8f", - "sha256": "2d80c38beeaadd384752dedc669a04fbc6bc59f40e54d5757d36c60e14bd9d8f" - } - } - } - }, - "jq": { - "version": "1.6", - "bottle": { - "rebuild": 1, - "root_url": "https://ghcr.io/v2/homebrew/core", - "files": { - "arm64_monterey": { - "cellar": ":any", - "url": "https://ghcr.io/v2/homebrew/core/jq/blobs/sha256:f70e1ae8df182b242ca004492cc0a664e2a8195e2e46f30546fe78e265d5eb87", - "sha256": "f70e1ae8df182b242ca004492cc0a664e2a8195e2e46f30546fe78e265d5eb87" - }, - "arm64_big_sur": { - "cellar": ":any", - "url": "https://ghcr.io/v2/homebrew/core/jq/blobs/sha256:674b3ae41c399f1e8e44c271b0e6909babff9fcd2e04a2127d25e2407ea4dd33", - "sha256": "674b3ae41c399f1e8e44c271b0e6909babff9fcd2e04a2127d25e2407ea4dd33" - }, - "monterey": { - "cellar": ":any", - "url": "https://ghcr.io/v2/homebrew/core/jq/blobs/sha256:7fee6ea327062b37d34ef5346a84810a1752cc7146fff1223fab76c9b45686e0", - "sha256": "7fee6ea327062b37d34ef5346a84810a1752cc7146fff1223fab76c9b45686e0" - }, - "big_sur": { - "cellar": ":any", - "url": "https://ghcr.io/v2/homebrew/core/jq/blobs/sha256:bf0f8577632af7b878b6425476f5b1ab9c3bf66d65affb0c455048a173a0b6bf", - "sha256": "bf0f8577632af7b878b6425476f5b1ab9c3bf66d65affb0c455048a173a0b6bf" - }, - "catalina": { - "cellar": ":any", - "url": "https://ghcr.io/v2/homebrew/core/jq/blobs/sha256:820a3c85fcbb63088b160c7edf125d7e55fc2c5c1d51569304499c9cc4b89ce8", - "sha256": "820a3c85fcbb63088b160c7edf125d7e55fc2c5c1d51569304499c9cc4b89ce8" - }, - "mojave": { - "cellar": ":any", - "url": "https://ghcr.io/v2/homebrew/core/jq/blobs/sha256:71f0e76c5b22e5088426c971d5e795fe67abee7af6c2c4ae0cf4c0eb98ed21ff", - "sha256": "71f0e76c5b22e5088426c971d5e795fe67abee7af6c2c4ae0cf4c0eb98ed21ff" - }, - "high_sierra": { - "cellar": ":any", - "url": "https://ghcr.io/v2/homebrew/core/jq/blobs/sha256:dffcffa4ea13e8f0f2b45c5121e529077e135ae9a47254c32182231662ee9b72", - "sha256": "dffcffa4ea13e8f0f2b45c5121e529077e135ae9a47254c32182231662ee9b72" - }, - "sierra": { - "cellar": ":any", - "url": "https://ghcr.io/v2/homebrew/core/jq/blobs/sha256:bb4d19dc026c2d72c53eed78eaa0ab982e9fcad2cd2acc6d13e7a12ff658e877", - "sha256": "bb4d19dc026c2d72c53eed78eaa0ab982e9fcad2cd2acc6d13e7a12ff658e877" - }, - "x86_64_linux": { - "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/jq/blobs/sha256:2beea2c2c372ccf1081e9a5233fc3020470803254284aeecc071249d76b62338", - "sha256": "2beea2c2c372ccf1081e9a5233fc3020470803254284aeecc071249d76b62338" - } - } - } - }, - "git": { - "version": "2.37.3", - "bottle": { - "rebuild": 0, - "root_url": "https://ghcr.io/v2/homebrew/core", - "files": { - "arm64_monterey": { - "cellar": "/opt/homebrew/Cellar", - "url": "https://ghcr.io/v2/homebrew/core/git/blobs/sha256:a8c3e5a517b342d4dbb29c9931cb471b4d11cbe1e6a35d67f0e4d62e81d3dabf", - "sha256": "a8c3e5a517b342d4dbb29c9931cb471b4d11cbe1e6a35d67f0e4d62e81d3dabf" - }, - "arm64_big_sur": { - "cellar": "/opt/homebrew/Cellar", - "url": "https://ghcr.io/v2/homebrew/core/git/blobs/sha256:d3fb7983def6cda8ed2aff9b9b6470de4e1d98aa4669b2630db34639972d8cc4", - "sha256": "d3fb7983def6cda8ed2aff9b9b6470de4e1d98aa4669b2630db34639972d8cc4" - }, - "monterey": { - "cellar": "/usr/local/Cellar", - "url": "https://ghcr.io/v2/homebrew/core/git/blobs/sha256:3388eb9ef80bd4e75a334dcef8d163493aa50f534f850c6a43b46b8c56e6af8f", - "sha256": "3388eb9ef80bd4e75a334dcef8d163493aa50f534f850c6a43b46b8c56e6af8f" - }, - "big_sur": { - "cellar": "/usr/local/Cellar", - "url": "https://ghcr.io/v2/homebrew/core/git/blobs/sha256:eabd8b4a14e9905f9a99d805d4096199f36599a83788bfc65bd71e8849ed0e43", - "sha256": "eabd8b4a14e9905f9a99d805d4096199f36599a83788bfc65bd71e8849ed0e43" - }, - "catalina": { - "cellar": "/usr/local/Cellar", - "url": "https://ghcr.io/v2/homebrew/core/git/blobs/sha256:ef29862303db9c7e172ee398d923ee13d1816afc3daf7f7ffa8192b62a21c8ec", - "sha256": "ef29862303db9c7e172ee398d923ee13d1816afc3daf7f7ffa8192b62a21c8ec" - }, - "x86_64_linux": { - "cellar": "/home/linuxbrew/.linuxbrew/Cellar", - "url": "https://ghcr.io/v2/homebrew/core/git/blobs/sha256:8b546791ebac51c6659c3ade93eca24c8e743d2327ae025572a022918185638a", - "sha256": "8b546791ebac51c6659c3ade93eca24c8e743d2327ae025572a022918185638a" - } - } - } - }, - "git-lfs": { - "version": "3.2.0", - "bottle": { - "rebuild": 0, - "root_url": "https://ghcr.io/v2/homebrew/core", - "files": { - "arm64_monterey": { - "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/git-lfs/blobs/sha256:a81d5b29d1c0203f592e8af7b25ccb95431489ffa8dc595dbb1c39f1c08cfb46", - "sha256": "a81d5b29d1c0203f592e8af7b25ccb95431489ffa8dc595dbb1c39f1c08cfb46" - }, - "arm64_big_sur": { - "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/git-lfs/blobs/sha256:f10c03ed48c4168d8b80164d053040452e772c978344cc485e386183de7d5c24", - "sha256": "f10c03ed48c4168d8b80164d053040452e772c978344cc485e386183de7d5c24" - }, - "monterey": { - "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/git-lfs/blobs/sha256:2ccd239da97286fa2f9702f7c2731202819a6012163906b7e599e8fb218a6c95", - "sha256": "2ccd239da97286fa2f9702f7c2731202819a6012163906b7e599e8fb218a6c95" - }, - "big_sur": { - "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/git-lfs/blobs/sha256:21c75c877159acff82ada003baa3ea7d65e2774a2636f740e4cfad4ae9d2d7b5", - "sha256": "21c75c877159acff82ada003baa3ea7d65e2774a2636f740e4cfad4ae9d2d7b5" - }, - "catalina": { - "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/git-lfs/blobs/sha256:c428d687c3a70defa9178fd0b287cd8766f05bf113eb6ae8ce7bcb7940751b05", - "sha256": "c428d687c3a70defa9178fd0b287cd8766f05bf113eb6ae8ce7bcb7940751b05" - }, - "x86_64_linux": { - "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/git-lfs/blobs/sha256:43e16ee02644936dbf6d2d504b8c66cd3e0c3dd1313436e9bd253c4c051e437c", - "sha256": "43e16ee02644936dbf6d2d504b8c66cd3e0c3dd1313436e9bd253c4c051e437c" - } - } - } - }, - "gradle": { - "version": "7.5.1", - "bottle": { - "rebuild": 0, - "root_url": "https://ghcr.io/v2/homebrew/core", - "files": { - "all": { - "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/gradle/blobs/sha256:022acd562e864e9ffd39dabc3c5c45df19b7ebe9aa0dee25b895ef410a01a3b9", - "sha256": "022acd562e864e9ffd39dabc3c5c45df19b7ebe9aa0dee25b895ef410a01a3b9" - } - } - } - }, - "python": { - "version": "3.10.6_1", - "bottle": { - "rebuild": 0, - "root_url": "https://ghcr.io/v2/homebrew/core", - "files": { - "arm64_monterey": { - "cellar": "/opt/homebrew/Cellar", - "url": "https://ghcr.io/v2/homebrew/core/python/3.10/blobs/sha256:4bf124c1807cc11c15b49916d215734925584f581f1589c85c05ac9f2baa207d", - "sha256": "4bf124c1807cc11c15b49916d215734925584f581f1589c85c05ac9f2baa207d" - }, - "arm64_big_sur": { - "cellar": "/opt/homebrew/Cellar", - "url": "https://ghcr.io/v2/homebrew/core/python/3.10/blobs/sha256:943a7b7b9f09a255eb087de33249c82ff70d091380669446d60c602291cb58f1", - "sha256": "943a7b7b9f09a255eb087de33249c82ff70d091380669446d60c602291cb58f1" - }, - "monterey": { - "cellar": "/usr/local/Cellar", - "url": "https://ghcr.io/v2/homebrew/core/python/3.10/blobs/sha256:b142ca7e72014b64b423f6b7785ff69b3b670b7619aec3684f56d8b622127bbf", - "sha256": "b142ca7e72014b64b423f6b7785ff69b3b670b7619aec3684f56d8b622127bbf" - }, - "big_sur": { - "cellar": "/usr/local/Cellar", - "url": "https://ghcr.io/v2/homebrew/core/python/3.10/blobs/sha256:2a2eb351c779256e78e9e70b72c683726918d16b66c15c8721eea5b3e1d392b1", - "sha256": "2a2eb351c779256e78e9e70b72c683726918d16b66c15c8721eea5b3e1d392b1" - }, - "catalina": { - "cellar": "/usr/local/Cellar", - "url": "https://ghcr.io/v2/homebrew/core/python/3.10/blobs/sha256:9309d4c2f17552321c22b7e8889f2907c2b18716b763004c3aacaf5645fc6c58", - "sha256": "9309d4c2f17552321c22b7e8889f2907c2b18716b763004c3aacaf5645fc6c58" - }, - "x86_64_linux": { - "cellar": "/home/linuxbrew/.linuxbrew/Cellar", - "url": "https://ghcr.io/v2/homebrew/core/python/3.10/blobs/sha256:809db3634bcdc3d3e5f60f9e0e74124fc7cb6f8c52085daa36acf118d2b64039", - "sha256": "809db3634bcdc3d3e5f60f9e0e74124fc7cb6f8c52085daa36acf118d2b64039" - } - } - } - }, - "hub": { - "version": "2.14.2", - "bottle": { - "rebuild": 0, - "root_url": "https://ghcr.io/v2/homebrew/core", - "files": { - "arm64_monterey": { - "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/hub/blobs/sha256:00602733d9a4c8049e34cb20a7c96dbd51f98a60e1cb5fbc9aec72663324ce89", - "sha256": "00602733d9a4c8049e34cb20a7c96dbd51f98a60e1cb5fbc9aec72663324ce89" - }, - "arm64_big_sur": { - "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/hub/blobs/sha256:19d761270350d4c4b6d5118d096dc7c012e7b58b43c0d81f9c6d8bded1888dd9", - "sha256": "19d761270350d4c4b6d5118d096dc7c012e7b58b43c0d81f9c6d8bded1888dd9" - }, - "monterey": { - "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/hub/blobs/sha256:d4c647211cc8a8e9aa9bedfaa4cb079a3a5fafea3f8378c7eaf5c50e2503cd0e", - "sha256": "d4c647211cc8a8e9aa9bedfaa4cb079a3a5fafea3f8378c7eaf5c50e2503cd0e" - }, - "big_sur": { - "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/hub/blobs/sha256:7c480f3de5f449a741f88718194c129d597f0fe0db8b2130c1ccf4daa9a8dfca", - "sha256": "7c480f3de5f449a741f88718194c129d597f0fe0db8b2130c1ccf4daa9a8dfca" - }, - "catalina": { - "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/hub/blobs/sha256:fdf05855839a9d7ec6e7bee6796e3cb5fc473500cffc002366cf98c09a805b69", - "sha256": "fdf05855839a9d7ec6e7bee6796e3cb5fc473500cffc002366cf98c09a805b69" - }, - "mojave": { - "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/hub/blobs/sha256:bcbae9c683d76f3395665467ba0f0c00c60c12c84022f72faba4b8981724b563", - "sha256": "bcbae9c683d76f3395665467ba0f0c00c60c12c84022f72faba4b8981724b563" - }, - "high_sierra": { - "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/hub/blobs/sha256:8800cda4532784bf764ea6116a06c81d8d90bb3d36d8ecf295e64f9dd647c4ad", - "sha256": "8800cda4532784bf764ea6116a06c81d8d90bb3d36d8ecf295e64f9dd647c4ad" - }, - "x86_64_linux": { - "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/hub/blobs/sha256:213636e856404251ffd7897357ab91cc9519d3852e4b28cbb43575988d9bbc1b", - "sha256": "213636e856404251ffd7897357ab91cc9519d3852e4b28cbb43575988d9bbc1b" - } - } - } - }, - "git-extras": { - "version": "6.4.0", - "bottle": { - "rebuild": 1, - "root_url": "https://ghcr.io/v2/homebrew/core", - "files": { - "all": { - "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/git-extras/blobs/sha256:139de676324d68edf3e958adb4806ef20d9a3d4e7f80588b8d21e5b1ff1feb56", - "sha256": "139de676324d68edf3e958adb4806ef20d9a3d4e7f80588b8d21e5b1ff1feb56" - } - } - } - }, - "awscli": { - "version": "2.7.27", - "bottle": { - "rebuild": 0, - "root_url": "https://ghcr.io/v2/homebrew/core", - "files": { - "arm64_monterey": { - "cellar": ":any", - "url": "https://ghcr.io/v2/homebrew/core/awscli/blobs/sha256:728ace6408cf56cb5e8f6b4e798600cf20e787df0e63934a9f79be50e5f4f69f", - "sha256": "728ace6408cf56cb5e8f6b4e798600cf20e787df0e63934a9f79be50e5f4f69f" - }, - "arm64_big_sur": { - "cellar": ":any", - "url": "https://ghcr.io/v2/homebrew/core/awscli/blobs/sha256:756dc564c15f5e75c0d1fc21ed26dae2e480c78b0e553b3989a6eec08e08e138", - "sha256": "756dc564c15f5e75c0d1fc21ed26dae2e480c78b0e553b3989a6eec08e08e138" - }, - "monterey": { - "cellar": ":any", - "url": "https://ghcr.io/v2/homebrew/core/awscli/blobs/sha256:80414c31c3ff246b859298f2d485bbe806e7ce3ce5c9355aca18317dd6c716bf", - "sha256": "80414c31c3ff246b859298f2d485bbe806e7ce3ce5c9355aca18317dd6c716bf" - }, - "big_sur": { - "cellar": ":any", - "url": "https://ghcr.io/v2/homebrew/core/awscli/blobs/sha256:9e2eedf68a976f8bec3564ed830d5efafa842fe6d5251dfa27f4146ca329e14e", - "sha256": "9e2eedf68a976f8bec3564ed830d5efafa842fe6d5251dfa27f4146ca329e14e" - }, - "catalina": { - "cellar": ":any", - "url": "https://ghcr.io/v2/homebrew/core/awscli/blobs/sha256:d9272fbd7320c52cdf93f5e791142cedf8a6df94560c33ac00cb9eed56d71952", - "sha256": "d9272fbd7320c52cdf93f5e791142cedf8a6df94560c33ac00cb9eed56d71952" - }, - "x86_64_linux": { - "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/awscli/blobs/sha256:42025d9b86891e74e03be9bfc223e8cad39e7cbd4aaebd7ddc5356a0e1b79a6f", - "sha256": "42025d9b86891e74e03be9bfc223e8cad39e7cbd4aaebd7ddc5356a0e1b79a6f" - } - } - } - }, - "docker-compose": { - "version": "2.10.2", - "bottle": { - "rebuild": 0, - "root_url": "https://ghcr.io/v2/homebrew/core", - "files": { - "arm64_monterey": { - "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/docker-compose/blobs/sha256:056ab56dbfb2ccf80adfdeade5a2e4d538cf4df94d5cda1d4c5daaf59737f999", - "sha256": "056ab56dbfb2ccf80adfdeade5a2e4d538cf4df94d5cda1d4c5daaf59737f999" - }, - "arm64_big_sur": { - "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/docker-compose/blobs/sha256:056ab56dbfb2ccf80adfdeade5a2e4d538cf4df94d5cda1d4c5daaf59737f999", - "sha256": "056ab56dbfb2ccf80adfdeade5a2e4d538cf4df94d5cda1d4c5daaf59737f999" - }, - "monterey": { - "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/docker-compose/blobs/sha256:e53ad8d98f9cae5bf9d8e2ebe094b9508c693bdad0f727a2f00d05e0d7fdc5e3", - "sha256": "e53ad8d98f9cae5bf9d8e2ebe094b9508c693bdad0f727a2f00d05e0d7fdc5e3" - }, - "big_sur": { - "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/docker-compose/blobs/sha256:e53ad8d98f9cae5bf9d8e2ebe094b9508c693bdad0f727a2f00d05e0d7fdc5e3", - "sha256": "e53ad8d98f9cae5bf9d8e2ebe094b9508c693bdad0f727a2f00d05e0d7fdc5e3" - }, - "catalina": { - "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/docker-compose/blobs/sha256:e53ad8d98f9cae5bf9d8e2ebe094b9508c693bdad0f727a2f00d05e0d7fdc5e3", - "sha256": "e53ad8d98f9cae5bf9d8e2ebe094b9508c693bdad0f727a2f00d05e0d7fdc5e3" - }, - "x86_64_linux": { - "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/docker-compose/blobs/sha256:fad64189a85d45fd75b641ce41961e5e1e6cbb305401b1cfce09e495279fdc05", - "sha256": "fad64189a85d45fd75b641ce41961e5e1e6cbb305401b1cfce09e495279fdc05" - } - } - } - }, - "postgresql": { - "version": "14.5_1", - "bottle": { - "rebuild": 0, - "root_url": "https://ghcr.io/v2/homebrew/core", - "files": { - "arm64_monterey": { - "cellar": "/opt/homebrew/Cellar", - "url": "https://ghcr.io/v2/homebrew/core/postgresql/14/blobs/sha256:7de4e2fa72473ee92a2380496fa0d479b2afa1b500d0db0c48e379ed26506884", - "sha256": "7de4e2fa72473ee92a2380496fa0d479b2afa1b500d0db0c48e379ed26506884" - }, - "arm64_big_sur": { - "cellar": "/opt/homebrew/Cellar", - "url": "https://ghcr.io/v2/homebrew/core/postgresql/14/blobs/sha256:8579858ca521e44777131827f335db0de705aadad6f7fc83fc343572424ab2ef", - "sha256": "8579858ca521e44777131827f335db0de705aadad6f7fc83fc343572424ab2ef" - }, - "monterey": { - "cellar": "/usr/local/Cellar", - "url": "https://ghcr.io/v2/homebrew/core/postgresql/14/blobs/sha256:1f510876b086a7696294298d9c8572813c91745bf706aad06efd3395b8f47505", - "sha256": "1f510876b086a7696294298d9c8572813c91745bf706aad06efd3395b8f47505" - }, - "big_sur": { - "cellar": "/usr/local/Cellar", - "url": "https://ghcr.io/v2/homebrew/core/postgresql/14/blobs/sha256:3af2b8cf4ce3056af9d6ec63bc0fdd40d0132f80f9e58d2b1043cba8e479badd", - "sha256": "3af2b8cf4ce3056af9d6ec63bc0fdd40d0132f80f9e58d2b1043cba8e479badd" - }, - "catalina": { - "cellar": "/usr/local/Cellar", - "url": "https://ghcr.io/v2/homebrew/core/postgresql/14/blobs/sha256:c168e4df71b1d8bd833d9a44d3f2c0fc555597ccf64b3d2e0fa144e53b2cb54d", - "sha256": "c168e4df71b1d8bd833d9a44d3f2c0fc555597ccf64b3d2e0fa144e53b2cb54d" - }, - "x86_64_linux": { - "cellar": "/home/linuxbrew/.linuxbrew/Cellar", - "url": "https://ghcr.io/v2/homebrew/core/postgresql/14/blobs/sha256:c3f08966cb882241078288c3328b63a732038a9168aca9db0f6c7f78f51032e7", - "sha256": "c3f08966cb882241078288c3328b63a732038a9168aca9db0f6c7f78f51032e7" - } - } - } - }, - "redis": { - "version": "7.0.4", - "bottle": { - "rebuild": 0, - "root_url": "https://ghcr.io/v2/homebrew/core", - "files": { - "arm64_monterey": { - "cellar": ":any", - "url": "https://ghcr.io/v2/homebrew/core/redis/blobs/sha256:5fd4a4cdd769fdebc82dc5ea1b06edb2464039b38c09355f29e8e70804eb8477", - "sha256": "5fd4a4cdd769fdebc82dc5ea1b06edb2464039b38c09355f29e8e70804eb8477" - }, - "arm64_big_sur": { - "cellar": ":any", - "url": "https://ghcr.io/v2/homebrew/core/redis/blobs/sha256:203cea84c495237fad2c5b1e172603da5b9f5655a063972d996b45ff83155f10", - "sha256": "203cea84c495237fad2c5b1e172603da5b9f5655a063972d996b45ff83155f10" - }, - "monterey": { - "cellar": ":any", - "url": "https://ghcr.io/v2/homebrew/core/redis/blobs/sha256:58f58d9fe07000a83e54581dd7fbe22747701d84ba78def762ae94b341f41259", - "sha256": "58f58d9fe07000a83e54581dd7fbe22747701d84ba78def762ae94b341f41259" - }, - "big_sur": { - "cellar": ":any", - "url": "https://ghcr.io/v2/homebrew/core/redis/blobs/sha256:a6aaf522bca22031de5bcaeb39ff41f5f1af977967e94a0dac507d2ed8fe769f", - "sha256": "a6aaf522bca22031de5bcaeb39ff41f5f1af977967e94a0dac507d2ed8fe769f" - }, - "catalina": { - "cellar": ":any", - "url": "https://ghcr.io/v2/homebrew/core/redis/blobs/sha256:38c669f105a76cccf7567b4ee32dba6972c63daaf7b4c178e1f79988f846684b", - "sha256": "38c669f105a76cccf7567b4ee32dba6972c63daaf7b4c178e1f79988f846684b" - }, - "x86_64_linux": { - "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/redis/blobs/sha256:dc16cc18a0e19a14fdc2e47bf6244690455795d89af8445abdf7df01542e1581", - "sha256": "dc16cc18a0e19a14fdc2e47bf6244690455795d89af8445abdf7df01542e1581" - } - } - } - }, - "java11": { - "version": "11.0.16.1", - "bottle": { - "rebuild": 0, - "root_url": "https://ghcr.io/v2/homebrew/core", - "files": { - "arm64_monterey": { - "cellar": ":any", - "url": "https://ghcr.io/v2/homebrew/core/openjdk/11/blobs/sha256:9c4b44dbad256cd0b6c90f35722ffe0748f834b0796029dbec1cc768d7affc87", - "sha256": "9c4b44dbad256cd0b6c90f35722ffe0748f834b0796029dbec1cc768d7affc87" - }, - "arm64_big_sur": { - "cellar": ":any", - "url": "https://ghcr.io/v2/homebrew/core/openjdk/11/blobs/sha256:ba5ec5c05afeef4a8d35893c845f493a681c6153aa31ef91e8ad5be2340ef5f7", - "sha256": "ba5ec5c05afeef4a8d35893c845f493a681c6153aa31ef91e8ad5be2340ef5f7" - }, - "monterey": { - "cellar": ":any", - "url": "https://ghcr.io/v2/homebrew/core/openjdk/11/blobs/sha256:b552bd2c8c776b1dc1d8def8b365baed60993f0bfcd580d0bb8aee051e789333", - "sha256": "b552bd2c8c776b1dc1d8def8b365baed60993f0bfcd580d0bb8aee051e789333" - }, - "big_sur": { - "cellar": ":any", - "url": "https://ghcr.io/v2/homebrew/core/openjdk/11/blobs/sha256:ee9ad84f9610a3096b22a5cfe68b00d273e839f3de1bae74380c88ebc0f18192", - "sha256": "ee9ad84f9610a3096b22a5cfe68b00d273e839f3de1bae74380c88ebc0f18192" - }, - "catalina": { - "cellar": ":any", - "url": "https://ghcr.io/v2/homebrew/core/openjdk/11/blobs/sha256:6b9915b84f1d8f2c7ad87fe984b7aefaa6597781ca20586f2ab902bdad8430d3", - "sha256": "6b9915b84f1d8f2c7ad87fe984b7aefaa6597781ca20586f2ab902bdad8430d3" - }, - "x86_64_linux": { - "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/openjdk/11/blobs/sha256:ea25b4dd142c423ef91de19c7b9a82f77ab10e09deb1e5e4332c60af82bd1ff5", - "sha256": "ea25b4dd142c423ef91de19c7b9a82f77ab10e09deb1e5e4332c60af82bd1ff5" - } - } - } - } - }, - "mas": { - "1Password": null, - "WhatsApp Desktop": null, - "Things 3": null, - "Bear - Markdown Notes": null, - "Harvest": { - "id": "506189836", - "version": "2.3.0" - }, - "Slack": { - "id": "803453959", - "version": "4.28.171" - }, - "Spark": { - "id": "1176895641", - "version": "2.11.22" - } - } - }, - "system": { - "macos": { - "monterey": { - "HOMEBREW_VERSION": "3.5.10", - "HOMEBREW_PREFIX": "/opt/homebrew", - "Homebrew/homebrew-core": "6fbe5378667926e396f3048449956914e7a7b356", - "CLT": "13.4.0.0.1.1651278267", - "Xcode": "13.4", - "macOS": "12.3" - } - } - } -} diff --git a/setup/macos b/setup/macos deleted file mode 100755 index c77aeda4f7..0000000000 --- a/setup/macos +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env bash - -# ~/.macos — https://mths.be/macos - -# Close any open System Preferences panes, to prevent them from overriding -# settings we’re about to change -osascript -e 'tell application "System Preferences" to quit' - -# Ask for the administrator password upfront -sudo -v - -# Keep-alive: update existing `sudo` time stamp until `.macos` has finished -while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null & - -############################################################################### -# General UI/UX # -############################################################################### - -# Set computer name (as done via System Preferences → Sharing) -sudo scutil --set ComputerName "andersemil" -sudo scutil --set HostName "andersemil" -sudo scutil --set LocalHostName "andersemil" -sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.smb.server NetBIOSName -string "andersemil" diff --git a/zsh/aliases b/zsh/aliases index de5973bb02..33ced58ce4 100644 --- a/zsh/aliases +++ b/zsh/aliases @@ -5,12 +5,12 @@ alias drop='cd ~/Dropbox' alias so='source ~/.zshrc' alias uuid="uuidgen | tr '[:upper:]' '[:lower:]'" alias cuuid="uuid | pbcopy" -alias prettyjson='python -m json.tool' +alias prettyjson='python3 -m json.tool' alias jsonvim='prettyjson | vim -c "set syntax=json" -' alias jsonless='prettyjson | less' alias cleardns="sudo killall -HUP mDNSResponder" alias jobdone="terminal-notifier -message \"Job's done\"" -alias csvtojson="python -c 'import csv, json, sys; print(json.dumps([dict(r) for r in csv.DictReader(sys.stdin)]))'" +alias csvtojson="python3 -c 'import csv, json, sys; print(json.dumps([dict(r) for r in csv.DictReader(sys.stdin)]))'" # Vim alias v='vim' @@ -25,31 +25,9 @@ alias tmk="tmux kill-session -t" alias tma="tmux attach -t" alias ms="mux start" -# Ruby -alias gemconsole="irb -rubygems -I lib -r ${PWD##*/}.rb" -alias bake='bundle exec rake' -alias be='bundle exec' -alias bu='bundle update' -alias bus='bundle update --source=' -alias remove_quotes="sed -r 's/\"//g'" - -# Rails -alias devlog="tail -f log/development.log" -alias rc="rails c" -alias rdbm="rake db:migrate" - -# Ember -alias es="ember serve" - -# PostgreSQL -alias stoppostgres='pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log stop' -alias startpostgres='pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start' - # Docker alias dc='docker-compose' alias docklog="docker logs --follow" -alias dconsole='docker_console' -alias dockload='eval $(docker-machine env nf-cluster)' # Git alias gs="git status" @@ -81,28 +59,6 @@ alias undeployed='git fetch --multiple production origin && git log production/m alias gpcb='git push origin HEAD' alias grom='git co master && git pull origin master && git checkout @{-1} && git rebase master' -# Pow -alias pr="powder -r" - -# Heroku -alias gpp="git push production master && hp rake db:migrate" -alias gps="git push staging master && hs rake db:migrate" -alias hdp="git push origin master && gpp" -alias hds="git push origin master && gps" -alias hlogs='heroku logs -t' -alias hs="h staging" -alias hp="h production" -alias hpc="hp run rails c" -alias hsc="hs run rails c" -alias hap="heroku accounts:set personal" -alias has="heroku accounts:set shape" - -# Projects -alias start_cargo="mux start cargoflux" -alias start_oddset="mux start oddset" -alias start_mitid="mux start mitid" -# alias rm="trash" -# # AWS alias asso='aws-sso-util' @@ -111,5 +67,3 @@ alias jt="./gradlew test --parallel" alias jc="./gradlew clean" alias tpush='./gradlew test --parallel && gpcb' alias kotlinlib="gradle init --type kotlin-library && rm -rf .gradle gradle && rm gradlew* && rm settings.gradle.kts .gitignore" - - diff --git a/zsh/functions b/zsh/functions index 731917d0e7..e9aaf77b6b 100644 --- a/zsh/functions +++ b/zsh/functions @@ -7,11 +7,6 @@ function git_branch_name { echo "$val" } -function git-done { - branch=`git_branch_name` - killruby ; spring stop ; git checkout master && git merge $branch --ff-only && bundle install && prepdb && bin/rspec && git push && git branch -D $branch && git push origin :$branch -} - function git-nuke { git branch -D $1 && git push origin :$1 } @@ -22,13 +17,6 @@ function git-on-master { git checkout master && git pull --rebase git checkout $branch git rebase master - } - -function legacy_aws_session_from_sso { - credential=$(aws-sso-util credential-process --profile "$AWS_PROFILE") - echo AWS_ACCESS_KEY_ID=$(jq -r '.AccessKeyId' <<< "$credential") - echo AWS_SECRET_ACCESS_KEY=$(jq -r '.SecretAccessKey' <<< "$credential") - echo AWS_SESSION_TOKEN=$(jq -r '.SessionToken' <<< "$credential") } function g { @@ -39,10 +27,6 @@ function g { fi } -function rrg { - bin/rake routes | grep $1 -} - function take { mkdir $1 cd $1 @@ -53,26 +37,11 @@ function gc { git commit -m "$*" } -function gem_from_path { - gem_name="$1" - - # Replace gem 'gem_name' with gem 'gem_name', path: '../gem_name' - perl -p -i -e "s/gem ('|\")${gem_name}('|\")\$/gem '${gem_name}', path: '..\/${gem_name}'/gi" Gemfile - rm -rf tmp/cache/assets # Clear asset cache (for rails apps) - bundle # Bundle - powder -r # Restart pow -} -alias gfp=gem_from_path - function note { vim ~/notes/$1.txt } alias en=note -function h { - heroku $2 --remote=$1 ${@:3} -} - function remove_untracked_files { git clean -f -n read -q "REPLY?Above files will be removed. Are you sure?" -r 1 -n @@ -83,25 +52,6 @@ function remove_untracked_files { fi } -function brew_install { - brew install $1 - echo "brew install $1" >> ~/.dotfiles/setup/brew_install -} - -function getapp { - brew cask install $1 - echo "brew cask install $1" >> ~/.dotfiles/setup/brew_cask_install -} - -function docker_console { - docker exec -it $1 /bin/bash -} - -function prettyjsonfile { - cat "$1" | prettyjson > "$1-pretty" - mv "$1-pretty" "$1" -} - function rebase_all { for branch in $(git branch --no-merged | xargs); do git co $branch diff --git a/zshrc b/zshrc index 5dfedf6785..b098e0d2f1 100644 --- a/zshrc +++ b/zshrc @@ -1,3 +1,6 @@ +# Homebrew (Apple Silicon) +eval "$(/opt/homebrew/bin/brew shellenv)" + # Path to your oh-my-zsh installation. export ZSH=$HOME/.oh-my-zsh @@ -26,13 +29,8 @@ source $ZSH/oh-my-zsh.sh # Python export PYTHONIOENCODING=utf-8 -# export PATH=~/Library/Python/3.6/bin:$PATH -# export PATH=~/code/bat:$PATH - -# PATH -# export PATH=$HOME/bin:$HOME/.dotfiles/bin:/usr/local/bin:/usr/local/sbin:$PATH -# You may need to manually set your language environment +# Locale export LC_ALL=en_US.UTF-8 export LANG=da_DK.UTF-8 export EDITOR='vim' @@ -42,38 +40,13 @@ source $HOME/.dotfiles/zsh/aliases source $HOME/.dotfiles/zsh/functions # Java -# export JAVA_8_HOME=$(/usr/libexec/java_home -v1.8) export JAVA_21_HOME=$(/usr/libexec/java_home -v21) -# alias java8='export JAVA_HOME=$JAVA_8_HOME' -# alias java11='export JAVA_HOME=$JAVA_11_HOME' alias java21='export JAVA_HOME=$JAVA_21_HOME' -# Default to java8 -# java8 - -# NVM -# export NVM_DIR="$HOME/.nvm" -# . "/usr/local/opt/nvm/nvm.sh" - -# Secret stuff +# Work / machine-specific env (AWS profile, SSO URLs, etc.) belongs in +# ~/.private-dotfiles/shell-init — sourced below if present. [ -f $HOME/.private-dotfiles/shell-init ] && source $HOME/.private-dotfiles/shell-init -# Brew -export PATH="/usr/local/sbin:$PATH" - -# shp-games-infrastructure tools -export PATH=$PATH:~/code/shp-games-infrastructure/bin/tools:~/code/shp-games-infrastructure/bin - -export PATH="/Users/andersemil/.local/bin:$PATH" - -# Shape Games CLI -# eval "$(/Users/andersemil/code/shp-games-backend-cli/bin/sg init -)" - -# AWS -export AWS_SHAPE_GAMES_USER=anders -export AWS_DEFAULT_SSO_REGION=eu-west-1 -export AWS_DEFAULT_SSO_START_URL=https://shapegames.awsapps.com/start - bindkey "^[[1;3D" backward-word bindkey "^[[1;3C" forward-word @@ -81,9 +54,7 @@ eval "$(nodenv init -)" export PATH="/opt/homebrew/opt/postgresql@17/bin:$PATH" -# bun completions -[ -s "/Users/andersemil/.bun/_bun" ] && source "/Users/andersemil/.bun/_bun" - # bun export BUN_INSTALL="$HOME/.bun" export PATH="$BUN_INSTALL/bin:$PATH" +[ -s "$HOME/.bun/_bun" ] && source "$HOME/.bun/_bun" From 411af87e3a9a488185a497daad3cb06be356d470 Mon Sep 17 00:00:00 2001 From: Anders Emil Pouplier Date: Mon, 11 May 2026 11:15:25 +0200 Subject: [PATCH 141/144] Add claude --- CLAUDE.md | 1 + Rakefile | 54 +++++++++++++- claude/commands/build-cli.md | 141 +++++++++++++++++++++++++++++++++++ claude/settings.json | 41 ++++++++++ 4 files changed, 236 insertions(+), 1 deletion(-) create mode 100644 claude/commands/build-cli.md create mode 100644 claude/settings.json diff --git a/CLAUDE.md b/CLAUDE.md index 72dcdf2f36..82cb585749 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -24,6 +24,7 @@ Consequence for edits: changing a file here changes the live config immediately. - `gitconfig` — signs commits via SSH key (`gpg.format = ssh`, `commit.gpgsign = true`); `pull.ff = only`; rich `git l`/`git r`/`git hp` aliases backed by `githelpers`. - `Brewfile` — `brew bundle --file=Brewfile` to install. - `bin/` — small one-off scripts, exposed on `$PATH` via the `~/.bin` symlink. +- `claude/` — Claude Code config. Handled specially by the Rakefile: NOT symlinked as `~/.claude` (that would clobber the live cache). Instead, individual entries listed in `CLAUDE_LINKS` in the Rakefile are symlinked into `~/.claude/` (e.g. `claude/settings.json` → `~/.claude/settings.json`, `claude/commands/build-cli.md` → `~/.claude/commands/build-cli.md`). Run `rake claude` to (re)apply just these links, or `rake install` to do everything. Add new tracked entries by appending to `CLAUDE_LINKS`. ## Common commands diff --git a/Rakefile b/Rakefile index 4ce39e749d..b53b076eae 100644 --- a/Rakefile +++ b/Rakefile @@ -1,10 +1,22 @@ require 'rake' +# Files/dirs that should NOT be symlinked as ~/.. +# `claude/` is handled specially below — we symlink individual entries +# into ~/.claude/ instead of clobbering the whole live directory. +SKIP = %w[Rakefile README.md README.rdoc LICENSE CLAUDE.md id_dsa.pub claude .git .gitignore .DS_Store].freeze + +# Paths inside the repo's claude/ dir that get linked into ~/.claude/. +# Add new entries here as you decide to track more Claude config. +CLAUDE_LINKS = %w[ + settings.json + commands/build-cli.md +].freeze + desc "install the dot files into user's home directory" task :install do replace_all = false Dir['*'].each do |file| - next if %w[Rakefile README.rdoc LICENSE id_dsa.pub].include? file + next if SKIP.include? file if File.exist?(File.join(ENV['HOME'], ".#{file}")) if replace_all @@ -27,6 +39,46 @@ task :install do link_file(file) end end + + install_claude +end + +desc "symlink tracked claude/ entries into ~/.claude/" +task :claude do + install_claude +end + +def install_claude + CLAUDE_LINKS.each do |rel| + src = File.join(Dir.pwd, 'claude', rel) + dest = File.join(ENV['HOME'], '.claude', rel) + + unless File.exist?(src) + puts "claude: missing source #{src}, skipping" + next + end + + FileUtils.mkdir_p(File.dirname(dest)) + + if File.symlink?(dest) && File.readlink(dest) == src + puts "claude: ~/.claude/#{rel} already linked" + next + end + + if File.exist?(dest) || File.symlink?(dest) + print "overwrite ~/.claude/#{rel}? [yn] " + case $stdin.gets.chomp + when 'y' + File.delete(dest) + else + puts "skipping ~/.claude/#{rel}" + next + end + end + + puts "linking ~/.claude/#{rel}" + File.symlink(src, dest) + end end def replace_file(file) diff --git a/claude/commands/build-cli.md b/claude/commands/build-cli.md new file mode 100644 index 0000000000..c4bc492445 --- /dev/null +++ b/claude/commands/build-cli.md @@ -0,0 +1,141 @@ +# Build CLI Command + +You are building a CLI that works well for both humans and agents. Follow these principles strictly when designing and implementing CLI commands. + +## Input + +The user will describe what their CLI should do. They may provide: +- A description of the domain and operations +- Existing API endpoints or data models +- Specific commands they want + +If $ARGUMENTS is provided, treat it as the task description. + +## CLI Design Principles + +### 1. Command Naming + +- Name commands around **user tasks**, not internal API operations +- Use `verb-noun` or `noun verb` patterns consistently (pick one, don't mix) +- Common workflows should require minimal flags +- Group related commands under a shared namespace + +### 2. Output Modes + +Every command that produces output MUST support: + +- **Table output** (default) — human-readable, aligned columns +- **JSON output** (`--output=json` or `-o json`) — machine-readable, stable schema +- **`--fields`** flag to select specific fields in both table and JSON modes +- **`--quiet` / `-q`** — minimal output (e.g., just IDs), useful for piping + +Output schema must be stable across versions. Adding fields is fine; renaming or removing fields is a breaking change. + +### 3. Schema Introspection + +Every command group MUST have a `schema` subcommand that returns: + +```json +{ + "command": "resource list", + "description": "List resources with optional filters", + "flags": { + "--status": { "type": "string", "enum": ["active", "archived"], "default": "active" }, + "--limit": { "type": "integer", "default": 50 } + }, + "output_fields": ["id", "name", "status", "created_at"], + "examples": [ + "cli resource list --status=active --output=json", + "cli resource list --fields=id,name" + ] +} +``` + +This lets agents inspect the CLI contract at runtime without parsing `--help` text. + +### 4. Dry Run + +Commands that **write, mutate, or have side effects** MUST support `--dry-run`: + +- Print the normalized request plan (what would be done) without executing +- Output should be valid JSON when combined with `--output=json` +- Dry run must NOT make network calls or state changes + +Read-only commands do not need `--dry-run`. + +### 5. Input Validation + +- Validate all inputs **before** execution, not during +- Use typed flags (enum, integer, boolean) — don't accept arbitrary strings where a finite set exists +- Provide clear, actionable error messages: say what was wrong AND what is expected +- Prefer explicit flags over positional argument overloading beyond the first argument + +### 6. Error Handling + +- Exit codes: `0` success, `1` general error, `2` usage error (bad input/flags) +- Errors in JSON mode must still be valid JSON: `{"error": "message", "code": "ERROR_CODE"}` +- Never print stack traces in production mode — log them to stderr or a debug file +- Include a `--verbose` / `-v` flag for diagnostic output on stderr + +### 7. Discoverability + +- `--help` on every command and subcommand with usage examples +- Top-level `help` command that lists all command groups +- Consider a `discover` command for CLIs that wrap APIs, to show available endpoints not yet promoted to typed commands + +### 8. Safety Rules for Write Commands + +Write commands (create, update, delete) should: + +- Require explicit confirmation for destructive operations (or `--yes` / `-y` to skip) +- Support `--dry-run` (see above) +- Log what was changed to stdout +- Return the affected resource in the output + +### 9. Standard Global Flags + +Every CLI should support these global flags: + +| Flag | Short | Purpose | +|------|-------|---------| +| `--output` | `-o` | Output format: `table`, `json` | +| `--fields` | | Comma-separated field list | +| `--quiet` | `-q` | Minimal output | +| `--verbose` | `-v` | Debug output on stderr | +| `--dry-run` | | Show plan without executing | +| `--yes` | `-y` | Skip confirmation prompts | +| `--help` | `-h` | Show help | + +### 10. Configuration + +- Support config via file (`~/.config/cli-name/config.toml` or similar), env vars, and flags +- Precedence: flags > env vars > config file > defaults +- Provide a `config show` command to display resolved configuration +- Provide a `config set` command for common settings + +## Implementation Approach + +When building the CLI: + +1. **Start with the command tree** — define all commands and their flags before writing implementation +2. **Implement the output layer first** — table/JSON formatting, error formatting, field selection +3. **Add schema generation** — derive from the command definitions, not hand-maintained +4. **Build commands** — using the shared output and validation infrastructure +5. **Add dry-run** — for all write commands +6. **Write integration tests** — test both human-readable and JSON output modes + +## Technology Preferences + +- Ask the user what language/framework they prefer if not obvious from context +- For TypeScript: consider `commander`, `yargs`, or `oclif` +- For Go: consider `cobra` + `pflag` +- For Python: consider `click` or `typer` +- For Rust: consider `clap` + +## What NOT to Do + +- Don't add hidden magic or implicit behavior that differs between runs +- Don't parse free-text where structured input is possible +- Don't change output format based on whether stdout is a TTY (unless the user explicitly opts into this) +- Don't require interactive input — every interactive prompt must have a flag equivalent +- Don't build features "just in case" — promote from real usage via `discover` patterns diff --git a/claude/settings.json b/claude/settings.json new file mode 100644 index 0000000000..15e5b7aa86 --- /dev/null +++ b/claude/settings.json @@ -0,0 +1,41 @@ +{ + "permissions": { + "defaultMode": "auto" + }, + "model": "opus", + "hooks": { + "Stop": [ + { + "hooks": [ + { + "type": "command", + "command": "osascript -e 'display notification \"Claude needs your attention\" with title \"Claude Code\" sound name \"Ping\"'" + } + ] + } + ] + }, + "enabledPlugins": { + "game-sounds@citedy": true, + "aws-cdk@aws-skills": true, + "aws-cost-ops@aws-skills": true, + "posthog@claude-plugins-official": true, + "frontend-design@claude-plugins-official": true + }, + "extraKnownMarketplaces": { + "citedy": { + "source": { + "source": "github", + "repo": "citedy/claude-plugins" + } + }, + "aws-skills": { + "source": { + "source": "github", + "repo": "zxkane/aws-skills" + } + } + }, + "agentPushNotifEnabled": true, + "skipAutoPermissionPrompt": true +} From 53f67c7e9eb26f7c3dd2679a5ac1ba136f61dbe0 Mon Sep 17 00:00:00 2001 From: Anders Emil Pouplier Date: Tue, 12 May 2026 14:11:18 +0200 Subject: [PATCH 142/144] Oh my zsh --- .gitignore | 1 + Brewfile | 1 + CLAUDE.md | 5 ++--- README.md | 11 +++++++---- Rakefile | 2 +- oh-my-zsh | 1 - zshrc | 12 ++++++++---- 7 files changed, 20 insertions(+), 13 deletions(-) delete mode 160000 oh-my-zsh diff --git a/.gitignore b/.gitignore index a4d4509014..718290212e 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ vim/bundle vim/doc/tags-ja zsh/credentials .bitbucket +oh-my-zsh diff --git a/Brewfile b/Brewfile index d5f029d049..9ae37d2f5d 100644 --- a/Brewfile +++ b/Brewfile @@ -60,6 +60,7 @@ brew "websocat" brew "wget" brew "yarn" brew "zsh" +brew "ngrok" # Mac App Store mas "1Password", id: 1333542190 diff --git a/CLAUDE.md b/CLAUDE.md index 82cb585749..201e49f7fe 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -16,11 +16,11 @@ Consequence for edits: changing a file here changes the live config immediately. ## Key files -- `zshrc` — entry point. Sources `zsh/aliases` and `zsh/functions`, plus `~/.private-dotfiles/shell-init` if present (private repo at `~/code/private-dotfiles`, symlinked as `~/.private-dotfiles`, for secrets and machine-specific env). Uses oh-my-zsh with theme `awesomepanda` and plugins `git docker aws`. +- `zshrc` — entry point. Sources `zsh/aliases` and `zsh/functions`. Uses oh-my-zsh with theme `awesomepanda` and plugins `git docker aws`. - `zsh/aliases`, `zsh/functions` — heavy use of short git aliases (`g`, `gs`, `gp`, `gpcb`, `grom`, …). Prefer extending these over adding new shell scripts. - `zsh/func/` — autoloaded zsh functions (prompt themes, `awsso`, `zgitinit`). - `vimrc` + `vim/` — Vim config; plugins managed by **Vundle** (not vim-plug). After editing the plugin list, run `:PluginInstall` in vim. Vundle itself is not vendored — bootstrap with `git clone https://github.com/gmarik/Vundle.vim.git ~/.vim/bundle/Vundle.vim`. -- `oh-my-zsh/` — full vendored copy of the oh-my-zsh repo, not a submodule. Don't edit files inside it; put customizations in `oh-my-zsh/custom/` or in `zsh/`. +- oh-my-zsh — not tracked in this repo. Installed separately into `~/.oh-my-zsh` via upstream's installer (see README). Listed in `SKIP` in the Rakefile and in `.gitignore`. Put customizations in `zsh/` (which is tracked) rather than in `~/.oh-my-zsh/custom/` (which is not). - `gitconfig` — signs commits via SSH key (`gpg.format = ssh`, `commit.gpgsign = true`); `pull.ff = only`; rich `git l`/`git r`/`git hp` aliases backed by `githelpers`. - `Brewfile` — `brew bundle --file=Brewfile` to install. - `bin/` — small one-off scripts, exposed on `$PATH` via the `~/.bin` symlink. @@ -39,5 +39,4 @@ There is no test suite, linter, or CI — this is config, not code. ## Conventions when editing - Adding shell aliases or functions: put them in `zsh/aliases` or `zsh/functions`. Don't create new top-level files unless they need to land in `$HOME` as a dotfile (the Rakefile will symlink every top-level entry). -- Secrets, work-specific env vars, and per-machine config belong in `~/.private-dotfiles/shell-init`, not here. The public `zshrc` only sources it if present. - The `master` branch is the only branch; commit directly. Commits are SSH-signed automatically via `gitconfig`. diff --git a/README.md b/README.md index 2348e45a7b..1c8b1ed48f 100644 --- a/README.md +++ b/README.md @@ -21,17 +21,20 @@ Personal macOS dotfiles (Apple Silicon). Shell, vim, git, tmux, and a `Brewfile` brew bundle --file=~/.dotfiles/Brewfile ``` Sign in to the App Store first if `mas` entries fail, then re-run `brew bundle`. -5. (Optional) Restore the private repo for secrets and work-specific env: +5. Install oh-my-zsh (the repo doesn't vendor it; `zshrc` expects it at `~/.oh-my-zsh`): ```sh - git clone git@github.com:/private-dotfiles.git ~/code/private-dotfiles - ln -s ~/code/private-dotfiles ~/.private-dotfiles + sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended --keep-zshrc ``` - `zshrc` sources `~/.private-dotfiles/shell-init` automatically when present. + `--keep-zshrc` is critical — without it the installer overwrites the `~/.zshrc` symlink created in step 3. 6. Vim plugins (Vundle): ```sh git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim vim +PluginInstall +qall ``` +7. Install Claude Code via Anthropic's official installer (not Homebrew): + ```sh + curl -fsSL https://claude.ai/install.sh | bash + ``` ## Notes diff --git a/Rakefile b/Rakefile index b53b076eae..e16f12603a 100644 --- a/Rakefile +++ b/Rakefile @@ -3,7 +3,7 @@ require 'rake' # Files/dirs that should NOT be symlinked as ~/.. # `claude/` is handled specially below — we symlink individual entries # into ~/.claude/ instead of clobbering the whole live directory. -SKIP = %w[Rakefile README.md README.rdoc LICENSE CLAUDE.md id_dsa.pub claude .git .gitignore .DS_Store].freeze +SKIP = %w[Rakefile README.md README.rdoc LICENSE CLAUDE.md id_dsa.pub claude oh-my-zsh .git .gitignore .DS_Store].freeze # Paths inside the repo's claude/ dir that get linked into ~/.claude/. # Add new entries here as you decide to track more Claude config. diff --git a/oh-my-zsh b/oh-my-zsh deleted file mode 160000 index e273cf004e..0000000000 --- a/oh-my-zsh +++ /dev/null @@ -1 +0,0 @@ -Subproject commit e273cf004e1ff0510aee61416885f3003bcd15d9 diff --git a/zshrc b/zshrc index b098e0d2f1..59b4cd38a8 100644 --- a/zshrc +++ b/zshrc @@ -24,6 +24,11 @@ chpwd() { ls -lrthG } +# Ngrok +if command -v ngrok &>/dev/null; then + eval "$(ngrok completion)" +fi + # Load oh my zsh source $ZSH/oh-my-zsh.sh @@ -43,15 +48,14 @@ source $HOME/.dotfiles/zsh/functions export JAVA_21_HOME=$(/usr/libexec/java_home -v21) alias java21='export JAVA_HOME=$JAVA_21_HOME' -# Work / machine-specific env (AWS profile, SSO URLs, etc.) belongs in -# ~/.private-dotfiles/shell-init — sourced below if present. -[ -f $HOME/.private-dotfiles/shell-init ] && source $HOME/.private-dotfiles/shell-init - bindkey "^[[1;3D" backward-word bindkey "^[[1;3C" forward-word eval "$(nodenv init -)" +# User-local binaries (Claude Code lives here) +export PATH="$HOME/.local/bin:$PATH" + export PATH="/opt/homebrew/opt/postgresql@17/bin:$PATH" # bun From a61af8b12009c270142687b80e99b02f649e6428 Mon Sep 17 00:00:00 2001 From: Anders Emil Pouplier Date: Wed, 13 May 2026 09:14:47 +0200 Subject: [PATCH 143/144] Cleanup --- Brewfile | 2 -- 1 file changed, 2 deletions(-) diff --git a/Brewfile b/Brewfile index 9ae37d2f5d..ab036c458e 100644 --- a/Brewfile +++ b/Brewfile @@ -8,7 +8,6 @@ cask "codex" cask "copilot-cli" cask "cursor" cask "docker-desktop" -cask "expressvpn" cask "fantastical" cask "figma" cask "flux-app" @@ -18,7 +17,6 @@ cask "iterm2" cask "licecap" cask "ngrok" cask "obsidian" -cask "openvpn-connect" cask "proxyman" cask "rectangle" cask "spotify" From 2b55041fc07ee10ef7894af21dce269d8b5c4d4a Mon Sep 17 00:00:00 2001 From: Anders Emil Pouplier Date: Wed, 13 May 2026 09:14:55 +0200 Subject: [PATCH 144/144] Fix and iterm --- Rakefile | 20 ++++++++++++++++++++ claude/settings.json | 1 + zshrc | 12 ++++++------ 3 files changed, 27 insertions(+), 6 deletions(-) diff --git a/Rakefile b/Rakefile index e16f12603a..77dc3bd04c 100644 --- a/Rakefile +++ b/Rakefile @@ -41,6 +41,7 @@ task :install do end install_claude + configure_iterm end desc "symlink tracked claude/ entries into ~/.claude/" @@ -48,6 +49,11 @@ task :claude do install_claude end +desc "force iTerm2 to Dark theme (ignoring system appearance)" +task :iterm do + configure_iterm +end + def install_claude CLAUDE_LINKS.each do |rel| src = File.join(Dir.pwd, 'claude', rel) @@ -81,6 +87,20 @@ def install_claude end end +# iTerm2 Preferences > Appearance > Theme. TabStyleWithAutomaticOption values: +# 0=Light 1=Dark 2=Light High Contrast 3=Dark High Contrast 4=Automatic 5=Minimal 6=Compact +ITERM_DARK = 1 + +def configure_iterm + current = `defaults read com.googlecode.iterm2 TabStyleWithAutomaticOption 2>/dev/null`.strip + if current == ITERM_DARK.to_s + puts "iterm: theme already Dark" + return + end + puts "iterm: setting theme to Dark (was #{current.empty? ? 'unset' : current})" + system "defaults write com.googlecode.iterm2 TabStyleWithAutomaticOption -int #{ITERM_DARK}" +end + def replace_file(file) system %Q{rm "$HOME/.#{file}"} link_file(file) diff --git a/claude/settings.json b/claude/settings.json index 15e5b7aa86..4ff8aea4a6 100644 --- a/claude/settings.json +++ b/claude/settings.json @@ -36,6 +36,7 @@ } } }, + "theme": "dark", "agentPushNotifEnabled": true, "skipAutoPermissionPrompt": true } diff --git a/zshrc b/zshrc index 59b4cd38a8..e4ba807d82 100644 --- a/zshrc +++ b/zshrc @@ -24,14 +24,14 @@ chpwd() { ls -lrthG } -# Ngrok +# Load oh my zsh +source $ZSH/oh-my-zsh.sh + +# Ngrok (must come after oh-my-zsh so compdef is defined) if command -v ngrok &>/dev/null; then eval "$(ngrok completion)" fi -# Load oh my zsh -source $ZSH/oh-my-zsh.sh - # Python export PYTHONIOENCODING=utf-8 @@ -45,8 +45,8 @@ source $HOME/.dotfiles/zsh/aliases source $HOME/.dotfiles/zsh/functions # Java -export JAVA_21_HOME=$(/usr/libexec/java_home -v21) -alias java21='export JAVA_HOME=$JAVA_21_HOME' +# export JAVA_21_HOME=$(/usr/libexec/java_home -v21) +# alias java21='export JAVA_HOME=$JAVA_21_HOME' bindkey "^[[1;3D" backward-word bindkey "^[[1;3C" forward-word