Last active
June 6, 2017 07:44
-
-
Save erickpatrick/b745958b5be615c21d61146430d6a1a5 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# SSH-KEY | |
function sshkey { | |
ssh-keygen -t rsa -b 4096 -C $1 | |
} | |
# GIT | |
alias globalgitconfig="git config --global core.excludesfile ~/.gitignore_global" | |
function addGitUser { | |
git config --global user.name "Erick Patrick" | |
git config --global user.email [email protected] | |
git config --global core.editor "vim" | |
} | |
# DIRECTORY NAVIGATION/CREATION | |
alias mkdir="mkdir -pv" | |
alias la="ls -la" | |
alias cls="clear" | |
alias ..="cd .." | |
# DISK UTILITY | |
alias df="df -Tha --total" | |
# CREATE TAG FILE FOR CURRENT PROJECT | |
# SEND ERROR MESSAGES TO /dev/null IN | |
# ORDER TO KEEP SCREEN CLEAN | |
alias mytags="ctags -R --fields=+laimS --languages=php > /dev/null 2>&1" | |
# REMOVES LINE FROM A FILE, SAVE IT | |
# TO A TMP PLACE AND OVERWRITE IT | |
# BACK WITHOUT LINE WITH THAT | |
# SEARCH TERM | |
# | |
# $1 search term | |
# $2 flie path | |
function removeLine { | |
grep -v $1 $2 > /tmp/tmp_file_without_line ; mv /tmp/tmp_file_without_line $2 | |
} | |
# REMOVES DEFINER FROM SQL DUMPS IN | |
# ORDER TO BE ABLE TO OPERATE WITH | |
# ANY USER FROM NEW RDBS | |
function removeDefiner { | |
perl -p -i.bak -e "s/DEFINER=\`\w.*\`@\`\d[0-3].*[0-3]\`//g" $1 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment