Skip to content

Instantly share code, notes, and snippets.

@benjie
benjie / README.md
Created March 6, 2014 10:51
Source map support for running CoffeeScript with `coffee`

DIY CoffeeScript source map support

CoffeeScript already has source map support via the -m flag, but you have to compile the .coffee first and then run the .js with node for it to be effective. Running the .coffee directly with coffee seems to have no source map support.

This hack recalculates (and caches in memory) the source map on the fly so it can be imported into the excellent source-map-support module. It's disabled if you run the compiled JS file directly (as you would in production) because it assumes the source maps will already have been generated.

@willurd
willurd / web-servers.md
Last active May 6, 2024 13:43
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000