Skip to content

Instantly share code, notes, and snippets.

View alexbasson's full-sized avatar

Alex Basson alexbasson

View GitHub Profile

Keybase proof

I hereby claim:

  • I am alexbasson on github.
  • I am abasson (https://keybase.io/abasson) on keybase.
  • I have a public key ASBvGahDfxpJSM-7SUDgmlDCkdHh5g3lofLi03SzGxlcbAo

To claim this, I am signing this object:

def system_or_exit(cmd, stdout = nil)
puts "Executing #{cmd}"
cmd += " > \"#{stdout}\"" if stdout
system(cmd) or raise "******** Build failed ********"
end
namespace :git do
desc "Merge feature branch"
task :merge do
system_or_exit 'git checkout master'
@alexbasson
alexbasson / Cantor.h
Last active August 29, 2015 14:05
Simple 1-1 mapping between `NSIndexPath`s and `NSInteger`s.
#import <Foundation/Foundation.h>
@interface Cantor : NSObject
- (NSInteger)tagForIndexPath:(NSIndexPath *)indexPath;
- (NSIndexPath *)indexPathForTag:(NSInteger)tag;
@end
NSInteger kSectionPrime = 3;