Skip to content

Instantly share code, notes, and snippets.

View billwscott's full-sized avatar

Bill Scott billwscott

View GitHub Profile
@totherik
totherik / gist:3379924
Created August 17, 2012 15:31
Profiling JavaScript in V8
$ git clone git://github.com/v8/v8.git v8 && cd v8
$ make dependencies # or mkdir build/gyp && git clone git://github.com/svn2github/gyp.git build/gyp
$ make native # (or the like: `$ make ia32`, etc)
$ out/native/d8 --prof 'test.js' # generates 'v8.log'
$ tools/mac-tick-processor # processes the generated 'v8.log'

Additional d8 options

@ryanflorence
ryanflorence / static_server.js
Last active June 10, 2024 02:37
Node.JS static file web server. Put it in your path to fire up servers in any directory, takes an optional port argument.
var http = require("http"),
url = require("url"),
path = require("path"),
fs = require("fs")
port = process.argv[2] || 8888;
http.createServer(function(request, response) {
var uri = url.parse(request.url).pathname
, filename = path.join(process.cwd(), uri);