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 "QREncoder.h" | |
... | |
#pragma mark - | |
#pragma UIImagePickerControllerDelegate | |
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info | |
{ | |
UIImage *image = [info valueForKey:UIImagePickerControllerOriginalImage]; |
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
#!/bin/bash | |
yum -y update | |
sed -i 's/^/#/g' /etc/sysconfig/i18n | |
echo 'LANG="ja_JP.utf8"' >> /etc/sysconfig/i18n | |
# install RPM forge | |
wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el5.rf.x86_64.rpm | |
# use 32bit? | |
# wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el5.rf.i386.rpm |
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 "AFHTTPRequestOperationManager+Timeout.h" | |
@implementation AFHTTPRequestOperationManager (TimeoutCategory) | |
- (AFHTTPRequestOperation *)GET:(NSString *)URLString | |
parameters:(NSDictionary *)parameters | |
timeoutInterval:(NSTimeInterval)timeoutInterval | |
success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success | |
failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure | |
{ |
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
NSString *stringColor = @"#AABBCC"; | |
NSUInteger red, green, blue; | |
sscanf([stringColor UTF8String], "#%02X%02X%02X", &red, &green, &blue); | |
UIColor *color = [UIColor colorWithRed:red/255.0 green:green/255.0 blue:blue/255.0 alpha: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
Pod::Spec.new do |s| | |
s.name = "AVAnimator" | |
s.version = "2.0.0" | |
s.summary = "VAnimator is an iOS library that makes it easy to implement non-trivial animated/video content in iOS." | |
s.homepage = "http://www.modejong.com/AVAnimator/index.html" | |
s.license = { :type => 'LGPL', :file => 'License.txt' } | |
s.author = { "Mo DeJong" => "mo@dejong.com" } | |
s.source = { :git => "https://github.com/mdejong/AVAnimator.git" } |
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
// | |
// ViewController.h | |
// FBSample | |
// | |
#import <UIKit/UIKit.h> | |
#import <FacebookSDK/FacebookSDK.h> | |
@interface ViewController : UIViewController <FBLoginViewDelegate> | |
@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
platform :ios, '6.1' | |
pod 'iCarousel' |
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)fetchAlbums | |
{ | |
MPMediaQuery *albumQuery = [MPMediaQuery albumsQuery]; | |
NSMutableArray *albums = [@[] mutableCopy]; | |
NSDateFormatter* formatter = [[NSDateFormatter alloc] init]; | |
[formatter setDateFormat:@"YYYY-MM-dd"]; | |
NSArray *jsonKeysAndValues = | |
@[ | |
@{ @"key": @"MPMediaEntityPropertyPersistentID", @"value" : MPMediaEntityPropertyPersistentID }, |
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
#!/bin/bash | |
sed -i 's/^/#/g' /etc/sysconfig/i18n | |
echo 'LANG="ja_JP.utf8"' >> /etc/sysconfig/i18n | |
# install RPM forge | |
wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el5.rf.x86_64.rpm | |
# use 32bit? | |
# wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el5.rf.i386.rpm | |
rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt |