The only cross-platform browser that fits in a Gist!
One line install. Works on Linux, MacOSX and Windows.
$> npm install http://gist.github.com/morganrallen/f07f59802884bcdcad4a/download
var Chartist = require("chartist") | |
/* Add a basic data series with six labels and values */ | |
var data = { | |
labels: ['1', '2', '3', '4', '5', '6'], | |
series: [ | |
{ | |
data: [1, 2, 3, 5, 8, 13] | |
} | |
] |
body { | |
color: red; | |
color: blue; | |
} |
I hereby claim:
To claim this, I am signing this object:
var http = require('http'); | |
http.createServer(function (req, res) { | |
if (!authorized(req, res, ['admin'])) { | |
res.statusCode = 401; | |
res.end("You don't have permissions"); | |
} | |
res.statusCode = 200; | |
res.end('Welcome back!'); |
on iMac: | |
$ browserify test.js | testling | |
events.js:72 | |
throw er; // Unhandled 'error' event | |
^ | |
Error: spawn ENOENT | |
at errnoException (child_process.js:980:11) | |
at Process.ChildProcess._handle.onexit (child_process.js:771:34) |
diff --git a/tests/models/listing_test.js b/tests/models/listing_test.js | |
index 14c3d14..c04b7a6 100644 | |
--- a/tests/models/listing_test.js | |
+++ b/tests/models/listing_test.js | |
@@ -10,6 +10,7 @@ var dict = { | |
'Name': 'CPK', | |
'HeadingText': 'Restaurants', | |
'PrimaryCollection': 'food', | |
+ 'Personalization.TotalNotes': '10' | |
}; |
// The server's main routes function | |
// | |
// Supports the following end-points: | |
// POST /push | |
// POST /register | |
// POST /register.php | |
// GET /health | |
// GET /health.txt | |
function router(config, req, res) { |
// Elphi System Simulator in Node.js | |
// TODO: check failure case | |
// 0) request times | |
// 0) server hangs | |
// 0) HTTP request timeouts where we never get a response | |
// 1) no api | |
// 2) no proxy on | |
// 3) plugs unresponsive |
goal: | |
----- | |
return an array of names that start with j and sorted by id | |
["josh", "jordan"] | |
arr = [{name: 'jordan',id: 3}, {name: 'josh',id: 1}, {name: 'rob',id: 5}] | |
1) | |
arr.select!{ |a| a[:name][/\Aj/] } |