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
WAT is a Brainfuck variant, | |
+ -> WAT | |
- -> WAAT | |
> -> WAAAT | |
< -> WAAAAT | |
. -> WAAAAAT | |
, -> WAAAAAAT | |
[ -> WAAAAAAAT | |
] -> WAAAAAAAAT |
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
guard | |
!arguments.isEmpty, | |
nums.count = arguments.count | |
else | |
{ | |
print("Usage: \(appName) <list-of-positive-integers>") | |
exit(-1) | |
} |
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
// | |
// NSArray+JBDiff.h | |
// Tyche | |
// | |
// Created by Joel Bernstein on 9/16/09. | |
// | |
#import <Foundation/Foundation.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
{ | |
"response": { | |
"ack": true, | |
"sessions": [ | |
{ | |
"id": "6150", | |
"title": "Color Management Lab", | |
"track": "Graphics and Games", | |
"type": "Lab", | |
"room": "Graphics and Games Lab A", |
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
varying highp vec2 textureCoordinate; | |
uniform sampler2D inputImageTexture; | |
#define M_PI 3.1415926535897932384626433832795 | |
void main() | |
{ | |
highp vec2 centered = textureCoordinate - vec2(0.5, 0.5); | |
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
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions | |
{ | |
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; | |
self.viewController = [[JBViewController alloc] initWithNibName:@"JBViewController" bundle:nil]; | |
self.window.rootViewController = self.viewController; | |
// ADD THIS LINE: | |
[self.window setTransform:CGAffineTransformMakeScale(0.81, 0.81)]; | |
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
+(NSData*)dataForPOSTWithDictionary:(NSDictionary *)dictionary boundary:(NSString *)boundary | |
{ | |
NSMutableData* postBodyData = [NSMutableData data]; | |
for(NSString* key in dictionary) | |
{ | |
id value = [dictionary valueForKey:key]; | |
if([value isKindOfClass:[NSData class]]) | |
{ |
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
@interface NSArray (BlockEnumerationTest) | |
-(void)enumerateObjectsUsingBlockType1:(void (^)(id, NSUInteger, BOOL *))block; | |
-(void)enumerateObjectsUsingBlockType2:(void (^)(id, NSUInteger, BOOL *))block; | |
@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
-(void)authenticateWithEmail:(NSString*)email password:(NSString*)password retries:(int)retries andThen:(BasicBlock)work | |
{ | |
NSString* urlString = @"https://www.google.com/accounts/ClientLogin"; | |
NSMutableDictionary* requestParameters = [NSMutableDictionary dictionary]; | |
[requestParameters setObject:email forKey:@"Email"]; | |
[requestParameters setObject:password forKey:@"Passwd"]; | |
[NSURLConnection postToUrlString:urlString withParameters:requestParameters completionBlock:^(NSData* data, NSURLResponse* response, NSError* error) |
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 "Common.h" | |
@interface AnimatedFloat : NSObject | |
@property (nonatomic, assign) GLfloat startValue; | |
@property (nonatomic, assign) NSTimeInterval startTime; | |
@property (nonatomic, assign) GLfloat endValue; | |
@property (nonatomic, assign) NSTimeInterval endTime; | |
@property (nonatomic, assign) AnimationCurve curve; |