Skip to content

Instantly share code, notes, and snippets.

View Pitbi's full-sized avatar

Pierre Biezemans Pitbi

View GitHub Profile
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var qualificationSchema = new mongoose.Schema ({
date : Date,
track : {type: Schema.ObjectId, ref : 'Track'},
mod : {type: Schema.ObjectId, ref : 'Mod'},
entrys : [entrySchema]
});
var Qualification = mongoose.model('Qualification', qualificationSchema);
@Pitbi
Pitbi / ERROR
Created September 21, 2012 21:41
DEBUG: TypeError: Cannot read property 'value' of undefined
at _asyncMap (/home/pitbi/Projects/RaceLive/node_modules/async/lib/async.js:185:23)
at async.forEachSeries.iterate (/home/pitbi/Projects/RaceLive/node_modules/async/lib/async.js:108:13)
at async.forEachSeries.iterate (/home/pitbi/Projects/RaceLive/node_modules/async/lib/async.js:119:25)
at _asyncMap (/home/pitbi/Projects/RaceLive/node_modules/async/lib/async.js:187:17)
at async.series.results (/home/pitbi/Projects/RaceLive/node_modules/async/lib/async.js:491:34)
at async.forEach (/home/pitbi/Projects/RaceLive/node_modules/async/lib/async.js:94:25)
at bestLapSearch (/home/pitbi/Projects/RaceLive/lib/rfactor_xml_parser.js:188:19)
at async.forEach (/home/pitbi/Projects/RaceLive/node_modules/async/lib/async.js:86:13)
at Array.forEach (native)
@Pitbi
Pitbi / ERROR
Created October 24, 2012 20:30
DEBUG: Starting child process with 'node rfactor_xml_watch.js'
rename 2012_10_22_00_14_23-15Q1.xml
DEBUG:
/home/pitbi/Projects/RaceLive/node_modules/libxmljs/lib/document.js:94
return bindings.fromXml(string);
^
DEBUG: Error: Start tag expected, '<' not found
at Object.module.exports.fromXml (/home/pitbi/Projects/RaceLive/node_modules/libxmljs/lib/document.js:94:21)
var util = require("util");
var RfactorXmlParser = require("./rfactor_xml_parser");
var Qualification = require("../models/qualification");
var QualificationParser = function QualificationParser(filePath) {
console.log("QualificationPARSER");
this.constructor.super_.call(this, filePath);
this.Session = Qualification;
};
var tags = /(.*)[,\.%\\\[\]*;%#]/.exec(req.body.thread.tags);
var HomeController = {};
HomeController.show = function (req, res) {
res.render('home/show');
};
module.exports = HomeController;
@Pitbi
Pitbi / plugin.js
Last active August 29, 2015 14:02
<!DOCTYPE html>
<html>
<head>
<title>Capture Photo</title>
<script type="text/javascript" charset="utf-8" src="cordova.js"></script>
<script type="text/javascript" charset="utf-8">
var pictureSource; // picture source
var destinationType; // sets the format of returned value