Reorganising slightly to hopefully work on Linux

pull/2/head
Bodaniel Jeanes 2009-04-26 16:55:34 +10:00
parent 8d3f6e1511
commit a5a644a072
4 changed files with 51 additions and 33 deletions

43
aliases
View File

@ -7,13 +7,12 @@ alias g='grep -i' #case insensitive grep
alias h='history|g'
alias ducks='du -cks * | sort -rn|head -11' # Lists the size of all the folders
alias top='top -o cpu'
alias systail='tail -f /var/log/system.log'
alias m='mate .'
alias et="m"
alias home='cd ~' # the tilda is too hard to reach
alias systail='tail -f -n0 /var/log/system.log'
alias aptail='tail -f -n0 /var/log/apache*/*log'
alias l='ls'
alias b='cd -'
alias c='clear' # shortcut to clear your terminal
alias eprof='mate ~/.dot-files'
alias sprof='source ~/.bash_profile'
# useful command to find what you should be aliasing:
@ -29,25 +28,31 @@ alias controller='script/generate controller'
alias migration='script/generate migration'
alias migrate='rake db:migrate'
alias rollback='rake db:rollback'
alias startpg='sudo /Library/StartupItems/PostgreSQL/PostgreSQL start'
alias r='rake'
# replacement netstat cmd to find ports used by apps on OS X
alias netstat="sudo lsof -i -P"
alias hidefile='/usr/bin/SetFile -a "V"'
alias showfile='/usr/bin/SetFile -a "v"'
alias colorslist="set | egrep 'COLOR_\w*'" # lists all the colors
function f() { find * -name $1; }
function manpdf() { man -t $@ | open -f -a Preview; }
if [ $system_name == 'Darwin' ]; then
function manpdf() { man -t $@ | open -f -a Preview; }
function osinfo() {
x1="$(/usr/bin/sw_vers -productName)"
x2="$(/usr/bin/sw_vers -productVersion)"
x3="$(/usr/bin/sw_vers -buildVersion)"
x4="$(/usr/bin/arch)"
echo "${x1} - ${x2} - ${x3} - ${x4}"
}
function osinfo() {
x1="$(/usr/bin/sw_vers -productName)"
x2="$(/usr/bin/sw_vers -productVersion)"
x3="$(/usr/bin/sw_vers -buildVersion)"
x4="$(/usr/bin/arch)"
echo "${x1} - ${x2} - ${x3} - ${x4}"
}
alias m='mate .'
alias et="m"
alias o='open .'
alias eprof="mate ~/.dot-files"
alias hidefile='/usr/bin/SetFile -a "V"'
alias showfile='/usr/bin/SetFile -a "v"'
alias startpg='sudo /Library/StartupItems/PostgreSQL/PostgreSQL start'
alias readrails="mate `ruby -rubygems -e "puts( ['rails', 'activerecord', 'activeresource', 'actionpack', 'activesupport'].collect { |gem| gems = Gem.source_index.find_name(gem); gems.last.full_gem_path; }.join(' '))"`"
fi

12
bashrc
View File

@ -1,11 +1,15 @@
system_name=`uname -s` # Sets 'Darwin' or 'Linux' etc
source ~/.exports
# source ~/.bash_completion
source ~/.gitrc
source ~/.gemdoc
source ~/.aliases
source ~/.terminal
source ~/.save-directory
if [ $system_name == 'Darwin' ]; then
source ~/.gemdoc
source ~/.terminal
fi
export PS1='$(__git_ps1 "\[${COLOR_RED}\](%s)\[${COLOR_NC}\] ")\$ '
# readline settings
@ -16,4 +20,4 @@ bind "set show-all-if-ambiguous On" # this allows you to automatically show comp
shopt -s checkwinsize
shopt -s histappend
complete -C ~/.rake-completion.rb -o default rake
complete -C ~/.rake-completion.rb -o default rake}

23
exports
View File

@ -1,9 +1,20 @@
export PATH="/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/:$PATH"
export PATH="/Library/PostgreSQL8/bin/:$PATH"
if [ $system_name == 'Darwin' ]; then
export EDITOR='mate -w'
export PATH="/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/:$PATH"
export PATH="/Library/PostgreSQL8/bin/:$PATH"
else
export EDITOR='nano -w'
fi
export PATH="/usr/local/mysql/bin/:$PATH"
export PATH=/opt/local/bin:/opt/local/sbin:$PATH
export PATH="/opt/local/bin:/opt/local/sbin:$PATH"
export PATH="$PATH:/usr/local/jruby/bin"
export IRBRC="$HOME/.irbrc"
export GIT_EDITOR=$EDITOR
export VISUAL=$EDITOR
export COLOR_NC='\e[0m' # No Color
export COLOR_WHITE='\e[1;37m'
export COLOR_BLACK='\e[0;30m'
@ -25,9 +36,6 @@ export COLOR_LIGHT_GRAY='\e[0;37m'
export TERM=xterm-color
export GREP_OPTIONS='--color=auto' GREP_COLOR='1;32'
export CLICOLOR=1
export EDITOR='mate -w'
export GIT_EDITOR=$EDITOR
export VISUAL=$EDITOR
# sets title of window to be user@host
export PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*} ${PWD}"; echo -ne "\007"'
@ -35,4 +43,5 @@ export PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*} ${PWD}"; echo -n
export BASH_COMPLETION='~/.bash_completion'
# export HISTCONTROL=erasedups # I actually want duplicates because of profileme
export HISTSIZE=1000000
export HISTSIZE=1000000

6
gemrc
View File

@ -1,10 +1,10 @@
---
:benchmark: false
:gem: --no-ri --no-rdoc
:verbose: true
:update_sources: true
:bulk_threshold: 1000
:backtrace: false
:sources:
- http://gems.rubyforge.org/
- http://gems.github.com/
:backtrace: false
:bulk_threshold: 1000
:benchmark: false