2017-07-09 00:07:36 +03:00
|
|
|
alias ls='ls --color=auto'
|
|
|
|
|
alias grep='grep --color=auto'
|
|
|
|
|
alias fgrep='fgrep --color=auto'
|
|
|
|
|
alias egrep='egrep --color=auto'
|
|
|
|
|
alias py='python3.6'
|
2017-11-10 12:00:02 +00:00
|
|
|
alias whatisopen='sudo netstat -pnlt'
|
2017-07-09 00:07:36 +03:00
|
|
|
alias calc='gcalccmd'
|
|
|
|
|
alias pmr='python manage.py runserver'
|
|
|
|
|
alias nopmr="netstat -pnlt | grep -E -o -e '[0-9]+/python' | cut -d '/' -f 1 | xargs kill"
|
|
|
|
|
alias pmm='python manage.py migrate'
|
|
|
|
|
alias pmmm='python manage.py makemigrations'
|
|
|
|
|
|
|
|
|
|
# git aliases
|
|
|
|
|
alias gs='git status'
|
|
|
|
|
alias ga='git add $1'
|
|
|
|
|
alias gc='git commit'
|
|
|
|
|
alias gp='git push origin master'
|
2017-12-04 09:57:03 +00:00
|
|
|
alias gpull='git pull origin master'
|
2017-07-09 00:07:36 +03:00
|
|
|
|
|
|
|
|
# MSR registers is responsible for lag after suspend
|
|
|
|
|
alias checkcpu='modprobe msr; rdmsr -a 0x19a'
|
|
|
|
|
alias fixcpu='wrmsr -a 0x19a 0x0'
|
|
|
|
|
|
2018-02-05 15:23:19 +00:00
|
|
|
alias daimi="grep -rnwi $2 $1"
|
2017-11-08 00:00:02 +00:00
|
|
|
alias muzika='xdg-open /home/viktor/Documents/Music/njoy.m3u'
|
2017-07-09 00:07:36 +03:00
|
|
|
alias randomstr="tr -dc a-z1-4 </dev/urandom | tr 1-2 ' \n' | awk 'length==0 || length>50' | tr 3-4 ' ' | sed 's/^ *//' | cat -s | sed 's/ / /g' |fmt"
|
|
|
|
|
alias battery="upower -i /org/freedesktop/UPower/devices/battery_BAT0 | grep -E 'time to empty|state|to\ full|percentage'"
|
2017-10-02 00:00:02 +01:00
|
|
|
alias omg="sudo service NetworkManager restart"
|
2017-10-30 12:00:02 +00:00
|
|
|
alias omg1.1="sudo modprobe -r iwlwifi; sudo modprobe iwlwifi"
|
2017-07-09 00:07:36 +03:00
|
|
|
alias zsh_fix="mv ~/.zsh_history ~/.zsh_history_bad; strings ~/.zsh_history_bad > ~/.zsh_history;fc -R ~/.zsh_history; rm ~/.zsh_history_bad"
|
2017-10-17 12:00:02 +01:00
|
|
|
alias myip="curl ifconfig.co"
|
2017-10-03 00:00:02 +01:00
|
|
|
alias rmswp="find ~/.vim/tmp/ -iname \"*swp\" -delete"
|
2017-10-19 00:00:02 +01:00
|
|
|
alias root="sudo su -"
|
2017-07-09 00:07:36 +03:00
|
|
|
|
2018-04-20 22:00:02 +01:00
|
|
|
function svali_papka() {
|
2017-07-09 00:07:36 +03:00
|
|
|
svn checkout $(echo $1 | sed "s/\/tree\/[a-zA-Z]\+/\/trunk/")
|
|
|
|
|
}
|
|
|
|
|
|
2018-01-18 12:00:02 +00:00
|
|
|
function bye() {
|
2018-01-22 12:00:02 +00:00
|
|
|
if ps -p $(pidof rsync) 2> /dev/null
|
2018-01-18 12:00:02 +00:00
|
|
|
then
|
|
|
|
|
echo 'Rsync is running, not going to sleep.'
|
|
|
|
|
else
|
2018-04-20 22:00:02 +01:00
|
|
|
/bin/lock && sudo systemctl suspend
|
2018-01-18 12:00:02 +00:00
|
|
|
fi
|
|
|
|
|
}
|
|
|
|
|
|
2017-07-09 00:07:36 +03:00
|
|
|
alias sizeof="du -sh $1"
|
2017-07-12 14:26:50 +03:00
|
|
|
alias mkdir="mkdir -pv"
|
2017-07-24 00:00:02 +03:00
|
|
|
|
2018-04-20 22:00:02 +01:00
|
|
|
function psave() {
|
|
|
|
|
sudo service bluetooth stop
|
|
|
|
|
sudo service ModemManager stop # moile broadband service
|
|
|
|
|
sudo service vmware stop
|
|
|
|
|
sudo service vmware-workstation-server stop
|
2017-11-08 00:00:02 +00:00
|
|
|
}
|