Generating GPG key
gpg --full-generate-key
Choose default RSA, set to 4096.
Setting git local repo config
gpg --list-secret-keys --keyid-format LONG
'use strict' | |
// this is run only on v12, because private field | |
const ITERATION = 1000 | |
console.log( | |
process.version, | |
ITERATION, | |
'iteration', | |
'with Type and freeze – v2: v12 only, private field' |
Generating GPG key
gpg --full-generate-key
Choose default RSA, set to 4096.
Setting git local repo config
gpg --list-secret-keys --keyid-format LONG
# Generate a unique private key (KEY) | |
sudo openssl genrsa -out mydomain.key 2048 | |
# Generating a Certificate Signing Request (CSR) | |
sudo openssl req -new -key mydomain.key -out mydomain.csr | |
# Creating a Self-Signed Certificate (CRT) | |
openssl x509 -req -days 365 -in mydomain.csr -signkey mydomain.key -out mydomain.crt | |
# Append KEY and CRT to mydomain.pem |
# If you already have an haproxy.cfg file, you can probably leave the | |
# global and defaults section as-is, but you might need to increase the | |
# timeouts so that long-running CLI commands will work. | |
global | |
ssl-default-bind-options ssl-min-ver TLSv1.2 | |
ssl-default-bind-ciphers ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256 | |
maxconn 4096 | |
# log stdout local0 debug | |
defaults |
//: # State machine: handling three state and transition | |
import GameplayKit | |
class RetrievingDataState: GKState { | |
override func isValidNextState(stateClass: AnyClass) -> Bool { | |
print("\n---> \(stateClass) class") | |
return (stateClass == DataAvailableState.self) || (stateClass == DataNotAvailableState.self) | |
} |
git ls-files --eol | grep -E '^(i/-text)' | grep "\.md" |
[Unit] | |
Description=Document Server Daemon | |
[Service] | |
Type=forking | |
Environment=NODE_VERSION=12 | |
WorkingDirectory=/home/your_user/your_node_app_dir | |
ExecStart=/home/your_user/.nvm/nvm-exec npm start | |
StandardOutput= | |
User=your_user |