Skip to content

Instantly share code, notes, and snippets.

@anggxyz
anggxyz / nginx.conf
Last active November 17, 2021 11:27
nginx config for deploying streamlit apps from custom url + reverse proxy for port | part of dev-notes: https://gist.github.com/nglglhtr/561e987c1168c868e484f35f76f4c0fd
location /:CUSTOM-PATH/ {
proxy_pass http://127.0.0.1:<PORT>/:CUSTOM-PATH/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_buffering off;
proxy_http_version 1.1;
# Also requires websocket:
proxy_set_header Upgrade $http_upgrade;
@dreikanter
dreikanter / encrypt_openssl.md
Last active April 20, 2024 13:45 — forked from crazybyte/encrypt_openssl.txt
File encryption using OpenSSL

Symmetic encryption

For symmetic encryption, you can use the following:

To encrypt:

openssl aes-256-cbc -salt -a -e -in plaintext.txt -out encrypted.txt

To decrypt:

@pugsley
pugsley / mysql-backup.md
Last active July 30, 2022 22:36
MySQL dump > compress > encrypt

Generate openssl keys:

openssl req -x509 -nodes -newkey rsa:2048 -keyout mysqldump-key.priv.pem -out mysqldump-key.pub.pem

Create a mysql default file:

# ~/.mysqldump
[mysqldump]
host = host.here.com