- Turning an eager, pure computation into a lazy one:
RACSequence
,RACSignal
- Side-effecting work that is safe to perform multiple times:
RACSignal
,RACCommand
- Side-effecting work that is safe to perform multiple times serially, but not concurrently:
RACCommand
,RefCount()
RACScheduler
would seem to apply here, but execution could become interleaved and thus not serial
- Side-effecting work that should only be performed once, then memoized:
RACMulticastConnection
with aRACReplaySubject
,RACSequence
- Enabling/disabling a UI based on whether work can be performed:
RACCommand
,RACReplaySubject
- Replaying is a Good Idea™ because this information may arrive before the UI is ready for it
- Updating a UI with information about work in progress:
RACCommand
,RACSubject
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
// | |
// NSObject+SMDictionaryMapping.h | |
// SoundTrack | |
// | |
// Created by Paddy O'Brien on 12-04-24. | |
// Copyright (c) 2012 Paddy O'Brien. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> |
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
######################### | |
# .gitignore file for Xcode4 / OS X Source projects | |
# | |
# Version 2.0 | |
# For latest version, see: http://stackoverflow.com/questions/49478/git-ignore-file-for-xcode-projects | |
# | |
# 2013 updates: | |
# - fixed the broken "save personal Schemes" | |
# | |
# NB: if you are storing "built" products, this WILL NOT WORK, |
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
- (NSManagedObjectContext*)managedObjectContextForTesting { | |
NSURL *modelURL = [[NSBundle mainBundle] URLForResource:@"YourModelName" withExtension:@"momd"]; | |
NSManagedObjectModel* model = [[NSManagedObjectModel alloc] initWithContentsOfURL:modelURL]; | |
NSPersistentStoreCoordinator* coordinator = [[NSPersistentStoreCoordinator alloc] initWithManagedObjectModel:model]; | |
[coordinator addPersistentStoreWithType:NSInMemoryStoreType configuration:nil URL:nil options:nil error:NULL]; | |
NSManagedObjectContext* managedObjectContext= [[NSManagedObjectContext alloc] init]; | |
managedObjectContext.persistentStoreCoordinator = coordinator; | |
return managedObjectContext; | |
} |
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
// | |
// NSObject+TypeValidation.h | |
// | |
// Created by Jerry Jones on 5/15/12. | |
// Copyright (c) 2012 Spaceman Labs, LLC. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> | |
BOOL CFTypeIsNull(id object); |
I have reluctantly come to accept that it is impossible to create a "perfect" programming language. Every language is domain-specific in some sense, and many of the criteria that make a language good for one purpose are fundamentally in opposition to qualities that are good for another.
A classic example would be "scripting" languages versus "embedded" languages.
Good qualities in a scripting language are:
- Dynamic typing (no need to specify types, or cast between them)
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
{ | |
"Id": "Policy1234", | |
"Statement": [ | |
{ | |
"Sid": "Stmt1234", | |
"Action": [ | |
"s3:GetObject" | |
], | |
"Effect": "Allow", | |
"Resource": "arn:aws:s3:::foo/*", |
- Additional optional downloads:
- Older SDKs, eg, for building ancient projects.
- Older compilers (for same).
- Either ship gcc/llvm-gcc or don't. Don't ship clang and call it 'gcc', that just breaks anyone who actually needs GCC and finds your not-gcc in the PATH.
First grep the heroku logs for the message that will state that the debugger service has started:
$ heroku logs -t --app=[APP_ID] | grep 'Debugger listening on'
Then in another shell enable the debugger service of the Node process by connecting through SSH and sending the process SIGUSR1
:
$ heroku ps:exec --app=[APP_ID]
OlderNewer