Skip to content

Instantly share code, notes, and snippets.

{
results = (
{
createdAt = "2012-07-09T07:13:24.593Z";
details = "First Store";
image = {
"__type" = File;
name = "9d2d8a0d-36fb-4abe-9908-bebd7fb39056-christmas.gif";
url = "http://files.serverapp.com/bcee5dd3-46dc-40a8-abe6-37da2732e809/1store.png";
@quique123
quique123 / AppDelegate
Last active December 14, 2015 17:09
first run check
-(void)checkIfFirstRun{
NSString *bundleVersion = [[NSBundle mainBundle] objectForInfoDictionaryKey:(NSString *)kCFBundleVersionKey];
NSString *appFirstStartOfVersionKey = [NSString stringWithFormat:@"first_start_%@", bundleVersion];
NSNumber *alreadyStartedOnVersion = [[NSUserDefaults standardUserDefaults] objectForKey:appFirstStartOfVersionKey];
if(!alreadyStartedOnVersion || [alreadyStartedOnVersion boolValue] == NO) {
// Preload plist data
[self parsePlistIntoCD];
[[NSUserDefaults standardUserDefaults] setObject:[NSNumber numberWithBool:YES] forKey:appFirstStartOfVersionKey];
}
@quique123
quique123 / AppDelegate.m
Created February 27, 2013 19:33
Cocos2d Image Size Bug
//
// AppDelegate.m
// Honduras
//
// Created by Marcio Valenzuela on 7/8/11.
// Copyright Personal 2011. All rights reserved.
//
#import "cocos2d.h"
//
// SecondViewController.m
// FarsimanTab
//
// Created by Marcio Valenzuela on 11/26/12.
// Copyright (c) 2012 Marcio Valenzuela. All rights reserved.
//
#import "SecondViewController.h"
#import "SDCoreDataController.h"
@quique123
quique123 / Layer.mm
Created December 7, 2012 01:03
Santiboy
//
// Puzzle2Layer.m
// iSanti
//
// Created by Marcio Valenzuela on 1/19/12.
// Copyright 2012 M2Studio. All rights reserved.
//
#import "Puzzle2Layer.h"
#import "SimpleQueryCallback.h"
@quique123
quique123 / json.php
Created September 24, 2012 14:12
json php file
<?php
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
/**
* Converts to and from JSON format.
*
* JSON (JavaScript Object Notation) is a lightweight data-interchange
* format. It is easy for humans to read and write. It is easy for machines
* to parse and generate. It is based on a subset of the JavaScript
* Programming Language, Standard ECMA-262 3rd Edition - December 1999.
@quique123
quique123 / CPHopper.m
Created May 9, 2012 20:38
Chipmunk Hopper v6
static cpBool preSolveHG(cpArbiter *arb, cpSpace *space, CPHopper *hopper){/////////////pass it hopper reference
if(cpvdot(cpArbiterGetNormal(arb, 0), ccp(0,-1)) < 0){/////////////////////////////ignore bottom collision
cpArbiterIgnore(arb);
return cpFalse;
}
////////////////////////////////////////////////////////////////////////If collision from top, set to TRUE
hopper.isOnGround = TRUE;
return cpTrue;
}
@quique123
quique123 / CPHopper.m
Created May 8, 2012 18:05
Chipmunk Hopper
@implementation CPHopper
@synthesize groundShapes, jetpack, hasShield;
@synthesize myDebugLabel;
//methods for collision detec chipmunk
static cpBool beginHG(cpArbiter *arb, cpSpace *space, void *ignore) {
CP_ARBITER_GET_SHAPES(arb, hopperShape, groundShape);
CPHopper *hopper = (CPHopper *)hopperShape->data;
cpVect n = cpArbiterGetNormal(arb, 0);
if (n.y < 0.0f) {
@quique123
quique123 / user_save.php
Created April 17, 2012 20:51
createUserLoginphp
<?
include"master_inc.php";
//--------------------------------------------------------------------------RECEIVE LOCAL VARIABLES FROM FORM
$lastname = strip_tags(substr($_POST['lastname'],0,32));
$firstname = strip_tags(substr($_POST['firstname'],0,32));
$phone = strip_tags(substr($_POST['phone'],0,32));
$password_hint=$_REQUEST['password_hint'];
$noERROR=1;
$udidposted = $_REQUEST['udid'];
@quique123
quique123 / CPHopper.h
Created April 12, 2012 21:26
Chipmunk Collision Detecion
//
// CPHopper.h
// PlanetHopper
//
// Created by Marcio Valenzuela on 12/29/11.
// Copyright (c) 2011 M2Studio. All rights reserved.
//
#import "CPSprite.h"