Skip to content

Instantly share code, notes, and snippets.

@hyoretsu
hyoretsu / utils.py
Created Jun 5, 2022
Various useful Python functions
View utils.py
import inspect
def get_var_name(var):
callers_local_vars = inspect.currentframe().f_back.f_locals.items()
return [var_name for var_name, var_val in callers_local_vars if var_val is var]
@hyoretsu
hyoretsu / https_in_wsl.MD
Last active May 30, 2021
How to run HTTPS in development with WSL2
View https_in_wsl.MD
  1. Download OpenSSL for Windows from https://slproweb.com/products/Win32OpenSSL.html
  2. Add whichever folder you selected for binaries to your PATH
  3. Create a file named example.conf and paste this
[req]
default_bits = 2048
prompt = no
default_md = sha256
x509_extensions = v3_req
distinguished_name = dn