This file contains 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
var express = require('express'); | |
var app = express(); | |
app.use(express.bodyParser()); | |
app.get('/:model', function (req, res) { | |
res.json(data[req.params.model]); | |
}); | |
app.get('/:model/:id', function (req, res){ | |
var record = data[req.params.model].filter(function (entry) { |
This file contains 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
Object.defineProperties = function(O, Properties) { | |
// 1. If Type(O) is not Object throw a TypeError exception. | |
if (typeof(O) !== "object" || O == null) { | |
throw TypeError("Object.defineProperties called on non-object"); | |
} | |
// 2. Let props be ToObject(Properties) | |
var props = Object(Properties); // not *exactly* the same, but similar enough | |
// 3. Let names be an internal list containing the names of each enumerable own property of props. |
This file contains 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
var NodeFilter = { | |
FILTER_ACCEPT: 1, | |
FILTER_REJECT: 2, | |
FILTER_SKIP: 3, | |
SHOW_ALL: -1, | |
SHOW_ELEMENT: 1, | |
SHOW_ATTRIBUTE: 2, | |
SHOW_TEXT: 4, | |
SHOW_CDATA_SECTION: 8, | |
SHOW_ENTITY_REFERENCE: 16, |
This file contains 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
Day Job: Project Manager @ freshout | |
Open Source contribution (if any): Elastic, Argon, Neon, Tellurium, Dysprosium, and some more i cant remember | |
Tell me about your experience with Ruby/Rails: Coding on many different projects for several years going from fast several hours project, to long project that go for several years of continuous development | |
How do you use GitHub: open source and closed source project, sharing gists and sharing code with the world | |
Favorite luchador(es): aluche |