Skip to content

Instantly share code, notes, and snippets.

View garex's full-sized avatar
🏒
❄️

Alexander Ustimenko garex

🏒
❄️
View GitHub Profile
@garex
garex / prove.js
Last active August 29, 2015 14:26
innerHTML speed test code
var bodyHtml = document.body.innerHTML;
function a() {
var date = Date.now();
document.body.innerHTML = Math.random().toString() + 'test';
console.log('render ' + (Date.now() - date) + 'ms');
setTimeout(a, 0);
}
function b() {
var date = Date.now();
document.body.innerHTML = bodyHtml;

Slimdown

A very basic regex-based Markdown parser. Supports the following elements (and can be extended via Slimdown::add_rule()):

  • Headers
  • Links
  • Bold
  • Emphasis
  • Deletions