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
server { | |
listen 80; | |
server_name default.dev.xxx; | |
root /home/www/default; | |
index index.html index.php; | |
client_max_body_size 50M; | |
allow all; | |
deny all; | |
access_log /home/www/log/default.access.log; |
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
#import "QREncoder.h" | |
... | |
#pragma mark - | |
#pragma UIImagePickerControllerDelegate | |
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info | |
{ | |
UIImage *image = [info valueForKey:UIImagePickerControllerOriginalImage]; |
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
#!/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 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
#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 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
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 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
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" => "[email protected]" } | |
s.source = { :git => "https://github.com/mdejong/AVAnimator.git" } |
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
// | |
// ViewController.h | |
// FBSample | |
// | |
#import <UIKit/UIKit.h> | |
#import <FacebookSDK/FacebookSDK.h> | |
@interface ViewController : UIViewController <FBLoginViewDelegate> | |
@end |
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
platform :ios, '6.1' | |
pod 'iCarousel' |
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)fetchAlbums | |
{ | |
MPMediaQuery *albumQuery = [MPMediaQuery albumsQuery]; | |
NSMutableArray *albums = [@[] mutableCopy]; | |
NSDateFormatter* formatter = [[NSDateFormatter alloc] init]; | |
[formatter setDateFormat:@"YYYY-MM-dd"]; | |
NSArray *jsonKeysAndValues = | |
@[ | |
@{ @"key": @"MPMediaEntityPropertyPersistentID", @"value" : MPMediaEntityPropertyPersistentID }, |