Skip to content

Instantly share code, notes, and snippets.

View adiog's full-sized avatar

Aleksander Gajewski adiog

View GitHub Profile
@adiog
adiog / jsontail
Created March 17, 2017 11:11
Serve stdin with HTTP json
from queue import Queue
from threading import Thread
import json
import sys
import tornado.ioloop
import tornado.web
MAX_NUM_LINES_IN_BUFFER=1000
MAX_NUM_LINES_PER_CHUNK=10
@adiog
adiog / MathJaxToggle.js
Created March 7, 2017 09:37
MathJax toggle
MathJax.Hub.Config({
tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}
});
function hideTypeset()
{
var HTML = MathJax.HTML;
var jax = MathJax.Hub.getAllJax();
for (var i = 0, m = jax.length; i < m; i++)