Skip to content

Instantly share code, notes, and snippets.

+ [[ -n '' ]]
+ export 'PS4=+ ${BASH_SOURCE##${rvm_path:-}} : ${FUNCNAME[0]:+${FUNCNAME[0]}()} ${LINENO} > '
+ PS4='+ ${BASH_SOURCE##${rvm_path:-}} : ${FUNCNAME[0]:+${FUNCNAME[0]}()} ${LINENO} > '
+ /scripts/cli : __rvm_parse_args() 746 > [[ -z '' ]]
+ /scripts/cli : __rvm_parse_args() 746 > [[ -n '' ]]
+ /scripts/cli : __rvm_parse_args() 748 > [[ 0 -eq 1 ]]
+ /scripts/cli : __rvm_parse_args() 748 > [[ -n '' ]]
+ /scripts/cli : __rvm_parse_args() 19 > [[ -n install ]]
+ /scripts/cli : __rvm_parse_args() 21 > rvm_token=install
+ /scripts/cli : __rvm_parse_args() 23 > (( 8 > 0 ))
@remear
remear / face_detector.rb
Created December 7, 2011 22:16 — forked from mattetti/face_detector.rb
Macruby Face Detection in Mac OS X Lion. Usage: $ macruby face_detector.rb or $ macruby face_detector.rb image_url
framework 'Cocoa'
class NSColor
def toCGColor
color_RGB = colorUsingColorSpaceName(NSCalibratedRGBColorSpace)
## approach #1
# components = Array.new(4){Pointer.new(:double)}
# color_RGB.getRed(components[0],
# green: components[1],
# blue: components[2],
defaults write .GlobalPreferences NSUserKeyEquivalents -dict-add "Paste and Match Style" -string "@v"
$ rake osx:deps:install
git fetch shoes
git merge shoes/shoes
fatal: 'merge' is not possible because you have unmerged files.
Please, fix them up in the work tree, and then use 'git add/rm <file>' as
appropriate to mark resolution and make a commit, or use 'git commit -a'.
rake aborted!
Command failed with status (128): [git merge shoes/shoes...]
fatal: Not a git repository (or any of the parent directories): .git
git remote add shoes git://github.com/wasnotrice/homebrew.git
fatal: Not a git repository (or any of the parent directories): .git
rake aborted!
Command failed with status (128): [git remote add shoes git://github.com/wasn...]
ERROR: Error running 'GEM_HOME='/usr/local/rvm/gems/ruby-1.9.2-p290@albinochipmunk' GEM_PATH='/usr/local/rvm/gems/ruby-1.9.2-p290@albinochipmunk' gem install rails -v 3.0.0 ', please read /usr/local/rvm/log/ruby-1.9.2-p290/gem.install.log
[2011-08-31 09:51:12] GEM_HOME='/usr/local/rvm/gems/ruby-1.9.2-p290@albinochipmunk' GEM_PATH='/usr/local/rvm/gems/ruby-1.9.2-p290@albinochipmunk' gem install webrat -v 0.7.2
/usr/local/rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/config_file.rb:237:in `exist?': Insecure operation - exist? (SecurityError)
from /usr/local/rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/config_file.rb:237:in `load_file'
from /usr/local/rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/config_file.rb:178:in `initialize'
NSLog(@"%f", NSAppKitVersionNumber);
=> 1138.000000
#if NSAppKitVersionNumber >= 1138
NSLog(@"OS X LION");
#else
NSLog(@"OS X SNOW LEOPARD");
#endif
=> OS X SNOW LEOPARD
@remear
remear / gist:1104604
Created July 25, 2011 17:11
gem installer example
rails -v 3.0.0
rspec
mysql -- --with-mysql-dir=/usr/local/mysql
jquery-rails
benchmark
sqlite -v 1.3.3
webrat -v 0.7.2
{
"jruby-1.6.1" = (
global,
monkey
);
"rbx-head" = (
global
);
"ruby-1.8.7-p334" = (
global
$ rvm gemset list ruby-1.9.2-head strings
ERROR: Gemset 'strings' does not exist, rvm gemset create 'strings' first.
WARN: ruby ruby-1.9.2-head is not installed.
To install do: 'rvm install ruby-1.9.2-head'
albinochipmunk
global