ajmorris (owner)

Revisions

  • 230f53 ajmorris Thu Feb 12 11:35:49 -0800 2009
  • 5e5d19 ajmorris Tue Jan 13 08:13:58 -0800 2009
gist: 46503 Download_button fork
public
Public Clone URL: git://gist.github.com/46503.git
Embed All Files: show embed
.bash_profile #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
### .bash_profile
 
export EDITOR='mate -w'
export VISUAL='mate -w'
export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:$PATH"
function parse_git_branch {
  git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
 
function proml {
  local RED="\[\033[0;31m\]"
  local GREEN="\[\033[0;32m\]"
  local LIGHT_GREEN="\[\033[1;32m\]"
  local BLUE="\[\033[0;34m\]"
  local LIGHT_BLUE="\[\033[1;34m\]"
  local WHITE="\[\033[1;37m\]"
  local LIGHT_GRAY="\[\033[0;37m\]"
  local LIGHT_PURPLE="\[\033[1;35m\]"
  local PURPLE="\[\033[0;35m\]"
  local LIGHT_CYAN="\[\033[1;36m\]"
  local CYAN="\[\033[0;36m\]"
  case $TERM in
    xterm*)
    TITLEBAR='\[\033]0;\u@\h:\w\007\]'
    ;;
    *)
    TITLEBAR=""
    ;;
  esac
 
PS1="${TITLEBAR}\
$CYAN[$PURPLE\u$LIGHT_CYAN@$PURPLE\h:$LIGHT_CYAN\w$GREEN\$(parse_git_branch)$CYAN]\
$CYAN\$ "
PS2='> '
PS4='+ '
}
proml
 
#export PS1='[\e[36m\u\e[0m\e[32m@\h\e[0m \e[33m\W\e[31m$(__git_ps1 " (%s)")\e[0m]
#> '
# Use this in any RAILS_ROOT dir. That restart.txt file tells mod_rails to restart this app.
# You'll want to do this when (for example) you install a new plugin.
alias restart_rails='touch tmp/restart.txt'
 
# By default, your app's error log now goes here. Unless you configure your apps otherwise,
# it's helpful to have an alias to take you to your error log quickly.
alias apache_logs='cd /private/var/log/apache2/'
 
# You'll be adding to your vhosts configuration everytime you introduce a new Rails app.
# Might as well make it a shortcut
alias vhosts='sudo vi /private/etc/apache2/extra/httpd-vhosts.conf'
 
# Dito with hosts
alias hosts='sudo vi /etc/hosts'
 
# You'll need to restart apache whenever you make a change to vhosts.
# You can also click System Preference->Sharing->Web Sharing, but this is quicker.
alias apache_restart='sudo apachectl restart'
 
# Starts tailing the log file.
# You need to be in the RAILS_ROOT dir for this to work.
alias loggerd='tail -f log/development.log'