jq is useful to slice, filter, map and transform structured json data.
brew install jq
user web; | |
# One worker process per CPU core. | |
worker_processes 8; | |
# Also set | |
# /etc/security/limits.conf | |
# web soft nofile 65535 | |
# web hard nofile 65535 | |
# /etc/default/nginx |
#!/usr/bin/python | |
# SPDX-License-Identifier: MIT | |
import sys,json,base64,binascii | |
with open(sys.argv[1]) as fp: | |
pkey=json.load(fp) | |
def enc(data): | |
missing_padding = 4 - len(data) % 4 | |
if missing_padding: |