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
# Load HexString and automatically extend String: | |
require 'hex_string' | |
# Convert data to human-readable hex tuples: | |
>> "hello".to_hex_string | |
=> "68 65 6c 6c 6f" | |
# Compact a hex string into its data equivalent: | |
>> "77 6f 72 6c 64".to_byte_string | |
=> "world" |
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
# Load HexString and automatically extend String: | |
require 'hex_string' | |
# Convert data to human-readable hex tuples: | |
>> "hello".to_hex_string | |
=> "68 65 6c 6c 6f" | |
# Compact a hex string into its data equivalent: | |
>> "77 6f 72 6c 64".to_byte_string | |
=> "world" |
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 <Foundation/Foundation.h> | |
@interface CrozSpecialObjectionModule : ObjectionModule { | |
UIWindow *_window; | |
} | |
@property (nonatomic, readonly, retain) IBOutlet UIWindow *window; | |
- (id) initWithWindow:(UIWindow *)window; | |
@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
#import "CrozSpecialObjectionModule.h" | |
@implementation CrozSpecialObjectionModule | |
@synthesize window = _window; | |
- (id) initWithWindow:(UIWindow *)window { | |
if ((self = [super init])) { | |
_window = [window retain]; | |
} | |
return self; |
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 "SpecHelper.h" | |
#import "CrozSpecialObjectionModule.h" | |
SPEC_BEGIN(CrozSpecialObjectionModuleSpec) | |
describe(@"ClassName", ^{ | |
__block CrozSpecialObjectionModule *target = nil; | |
__block UIWindow *window = nil; | |
beforeEach(^{ |
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
// | |
// CrozSpecialAppDelegate.m | |
// CrozSpecial | |
// | |
// Created by David Crosby on 7/21/11. | |
// Copyright 2011 __MyCompanyName__. All rights reserved. | |
// | |
#import "CrozSpecialAppDelegate.h" | |
#import "CrozSpecialObjectionModule.h" |
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
desc "Generate Arduino code tags" | |
task :tags do | |
sh %{ctags -f tags.cpp `find . -name "*.cpp" -o -name "*.h"`} | |
sh %{ctags -f tags.pde --langmap=c++:.pde `find . -name "*.pde"`} | |
sh %{cat tags.cpp tags.pde > tags} | |
sh %{sort tags -o tags} | |
rm_f Dir["tags.*"] | |
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
patiently do | |
page.should have_content("Task Table") | |
page.should have_selector(".row:nth-child(1)", text: "Ride to work") | |
page.should have_selector(".row:nth-child(2)", text: "Write some code") | |
page.should have_selector(".row:nth-child(3)", text: "Go to The Meanwhile") | |
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
class Car | |
construct_with :chassis, :engine, :highway | |
end | |
car = Conject.default_object_context[:car] |