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
@interface CoordinatorAssembly | |
@property (strong, nonatomic) DependencyOne *existingInjectedDependency; | |
- (DependencyTwo *)newDependency; | |
- (MyModel *)modelThatIsInjectedWithBothDependencies; | |
@end |
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
@implementation MyViewController | |
+ (BSInitializer *)bsInitializer { | |
return [BSInitializer initializerWithClass:self | |
selector:@selector(initWithApi:) | |
argumentKeys:@"myApi", nil]; | |
} | |
- (instancetype)initWithApi:(MyApi *)myApi { | |
... |
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
JSObjectionInjector *injector = [JSObjection createInjector]; | |
[injector bindBlock:^(JSObjectionInjector *context) { | |
MyModel *model = [[MyModel alloc] initWithDependency:context.getObject([Dependency class])]; | |
return model; | |
} toClass:[MyModel class]]; | |
id myModel = [injector getObject:[MyModel class]]; |
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
#import "AppDelegate.h" | |
#import "AppCoordinator.h" | |
@interface AppDelegate () | |
@property (strong, nonatomic) AppCoordinator *coordinator; | |
@end | |
@implementation AppDelegate |
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
#import "AppDelegate.h" | |
@interface AppDelegate () | |
@property (strong, nonatomic) NSManagedObjectContext *managedObjectContext; | |
@property (strong, nonatomic) GCDWebServer *webServer; | |
@end | |
@implementation AppDelegate |
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
#import "UISplitViewControllerDelegateService.h" | |
#import "NoteViewController.h" | |
@interface UISplitViewControllerDelegateService () <UISplitViewControllerDelegate> | |
@end | |
@implementation UISplitViewControllerDelegateService | |
- (id)initWithSplitViewController:(UISplitViewController *)controller { |
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
$(document).ajaxError(function (e, xhr, settings, exception) { | |
var STATUS_CODE_UNAUTHORIZED = 401, | |
STATUS_CODE_FORBIDDEN = 403; | |
// If we don't have a valid session, show a login form | |
if (xhr.status === STATUS_CODE_UNAUTHORIZED || xhr.status === STATUS_CODE_FORBIDDEN) { | |
showLoginForm(); | |
} | |
}); |
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
cd ~ | |
sudo yum update | |
sudo yum install java-1.7.0-openjdk -y | |
wget https://github.com/downloads/elasticsearch/elasticsearch/elasticsearch-0.19.11.tar.gz -O elasticsearch.tar.gz | |
tar -xf elasticsearch.tar.gz | |
rm elasticsearch.tar.gz | |
mv elasticsearch-* elasticsearch | |
sudo mv elasticsearch /usr/local/share |
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
{ | |
"name": "symfony/framework-standard-edition", | |
"autoload": { | |
"psr-0": { "": "src/" } | |
}, | |
"require": { | |
"php": ">=5.3.2", | |
"symfony/symfony": "2.1.*", | |
"doctrine/orm": "2.2.*", | |
"doctrine/doctrine-bundle": "dev-master", |