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
#include <stdio.h> | |
#include <fcntl.h> | |
#include <stdlib.h> | |
#include <ctype.h> | |
#include <unistd.h> | |
#define _GNU_SOURCE 1 | |
#include <string.h> | |
#include <sys/stat.h> // for mkdir | |
#include <sys/mman.h> // for mmap |
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//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>IncompatiblePaths</key> | |
<array> | |
<dict> | |
<key>Application Name</key> | |
<string>Sxs Memory Card Driver</string> | |
<key>Blurb</key> |
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
{ | |
"products": [ | |
{ | |
"name": "macbook-12-inch", | |
"brand": "MacBook", | |
"model": "MacBook 12-inch", | |
"video-screensaver": { | |
"src": "\/videos\/mac-fall2016\/16x10\/screensaver.mov", | |
"width": "1152", | |
"height": "720" |
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)describePreferredFonts | |
{ | |
static NSArray *textStyles; | |
static dispatch_once_t onceToken; | |
dispatch_once(&onceToken, ^{ | |
textStyles = @[UIFontTextStyleHeadline, | |
UIFontTextStyleSubheadline, | |
UIFontTextStyleBody, | |
UIFontTextStyleFootnote, | |
UIFontTextStyleCaption1, |
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
//: Playground - noun: a place where people can play | |
//: Prop 'til you Drop | |
indirect enum Formula : CustomStringConvertible { | |
case Var(String) | |
case Or(Formula, Formula) | |
case And(Formula, Formula) | |
case Imply(Formula, Formula) | |
case BiImply(Formula, Formula) | |
case Negate(Formula) |
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
Pod::Spec.new do |s| | |
s.name = 'MHNatGeoViewControllerTransition' | |
s.version = '0.0.1' | |
s.summary = 'A new ViewController transition inspired by NatGeo City Guides by National Geographic.' | |
s.homepage = 'https://github.com/michaelhenry/MHNatGeoViewControllerTransition' | |
s.author = 'Michael Henry' | |
s.source = { :git => 'https://github.com/michaelhenry/MHNatGeoViewControllerTransition.git' } | |
s.source_files = 'MHNatGeoViewControllerTransition/*' | |
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
- (void)refreshArticles | |
{ | |
[SVProgressHUD showWithMaskType:SVProgressHUDMaskTypeGradient]; | |
__weak SMArticlesViewController *me = self; | |
[[self articlesDataSource] loadArticlesWithOnLoad:^(NSArray *newObjects) { | |
if (me != nil) { | |
[me.tableView reloadData]; | |
[SVProgressHUD dismissWithSuccess:nil afterDelay:1]; |
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 <RestKit/RestKit.h> | |
@class SMArticle | |
@interface SMArticleDataController : NSObject | |
- (void)loadArticlesWithOnLoad:(RKObjectLoaderDidLoadObjectsBlock)loadBlock onError:(RKRequestDidFailLoadWithErrorBlock)failBlock; | |
- (int)articleCount; | |
- (SMArticle*)articleAtIndex:(int)index; |
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 "SMArticle.h" | |
#import <RestKit/RestKit.h> | |
@implementation SMArticle | |
@synthesize articleID,name; | |
+ (RKObjectMapping *)mapping { |
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
NSURL* baseURL = [NSURL URLWithString:@"https://api.example.com/"]; | |
RKObjectManager* objectManager = [RKObjectManager objectManagerWithBaseURL:baseURL]; | |
objectManager.acceptMIMEType = RKMIMETypeJSON; | |
objectManager.serializationMIMEType = RKMIMETypeJSON; | |
[objectManager.mappingProvider setMapping:[SMArticle mapping] forKeyPath:@"article"]; | |
[objectManager.mappingProvider |
NewerOlder