-
-
Save flyfire/1102218 to your computer and use it in GitHub Desktop.
common alias
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
#!/bin/bash | |
export EDITOR='/usr/bin/vim' | |
export PS1="\[\e[36;1m\]\u\[\e[0m\]@\[\e[32;1m\]\h\[\e[0m\]:\[\e[31;1m\]\w\[\e[0m\]\n$" | |
alias a=alias | |
a grep="grep --color=auto -s" | |
#ls | |
a l='ls -CFG' | |
a la='ls -AG' | |
a ll='ls -alFG' | |
a ls='ls -G' | |
#network | |
a myip='/sbin/ifconfig |grep -oP "((?<=inet addr:)|(?<=inet ))[\d.]+" && curl -s ifconfig.me' | |
a sv="myip && python -m SimpleHTTPServer &" | |
a ping="ping -c 3" | |
a ar="sudo /etc/init.d/httpd restart" #apache restart | |
#editor | |
a ss=". ~/.bash_profile && echo 'Profile updated.'" | |
a e="$EDITOR" | |
a ea="e ~/.bash_aliases && . ~/.bash_profile && echo 'Alieas updated!'" | |
a ef="e ~/.bash_functions && . ~/.bash_profile && echo 'Functions updated!'" | |
a ee="e ~/.bash_profile && . ~/.bash_profile && echo 'Profile updated'" | |
a ev="e ~/.vimrc && echo 'vimrc updated.'" | |
#python related | |
a py=python | |
a ipy=ipython | |
a py3=python3 | |
a pmr="python manage.py runserver" | |
a pm="python manage.py" | |
#misc | |
a tree="find . -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g'" | |
a ?=" bc <<< $* " | |
a host="sudo vim /etc/hosts" | |
a count="sort | uniq -c| sort -nr" | |
#char convert | |
a g2u="iconv -f gbk -t utf-8" | |
a b2u="iconv -f big5 -t utf-8" | |
a mysql='mysql --default-character-set=utf8 --auto-rehash' | |
a x='exit' | |
a sec="date '+%s'" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment