Skip to content

Instantly share code, notes, and snippets.


Block or report user

Report or block guiomie

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
guiomie / node-service-deploy on joyent smartmachine
Created Oct 23, 2011
node-service-deploy on joyent smartmachine
View node-service-deploy on joyent smartmachine
[node@workoutcell ~]$ node-service-deploy
Deploying node-service.
revision: master
timestamp: 2011-10-23T15-38-27.419110651
Installing node module deps (from package.json).
npm WARN invalid config node-version="v0.4"
> mongoose@2.3.6 test /home/node/node-service/releases/2011-10-23T15-38-27.41911 0651/node_modules/mongoose
> make test
guiomie / gist:1258099
Created Oct 2, 2011
Calling getParcourList returns undefined all the time
View gist:1258099
var getParcourList = function(userId){
GeneralReference.findOne({ id: userId}, function(err, result){
console.log("error in save: " + err);
return "No Document found: " + err;
return result.parcours;
guiomie / express static weird
Created Sep 21, 2011
Serves an invisible image, but a css file without any issues.
View express static weird
var express = require("express"),
app = express.createServer();
app.use(express.static(__dirname + '/static'));
app.get('/', function(req, res){
res.send('Hello World');
guiomie / gist:1167029
Created Aug 24, 2011
Saving new user, put it always saves the same thing in mongodb (first authenticated user) I'm using everyauth
View gist:1167029
exports.findOrCreateFacebookUser = function(fbUserData, promise){
User.findOne({}, function(err, user) {
if(err) {
console.log("Error in finding user for auth. Check Db");;
else if(user){
console.log("User found ");
guiomie / gist:1046775
Created Jun 25, 2011
Function parameters not passed
View gist:1046775
var writeToCollection = function(collectionName, jsonObject){
//the db name is hardcoded,
var collection = new mongo.Collection(db, collectionName);
collection.insert(jsonObject, {safe:true}, function(err, objects) {
if(err != null){
sys.log("Could not write JSON in collection ->" + err);
You can’t perform that action at this time.