Skip to content

Instantly share code, notes, and snippets.

@jpallen
jpallen / errorhandling.js
Created October 10, 2012 13:26
errorhandling
function respondWithError(response, namespace, message, status) {
if (!status) {
status = 500;
}
console.log(namespace, message);
response.setHeader('Content-Type','application/json');
response.writeHead(status);
response.end(JSON.stringify("Missing guid"));
}
@jpallen
jpallen / foo.txt
Created June 25, 2015 13:27
Test gist
Hello world 2
@jpallen
jpallen / gist:91bdfa1fd85d9fb76cead604bdd191ee
Created August 21, 2017 16:08
GPG public key (james.allen@overleaf.com)
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBFmbBPgBEACiy0ildAI/GQyC+SpKdswu5RgHCyFytHUK8v2s9nT3jRyHCGhr
zri//dN/m2OJK8vY7SU/QuGVXvfI3if0q3ClULi/0o9BqQH5VKBjU2miSPclSMRG
34fLhkIzz8hc7UhZrJ6CFtD/HKY2sWQSS1LqgC30prf9SIWGKRJPiw5v1nBpUXOt
GZPbxUMAjHD/S853GeZ28gphzRHlio0lI3/X/GSs7ioOrbqgMPXZp1whZfZUZqlc
FFj9EkxbxFV77ZgCKXIQatiFyeJEbUbwT1K5Y2jMLrd74cF6G8luXu96RBB62SNl
hsT/f5Tynzd1T1lgot3PLrc/A5YzCU6zwrVGtN07hqUEyrxndtKULxfs2om+ELNK
NeRNX9fe03kgnKznxahpWiTakBGjsXyfbDhzPmf14yVZL3egO17MhRLwt/i5VFSc
La9NJ1gbeRex5cangy8sWay4Sm3TEm6rCONVUR3s6ac8vKwAlmy1ISLg37Mhbrwi
--- public/js/ace-1.2.5/ace.js 2018-10-19 12:19:28.000000000 +0100
+++ public/js/ace-1.2.9/ace.js 2018-11-07 19:12:36.000000000 +0000
@@ -960,7 +960,7 @@
if (!doc)
doc = document;
return doc.head || doc.getElementsByTagName("head")[0] || doc.documentElement;
-}
+};
exports.createElement = function(tag, ns) {