Created
July 9, 2019 04:39
-
-
Save ijleesw/a54054bf24e10ea4e058ae2b31053a81 to your computer and use it in GitHub Desktop.
.bashrc setting for ubuntu 14.04
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias v='vim ' | |
alias sudo='sudo ' | |
alias p='python3.5 ' | |
alias gsq='gnome-session-quit' | |
alias :q='exit' | |
psg() { | |
ps -ef | grep $1 | |
} | |
pspid() { | |
ps -ef | grep $1 | grep -v grep | awk '{printf "%s\t", $2; for (i=8; i<=NF; i++) printf " %s", $i; printf "\n"}' | grep $1 | |
} | |
lsg() { | |
if (( $# == 1 )) | |
then | |
ls | grep $1 | |
elif (( $# == 2)) | |
then | |
ls $1 | grep $2 | |
else | |
echo 'lsg: should have 1 or 2 arguments.' | |
fi | |
} | |
cla() { | |
clang++ -std=c++11 -g a.cpp && ./a.out | |
} | |
cl() { | |
clang++ -std=c++11 $* && ./a.out | |
} | |
k9() { | |
kill -9 $* | |
} | |
kall() { | |
ps aux | grep $1 | grep -v grep | awk '{print $2}' | xargs kill -9 | |
} | |
gdif () { | |
if [ "$#" -ne 1 ]; then | |
printf "Usage: gdif <commit_hash>\n" | |
return 1 | |
fi | |
git diff $1~ $1 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment