This file contains hidden or 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+Convenience.h | |
// ResidentPortal | |
// | |
// Created by Prashant Patil on 18/06/14. | |
// Copyright (c) 2014 Property Solutions. All rights reserved. | |
// | |
#import <CoreData/CoreData.h> | |
#import <Foundation/Foundation.h> |
This file contains hidden or 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
cert: | |
openssl pkcs12 -clcerts -nokeys -out cert.pem -in cert.p12 | |
key: | |
openssl pkcs12 -nocerts -nodes -out key.pem -in key.p12 | |
source: | |
// node.js | |
http://stackoverflow.com/questions/1762555/creating-pem-file-for-apns |
This file contains hidden or 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
- (UIImage *)imageWithShadow { | |
CGColorSpaceRef colourSpace = CGColorSpaceCreateDeviceRGB(); | |
CGFloat imageWidth = self.size.width; | |
CGFloat imageHeight = self.size.height; | |
CGContextRef shadowContext = CGBitmapContextCreate(NULL, imageWidth, imageHeight, CGImageGetBitsPerComponent(self.CGImage), 0, colourSpace, (CGBitmapInfo)kCGImageAlphaPremultipliedLast); | |
CGColorSpaceRelease(colourSpace); | |
CGContextSetShadowWithColor(shadowContext, CGSizeMake(1, -1), 3, [UIColor greenColor].CGColor); |
This file contains hidden or 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)setResizedImageNamed:(NSString *)imageName { | |
UIEdgeInsets insets = UIEdgeInsetsMake(0, 50, 0, 5); | |
UIImage *image = [UIImage imageNamed:imageName]; | |
UIImage *buttonImage = [image resizableImageWithCapInsets:insets]; | |
[button setBackgroundImage:buttonImage forState:UIControlStateNormal]; | |
} |
This file contains hidden or 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
declare private function in 'libdispatch': | |
uint64_t dispatch_benchmark(size_t count, void (^block)(void)); | |
and use it like so: | |
size_t const objectCount = 1000; | |
uint64_t n = dispatch_benchmark(10000, ^{ | |
@autoreleasepool { | |
id obj = @42; |
This file contains hidden or 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
// | |
// UILabel+PreferredWidth.h | |
// GooglePlacesDemo | |
// | |
// Created by sudeep on 28/04/15. | |
// Copyright (c) 2015 Sudeep Jaiswal. All rights reserved. | |
// | |
@import UIKit; |
This file contains hidden or 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
find . -name '*.DS_Store' -type f -delete |
This file contains hidden or 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
// | |
// CALayer+IBColor.h | |
// FunWithRuntimeAttributes | |
// | |
// Created by Mike Woelmer on 5/13/14. | |
// Copyright (c) 2014 atomicobject. All rights reserved. | |
// | |
@import UIKit; | |
@import QuartzCore; |
This file contains hidden or 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
// | |
// UIImage+Colorize.h | |
// Coderwall | |
// | |
// Created by Coderwall on 11/04/15. | |
// Copyright (c) 2015 Coderwall. All rights reserved. | |
// | |
#import <UIKit/UIKit.h> |