Created
August 28, 2015 04:34
-
-
Save mul14/e3c44a1ff1a27f437d09 to your computer and use it in GitHub Desktop.
Useful Aliases for me
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
#!/usr/bin/env sh | |
alias ping8='ping 8.8.8.8' | |
alias pingg='ping google.com' | |
alias ls='ls --group-directories-first --color -F --time-style=long-iso' | |
alias lsd='ls -l | grep "^d"' | |
alias lsf='ls -l | grep "^-"' | |
alias mkdir='mkdir -p' | |
alias remove-unnecessary-files="find . -type f \( -name .DS_Store -o -name Thumbs.db \) -print0 | xargs -0 rm" | |
alias fuck='eval $(thefuck $(fc -ln -1 | tail -n 1)); fc -R' | |
# Compress | |
# zip [-recursive] [-X without OS X extra files like .DS_Store] [folder] | |
alias create_zip='zip -r -X' | |
alias create_targz='tar -zcf' | |
alias create_tarbz2='tar -jcf' | |
alias untar='tar xf --' | |
alias vi='vim -u $HOME/.virc' | |
alias mvi='mvim -u $HOME/.virc' | |
alias evim='vim -y' | |
alias wget-mirror='wget -mkEpnp' | |
alias portscan='netstat -tulpn' | |
alias phantomjs-webdriver='phantomjs --webdriver=4444' | |
alias selenium-server='java -jar ~/bin/selenium-server-standalone.jar $1' | |
mysql_recreate_database(){ | |
if [ -z "$1" ] | |
then | |
echo "Nama database jangan lupa" | |
else | |
mysql -uroot -proot -e "DROP DATABASE IF EXISTS $1; CREATE DATABASE $1;" | |
fi | |
} | |
# phpserver(){ /usr/local/bin/php -S 0.0.0.0:$2 -t $1} | |
phpserver(){ /usr/local/bin/php -S 0.0.0.0:${2:-8080} -t ${1:-.} } | |
# Mac OS X only | |
alias hidedesktop="defaults write com.apple.finder CreateDesktop -bool false && killall Finder" | |
alias showdesktop="defaults write com.apple.finder CreateDesktop -bool true && killall Finder" | |
# Laravel | |
alias art='APP_ENV=local php artisan --env=local' | |
alias artp='APP_ENV=production php artisan --env=production' | |
# Reset permissions | |
alias chmod-reset='find . -type d -print0 | xargs -0 chmod 755 && find . -type f -print0 | xargs -0 chmod 644' | |
alias ppjson='python -m json.tool' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment