misc changes
This commit is contained in:
parent
e590542f82
commit
6b5a4eaca4
@ -1,7 +1,7 @@
|
||||
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 fuck='eval $(thefuck $(fc -ln -1)); \history -r'
|
||||
alias g='git'
|
||||
alias pdb="python -m pdb"
|
||||
alias ppjson="python -m json.tool"
|
||||
@ -11,7 +11,7 @@ alias adocs='cd $ADDGENE_CORE_REPO_DIR/docs && make html && open $ADDGENE_CORE_R
|
||||
alias deploy_all="fab -R silver-web deploy:master && fab -R gold-web deploy:master && fab -R jupyter fab -R jupyter deploy_jupyter && fab --parallel avail_staging_hosts deploy:master"
|
||||
alias deploy_all_migration="fab -R silver-web deploy:master,1 && fab -R gold-web deploy:master,1 && fab -R jupyter deploy_jupyter & fab --parallel avail_staging_hosts deploy:master,1"
|
||||
alias aenv='env | sort | grep ADDGENE'
|
||||
alias sl='source local.env'
|
||||
alias sl="source local.env.$(basename $SHELL)"
|
||||
|
||||
if [[ $OSTYPE == darwin* ]]; then
|
||||
alias rm=trash;
|
||||
|
@ -11,11 +11,15 @@
|
||||
interactive = auto
|
||||
[push]
|
||||
default = current
|
||||
[fetch]
|
||||
prune = true
|
||||
[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
|
||||
@ -37,6 +41,7 @@
|
||||
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"
|
||||
scrum = log --since='1 day ago' --author='Tyrel Souza' --oneline
|
||||
[filter "lfs"]
|
||||
clean = git-lfs clean %f
|
||||
smudge = git-lfs smudge %f
|
||||
|
@ -1,3 +1,7 @@
|
||||
import sys
|
||||
import pprint
|
||||
sys.displayhook = pprint.pprint
|
||||
try:
|
||||
import pdir
|
||||
except ImportError:
|
||||
pass
|
||||
|
36
zshrc
36
zshrc
@ -3,7 +3,6 @@ plugins=(git sudo github django python pip cp vagrant virtualenv nmap rvm)
|
||||
if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]; then
|
||||
ZSH_THEME="soliah"
|
||||
else
|
||||
ZSH_THEME="candy"
|
||||
ZSH_THEME="tyrel"
|
||||
export VIRTUAL_ENV_DISABLE_PROMPT=1
|
||||
fi
|
||||
@ -92,3 +91,38 @@ function adtest () {
|
||||
function dots(){
|
||||
cd $(dirname `readlink ~/.zshrc`)
|
||||
}
|
||||
alias shrug="echo -n '¯\_(ツ)_/¯' | pbcopy"
|
||||
|
||||
function h () {
|
||||
if [ -z "$*" ]
|
||||
then
|
||||
history
|
||||
else
|
||||
history | egrep "$@"
|
||||
fi
|
||||
}
|
||||
|
||||
if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]; then
|
||||
export PS1="<ssh>$PS1"
|
||||
fi
|
||||
alias stabbats='sudo killall VDCAssistant && open https://appear.in/stab-bats'
|
||||
|
||||
|
||||
function GitHub()
|
||||
{
|
||||
git_url=`git config --get remote.origin.url`
|
||||
if [[ $git_url == https://github* ]];
|
||||
then
|
||||
url=${git_url%.git}
|
||||
else
|
||||
if [[ $git_url == git@github.com* ]]
|
||||
then
|
||||
url="https://github.com/${${git_url:15}%.git}"
|
||||
else
|
||||
echo "ERROR: Remote origin is invalid" && return false;
|
||||
fi
|
||||
fi
|
||||
open $url
|
||||
}
|
||||
|
||||
alias github=GitHub
|
||||
|
Loading…
Reference in New Issue
Block a user