Skip to content

Instantly share code, notes, and snippets.

@lucian303
Last active October 12, 2015 11:57
Show Gist options
  • Save lucian303/4022684 to your computer and use it in GitHub Desktop.
Save lucian303/4022684 to your computer and use it in GitHub Desktop.
server .bashrc
# .bashrc
# User specific aliases and functions
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
# .bashrc
# User specific aliases and functions
alias cp='cp'
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
# set variable identifying the chroot you work in (used in the prompt below)
if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then
debian_chroot=$(cat /etc/debian_chroot)
fi
##########################################################################
function parse_git_branch () {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u @ \h \[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]$(parse_git_branch)$ '
EDITOR='nano'
export EDITOR
# User specific aliases and functions
alias ..='cd ..'
alias 777='sudo chmod -R 777 $1'
alias 7777='chmod -R 777 $1'
alias a='alias'
alias add='svn add '
alias apa='cd /usr/local/apache2'
alias brc='nano ~/.bashrc'
alias ci='svn ci '
alias cl='clear'
alias conf='cd /usr/local/apache/conf.d'
alias dif='diff -wyW 200 --suppress-common-lines $1 $2'
alias ex='exit'
alias fd='grep -HIirn -A 1'
alias go='cd /var/www/html/lucian'
alias h='history'
alias hh='history | tail -n 30'
alias home='cd ~'
alias l='ls -alFh'
alias l.='ls -dh .* --color=tty'
alias lapache='cd /usr/local/apache/conf.d/'
alias lg='svn log|more'
alias ll='ls -llh'
alias log='tail -fn 30 /usr/local/apache2/logs/error_log'
alias ls='ls --color=tty'
alias lsd='ls -lah'
alias lsdd='ls -lahd'
alias n='nano'
alias nosvn='tar --exclude=*.svn -czvf $1 $2'
alias nosvn2='|grep -v "svn"'
alias ns='nslookup'
alias own='sudo chown -R you:yourgroup $1'
alias peardir='cd /usr/local/lib/php'
alias perms='svn -R ps perms 777 $1'
alias po='popd'
alias pu='pushd $1'
alias rd='rmdir'
alias rsa='service httpd restart'
alias src='source ~/.bashrc'
alias st='svn st '
alias stat='svn status'
alias sup='svn up'
alias tarr='tar czvf $1 $2'
alias untar='tar xzvf $1'
alias unbz='tar xjvf $1'
alias v='vi'
alias vi='vim'
alias ht='cd ~/public_html'
alias co='svn co https://corp.goingon.us/repos/goingon/trunk/$1/'
alias fb='cd /home/users/public_html/fb_lucianux'
alias sql='mysql -uroot -proot'
alias gadd='git add'
alias gco='git commit'
alias givekey='cat .ssh/id_rsa.pub | ssh lucianth@lucian303.com '\''cat >> .ssh/authorized_keys'
alias gpull='git pull'
alias gpush='git push'
alias gst='git status'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment