alias to jump to root directory: git rev-parse --show-cdup
[dotfiles] / .bash_aliases
1 #!/bin/sh
2 # my weird aliases
3
4 # go to root dir
5 alias git-root='cd $(git rev-parse --show-cdup)'
6
7 alias my_installed_packages="dpkg --get-selections"
8 alias my_manually_installed_packages="aptitude search '~i !~M'"
9
10 alias my_tcp_sockets='ss -s'
11 alias my_tcp_sockets2='netstat -s'
12 alias my_open_ports2='ss -l'
13 alias my_open_ports='netstat -tupln'
14 alias my_open_tcp_port='netstat -plnt'
15
16
17 # emacsclient is too long to write
18 alias emax="emacsclient -c"
19
20 alias my_laptop_serial_number='sudo dmidecode -t 1 | grep -i serial'
21
22 alias my_show_user_process='ps wu -U'
23
24
25 alias my_send_email="emacsclient -c --eval '(mail)'"
26 alias my_emails="emacsclient -c --eval '(gnus)'"
27
28 alias my_architecture='dpkg --print-architecture'
29 alias my_number_of_cores='cat /proc/cpuinfo |grep processor'
30
31 alias ip='sudo ip'
32 alias dhclient='sudo dhclient'
33
34 alias my_debian_version='sudo cat /etc/debian_version'
35 alias my_ubuntu_version='sudo cat /etc/issue'
36 alias my_kernel_info='uname -a'
37 alias my_kernel_release='uname -r'
38
39 alias emacs="emacs -nw"
40 alias grep="grep --color=auto"
41 alias fgrep="fgrep --color=auto"
42 alias egrep="egrep --color=auto"
43
44 alias mkdir='mkdir -p'
45
46 alias my_processes='ps aux | grep'
47
48 # some more ls aliases
49 alias ls='ls --hide="*~" --color'
50 alias dir='dir --color=auto'
51 alias vdir='vdir --color=auto'
52 alias ll='ls -lh'
53 alias la='ls -lah'
54
55 # some more mor aliases
56 alias aptitude="sudo aptitude"
57 alias service="sudo service"
58 alias halt='sudo halt'
59 alias wvdial='sudo wvdial'
60 alias apt-get='sudo apt-get'
61 alias dpkg='sudo dpkg'
62
63 alias h="history"
64 alias j="jobs -l"
65
66 alias ..="cd .."
67 alias ....="cd ../.."
68 alias ......="cd ../../.."
69
70 #git
71 alias gstatus='git status'
72 alias gcheckout='git checkout'
73 alias gcommit='git commit'
74 alias grebase='git rebase'
75 alias gbranch='git branch'
76 alias gpull='git pull'
77 alias gpush='git push'
78 alias gadd='git add'
79 alias gmergetool='git mergetool'
80 alias gdiff='git diff --color'
81 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"'
82 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"'
83
84 alias du="du -kh" # Makes a more readable output.
85 alias df="df -kTh"
86
87 alias ifconfig='/sbin/ifconfig'
88 alias sshx='ssh dev_server'
89 alias my_gatewayaddress="netstat -nr"
90
91 alias reload_tmuxconf="tmux source-file ~/.tmux.conf"
92 alias reload_bash="source ~/.bashrc"
93 alias reload_alsa="service alsa-utils restart"
94 alias reload_bluetooth='service bluetooth restart'
95
96 # virtualenv
97 alias my_wifi_list="sudo iw wlan0 scan | less"