Merge branch 'master' of gitlab.com:tyrelsouza/dotfiles

This commit is contained in:
Tyrel Souza 2017-04-26 23:02:08 -04:00
commit ef338dbf97
No known key found for this signature in database
GPG Key ID: 2EECB5087209E6A5
5 changed files with 53 additions and 3 deletions

View File

@ -2,7 +2,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"
@ -12,7 +12,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;
@ -45,4 +45,39 @@ function cpbr () {
}
function hidden() { ls -a "$@" | grep '^\.'; }
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

7
bin/resolv_work.sh Executable file
View File

@ -0,0 +1,7 @@
#!/bin/bash
cp /etc/resolv.conf /home/tyrelsouza/prev_resolv.conf
echo > /etc/resolv.conf
echo "nameserver 10.0.2.22" >> /etc/resolv.conf
echo "search addgene.org" >> /etc/resolv.conf

View File

@ -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

View File

@ -1,3 +1,7 @@
import sys
import pprint
sys.displayhook = pprint.pprint
try:
import pdir
except ImportError:
pass

1
zshrc
View File

@ -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