Skip to content

Instantly share code, notes, and snippets.

View gmcerveny's full-sized avatar

Greg Cerveny gmcerveny

View GitHub Profile
-(PragBook *) book{
if (!book) {
self.book = [[PragBook alloc] init];
//self.book.title = @"Manage Your Project Portfolio";
//self.book.author = @"Johanna Rothman";
NSDictionary *bookInfo = [NSDictionary dictionaryWithObjectsAndKeys:
@"Manage Your Project Portfolio", @"title",
@"Johana Rothman", @"author", nil];
[self.book setValuesForKeysWithDictionary:bookInfo];
}
@interface PragBook : NSObject {
NSString *title;
NSString *author;
NSMutableArray *chapters;
}
@interface Chapter : NSObject {
NSString *chapterTitle;
NSNumber *pageCount;
}
@gmcerveny
gmcerveny / gist:940973
Created April 25, 2011 18:37
UIAlertViewDelegate isKeyWindow
- (void)willPresentAlertView:(UIAlertView *)alertView
{
return; //[[[self view] window] isKeyWindow] YES
}
- (void)didPresentAlertView:(UIAlertView *)alertView
{
return; //[[[self view] window] isKeyWindow] NO
}
@gmcerveny
gmcerveny / gist:1235575
Created September 22, 2011 18:25
Gregtaur Resume
G
reg
Cer
ven
yOb
jec
tiv
eDelive renga
gin gexperi enc
eso niOSand OSX
@gmcerveny
gmcerveny / gist:1343466
Created November 6, 2011 20:55
Core Audio Ch 2 Tone Generator Lion Changes
asbd.mFormatID = kAudioFormatLinearPCM;
asbd.mFormatFlags = kAudioFormatFlagIsBigEndian | kAudioFormatFlagIsSignedInteger | kAudioFormatFlagIsPacked;
NSLog (@"wrote %ld samples", sampleCount);
@gmcerveny
gmcerveny / testname
Created December 14, 2011 21:28
testing
{ "Greg" }
$ curl -X POST http://jsonbin.herokuapp.com/
access at http://jsonbin.herokuapp.com/abf052c9
$ curl -X PUT -d "oops=there goes my skirt" http://jsonbin.herokuapp.com/abf052c9
{"oops":"there goes my skirt"}
$ curl http://jsonbin.herokuapp.com/abf052c9
@gmcerveny
gmcerveny / AMViewController.h
Created January 30, 2012 23:47
Completion block
//
// AMViewController.h
// testAnimation
//
// Created by Greg Cerveny on 1/30/12.
// Copyright (c) 2012 Artful Medium, LLC. All rights reserved.
//
#import <UIKit/UIKit.h>
@gmcerveny
gmcerveny / gist:2045062
Created March 15, 2012 16:21
SXSW 2012 Music
## Thursday
12-6p
Music Gear Expo
Exhibit Hall 5
http://sxsw.com/music/expos/gear
1p-3:45p
Dubspot @ SXSW
Exhibit Hall 5
- (UIImage *)getNextImage {
if (!self.demonstrationImages || [self.demonstrationImages count] == 0)
return nil;
UIImage *nextImage = [self.demonstrationImageEnumerator nextObject];
if (nextImage)
return nextImage;
self.demonstrationImageEnumerator = [self.demonstrationImages objectEnumerator];
return [self getNextImage];