Skip to content

Instantly share code, notes, and snippets.

@vmleon
vmleon / bash.sh
Created April 17, 2021 13:12
Flask Cheroot
pip install cherrypy
nohup python server.py 2>&1 > app.log &
@GAS85
GAS85 / split_tunnel_VPN.md
Last active June 20, 2024 14:30
Force Torrent/user Traffic through VPN Split Tunnel on Ubuntu 16.04
@KatiRG
KatiRG / flask_gunicorn_app.py
Last active January 22, 2024 06:00
Running Flask with Gunicorn
# This gist shows how to integrate Flask into a
# custom Gunicorn-WSGI application described
# here: http://docs.gunicorn.org/en/stable/custom.html
from __future__ import unicode_literals
import multiprocessing
import gunicorn.app.base
@steinwaywhw
steinwaywhw / One Liner to Download the Latest Release from Github Repo.md
Last active July 19, 2024 22:35
One Liner to Download the Latest Release from Github Repo
  • Use curl to get the JSON response for the latest release
  • Use grep to find the line containing file URL
  • Use cut and tr to extract the URL
  • Use wget to download it
curl -s https://api.github.com/repos/jgm/pandoc/releases/latest \
| grep "browser_download_url.*deb" \
| cut -d : -f 2,3 \
| tr -d \" \
@ninovsnino
ninovsnino / pyopenssl_x509_signverify_example.py
Last active November 2, 2023 14:29
PyOpenSSL example of self sign X509 with RSA key-pair to do sign and verify
from OpenSSL import crypto
from socket import gethostname
k = crypto.PKey()
k.generate_key(crypto.TYPE_RSA, 2048) # generate RSA key-pair
cert = crypto.X509()
cert.get_subject().C = "<country>"
cert.get_subject().ST = "<city>"