Skip to content

Instantly share code, notes, and snippets.

@jonlundy
jonlundy / conv.py
Last active February 15, 2024 00:12
#!/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:
@JFK
JFK / gist:4591707
Last active September 16, 2019 21:10
Ngnix + Nginx-GridFS-Replicaset(mongodb) + nginx-image-filter +nginx-proxy-cache Sample Configuration
user www-data;
#worker_processes 4;
#worker_priority 0;
#worker_cpu_affinity 0001 0010 0100 1000;
#worker_rlimit_nofile 163840;
#worker_processes 8;
#worker_priority 0;
#worker_cpu_affinity 00000001 00000010 00000100 00001000 00010000 00100000 01000000 10000000;