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
echo "`date +"%Y-%m-%d %H:%M:%S"`.`perl -e 'use Time::HiRes qw(gettimeofday); my($sec,$microsec)=gettimeofday(); print $microsec . "\n";'`" |
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 | |
START_TIME=`date +%s` | |
# do something you want to measure time | |
END_TIME=`date +%s` | |
SS=`expr ${END_TIME} - ${START_TIME}` | |
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
警告: | |
この 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
$ jarsigner -verbose -verify -certs TARGET.jar | |
22501 Thu Dec 02 20:26:46 JST 2010 META-INF/MANIFEST.MF | |
22534 Thu May 17 22:40:54 JST 2012 META-INF/MY_ALIAS.SF | |
3731 Thu May 17 22:40:54 JST 2012 META-INF/MY_ALIAS.RSA | |
... | |
sm 1012 Thu Dec 02 20:26:46 JST 2010 com/example/a.class |
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 |
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 -list -keystore MY_KEYSTORE_2.jks | |
キーストアのタイプ: JKS | |
キーストアのプロバイダ: SUN | |
キーストアには 1 エントリが含まれます。 | |
MY_ALIAS, 2010/06/10, PrivateKeyEntry, | |
証明書のフィンガープリント (MD5): XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX |
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 -changealias -keystore MY_KEYSTORE_2.jks -alias XXX-XXX-XXX-XXX-XXX -destalias MY_ALIAS |
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
$vi ~/.ssh/config | |
ServerAliveInterval 60 | |
Host HOST2 | |
User USER | |
ProxyCommand ssh USER@HOST1 nc -w 6000 HOST2 22 |