Skip to content

Instantly share code, notes, and snippets.

View jdfreder's full-sized avatar

Jonathan Frederic jdfreder

View GitHub Profile
@jdfreder
jdfreder / nginx.conf
Created November 26, 2015 04:45
Simple nginx HTTP reverse proxy for JupyterHub on OSX
worker_processes 1;
events {
worker_connections 768;
}
http {
include mime.types;
default_type application/octet-stream;
@jdfreder
jdfreder / wslog.js
Last active May 20, 2016 22:13
Log websocket messages
// Dump this into your web console in a live notebook
function safeLog(type) {
try {
console.log.apply(console, arguments);
} catch(err) {
console.warn(type, 'could not print data');
}
}
var orig1 = Jupyter.notebook.kernel.ws.onmessage;
Jupyter.notebook.kernel.ws.onmessage = function() {

This is the configuration of my Atom editor

@jdfreder
jdfreder / gist:2521659df674f3979408
Created June 30, 2015 00:47
Draw.io debugger.
Draw.loadPlugin(function(ui)
{
console.log('Draw.io `ui` available as window.draw');
window.draw = ui;
});
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jdfreder
jdfreder / gist:7d5c8a445eaaa49b7aeb
Created January 28, 2016 21:30
what a comm looks like
Object.defineProperty(Comm.prototype, 'comm_id',
Object.defineProperty(Comm.prototype, 'target_name',
Comm.prototype.open = function (data, callbacks, metadata)
Comm.prototype.send = function (data, callbacks, metadata, buffers)
Comm.prototype.close = function (data, callbacks, metadata)
Comm.prototype.on_msg = function (callback)
Comm.prototype.on_close = function (callback)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.