Skip to content

Instantly share code, notes, and snippets.

View weatherbell's full-sized avatar

WeatherBELL Analytics weatherbell

View GitHub Profile
@weatherbell
weatherbell / pip_install_private_repo_ssh.md
Last active August 9, 2018 14:59
pip install a private github repository over SSH

Create a ~/.ssh/config file with contents like these:

Host myrepo
   HostName github.com
   User git
   PreferredAuthentications publickey
   IdentityFile /root/.ssh/my_repo_private_key

Then pip install like this:

@weatherbell
weatherbell / stacktracer.py
Created June 13, 2018 16:33
Multithreading deadlock debugger
"""Stack tracer for multi-threaded applications.
Usage:
import stacktracer
stacktracer.trace_start("trace.html",interval=5,auto=True) # Set auto flag to always update file!
....
stacktracer.trace_stop()
"""
@weatherbell
weatherbell / gist:439994a2faa7f0e257807c3212cd5fde
Created February 22, 2018 15:57 — forked from mediavrog/gist:49c4f809dffea4e00738a7f5e3bbfa59
CORS in Google Cloud Functions for Firebase
const cors = require('cors')({origin: true});
exports.sample = functions.https.onRequest((req, res) => {
cors(req, res, () => {
res.send('Passed.');
});
});