This file contains 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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>DVTConsoleDebuggerInputTextColor</key> | |
<string>0.000 0.000 0.000 1</string> | |
<key>DVTConsoleDebuggerInputTextFont</key> | |
<string>Inconsolata - 14pt</string> | |
<key>DVTConsoleDebuggerOutputTextColor</key> | |
<string>0.000 0.000 0.000 1</string> |
This file contains 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
// in the app delegate | |
RKObjectManager *objectManager = [RKObjectManager objectManagerWithBaseURL:@"http://192.168.0.29:8080/"]; | |
RKManagedObjectStore *objectStore = [RKManagedObjectStore objectStoreWithStoreFilename:@"TestJSON.sqlite"]; | |
[objectManager setObjectStore:objectStore]; | |
// following is called within a view | |
if (self) { |
This file contains 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)setUp | |
{ | |
[super setUp]; | |
RKObjectManager *objectManager = [RKObjectManager | |
objectManagerWithBaseURL:@"http://192.168.0.29:8080/"]; | |
[RKObjectManager setSharedManager:objectManager]; | |
// [RKObjectManager sharedManager].objectStore = [RKManagedObjectStore objectStoreInMemory]; | |
RKManagedObjectStore *objectStore = [RKManagedObjectStore objectStoreInMemory]; |
This file contains 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
NSString *jsonString = [self readJSON:@"some_file"]; | |
NSDictionary *dictionary = [jsonString objectFromJSONString]; | |
RKObjectMapper *mapper = [RKObjectMapper mapperWithObject:dictionary | |
mappingProvider:[MappingFactory sharedMappingProvider]]; | |
RKObjectMappingResult *result = [mapper performMapping]; | |
// MappingFactory | |
+ (RKObjectMappingProvider *)sharedMappingProvider | |
{ |
This file contains 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
public void receive() { | |
TransactionStatus status = transactionManager.getTransaction(new DefaultTransactionDefinition()); | |
Message msg = jmsTemplate.receive(queue); | |
boolean success = false; | |
if (msg != null) { | |
try { | |
success = handleMessage(msg); | |
if (success) { | |
msg.acknowledge(); // session is still open within the transaction | |
} |
This file contains 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
I have marked with a * those which I think are absolutely essential | |
Items for each section are sorted by oldest to newest. Come back soon for more! | |
BASH | |
* In bash, 'ctrl-r' searches your command history as you type | |
- Input from the commandline as if it were a file by replacing | |
'command < file.in' with 'command <<< "some input text"' | |
- '^' is a sed-like operator to replace chars from last command | |
'ls docs; ^docs^web^' is equal to 'ls web'. The second argument can be empty. | |
* '!!:n' selects the nth argument of the last command, and '!$' the last arg |