by
539 12
0
4
226k
2
Top 1% !
Popular
Pearl of Wisdom
Specified
Popularity: 6535th place
This snippet is Public
No tags for this snippet yet.
LanguageShell
LicenseMIT_X11
SourceGithub

My .bashrc

My .bashrc: 
.bashrc
Copy Embed Code
<iframe id="embedFrame" style="width:600px; height:300px;"
src="https://www.snip2code.com/Embed/20402/My--bashrc?startLine=0"></iframe>
Click on the embed code to copy it into your clipboard Width Height
Leave empty to retrieve all the content Start End
#~/.bashrc: executed by bash(1) for non-login shells #01;32m: #35 = magenta #34 = blue #32 = green #33 = yellow #31 = red #30 = black #29 = white DEFAULT_COLOR="33" if [ "$OSTYPE" == "darwin13" ]; then DEFAULT_COLOR="29" fi if [ -f /etc/redhat-release ]; then DEFAULT_COLOR="31" fi if [ -f /etc/debian_version ]; then DEFAULT_COLOR="32" fi case "$TERM" in xterm-256color) PS1='[\[\033[${DEFAULT_COLOR};${DEFAULT_COLOR}m\]${USER}@\h\[\033[00m\]] \[\033[32;32m\]${PWD}\[\033[00m\]\$ ' ;; xterm-color) PS1='\[\033[${DEFAULT_COLOR};${DEFAULT_COLOR}m\]${USER}@\h\[\033[00m\]:\[\033[32;32m\]${PWD}\[\033[00m\]\$ ' ;; xterm-256color) PS1='\[\033[${DEFAULT_COLOR};${DEFAULT_COLOR}m\]${USER}@\h\[\033[00m\]:\[\033[32;32m\]${PWD}\[\033[00m\]\$ ' ;; xterm*|rxvt*) PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"' ;; *) ;; esac #Top 5 memory hogs function memh() { top -n 5 -o rprvt -l1 | tail -n 5 | awk '{ printf "%5d\t%-10s\t%4.1fMB\n", $1, $2, $(NF-3) }'; } #Back Up and date function bkdate() { cp $1 $1.`date +%Y%m%d`; } # Add a directory to PATH if it exists function add_to_path() { if [ -d $1 ]; then PATH="$1":"${PATH}" fi } add_to_path /usr/bin add_to_path /usr/sbin add_to_path /usr/local/bin add_to_path /usr/local/sbin add_to_path /Library/PostgreSQL8/bin add_to_path /usr/local/lib/erlang/lib/rabbitmq_server-1.4.0/sbin add_to_path ~/SourceCache/from-svn/depot_tools add_to_path ~/bin export PATH if [ -f /usr/bin/nano ]; then export EDITOR="nano" fi if [ -f /usr/bin/pico ]; then export EDITOR="pico" fi if [ -f /usr/local/bin/mate ]; then export EDITOR="mate -aw" fi alias lsl='ls -lFh' alias lsa='ls -laFh' # don't put duplicate lines in the history. See bash(1) for more options export HISTCONTROL=ignoredups # check the window size after each command and, if necessary, # update the values of LINES and COLUMNS. shopt -s checkwinsize if [ "$OSTYPE" == "darwin13" ]; then alias getinfo='xcrun GetFileInfo' alias screenback='/System/Library/Frameworks/ScreenSaver.framework/Resources/ScreenSaverEngine.app/Contents/MacOS/ScreenSaverEngine -background &' alias top='top -u' fi if [ "$OSTYPE" == "linux-gnu" ]; then if [ "$TERM" != "dumb" ]; then eval "`dircolors -b`" alias ls='ls --color=auto' fi fi if [ -f /etc/bash_completion ]; then . /etc/bash_completion fi # Allow per-host customization if [ -f ~/.bashrc_local ]; then . ~/.bashrc_local fi if [ "`which git`!" != "!" ]; then alias tag-genocide='for tag in $(git tag | tr "\n" " "); do git tag -d $tag; done' fi if [ -f ~/.git-completion.sh ]; then . ~/.git-completion.sh fi function http(){ curl http://httpcode.info/$1; } ### Added by the Heroku Toolbelt export PATH="/usr/local/heroku/bin:$PATH"
If you want to be updated about similar snippets, Sign in and follow our Channels

blog comments powered by Disqus