Skip to content

Instantly share code, notes, and snippets.

@probablyangg
probablyangg / 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;
@SkaTeMasTer
SkaTeMasTer / top-25-ssh-commands-tricks
Created January 18, 2017 00:32
25 Best SSH Commands / Tricks
1) Copy ssh keys to user@host to enable password-less ssh logins.
ssh-copy-id user@host
To generate the keys use the command ssh-keygen
2) Start a tunnel from some machine’s port 80 to your local post 2001
ssh -N -L2001:localhost:80 somemachine
@dreikanter
dreikanter / encrypt_openssl.md
Last active March 1, 2025 14:11 — 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 March 19, 2025 12:06
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