Skip to content

Instantly share code, notes, and snippets.

View miwillhite's full-sized avatar

Matthew Willhite miwillhite

View GitHub Profile
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
SKView *skView = [[SKView alloc] initWithFrame:self.view.frame];
[self.view addSubview:skView];
}
- (void)setFirstTouchTimestamp:(NSTimeInterval)time {
objc_setAssociatedObject(self, &kJJFirstTouchTimestampKey, [NSNumber numberWithDouble:time], OBJC_ASSOCIATION_COPY_NONATOMIC);
}
[UIView animateWithDuration:PRESENT_DURATION
delay:0
options:UIViewAnimationOptionCurveEaseIn
animations:^{
// THIS GETS CALLED
toVC.view.transform = CGAffineTransformIdentity;
} completion:^(BOOL finished) {
// DOESNT GET HERE
[transitionContext completeTransition:YES];
}];
1) ElementTemplatesController#index behaves like InheritedResources::Base#index behaves like it renders the json renders the json
Failure/Error: expect(response.body).to be_json_eql(json)
Expected equivalent JSON
Diff:
@@ -1,14 +1,10 @@
-{
- "element_templates": [
- {
- "created_at": "2013-11-13T18:13:06+00:00",
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, (unsigned long)NULL), ^{
[self setClient:[[JJRemoteAssetClient alloc] init]];
[self.client GET:[NSURL URLWithString:self.thumbURL]
success:^(AmazonServiceResponse *response) {
NSLog(@"Fetched thumbnail: %@", self.thumbURL);
[JJRemoteAssetClient saveImageWithData:response.body
andName:self.thumbName];
}
failure:^(NSError *error) {
NSLog(@"error: %@", error);
/*
2013-11-22 19:08:30.805 Juju[1230:60b] CoreData: sql: SELECT DISTINCT 0, t0.Z_PK, t0.Z_OPT, t0.ZBUNDLEDIR, t0.ZCONSUMABLE, t0.ZCONSUMABLEIDENTIFIER, t0.ZICONURL, t0.ZNAME, t0.ZPRODUCTIDENTIFIER, t0.ZPURCHASEVALIDATED, t0.ZUUID FROM ZJJPACKAGE t0 JOIN ZJJASSET t1 ON t0.Z_PK = t1.ZPACKAGE WHERE t1.ZKLASSNAME IN (?)
2013-11-22 19:08:30.807 Juju[1230:60b] CoreData: annotation: sql connection fetch time: 0.0021s
2013-11-22 19:08:30.809 Juju[1230:60b] CoreData: sql: SELECT 0, t0.Z_PK, t0.Z_OPT, t0.ZIMAGENAME, t0.ZIMAGEURL, t0.ZKLASSNAME, t0.ZMESSAGE, t0.ZTHUMBNAME, t0.ZTHUMBURL, t0.ZUUID, t0.ZPACKAGE FROM ZJJASSET t0 WHERE t0.ZPACKAGE IN (?) ORDER BY t0.ZPACKAGE
*/
NSManagedObjectContext *context = [JJCoreDataHelper getManagedObjectContext];
NSFetchRequest *fetchRequest = [[NSFetchRequest alloc] initWithEntityName:@"JJPackage"];
NSPredicate *classPredicate = [NSPredicate predicateWithFormat:@"ANY assets.klassName IN %@", @[NSStringFromClass(self.elementClass)]];
[fetchRequest setRelationshipKeyPathsForP
#import <Foundation/Foundation.h>
int main(int argc, char *argv[]) {
@autoreleasepool {
typedef enum {
helloBlahType,
byeBlahType
} BlahType;
BlahType blah = 999999;
ClearMocks(mockPackage, mockAsset)
storeControllers.directive('newPane', function() {
return {
restrict: 'E',
scope: {
},
controller: ['$scope, InstallationType',
function($scope, InstallationType) {
$scope.installation_types = InstallationType.query();
}],
templateUrl: '<%= asset_path 'assets/templates/stores/new-pane.html' %>'
#store_installations{ 'ng-show' => 'stores' }
%h3 Your stores
%ul
%li{ 'ng-repeat' => 'store in stores' }
{{ store.name }}