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
javap -s -p java.io.File |
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
javah -classpath bin/classes -d jni jp.co.petworks.filesystemtest.NDKBridge |
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
double delayInSeconds = 1.0; // 遅延時間 | |
dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(delayInSeconds * NSEC_PER_SEC)); | |
dispatch_after(popTime, dispatch_get_main_queue(), ^(void){ | |
// ここに遅延実行したい処理を記述。 | |
}); |
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
security cms -D -i pp.mobileprovision > tmp.plist |
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 <Foundation/Foundation.h> | |
int main(int argc, char **argv) { | |
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; | |
/* | |
Objective-Cのコード。 | |
*/ | |
[pool drain]; | |
return 0; | |
} |
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
NSArray *languages = [NSLocale preferredLanguages]; | |
if ([[languages objectAtIndex:0] isEqualToString:@"ja"]) { | |
// 日本語での処理 | |
} else { | |
// それ以外での処理 | |
} |
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 boto, time | |
''' | |
@param[in] aws_access_key_id AWSアカウントのアクセスキーID | |
@param[in] aws_secret_access_key AWSアカウントのシークレットキー | |
@param[in] keypair_id CloudFrontキーペアID | |
@param[in] keypair_file CloudFrontキーペアファイル | |
@param[in] cf_distribution_id CloudFrontディストリビューションID | |
@param[in] s3_object_name 公開したいS3オブジェクトのキー | |
@param[in] expires_in_seconds CloudFrontで公開する期間を秒で指定 |
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
[NSTask launchedTaskWithLaunchPath:@"/usr/bin/open" arguments:[NSArray arrayWithObject:[NSString stringWithFormat:@"/tmp/%@.png", filename]]]; |
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
[UIView animateWithDuration:0.5 animations:^{ | |
self.imageView.alpha = 0.0; | |
}]; |
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
1. 仮想インタフェースの作成 | |
% sudo ifconfig lo0 alias 127.0.0.2 | |
Password: <--- パスワードを入力。 | |
2. トンネル接続 | |
% ssh -N <username>@<ssh server> -L 127.0.0.2:8139:<SMB server>:139 | |
3. Finderでマウント |