Skip to content

Instantly share code, notes, and snippets.

@rodchile
rodchile / gist:1119111
Created August 1, 2011 22:04
UISpec Exception
ld: warning: directory not found for option '-LSpecs/Runner/UISpec/xcode/UISpec/build/Debug-iphonesimulator'
ld: library not found for -lUISpec
Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/llvm-gcc-4.2 failed with exit code 1
@rodchile
rodchile / gist:1233823
Created September 22, 2011 01:33
test trace
35)
NSInternalInconsistencyException in RKObjectRouterSpec beforeAll
Managed object store failed to create persistent store coordinator: Error Domain=NSCocoaErrorDomain Code=134130 "The operation couldn’t be completed. (Cocoa error 134130.)" UserInfo=0xcfc2340 {URL=file://localhost/Users/rorogarcia/Library/Application%20Support/iPhone%20Simulator/5.0/Applications/098C597C-8006-4A5E-9081-F35B38E6492E/Documents/RKSpecs.sqlite, metadata=<CFBasicHash 0xd0882b0 [0x16739e8]>{type = immutable dict, count = 7,
entries =>
2 : <CFString 0xd08a860 [0x16739e8]>{contents = "NSStoreModelVersionIdentifiers"} = <CFArray 0xd08aa90 [0x16739e8]>{type = immutable, count = 1, values = (
0 : <CFString 0x166ec98 [0x16739e8]>{contents = ""}
)}
4 : <CFString 0xd08a890 [0x16739e8]>{contents = "NSPersistenceFrameworkVersion"} = <CFNumber 0xd08a8c0 [0x16739e8]>{value = +366, type = kCFNumberSInt64Type}
6 : <CFString 0xd08aa10 [0x16739e8]>{contents = "NSStoreModelVersionHashes"} = <CFBasicHash 0xd08ae10 [0x16739e8]>{type = immutabl
@rodchile
rodchile / gist:1249093
Created September 28, 2011 20:01
Context Values for Test
Map<String,Object> updateValues = new HashedMap();
updateValues.put("pmtDebtorOrgIdentificationOtherId", "String Rut");
updateValues.put("pmtRequestedExecutionDate","String");
updateValues.put("agreementId","String");
updateValues.put("cctPaymentType", "String");
updateValues.put("clientId","String");
updateValues.put("userId", "String");
updateValues.put("trChannel", "String");
updateValues.put("cctStatus","new");
PaymentObjectDTO payObj = new PaymentObjectDTO();
@rodchile
rodchile / gist:1705475
Created January 30, 2012 17:10
RkRequestQueue
RKClient* requestClient = [RKClient clientWithBaseURL:MBLoginURL];
requestClient.disableCertificateValidation = YES;
RKRequest* theRequest = [requestClient requestWithResourcePath:@"" delegate:self];
[theRequest setHTTPBodyString:httpBody];
[theRequest setMethod:RKRequestMethodPOST];
[theRequest send];
@rodchile
rodchile / my singleton Methods
Created February 26, 2012 23:55
Singleton Methods on Ruby
myObject = Object.new
def myObject.sayHello
puts 'Hello from my singleton method! This is me: '
puts self
end
myObject.sayHello
puts "Any doubts? I'm still the same object:"
puts myObject
//
// main.c
// first_program
//
// Created by Rodrigo Garcia on 1/18/13.
// Copyright (c) 2013 Rodrigo Garcia. All rights reserved.
//
#include <stdio.h>
#import <QuartzCore/QuartzCore.h>
static long long __color1 = 0x2ACE46;
static long long __color2 = 0x34AADC;
@interface MViewController ()
@property (nonatomic,strong) CALayer *layerColor;
@property (nonatomic,strong) UIColor *color1;
@rodchile
rodchile / C string reverser
Created January 5, 2014 21:00
Implementing a C string reverser
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
void reverseString (char **str)
{
char *strCopy = *str;
int size = strlen(strCopy) - 1;
@rodchile
rodchile / gist:8289420
Created January 6, 2014 20:34
Script to verify if a given C string is a permutation of other C string
#include <stdlib.h>
#include <stdio.h>
#include <stdbool.h>
#include <string.h>
char *sortString (char *stringToSort)
{
int stringLenght = strlen(stringToSort);
char *sortedString = strdup(stringToSort);
### Keybase proof
I hereby claim:
* I am rodchile on github.
* I am rodchile (https://keybase.io/rodchile) on keybase.
* I have a public key whose fingerprint is F7BF 1FAB A5EF BAD3 D21A C35F 51F9 8C77 5A3F 7177
To claim this, I am signing this object: