Skip to content

Instantly share code, notes, and snippets.

View beledouxdenis's full-sized avatar

Denis Ledoux beledouxdenis

View GitHub Profile
@beledouxdenis
beledouxdenis / self-hosted-ngrok.md
Last active April 17, 2019 14:08
Auto-starting self hosted Ngrok (requires a server with Nginx and a registered domain)

On the remote server

vim /etc/nginx/sites-enabled/tunnel_yourdomain_com
server {
    server_name tunnel.yourdomain.com;
# Add the below code in your Python file,
# then add @own_profiler as a decorator on the method you would like to profile.
# Note:
# - If there is already a decorator on the method, set @own_profiler above,
# - Each time the method is called, it generates a new profile file,
# don't set this decorator on a method called hundred of times or you will have hundred of profile files to analyze.
#
# To display the resulting profiling data file:
#
# Snakeviz: Callstack layer graph & stats table