Last active
February 23, 2016 15:47
Revisions
-
ruph revised this gist
Jun 5, 2015 . 1 changed file with 25 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,29 @@ Set the PS1 prompt (with colors). # Based on http://www-128.ibm.com/developerworks/linux/library/l-tip-prompt/ # And http://networking.ringofsaturn.com/Unix/Bash-prompts.php . # PS1="\h\[\e[32;1m\]:\[\e[32;1m\]\w$ \[\e[0m\]" ## GIT / SVN aware prompt BLACK="\[\033[0;38m\]" RED="\[\033[0;31m\]" RED_BOLD="\[\033[01;31m\]" BLUE="\[\033[01;34m\]" GREEN="\[\033[0;32m\]" parse_git_branch () { git name-rev HEAD 2> /dev/null | sed 's#HEAD\ \(.*\)# (git::\1)#' } parse_svn_branch() { parse_svn_url | sed -e 's#^'"$(parse_svn_repository_root)"'##g' | egrep -o '(tags|branches)/[^/]+|trunk' | egrep -o '[^/]+$' | awk '{print " ("$1")" }' } parse_svn_url() { svn info 2>/dev/null | sed -ne 's#^URL: ##p' } parse_svn_repository_root() { svn info 2>/dev/null | sed -ne 's#^Repository Root: ##p' } PS1='\h\[\e[32;1m\]:\[\e[32;1m\]\w\[\033[0;31m\]$(parse_git_branch)$(parse_svn_branch)\[\033[00m\]\$ ' # Set the default editor to vim. export EDITOR=vim -
ruph revised this gist
May 25, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -46,4 +46,4 @@ alias fixopenwith='/System/Library/Frameworks/CoreServices.framework/Frameworks/ # GNU GLOBAL (gtags) export GTAGSCONF="$HOME/.globalrc" export GTAGSLABEL="pygments-parser" -
ruph revised this gist
May 11, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -46,4 +46,4 @@ alias fixopenwith='/System/Library/Frameworks/CoreServices.framework/Frameworks/ # GNU GLOBAL (gtags) export GTAGSCONF="$HOME/.globalrc" export GTAGSLABEL="ctags" -
ruph revised this gist
May 11, 2015 . 1 changed file with 5 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -42,4 +42,8 @@ alias svnci="svn st | grep ^[AMD] | awk '{print \$2}' | xargs svn ci" # Quick way to rebuild the Launch Services database and get rid # of duplicates in the Open With submenu. alias fixopenwith='/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user' # GNU GLOBAL (gtags) export GTAGSCONF="$HOME/.globalrc" export GTAGSLABLE="ctags" -
ruph revised this gist
Feb 22, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,5 @@ # Set the PS1 prompt (with colors). # Based on http://www.ibm.com/developerworks/library/l-tip-prompt/ # And http://networking.ringofsaturn.com/Unix/Bash-prompts.php . PS1="\[\e[37;1m\]\h\[\e[37;1m\]:\[\e[30;1m\]\w$ \[\e[0m\]" -
ruph revised this gist
Sep 16, 2013 . 1 changed file with 3 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -6,6 +6,9 @@ PS1="\[\e[37;1m\]\h\[\e[37;1m\]:\[\e[30;1m\]\w$ \[\e[0m\]" # Set the default editor to vim. export EDITOR=vim # Proper java home export JAVA_HOME=$(/usr/libexec/java_home) # Set bash history HISTFILE="$HOME/.bash_history" HISTFILESIZE=10240 -
ruph revised this gist
Jun 18, 2013 . 1 changed file with 4 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -33,6 +33,10 @@ alias grep='grep --color=auto --exclude-dir=\.svn' export CLICOLOR=1 export LSCOLORS=GxFxCxDxBxegedabagaced alias svnadd="svn st | grep ^? | awk '{print \$2}' | xargs svn add" alias svndel="svn st | grep ^! | awk '{print \$2}' | xargs svn del" alias svnci="svn st | grep ^[AMD] | awk '{print \$2}' | xargs svn ci" # Quick way to rebuild the Launch Services database and get rid # of duplicates in the Open With submenu. alias fixopenwith='/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user' -
ruph revised this gist
Mar 16, 2013 . 1 changed file with 5 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -31,4 +31,8 @@ alias grep='grep --color=auto --exclude-dir=\.svn' # Sweet colors export CLICOLOR=1 export LSCOLORS=GxFxCxDxBxegedabagaced # Quick way to rebuild the Launch Services database and get rid # of duplicates in the Open With submenu. alias fixopenwith='/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user' -
ruph revised this gist
Nov 4, 2012 . 1 changed file with 7 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -12,15 +12,18 @@ HISTFILESIZE=10240 HISTSIZE=10240 # Avoid succesive duplicates in the bash command history. export HISTCONTROL=ignoredups:erasedups:ignorespace # ... and ignore ls and cd (if they are called without arguments), and bg, # fg, exit, and clear, _and_ any command prefaced with a space export HISTIGNORE='&:clear:ls:cd:[bf]g:exit:[ t\]*' # Append commands to the bash command history file (~/.bash_history) # instead of overwriting it. shopt -s histappend # Write out changes in history after every command export PROMPT_COMMAND="history -a" # Make grep more user friendly by highlighting matches # and exclude grepping through .svn folders. -
ruph revised this gist
Oct 22, 2012 . 1 changed file with 5 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -24,4 +24,8 @@ PROMPT_COMMAND="history -n; history -w; history -c; history -r; $PROMPT_COMMAND" # Make grep more user friendly by highlighting matches # and exclude grepping through .svn folders. alias grep='grep --color=auto --exclude-dir=\.svn' # Sweet colors export CLICOLOR=1 export LSCOLORS=GxFxCxDxBxegedabagaced -
ruph created this gist
Oct 22, 2012 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,27 @@ # Set the PS1 prompt (with colors). # Based on http://www-128.ibm.com/developerworks/linux/library/l-tip-prompt/ # And http://networking.ringofsaturn.com/Unix/Bash-prompts.php . PS1="\[\e[37;1m\]\h\[\e[37;1m\]:\[\e[30;1m\]\w$ \[\e[0m\]" # Set the default editor to vim. export EDITOR=vim # Set bash history HISTFILE="$HOME/.bash_history" HISTFILESIZE=10240 HISTSIZE=10240 # Avoid succesive duplicates in the bash command history. export HISTCONTROL=ignoredups:erasedups # Append commands to the bash command history file (~/.bash_history) # instead of overwriting it. shopt -s histappend # Append commands to the history every time a prompt is shown, # instead of after closing the session. PROMPT_COMMAND="history -n; history -w; history -c; history -r; $PROMPT_COMMAND" # Make grep more user friendly by highlighting matches # and exclude grepping through .svn folders. alias grep='grep --color=auto --exclude-dir=\.svn'