Skip to content

Instantly share code, notes, and snippets.

View justmao945's full-sized avatar
🌴
On vacation

justmao945

🌴
On vacation
View GitHub Profile
@justmao945
justmao945 / golang-tls.md
Created October 20, 2017 08:14 — forked from denji/golang-tls.md
Simple Golang HTTPS/TLS Examples

Moved to git repository: https://github.com/denji/golang-tls

Generate private key (.key)
# Key considerations for algorithm "RSA" ≥ 2048-bit
openssl genrsa -out server.key 2048

# Key considerations for algorithm "ECDSA" ≥ secp384r1
# List ECDSA the supported curves (openssl ecparam -list_curves)
@justmao945
justmao945 / unzip-gbk.py
Created February 21, 2016 14:08 — forked from yinyanghu/unzip-gbk.py
Extracting file from ZIP format for GBK coding
import os
import sys
import zipfile
print "Processing File " + sys.argv[1]
file=zipfile.ZipFile(sys.argv[1],"r");
for name in file.namelist():
utf8name=name.decode('gbk')
print "Extracting " + utf8name