Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Updates ...

  • Loading branch information...
commit edca5413d14d930128713223a644b095c85dbb08 1 parent 316ee92
@oc authored
Showing with 252 additions and 36 deletions.
  1. +45 −25 .autotest
  2. +10 −1 .bashrc
  3. +9 −0 .gemrc
  4. +11 −10 .gitconfig
  5. +59 −0 .irbrc
  6. +2 −0  .rvmrc
  7. +116 −0 .zshrc
View
70 .autotest
@@ -1,31 +1,51 @@
require 'autotest'
-#require 'autotest_notification'
require 'autotest/fsevent'
require 'autotest/growl'
-module Autotest::Growl
- def self.growl(title, msg, img, pri=0, stick="")
- system "growlnotify -n autotest --image #{img} -p #{pri} -m #{msg.inspect} #{title} #{stick}"
- end
+ERROR = "~/.rvm/gems/ruby-1.8.7-p302/gems/autotest-growl-0.2.4/img/ruby/error.png"
+FAILED = "~/.rvm/gems/ruby-1.8.7-p302/gems/autotest-growl-0.2.4/img/ruby/failed.png"
+INFO = "~/.rvm/gems/ruby-1.8.7-p302/gems/autotest-growl-0.2.4/img/ruby/info.png"
+PASSED = "~/.rvm/gems/ruby-1.8.7-p302/gems/autotest-growl-0.2.4/img/ruby/passed.png"
+PENDING = "~/.rvm/gems/ruby-1.8.7-p302/gems/autotest-growl-0.2.4/img/ruby/pending.png"
- Autotest.add_hook :initialize do |autotest|
- %w{.git .svn .hg .DS_Store ._* vendor}.each {|exception| autotest.add_exception(exception) }
- false
- end
-
- Autotest.add_hook :ran_command do |autotest|
- results = [autotest.results].flatten.join("\n")
- output = results.slice(/(\d+)\s+tests?,\s*(\d+)\s+assertions?,\s*(\d+)\s+failures?,\s*(\d+)\s+errors?/)
-
- #61 tests, 84 assertions, 0 failures, 0 errors
-
- if output =~ /([1-9]\d*)\s*errors?/
- growl("DOH!", "#{output}", "'/Library/Ruby/Gems/1.8/gems/autotest-growl-0.1.1/img/error.png'", 3)
- elsif output =~ /([1-9]\d*)\s*failures?/
- growl("WELL?", "#{output}", "'/Library/Ruby/Gems/1.8/gems/autotest-growl-0.1.1/img/failed.png'", 3)
- else
- growl("Ok!", "#{output}", "'/Library/Ruby/Gems/1.8/gems/autotest-growl-0.1.1/img/passed.png'")
- end
- end
-end
+#module Autotest::Growl
+# def self.growl(title, msg, img, pri=0, stick="")
+# system "growlnotify -n autotest --image #{img} -p #{pri} -m #{msg.inspect} #{title} #{stick}"
+# end
+#
+# Autotest.add_hook :initialize do |autotest|
+# %w{.git .svn .hg .DS_Store ._* vendor}.each {|exception| autotest.add_exception(exception) }
+# false
+# end
+#
+# Autotest.add_hook :ran_command do |autotest|
+# results = [autotest.results].flatten.join("\n")
+# output = results.slice(/(\d+)\s+tests?,\s*(\d+)\s+assertions?,\s*(\d+)\s+failures?,\s*(\d+)\s+errors?/)
+#
+# #61 tests, 84 assertions, 0 failures, 0 errors
+#
+# if output =~ /([1-9]\d*)\s*(errors?|failed)/
+# growl("DOH!", "#{output}", ERROR, 3)
+# elsif output =~ /([1-9]\d*)\s*(failures?|skipped)/
+# growl("WELL?", "#{output}", FAILED, 3)
+# else
+# growl("Ok!", "#{output}", PASSED)
+# end
+# end
+#
+# Autotest.add_hook :ran_command do |autotest|
+# results = [autotest.results].flatten.join("\n")
+# # Cucumber: 14 steps (2 failed, 3 skipped, 9 passed)
+#
+# output = results.slice(/(\d+)\s+steps?\s*\((\d+)\s+failed,\s*(\d+)\s+skipped,\s*(\d+)\s+passed\)/)
+#
+# if output =~ /([1-9]\d*)\s*failed/
+# growl("DOH!", "#{output}", ERROR, 3)
+# elsif output =~ /([1-9]\d*)\s*skipped/
+# growl("WELL?", "#{output}", FAILED, 3)
+# else
+# growl("Ok!", "#{output}", PASSED)
+# end
+# end
+#nd
View
11 .bashrc
@@ -86,6 +86,15 @@ alias gen='ruby script/generate'
alias m2='mvn clean install'
alias cuke='cucumber features'
+alias m2c='mvn clean install -DskipTests -P-integrationTests'
+
+# Projects (censored)
+alias spo='cd ...'
+alias rep='cd ...'
+alias bk='cd ...'
+alias lab='cd ...'
+alias shp='cd ...'
+
# MySQL via homebrew
alias startmysql='/opt/homebrew/Cellar/mysql/5.1.47/share/mysql/mysql.server start'
alias stopmysql='/opt/homebrew/Cellar/mysql/5.1.47/share/mysql/mysql.server stop'
@@ -139,4 +148,4 @@ alias nomz='ps -aux'
alias nomnom='killall'
alias cya='reboot'
-alias kthxbai='halt'
+alias kthxbai='halt'
View
9 .gemrc
@@ -0,0 +1,9 @@
+---
+:verbose: true
+gem: --no-ri --no-rdoc
+:update_sources: true
+:sources:
+- http://gems.rubyforge.org
+:backtrace: false
+:bulk_threshold: 1000
+:benchmark: false
View
21 .gitconfig
@@ -2,17 +2,20 @@
editor = mate -w
excludesfile = /Users/oc/.gitignore
autocrlf = input
+ safecrlf = true
[alias]
- st = status
- ci = commit
+ a = add
+ b = branch
+ ci = commit -v
+ cia = commit -v -a
co = checkout
- pu = push origin master
- up = pull --rebase
- sup = svn fetch
- sci = svn dcommit
- sreb = svn rebase
- srebt = svn rebase remotes/trunk
+ cp = cherry-pick
+ l = log
+ ll = log -p
+ lm = log master..
reb = rebase
+ st = status
+ up = pull --rebase --stat -v
[user]
name = Ole Christian Rynning
email = oc@rynning.no
@@ -23,5 +26,3 @@
status = auto
[merge]
tool = opendiff
-[filter "tabspace"]
-[filter "tab2space"]
View
59 .irbrc
@@ -0,0 +1,59 @@
+#!/usr/bin/ruby
+require 'irb/completion'
+require 'irb/ext/save-history'
+
+IRB.conf[:SAVE_HISTORY] = 1000
+IRB.conf[:HISTORY_FILE] = "#{ENV['HOME']}/.irb_history"
+IRB.conf[:PROMPT_MODE] = :SIMPLE
+
+%w[rubygems looksee/shortcuts wirble].each do |gemfile|
+ begin
+ require gemfile
+ rescue LoadError
+ puts "Couldn't load #{gemfile}"
+ end
+end
+
+if defined?(Wirble)
+ Wirble.init
+ Wirble.colorize
+end
+
+class Object
+ # list methods which aren't in superclass
+ def local_methods(obj = self)
+ (obj.methods - obj.class.superclass.instance_methods).sort
+ end
+
+ # print documentation
+ #
+ # ri 'Array#pop'
+ # Array.ri
+ # Array.ri :pop
+ # arr.ri :pop
+ def ri(method = nil)
+ unless method && method =~ /^[A-Z]/ # if class isn't specified
+ klass = self.kind_of?(Class) ? name : self.class.name
+ method = [klass, method].compact.join('#')
+ end
+ system 'ri', method.to_s
+ end
+end
+
+def copy(str)
+ IO.popen('pbcopy', 'w') { |f| f << str.to_s }
+end
+
+def copy_history
+ history = Readline::HISTORY.entries
+ index = history.rindex("exit") || -1
+ content = history[(index+1)..-2].join("\n")
+ puts content
+ copy content
+end
+
+def paste
+ `pbpaste`
+end
+
+#load File.dirname(__FILE__) + '/.railsrc' if $0 == 'irb' && ENV['RAILS_ENV']
View
2  .rvmrc
@@ -0,0 +1,2 @@
+rvm_project_rvmrc_default=1
+rvm_gemset_create_on_use_flag=1
View
116 .zshrc
@@ -0,0 +1,116 @@
+# Path to your oh-my-zsh configuration.
+export ZSH=$HOME/.oh-my-zsh
+
+# Set to the name theme to load.
+# Look in ~/.oh-my-zsh/themes/
+export ZSH_THEME="oc"
+
+# Set to this to use case-sensitive completion
+# export CASE_SENSITIVE="true"
+
+# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
+# Example format: plugins=(rails git textmate ruby lighthouse)
+plugins=(git gem textmate ruby brew)
+
+source $ZSH/oh-my-zsh.sh
+
+# fix rvm
+unsetopt auto_name_dirs
+
+# yellow dirs
+export LSCOLORS=DxGxcxdxCxcgcdabagacad
+#LSCOLORS=Gxfxcxdxbxegedabagacad
+
+# Scala
+export SCALA_HOME=/opt/scala
+
+# JRuby Trunk
+export JRUBY_HOME=/opt/jruby-trunk
+
+# JRebel
+export JREBEL_HOME=/opt/jrebel
+
+# Android
+export ANDROID_SDK=/opt/android-sdk-mac_86
+
+# Haskell cabal
+export CABAL_HOME=/Users/oc/.cabal
+
+export RUBYGEMS_BIN=/Library/Ruby/Gems/1.8/bin
+export GEM_EDITOR=mate
+export BUNDLER_EDITOR=mate
+
+# Autotest
+export AUTOFEATURE=true
+
+# OCI8
+export NLS_LANG=NORWEGIAN_NORWAY.UTF8
+export DYLD_LIBRARY_PATH=/opt/oracle/instantclient_10_2
+
+# Maven
+export M2_HOME=/opt/maven
+export MAVEN_OPTS="-XX:MaxPermSize=128m"
+
+export PATH=$JAVA_HOME/bin:$M2_HOME/bin:$PATH:/usr/local/mysql/bin:$JRUBY_HOME/bin:$SCALA_HOME/bin:$ANDROID_SDK/tools:/Users/oc/.gem/ruby/1.8/bin:$CABAL_HOME/bin:$RUBYGEMS_BIN:/Users/oc/bin
+
+# /opt
+for d in local $(ls /opt/ | grep -v local); do
+ FULLPATH=/opt/$d
+ if [ -x $FULLPATH ]; then
+ if [ -x $FULLPATH/bin ]; then
+ export PATH="$PATH:$FULLPATH/bin"
+ fi
+ if [ -x $FULLPATH/sbin ]; then
+ export PATH="$PATH:$FULLPATH/sbin"
+ fi
+ if [ -x $FULLPATH/share/aclocal ]; then
+ export ACLOCAL_FLAGS="-I $FULLPATH/share/aclocal $ACLOCAL_FLAGS"
+ fi
+ if [ -x $FULLPATH/man ]; then
+ export MANPATH="$MANPATH:$FULLPATH/man"
+ fi
+ if [ -x $FULLPATH/share/man ]; then
+ export MANPATH="$MANPATH:$FULLPATH/share/man"
+ fi
+ if [ -x $FULLPATH/lib/pkgconfig ]; then
+ export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$FULLPATH/lib/pkgconfig/"
+ fi
+ fi
+done
+
+# Convenience
+alias ls="ls -G -F"
+alias la="ls -alh"
+alias ll="ls -l"
+alias l="ls"
+
+alias pu="pushd ."
+alias po="popd"
+
+alias j='jruby'
+alias js='jruby -S'
+alias gen='ruby script/generate'
+alias m2='mvn clean install'
+alias m2c='mvn clean install -DskipTests -P-integrationTests'
+alias cuke='cucumber features'
+
+# MySQL via homebrew
+alias startmysql='/opt/homebrew/Cellar/mysql/5.1.47/share/mysql/mysql.server start'
+alias stopmysql='/opt/homebrew/Cellar/mysql/5.1.47/share/mysql/mysql.server stop'
+
+alias startredis='redis-server /opt/homebrew/etc/redis.conf'
+
+# Misc helper functions
+pix() { scp $1 oc:/var/www/oc/pix; }
+
+idiot-mv() {
+ orig=$1
+ dest=$2
+
+ if [[ -f $dest ]]; then
+ git reset HEAD $orig && git reset HEAD $dest && mv $dest ${dest}.tmp && git checkout $orig && git mv $orig $dest && mv ${dest}.tmp $dest && echo "OK"
+ fi
+}
+
+# RVM
+if [[ -s $HOME/.rvm/scripts/rvm ]] ; then source $HOME/.rvm/scripts/rvm ; fi
Please sign in to comment.
Something went wrong with that request. Please try again.