This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Exception | |
alias_method :_message, :message | |
def message | |
"#{_message}\t\n#{backtrace.join("\t\n")}" | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias rake='macrake' | |
export GEM_HOME=~/.gem/macruby/1.9.2 | |
export GEM_PATH=~/.gem/macruby/1.9.2:/Library/Frameworks/MacRuby.framework/Versions/0.10/usr/lib/ruby/Gems/1.9.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
framework 'Cocoa' | |
require 'pp' | |
view = NSView.alloc.init | |
view.frame.origin.x = 5 | |
pp view.frame |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
framework 'Cocoa' | |
view = NSView.alloc.init | |
view.frame.origin.x = 5 | |
p view.frame.origin.x |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
framework 'Cocoa' | |
view = NSView.alloc.init | |
view.frame.origin.x = 5 | |
p view.frame.origin.x | |
view.frame = [5,0,0,0] | |
p view.frame.origin.x |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
export GEM_HOME="${GEM_HOME:-/Users/msch/.rvm/gems/macruby-0.10}" | |
export GEM_PATH="${GEM_PATH:-/Users/msch/.rvm/gems/macruby-0.10:/Users/msch/.rvm/gems/macruby-0.10@global}" | |
export MY_RUBY_HOME="/Users/msch/.rvm/rubies/macruby-0.10" | |
export PATH="/Users/msch/.rvm/gems/macruby-0.10/bin:/Users/msch/.rvm/gems/macruby-0.10@global/bin:/Users/msch/.rvm/rubies/macruby-0.10/bin:$PATH" | |
exec "/Library/Frameworks/MacRuby.framework/Versions/0.10/usr/bin/macruby" "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Add this to the bottom of your ~/.vimrc to enable jst highlighting | |
au BufNewFile,BufRead *.jst set syntax=jst |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2011-07-03 23:57:52.802 TreeTest[69405:707] An uncaught exception was raised | |
2011-07-03 23:57:52.802 TreeTest[69405:707] keypath _Z_FOK_PARENT not found in entity <NSSQLEntity Item id=1> | |
2011-07-03 23:57:52.806 TreeTest[69405:707] ( | |
0 CoreFoundation 0x00007fff8b443986 __exceptionPreprocess + 198 | |
1 libobjc.A.dylib 0x00007fff8b9ebd5e objc_exception_throw + 43 | |
2 CoreData 0x00007fff8a672a92 -[NSSQLGenerator newSQLStatementForFetchRequest:ignoreInheritance:countOnly:nestingLevel:] + 578 | |
3 CoreData 0x00007fff8a672748 -[NSSQLAdapter _newSelectStatementWithFetchRequest:ignoreInheritance:] + 488 | |
4 CoreData 0x00007fff8a6c26dc -[NSSQLCore newFetchedPKsForSourceID:andRelationship:] + 1324 | |
5 CoreData 0x00007fff8a6c1c70 -[NSSQLCore newValueForRelationship:forObjectWithID:withContext:error:] + 672 | |
6 CoreData 0x00007fff8a6c19c5 -[N |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <Cocoa/Cocoa.h> | |
#include <stdarg.h> | |
// by @MSch <[email protected]> | |
// From http://stackoverflow.com/questions/2632300/looping-through-macro-varargs-values | |
#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) | |
/* C99-style: anonymous argument referenced by __VA_ARGS__, empty arg not OK */ |