create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "[email protected]"
create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "[email protected]"
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
NSString *str = <#some string#>; | |
CGSize size; | |
CGSize maxSize = CGSizeMake(<#width#>, <#height#>); | |
UIFont *font = <#font#>; | |
if ([str respondsToSelector:@selector(boundingRectWithSize:options:attributes:context:)]) { | |
NSMutableParagraphStyle *style = [[NSMutableParagraphStyle alloc] init]; | |
[style setLineBreakMode:<#Line break mode#>]; | |
[style setAlignment:<#String alignment#>]; | |
NSDictionary *attributes = @{ NSFontAttributeName:font, | |
NSParagraphStyleAttributeName:style |
ACAccountStore *accountStore = [[ACAccountStore alloc] init]; | |
ACAccountType *facebookAccountType = [accountStore accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierFacebook]; | |
id options = @{ | |
ACFacebookAppIdKey: @"403376439767549", | |
ACFacebookPermissionsKey: @[ @"email", @"read_friendlists"], | |
ACFacebookAudienceKey: ACFacebookAudienceFriends | |
}; | |
[accountStore requestAccessToAccountsWithType:facebookAccountType | |
options:options | |
completion:^(BOOL granted, NSError *error) { |
_ |
// | |
// ViewController.m | |
// AVPlayerCaching | |
// | |
// Created by Anurag Mishra on 5/19/14. | |
// Sample code to demonstrate how to cache a remote audio file while streaming it with AVPlayer | |
// | |
#import "ViewController.h" | |
#import <AVFoundation/AVFoundation.h> |
// | |
// ViewController.m | |
// AVPlayerCaching | |
// | |
// Created by Anurag Mishra on 5/19/14. | |
// Sample code to demonstrate how to cache a remote audio file while streaming it with AVPlayer | |
// | |
#import "ViewController.h" | |
#import <AVFoundation/AVFoundation.h> |
#import <RestKit/RestKit.h> | |
#import "CoreData+MagicalRecord.h" | |
// Use a class extension to expose access to MagicalRecord's private setter methods | |
@interface NSManagedObjectContext () | |
+ (void)MR_setRootSavingContext:(NSManagedObjectContext *)context; | |
+ (void)MR_setDefaultContext:(NSManagedObjectContext *)moc; | |
@end | |
@implementation AppDelegate |
#import <RestKit/RestKit.h> | |
#import "CoreData+MagicalRecord.h" | |
// Use a class extension to expose access to MagicalRecord's private setter methods | |
@interface NSManagedObjectContext () | |
+ (void)MR_setRootSavingContext:(NSManagedObjectContext *)context; | |
+ (void)MR_setDefaultContext:(NSManagedObjectContext *)moc; | |
@end | |
@implementation AppDelegate |
// this code will cause a UIView to shake--good for "login error" | |
CAKeyframeAnimation * anim = [ CAKeyframeAnimation animationWithKeyPath:@"transform" ] ; | |
anim.values = [ NSArray arrayWithObjects: | |
[ NSValue valueWithCATransform3D:CATransform3DMakeTranslation(-5.0f, 0.0f, 0.0f) ], | |
[ NSValue valueWithCATransform3D:CATransform3DMakeTranslation(5.0f, 0.0f, 0.0f) ], | |
nil ] ; | |
anim.autoreverses = YES ; | |
anim.repeatCount = 2.0f ; | |
anim.duration = 0.07f ; |