customize all the things

This commit is contained in:
Tyrel Souza 2017-05-08 14:04:27 -04:00
parent 634fb11447
commit e505eeb818
No known key found for this signature in database
GPG Key ID: 2EECB5087209E6A5
6 changed files with 1487 additions and 50 deletions

View File

@ -1,21 +1,25 @@
#!/usr/local/bin/zsh
export HOMEBREW_GITHUB_API_TOKEN="caf4cd85c6eb6ddcf006d4571d4a294c0b0592e4"
alias ag='\ag --pager="less"'
alias cg='cd "$(git rev-parse --show-toplevel)"'
alias fuck='eval $(thefuck $(fc -ln -1)); \history -r'
alias g='git'
alias pdb="python -m pdb"
alias ppjson="python -m json.tool"
# Addgene specific
# Aliases
alias adg="workon addgene-core"
alias adocs='cd $ADDGENE_CORE_REPO_DIR/docs && make html && open $ADDGENE_CORE_REPO_DIR/docs/build/html/index.html'
alias aenv='env | sort | grep ADDGENE'
alias sl="source local.env.$(basename $SHELL)"
alias ag='\ag --pager="less"'
alias cg='cd "$(git rev-parse --show-toplevel)"'
alias dots="cd $(dirname `readlink ~/.vim`)"
alias g='git'
alias gp='git push'
alias pdb="python -m pdb"
alias ppjson="python -m json.tool"
alias shrug="echo -n '¯\_(ツ)_/¯' | pbcopy"
alias sl="source local.env"
alias stabbats='sudo killall VDCAssistant && open https://appear.in/stab-bats'
if [[ $OSTYPE == darwin* ]]; then
alias rm=trash;
fi;
# Functions
function adtest () {
no_slashes="$(echo "$1" | sed -e 's/\//\./g')";
a_test="$(echo "$no_slashes" | sed -e 's/.py//g')";
@ -24,14 +28,6 @@ function adtest () {
echo "Evaling $run_test";
eval $run_test;
}
function dots(){
cd $(dirname `readlink ~/.vim`)
}
function adg () {
workon addgene-core
}
function cpbr () {
if branch=$(git symbolic-ref --short -q HEAD)
then
@ -42,9 +38,6 @@ function cpbr () {
fi
}
function hidden() { ls -a "$@" | grep '^\.'; }
alias shrug="echo -n '¯\_(ツ)_/¯' | pbcopy"
function h () {
if [ -z "$*" ]
then
@ -54,4 +47,3 @@ function h () {
fi
}
alias stabbats='sudo killall VDCAssistant && open https://appear.in/stab-bats'

1450
bin/Markdown.pl Executable file

File diff suppressed because it is too large Load Diff

View File

@ -16,32 +16,21 @@
[format]
pretty = format:%C(auto)%h %C(green)%G? %C(red)%<(15,trunc)%aN %C(cyan)%<(15,trunc)%ar %C(white)%<(60,trunc)%s %C(auto)%d
[alias]
# show all these aliases
alias = "!git config -l | grep alias | cut -c 7-"
# delete all merged branches
bc = !git branch --merged master | grep -v master | xargs git branch -d
# Way more information on git log
ll = log --stat --abbrev-commit
# Show files modified per commit
files = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --numstat
# show a tree with branches merging
logtree= "log --graph --oneline --decorate --all"
# get the most 10 recent branches worked on
recent = "!git for-each-ref --format=\"%(committerdate:relative) | %(refname)\" --sort=-committerdate refs/heads | sed '/master/d' | head -n 15"
# show tabs with ⌑ replacing tabs
tabs = "!git diff --color | sed 's/\t/⌑/g'"
# show the current version tag
v=describe --tags --match 'v*'
# alias like `hg st`, because I like st, shorter is nice!
st = status
# prettier diffs
d = diff --color-words
#push
alias = "!git config -l | grep alias | cut -c 7-" # show all these aliases
bc = !git branch --merged master | grep -v master | xargs git branch -d # delete all merged branches
d = diff --color-words # prettier diffs
dsf = "!f() { [ \"$GIT_PREFIX\" != \"\" ] && cd "$GIT_PREFIX"; git diff --color $@ | diff-so-fancy | less --tabs=4 -RFX; }; f" # Diff so fancy!
files = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --numstat # Show files modified per commit
ll = log --stat --abbrev-commit # Way more information on git log
lb = log --stat --no-merges origin/master..
logtree= "log --graph --oneline --decorate --all" # show a tree with branches merging
p = push
pr = !"pr() { git fetch origin pull/$1/head:pr-$1; git checkout pr-$1; }; pr"
# Diff so fancy!
dsf = "!f() { [ \"$GIT_PREFIX\" != \"\" ] && cd "$GIT_PREFIX"; git diff --color $@ | diff-so-fancy | less --tabs=4 -RFX; }; f"
recent = "!git for-each-ref --format=\"%(committerdate:relative) | %(refname)\" --sort=-committerdate refs/heads | sed '/master/d' | head -n 15" # get the most 10 recent branches worked on
scrum = log --since='1 day ago' --author='Tyrel Souza' --oneline
st = status # alias like `hg st`, because I like st, shorter is nice!
tabs = "!git diff --color | sed 's/\t/⌑/g'" # show tabs with ⌑ replacing tabs
v=describe --tags --match 'v*' # show the current version tag
[filter "lfs"]
clean = git-lfs clean %f
smudge = git-lfs smudge %f

12
vimrc
View File

@ -38,7 +38,7 @@ set paste
" Open new split panes to right and bottom, which feels more natural
set splitbelow
" set splitright
set splitright
" Quicker window movement
" Switch between the last two files
@ -133,9 +133,13 @@ nmap <silent> <F1> :set invnumber<CR>
autocmd StdinReadPre * let s:std_in=1
hi Normal ctermbg=none
" Local config
if filereadable($HOME . "/.vimrc.local")
source ~/.vimrc.local
endif
let g:go_fmt_command = "goimports"
nnoremap <leader><tab> :buffers<CR>:buffer<Space>
set background=dark
let vim_markdown_preview_hotkey='<C-m>'
let vim_markdown_preview_github=1
let vim_markdown_preview_browser='Google Chrome'
if filereadable($HOME . "/.vimrc.local")
source ~/.vimrc.local
endif

View File

@ -8,6 +8,7 @@ zstyle ':prezto:load' pmodule \
'utility' \
'completion' \
'tmux' \
'git' \
'python' \
'prompt'
@ -19,6 +20,7 @@ zstyle ':prezto:module:git:status:ignore' submodules 'all'
zstyle ':prezto:module:prompt' theme 'paradox'
zstyle ':prezto:module:prompt' long-pwd 'yes'
zstyle ':prezto:module:terminal:multiplexer-title' format '%s'
zstyle ':prezto:module:tmux:iterm' integrate 'yes'
zstyle ':prezto:module:tmux:auto-start' local 'yes'
zstyle ':prezto:module:tmux' session 'AddgeneImac'
zstyle ':prezto:module:python:info:virtualenv' format 'v:% v'

View File

@ -40,8 +40,8 @@ if [ -e ~/.ssh/id_addgene ];then
ssh-add ~/.ssh/id_addgene
fi
source ~/.bash_aliases
if [ -e $HOME/.credentials ];then
source $HOME/.credentials
fi
source ~/.bash_aliases