Skip to content

Instantly share code, notes, and snippets.

View jonsterling's full-sized avatar

Jon Sterling jonsterling

View GitHub Profile

Songs

  1. Bag's Groove (medium swing, sticks)
  2. Up Jumped Spring (WALTZ, medium)
  3. Cascade (medium-up swing, sticks)
  4. History of the Americas (medium-slow swing, sticks)
  5. Subway Sammiches (medium-up bop, sticks)
  6. Lullaby of Birdland (medium swing, square-ish, brushes)
  7. Boplicity (medium swing, brushes)
svn co http://myrepositoryaddress/stuff Project
cd Project
mv trunk ~/development/Project
find . -name ".svn" -type d -exec rm -rf {} ;
#import <Foundation/Foundation.h>
#import "cocos2d.h"
@protocol JSSpriteTouching
@optional
- (void)actOnTouch;
- (void)actOnTouchWithPosition:(CGPoint)pos;
@end
@interface JSTouchSprite : Sprite {
@interface SomeClass : SomeControllerClass <JSTutorialDelegate>
// ...
@end
#define $(obj,method) obj->method(obj)
#define $$(obj,method,args) obj->method(obj,args)
Jon’s full name: Jonathan Sterling
Jon’s original age: 17
adding 30 years…
Jon’s new age: 47
reverting to infancy…
Jon’s new age: 0
Hi! I’m Jonathan Sterling! Hello World!
#import <Cocoa/Cocoa.h>
@interface Conversion : NSObject
@end
@interface Conversion (Abstract)
- (NSString *)firstUnitName;
- (NSString *)secondUnitName;
- (double)secondValueForFirstValue:(double)firstValue;
- (void)didWobble:(NSNotification *)notification;
NSString *WindowControllerPath = [[NSBundle mainBundle] pathForResource:@"WindowController"
ofType:@"st"];
NSString *WindowControllerCode = [NSString stringWithFormat:@"[%@]",
[NSString stringWithContentsOfFile:FileWindowControllerPath
encoding:NSUTF8StringEncoding
error:nil]];
FSBlock *WindowControllerBlock = [WindowControllerCode asBlock];
[WindowConrollerBlock value];
Class WindowController = NSClassFromString(@"WindowController");
JSClass *Dog = [JSClass newClass:@"Dog"
parent:[NSObject class]
properties:[NSArray arrayWithObjects:@"name",@"breed",nil]];
[Dog onClassMessage:@selector(dogWithBreed:)
do:^(id Self, NSString *breed) {
id instance = [[Self alloc] init];
[instance setBreed:breed];
return [instance autorelease];
}];
[Dog addClassProperty:@"kingdom" withValue:@"Animalia"];