cat ~/.bash_profile
CLICOLOR=1
LSCOLORS=gxfxcxdxegedabagacad
export PS1="\[\e[31;1m\]\u @ \[\e[36;1m\]\w \[\e[33;1m\]\t $ \[\e[37;1m\]\n"
export TERM=xterm-color
# git alias
alias gs="git status"
alias tao="npm install --registry=https://registry.npm.taobao.org"
alias s="npm run start"
alias b="npm run build"
alias crmaster="git push origin HEAD:refs/for/master"
alias crdev="git push origin HEAD:refs/for/develop"
# alias pull="git pull origin --rebase "
alias pys="python3 -m http.server 9999"
alias un="npm uninstall -S "
alias in="npm install -S "
# component
function comp() {
ng g c $1 --flat --spec=false --lintFix=false --changeDetection=OnPush;
}
# code review
function cr() {
git push origin HEAD:refs/for/omni-static_1-1-$1_BRANCH;
}
function g() {
ng g @xxx/omni-ng-schematics:$1;
}
# lookup port used status
function port() {
lsof -i :$1;
}
function killportpid() {
lsof -i :$1 | grep -v 'PID' | awk '{print $2}' | xargs kill -9;
# ps -ef | grep /usr/local/bin/node | grep -v grep | awk '{print $2}' | xargs kill -9
}
function pull() {
if [ -z $1 ];then
echo 'please input the branch no.';
echo 'usage: pull <branch_no>';
echo 'e.g. pull 17';
else
git pull origin omni-static_1-1-$1_BRANCH --rebase;
fi
}
# Setting PATH for Python 3.7
# The original version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/3.7/bin:/usr/local/mysql/bin:${PATH}"
export PATH
export ICODING_HOME=/Users/ccc/projects/icoding
export PATH="${PATH}:$ICODING_HOME"