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
# usage: watermark.sh <pdf file name without extension> | |
# | |
magick $1.pdf \ | |
-gravity Center \ | |
-pointsize 40 \ | |
-fill 'rgba(169, 169, 169, 0.5)' \ | |
-draw "rotate -45 text 0,0 'SAMPLE WATERMARK'" \ | |
-alpha on -background none -compose over \ | |
$1-WM.pdf |
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
//author: http://github.com/wongoo | |
//date: 20190717 | |
package rsautil | |
import ( | |
"bytes" | |
"crypto" | |
"crypto/rand" | |
"crypto/rsa" |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
var conn *tls.Conn | |
if conn, err = tls.Dial("tcp", "10.20.30.215:2000", config); err != nil { | |
panic("failed to connect: " + err.Error()) | |
} | |
defer conn.Close() | |
certs := conn.ConnectionState().PeerCertificates | |
if len(certs) != 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
# Assumptions: easyrsa3 available in current dir, and functional openssl. | |
# This basic example puts the "offline" and "sub" PKI dirs on the same system. | |
# A real-world setup would use different systems and transport the public components. | |
# Build root CA: | |
EASYRSA_PKI=offline ./easyrsa init-pki | |
EASYRSA_PKI=offline ./easyrsa build-ca nopass | |
# Build sub-CA request: | |
EASYRSA_PKI=sub ./easyrsa init-pki |