EvilZone

General Tech => Operating System => : Stackprotector March 31, 2014, 12:37:23 PM

: [linux] Bashrc awesomeness thread.
: Stackprotector March 31, 2014, 12:37:23 PM
Okay, let's share some handy things you guys have in your bashrc/bash_profile files. I will start with some git fun:

:
alias gc="git commit -m "
alias ga="git add --all && git status"
alias gp="git push"
: Re: [linux] Bashrc awesomeness thread.
: proxx March 31, 2014, 12:45:06 PM
ZSH FTW!

Will do some digging when I am home.
I know I have this one in:
"alias evilzone='proxychains irrsi --config=/home/me/.config/ircez'"

: Re: [linux] Bashrc awesomeness thread.
: lucid March 31, 2014, 08:47:33 PM
:
alias dshred='find -type f -execdir shred -uvz '{}' \;'
alias ssh='ssh -c blowfish-cbc'

Nice idea with the git stuff Factionwars.
: Re: [linux] Bashrc awesomeness thread.
: 0poitr April 10, 2014, 03:38:12 PM
:
alias bftp="obexftp -b 20:D6:07:03:43:82 -c $1 -p $2"
alias bpush="ussp-push 20:D6:07:03:43:82@9"    # bluetooth push device id@channel number
alias samp='/usr/bin/time -f "Time: %E | Max.Mem: %M K | PF: %F Major %R Minor | Context Swtches: %c"'
alias gdb="gdb -silent"
alias cpu="cpupower -c all frequency-info"
alias mods="lspci -mvk | grep '^Module' | awk '{print $2}' | uniq"  #show currently loaded modules
alias init_dm="stest -flx $PATH|sort -u|tee .cache/dmenu_run|dmenu "$@""

The last one regenerates dmenu cache if it does not pick up new installs, which is rare but happened sometime back, I remember.
: Re: [linux] Bashrc awesomeness thread.
: d4rkcat April 10, 2014, 04:34:05 PM
:
alias ..='cd ..'
alias ...='cd ../../../'
alias ....='cd ../../../../'
alias .....='cd ../../../../../'
alias 000='chmod 000'
alias 644='chmod 644'
alias 755='chmod 755'
alias c='clear'
alias chrome='google-chrome --user-data-dir &> /dev/null&'
alias chromium='chromium-browser --user-data-dir &> /dev/null&'
alias diff='colordiff'
alias dir='dir --color=auto'
alias e='exit'
alias egrep='egrep --color=auto'
alias fastping='ping -c 100 -s.2'
alias fgrep='fgrep --color=auto'
alias grep='grep --color=auto'
alias l='ls'
alias ls='ls -lax --color=auto'
alias mount='mount |column -t'
alias multifox='(iceweasel -P Tor -no-remote &>/dev/null&);(iceweasel -no-remote &>/dev/null&)'
alias mx='chmod a+x'
alias ollydbg='wine /opt/ollydbg.exe 2> /dev/null&'
alias openports='netstat -lntp 2>/dev/null | grep -v '\'' - *$'\'''
alias ps='ps auxf'
alias search='locate -r'
alias server='python -m SimpleHTTPServer'
alias untar='tar -zxvf'
alias update='apt-get update --fix-missing && apt-get -y upgrade --fix-missing'
alias vdir='vdir --color=auto'
alias wget='wget -c
: Re: [linux] Bashrc awesomeness thread.
: Deque April 10, 2014, 07:45:09 PM
:
#less with vim syntax highlighting
alias vless='vim -u /usr/share/vim/vim74/macros/less.vim'

:
#colored man pages
man() {
    env LESS_TERMCAP_mb=$(printf "\e[1;47;34m") \
        LESS_TERMCAP_md=$(printf "\e[1;34m") \
        LESS_TERMCAP_me=$(printf "\e[0m") \
        LESS_TERMCAP_se=$(printf "\e[0m") \
        LESS_TERMCAP_so=$(printf "\e[1;44;33m") \
        LESS_TERMCAP_ue=$(printf "\e[1m") \
        LESS_TERMCAP_us=$(printf "\e[1;33m") \
        man "$@"
}