#!/bin/sh # the grep I use the most alias my_grep="grep -Hrnisl" # my weird aliases alias djo_runserver="python manage.py runserver" alias djo_shell="python manage.py shell" alias djo_shellp="python manage.py shell_plus" alias djo_make="python manage.py makemigrations" alias djo_mig="python manage.py migrate" alias djo_csu="python manage.py createsuperuser" alias nimcr="nim c -r" alias my_current_shell="echo $0" alias my_shells="cat /etc/shells" alias mount="sudo mount" alias umount="sudo umount" alias my_public_ip="curl ifconfig.me" alias my_dl_website="wget --random-wait -r -p -e robots=off -U mozilla " alias my_poor_man_bandwith_monitor="watch -n1 'ifconfig eth0 | grep RX' " # curl retrieve header only when doing a post # -D- dump header to stdout # -s no progress bar # -o/dev/null output body to /dev/null alias curlh="curl -s -D- -o/dev/null " # test disk read/write speed alias my_disk_write_speed="dd if=/dev/zero of=/tmp/output.img bs=8k count=256k conv=fdatasync; rm -rf /tmp/output.img" alias my_disk_read_speed="hdparm -Tt /dev/sda" # generate random password, 16 char long alias my_gen_pwd="LANG=c < /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c${1:-16};echo;" alias my_gen_pwd2="openssl rand -base64 16" # go to root dir alias git-root='cd $(git rev-parse --show-cdup)' alias my_installed_packages="dpkg --get-selections" alias my_manually_installed_packages="aptitude search '~i !~M'" alias my_tcp_sockets='ss -s' alias my_tcp_sockets2='netstat -s' alias my_open_ports2='ss -l' alias my_open_ports='netstat -tupln' alias my_open_tcp_port='netstat -plnt' # emacsclient is too long to write alias emax="emacsclient -c" alias my_laptop_serial_number='sudo dmidecode -t 1 | grep -i serial' alias my_show_user_process='ps wu -U' alias fuck="sudo !!" alias my_send_email="emacsclient -c --eval '(mail)'" alias my_emails="emacsclient -c --eval '(gnus)'" alias my_architecture='dpkg --print-architecture' alias my_number_of_cores='cat /proc/cpuinfo |grep processor' alias ip='sudo ip' alias dhclient='sudo dhclient' alias my_debian_version='sudo cat /etc/debian_version' alias my_ubuntu_version='sudo cat /etc/issue' alias my_kernel_info='uname -a' alias my_kernel_release='uname -r' alias emacs="emacs -nw" alias grep="grep --color=auto" alias fgrep="fgrep --color=auto" alias egrep="egrep --color=auto" alias mkdir='mkdir -p' alias my_processes='ps aux | grep' # some more ls aliases alias ls='ls --hide="*~" --color' alias dir='dir --color=auto' alias vdir='vdir --color=auto' alias ll='ls -lh' alias la='ls -lah' # some more mor aliases alias aptitude="sudo aptitude" alias service="sudo service" alias halt='sudo halt' alias wvdial='sudo wvdial' alias apt-get='sudo apt-get' alias dpkg='sudo dpkg' alias h="history" alias j="jobs -l" alias ..="cd .." alias ....="cd ../.." alias ......="cd ../../.." #git alias gstatus='git status' alias gcheckout='git checkout' alias gcommit='git commit' alias grebase='git rebase' alias gbranch='git branch' alias gpull='git pull' alias gpush='git push' alias gadd='git add' alias gmergetool='git mergetool' alias gdiff='git diff --color' alias glog='git log --date-order --all --graph --format="%C(green)%h%Creset %C(yellow)%an%Creset %C(blue bold)%ar%Creset %C(red bold)%d%Creset%s"' alias glog2='git log --date-order --all --graph --name-status --format="%C(green)%h%Creset %C(yellow)%an%Creset %C(blue bold)%ar%Creset %C(red bold)%d%Creset%s"' alias du="du -kh" # Makes a more readable output. alias df="df -kTh" alias ifconfig='/sbin/ifconfig' alias sshx='ssh dev_server' alias my_gatewayaddress="netstat -nr" alias reload_tmuxconf="tmux source-file ~/.tmux.conf" alias reload_bash="source ~/.bashrc" alias reload_alsa="service alsa-utils restart" alias reload_bluetooth='service bluetooth restart' # virtualenv alias my_wifi_list="sudo iw wlan0 scan | less" alias my_top10_running_proc="ps aux | sort -nk +4 | tail"