Skip to content

Instantly share code, notes, and snippets.

View MACSkeptic's full-sized avatar
🏠
Working from home

♥♥♥♥♥ ����� MACSkeptic

🏠
Working from home
View GitHub Profile
@lotz84
lotz84 / Simple markdown editor
Last active October 12, 2017 18:16
Simple markdown editor on browser, which extends "data:text/html,<html contenteditable>".
data:text/html,<title>md</title><script src='http://cdnjs.cloudflare.com/ajax/libs/marked/0.3.2/marked.min.js'></script><style>#a,#b{width:50%;height:100%;float:left;outline:none}@media print{#a{display:none;}}</style><div id='a' contenteditable>md</div><div id='b'></div><script>var c=function(a){return document.getElementById(a)};c('a').addEventListener('keydown',function(e){if(e.keyCode==9){e.preventDefault();document.execCommand('insertText',![],'\t');return ![];}setTimeout(function(){c('b').innerHTML=marked(c('a').innerText)},0)})</script>
@tildedave
tildedave / gist:7371282
Last active December 20, 2018 20:16
Of course NaN is a number
user=> (/ 0.0 0.0)
NaN
user=> (type (/ 0.0 0.0))
java.lang.Double