- option 1
- option 2
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
# parse X509 Certificate | |
openssl x509 -in fwso_cn.crt -noout -text | |
# extract pubkey from X509 certificate | |
openssl x509 -in fwso_cn.crt -noout -pubkey | |
# extract pubkey from RSA private key | |
openssl rsa -in ~/.ssh/id_rsa -pubout -out id_rsa.pub | |
# sign data with private key |
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
INFO [CompactionExecutor:3] 2016-07-06 10:02:38,636 CompactionTask.java:141 - Compacting [SSTableReader(path='/data0/cassandra/data/system/schema_columnfamilies-45f5b36024bc3f83a3631034ea4fa697/system-schema_columnfamilies-ka-32-Data.db'), SSTableReader(path='/data0/cassandra/data/system/schema_columnfamilies-45f5b36024bc3f83a3631034ea4fa697/system-schema_columnfamilies-ka-31-Data.db'), SSTableReader(path='/data0/cassandra/data/system/schema_columnfamilies-45f5b36024bc3f83a3631034ea4fa697/system-schema_columnfamilies-ka-29-Data.db'), SSTableReader(path='/data0/cassandra/data/system/schema_columnfamilies-45f5b36024bc3f83a3631034ea4fa697/system-schema_columnfamilies-ka-30-Data.db')] | |
INFO [CompactionExecutor:5] 2016-07-06 10:02:38,637 CompactionTask.java:141 - Compacting [SSTableReader(path='/data0/cassandra/data/system/schema_columns-296e9c049bec3085827dc17d3df2122a/system-schema_columns-ka-31-Data.db'), SSTableReader(path='/data0/cassandra/data/system/schema_columns-296e9c049bec3085827dc17d3df2122a/system-sc |
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
GOX=src/golang.org/x | |
mkdir -p $GOX | |
cd $GOX | |
git clone https://github.com/golang/tools.git | |
git clone https://github.com/golang/net.git | |
git clone https://github.com/golang/oauth2.git | |
git clone https://github.com/golang/sys.git | |
git clone https://github.com/golang/crypto.git | |
git clone https://github.com/golang/image.git | |
git clone https://github.com/golang/text.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
import java.util.Date; | |
import java.util.Locale; | |
import java.util.Calendar; | |
import java.util.TimeZone; | |
import java.text.DateFormat; | |
import java.text.SimpleDateFormat; | |
public class DateTime { | |
public static void main(String[] args) { | |
String ts = "1468857599"; |
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 | |
function _echo() { | |
echo "`date +'%F %T'` - $1" | |
} | |
if [ $# -lt 1 ] | |
then | |
echo "Usage: $0 YYYY-MM-DD [HH]" | |
exit 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
// reference: https://tools.ietf.org/html/rfc5321 | |
package main | |
import ( | |
"bufio" | |
"encoding/base64" | |
"fmt" | |
"log" | |
"net" | |
"os" |
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
//https://play.golang.org/p/d2ILCDInTy | |
package main | |
import ( | |
"bytes" | |
"fmt" | |
"io" | |
) |
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
./configure --prefix=/usr/local --mandir=/usr/local/Cellar/vim/8.0.0543/share/man --enable-multibyte --with-tlib=ncurses --enable-cscope --with-compiledby --with-lua-prefix=/usr/local/Cellar/lua/5.2.4_4 --enable-luainterp=yes |
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
certbot certonly --webroot -w /usr/local/nginx/html -d example.com | |
Saving debug log to /var/log/letsencrypt/letsencrypt.log | |
Starting new HTTPS connection (1): acme-v01.api.letsencrypt.org | |
Obtaining a new certificate | |
Performing the following challenges: | |
http-01 challenge for notes.fwso.cn | |
Using the webroot path /usr/local/nginx/html for all unmatched domains. | |
Waiting for verification... | |
Cleaning up challenges | |
Generating key (2048 bits): /etc/letsencrypt/keys/0000_key-certbot.pem |