This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta http-equiv="Content-type" content="text/html; charset=utf-8"> | |
| <title>Example Mocha Test</title> | |
| </head> | |
| <body> | |
| <!-- Required for browser reporter --> | |
| <div id="mocha"></div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "name": "ludum-dare-33", | |
| "version": "0.0.0", | |
| "description": "Ludum Dare #LDJAM 33 Game Submission", | |
| "main": " ", | |
| "scripts": { | |
| "start": "node_modules/.bin/http-server -p 51000 -c-1", | |
| "test": "echo \"Error: no test specified\" && exit 1" | |
| }, | |
| "repository": { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
| [ | |
| { "keys": ["ctrl+tab"], "command": "next_view" }, | |
| { "keys": ["ctrl+shift+tab"], "command": "prev_view" } | |
| ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| _.mixin({ | |
| // Serialize key-value pairs of an object into urlencoded format | |
| serialize: function(obj) { | |
| var pairs = _.pairs(obj); | |
| return _.reduce(pairs, function(memo, pair) { | |
| var key = _.first(pair), value = _.last(pair); | |
| value = _.isFunction(value) ? value() : value; | |
| return memo + '&' + encodeURIComponent(key) + '=' + encodeURIComponent(value); | |
| }, '').replace('&', '').replace(/%20/g, '+'); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // proxy all API requests | |
| function proxy(method, path, headers, data) { | |
| var defer = q.defer(), request, | |
| pubKey = '****'; | |
| // filter paramaters contained in header, to avoid | |
| // incorrectly identifying client domain and agent in request | |
| headers = _.pick(headers, ['x-stackmob-api-key', 'x-stackmob-proxy-plain', 'x-stackmob-api-key-' + pubKey, 'accept', 'content-type', 'content-length', 'authorization']); | |
| // format headers | |
| headers = { |
NewerOlder