Skip to content

Instantly share code, notes, and snippets.

View kitsu's full-sized avatar

Ed Blake kitsu

View GitHub Profile
@rsbohn
rsbohn / win7-use-node.md
Created February 27, 2012 15:54
Run .js files using node.exe on Windows 7

Want to run node.js files on Windows 7 just by typing in the file name? Here's how I got it to work:

echo %pathext%

You should see .JS included in the list. This allows you to type in the script name (hello.js) and Windows will attempt to run it. Next you need to tell Windows to use node.exe instead of wscript.exe (Anyone still use that?) You'll need a CMD.exe window with Administrator privileges. Easy way to do that is to tap the 'Windows' key, type in CMD, right click when it appears in the menu and click 'Run as Administrator'. You may need a password.

When you have the CMD.exe window enter the following:

assoc .js=JavaScript

ftype JavaScript=node.exe %1 %*

@mbostock
mbostock / .block
Last active March 19, 2018 02:57
getBBox
license: gpl-3.0