Skip to content

Instantly share code, notes, and snippets.

@millermedeiros
millermedeiros / example.html
Created August 28, 2012 13:52
node.js script to inline static includes
<!DOCTYPE html>
<!-- #include "inc_header.html" title="Example" header="Sample Title" -->
<html>
<head>
<meta charset="utf-8">
<title>Example</title>
<link rel="stylesheet" href="css/main.css">
</head>
<body>
<h1>Sample Title</h1>
@kirbysayshi
kirbysayshi / README.markdown
Created June 13, 2011 04:40
quick nodejs script to combine, possibly minify, scripts, as well as precompile templates:

This is a quick example of taking a config file (example.js), and running jscombine.js. It will bundle up regular scripts as well as templates (hard coded to use doT). Compiled templates are automatically added to a "templates" property on the given namespace (ns key in the example file), keyed by a slightly transformed version of their filename.

@dennishall
dennishall / Strip_Trailing_Whitespace.js
Created May 11, 2011 13:26
Strip Trailing Whitespace (Macro for Komodo Edit)
// also available at http://jsfiddle.net/dennishall/UydZn/
var previousIndentation = '';
var indent = " ";
/**
* Standard setup for a method
*
* @param Function callback The content of the script
*/