Skip to content

Instantly share code, notes, and snippets.

@jed
jed / rendering_templates_obsolete.md
Created October 19, 2012 05:07
Rendering templates obsolete

(tl;dr DOM builders like [domo][domo] trump HTML templates on the client.)

Like all web developers, I've used a lot of template engines. Like most, I've also written a few of them, some of which even [fit in a tweet][140].

The first open-source code I ever wrote was also one of the the first template engines for node.js, [a port][node-tmpl] of the mother of all JavaScript template engines, [John Resig][jresig]'s [micro-templates][tmpl]. Of course, these days you can't swing a dead cat without hitting a template engine; one in eight packages on npm ([2,220][npm templates] of 16,226 as of 10/19) involve templates.

John's implementation has since evolved and [lives on in Underscore.js][underscore], which means it's the default choice for templating in Backbone.js. And for a while, it's all I would ever use when building a client-side app.

But I can't really see the value in client-side HTML templates anymore.

@LeCoupa
LeCoupa / nodejs-cheatsheet.js
Last active June 30, 2024 04:14
Complete Node.js CheatSheet --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
/* *******************************************************************************************
* THE UPDATED VERSION IS AVAILABLE AT
* https://github.com/LeCoupa/awesome-cheatsheets
* ******************************************************************************************* */
// 0. Synopsis.
// http://nodejs.org/api/synopsis.html
@JimiSweden
JimiSweden / dwraw.io. configuration example.md
Last active January 22, 2024 02:15
draw.io windows app override default configuration to allow larger images

problem

When trying to insert an image you might get the warning "Image too big" when selecting "Actual size" in the insert dialog

Soulution

is to change the default settings.

note: this is tested on Windows, probably similar in Mac - check out the linke here if you are using Mac https://gist.github.com/cellularmitosis/e5e7d1517939b98418a58cdd8595dd8c

open Draw.io app ()

  • in menu "Extras" , select "Configuration".