Skip to content

Instantly share code, notes, and snippets.

@carmour24
carmour24 / grunt.js
Created January 8, 2013 17:25 — forked from anonymous/grunt.js
Rubbish wee grunt file to watch a set of files and spawn multimarkdown for any that change. Requires nodejs, grunt and multimarkdown installed and in the path env.
/*global module:false process:false*/
var path = require('path');
var child_process = require('child_process');
module.exports = function (grunt) {
'use strict';
grunt.initConfig({
watch: {
'markdown': {
@carmour24
carmour24 / static_server.js
Created September 14, 2012 11:16 — forked from ryanflorence/static_server.js
Node.JS static file web server. Put it in your path to fire up servers in any directory, takes an optional port argument. If the requested file is a directory it will return the content of the base index.htm file. Requires mime package.
var http = require("http"),
url = require("url"),
path = require("path"),
fs = require("fs"),
port = process.argv[2] || 8888,
mime;
try {
mime = require("mime");
}