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 <sys/sysctl.h> | |
/* | |
Return device model name. | |
Possible values: | |
"iPhone1,1" = iPhone 1G | |
"iPhone1,2" = iPhone 3G | |
"iPhone2,1" = iPhone 3GS | |
"iPhone3,1" = iPhone 4 | |
"iPhone3,3" = iPhone 4 (CDMA) |
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
javascript:(function(){prompt('Copy%20below!',document.getElementsByTagName('title')[0].innerHTML+'%20'+location.href);})(); |
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
cd PROJECT_TOP_DIRECTORY | |
rm -rf `find ./ -type d -name .svn ! -regex \.svn/. -print` |
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
cd PROJECT_TOP_DIRECTORY | |
svn add --force . | |
svn revert "build" --recursive | |
svn propset svn:ignore "build" . | |
svn revert Example.xcodeproj/*.mode1v3 | |
svn revert Example.xcodeproj/*.pbxuser | |
svn propedit svn:ignore Example.xcodeproj/ | |
*.mode1v3 | |
*.pbxuser | |
svn commit -m "New Xcode project" |
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
+ (UInt64)getEpochSeconds | |
{ | |
return (UInt64)floor(CFAbsoluteTimeGetCurrent() + kCFAbsoluteTimeIntervalSince1970); | |
} | |
+ (UInt64)getEpochMilliSeconds | |
{ | |
return (UInt64)floor((CFAbsoluteTimeGetCurrent() + kCFAbsoluteTimeIntervalSince1970) * 1000.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
$vi ~/.ssh/config | |
ServerAliveInterval 60 | |
Host HOST2 | |
User USER | |
ProxyCommand ssh USER@HOST1 nc -w 6000 HOST2 22 |
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
$ keytool -importkeystore -srckeystore MY_KEYSTORE_1.pfx -srcstoretype PKCS12 -destkeystore MY_KEYSTORE_2.jks | |
出力先キーストアのパスワードを入力してください: | |
新規パスワードを再入力してください: | |
ソースキーストアのパスワードを入力してください: | |
別名 XXX-XXX-XXX-XXX-XXX のエントリのインポートに成功しました。 | |
インポートコマンドが完了しました: 1 件のエントリのインポートが成功しました。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
警告: | |
この jar には、署名者の証明書が期限切れのエントリが含まれています。 |
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
$ keytool -importkeystore -srckeystore OLD_KEYSTORE.jks -destkeystore OLD_KEYSTORE.p12 -srcstoretype JKS -deststoretype PKCS12 -srcalias MY_ALIAS -destalias MY_ALIAS | |
$ openssl pkcs12 -in OLD_KEYSTORE.p12 -nocerts -nodes -out PRIVATE.key | |
$ openssl pkcs7 -in NEW_CERT.p7s -out NEW_CERT.cer -print_certs | |
$ openssl pkcs12 -export -in NEW_CERT.cer -inkey PRIVATE.key -out NEW_KEYSTORE.p12 |
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
$ jarsigner -keystore MY_KEYSTORE_2.jks TARGET.jar MY_ALIAS |
OlderNewer