1
0
mirror of https://github.com/meineerde/dotfiles.git synced 2026-02-06 00:53:23 +00:00

Merge branch 'master' of github.com:meineerde/dotfiles

This commit is contained in:
Holger Just 2011-09-03 11:44:46 +02:00
commit 644d81e907
2 changed files with 20 additions and 13 deletions

29
.bashrc
View File

@ -40,6 +40,13 @@ if [[ -s $HOME/.rvm/scripts/rvm ]] ; then
source $HOME/.rvm/scripts/rvm ;
fi
# REE tweaks to make it faster for specs.
export RUBY_HEAP_MIN_SLOTS=1000000
export RUBY_HEAP_SLOTS_INCREMENT=1000000
export RUBY_HEAP_SLOTS_GROWTH_FACTOR=1
export RUBY_GC_MALLOC_LIMIT=1000000000
export RUBY_HEAP_FREE_MIN=500000
# NVM
[[ -s $HOME/.nvm/nvm.sh ]] && source $HOME/.nvm/nvm.sh
@ -234,16 +241,17 @@ alias ciam='git ci -am'
alias got='git'
alias goit='git'
alias ss="script/server -b 127.0.0.1"
alias sc="script/console"
alias be="bundle exec"
alias rs="rails server -b 127.0.0.1"
alias rc="rails console"
ss() { if [[ -x script/server ]]; then script/server -b 127.0.0.1 $@; else rs $@; fi }
sc() { if [[ -x script/console ]]; then script/console $@; else rc $@; fi }
# if cat is called on a directory, call ls instead
cat() {
if [[ $# = 1 ]] && [[ -d $1 ]]; then
ls $1
ls "$1"
else
/usr/bin/env cat "$@"
fi
@ -251,25 +259,24 @@ cat() {
# directory for project
d() {
for dir in $HOME/workspace/$1 $HOME/$1 $1 /Volumes/Finn/$1 $RUBY_PATH/$RUBY_VERSION/lib/ruby/gems/*/gems/$1-*; do
if [[ -d $dir ]]; then
local dir
for dir in $HOME/workspace/$1 $HOME/$1 $1 /Volumes/Finn/$1 $RUBY_PATH/$RUBY_VERSION/lib/ruby/gems/*/gems/$1-* $GEM_HOME/gems/$1-*; do
if [[ -d "$dir" ]]; then
echo $dir
break
fi
done
unset dir
}
# do stuff with project
with_project() {
target=$(d $1)
local target=$(d "$1")
if [[ $target ]]; then
echo $2 $target
$2 $target
echo "$2 $target"
"$2" "$target"
else
echo "unknown project"
fi
unset target
}
# cd to project

View File

@ -16,8 +16,6 @@
grep = auto
interactive = auto
ui = auto
[help]
autocorrect = 1
[push]
default = matching
[core]
@ -25,3 +23,5 @@
editor = mate -wl1
[github]
user = meineerde
[branch]
autosetupmerge = true