This file contains hidden or 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
request.setTimeout 1000 () => | |
console.log('TIMEOUT???!??!?!'); |
This file contains hidden or 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
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath | |
{ | |
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:kGameCellIdent forIndexPath:indexPath]; | |
if ( cell.tag != 1 ) { | |
UITapGestureRecognizer tappy = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(_cellTapped:)]; | |
[cell addGestureRecognizer:tappy]; | |
cell.tag = 1; | |
} |
This file contains hidden or 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
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath | |
{ | |
EALobbyGameCell *cell = [tableView dequeueReusableCellWithIdentifier:kGameCellIdent forIndexPath:indexPath]; | |
if ( [cell viewWithTag:444] == nil ) { | |
// make gesture recoginzer and give it a tag of 444 | |
}) | |
// set target here |
This file contains hidden or 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
@implementation UIDevice (EAAdditions) | |
+ (BOOL)isFourInch | |
{ | |
static dispatch_once_t onceToken; | |
static BOOL itIs = NO; | |
dispatch_once(&onceToken, ^{ | |
CGRect screenBounds = [[UIScreen mainScreen] bounds]; | |
if (screenBounds.size.height == 568) { | |
itIs = YES; |
This file contains hidden or 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
Evil Apples is hiring! | |
=== HOORAY === | |
Our App has over 250,000 downloads and at any given moment a TON of socket connections. | |
We are a Top 5 Word Game and Top 100 Game in the Apple App Store! | |
We are getting more and more attention every day so it is time to find a Node guru to | |
take charge. A wizard or Jedi is also acceptable. | |
No sorcerers. We don't trust sorcerers. |
This file contains hidden or 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
/** | |
THE PROBLEM: | |
NSDictionary *d = [sever getMeta]; | |
// d.score returns something of type 'NSArray' | |
NSNumber *userId = [d objectForKey:@"score"]; | |
NSInteger i = [userId integerValue]; // <<------- Now what happens! |
This file contains hidden or 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
var cluster = require('cluster'), | |
redis = require("socket.io/node_modules/redis"), | |
numCPUs = require('os').cpus().length; | |
if (cluster.isMaster) { | |
//master process - fork children | |
for (var i = 0; i < numCPUs; i++) { | |
cluster.fork(); | |
} |
This file contains hidden or 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
+ (id) objectFromJSONData:(NSData *)data error:(NSError **)error { | |
Class serializer; | |
// try SBJson first | |
serializer = NSClassFromString(@"SBJsonParser"); | |
if (serializer) { | |
id parser; | |
id object; | |
parser = [[serializer alloc] init]; |
This file contains hidden or 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
var post_options = { | |
host: 'https://buy.itunes.apple.com', | |
port: '80', | |
path: '/verifyReceipt', | |
method: 'POST', | |
// headers: { | |
// 'Content-Type': 'application/x-www-form-urlencoded', | |
// 'Content-Length': bodyData.length | |
// } |
This file contains hidden or 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)_getProductsById:(NSSet *)productIDs | |
{ | |
NSAssert(self.requestingProducts, @"Should be busy from previous method (getProductsWithCompletion)"); | |
NSAssert(self.productRequest == nil, @"logic"); | |
EALog(@"Getting items: %@", productIDs); | |
SKProductsRequest *productRequest = [[SKProductsRequest alloc] initWithProductIdentifiers:productIDs]; | |
[productRequest setDelegate:self]; |