Skip to content

Instantly share code, notes, and snippets.

@nkgsv
nkgsv / mathjax.js
Last active May 2, 2020 14:45
Enable MathJax on any web page
// Add the following bookmarklet:
// javascript:(async function () {var x = await fetch('https://gist.githubusercontent.com/nkgsv/db4a65eb27a40f812f22782cab823755/raw/bc09ef1d4bbabf3dbe9c5db1496161654a88f286/mathjax.js'); x = await x.text(); eval(x);})();
// or simply copy and paste the following code to Developer Console:
var script = document.createElement('script');
script.type = 'text/javascript';
script.src = 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/MathJax.js?config=TeX-AMS_HTML';
document.head.appendChild(script);
var render = function() {
@nkgsv
nkgsv / m6hw1_schema_sandbox.sql
Created November 10, 2015 11:48
pstgres ltree example
DROP TABLE IF EXISTS KeywordLtreeSandbox CASCADE;
CREATE TABLE KeywordLtreeSandbox(
id INT PRIMARY KEY,
value TEXT,
path ltree
);
INSERT INTO KeywordLtreeSandbox(id, value, path) VALUES
(0, 'A', '')
, (1, 'B', '1')