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
FROM ubuntu:precise | |
MAINTAINER Olivier Lalonde <olalonde@gmail.com> | |
RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list | |
RUN apt-get update | |
RUN apt-get upgrade -y | |
RUN apt-get install -y bitcoind git node | |
# install node | |
RUN apt-get install -y wget | |
RUN wget http://nodejs.org/dist/v0.10.26/node-v0.10.26-linux-x64.tar.gz |
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
$ git st *[master][] | |
# On branch master | |
# Changes to be committed: | |
# (use "git reset HEAD <file>..." to unstage) | |
# | |
# modified: index.js | |
# modified: package.json | |
# new file: test.js | |
# |
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
{ | |
"partial_tree": { | |
"data": { | |
"value": 37618, | |
"hash": "epzhNrElpCnpqNS4gdqFD4hn75hIfPzKM/WmNS9Dxq0=" | |
}, | |
"left": { | |
"data": { | |
"value": 24614, | |
"hash": "mVHpwxFubNXJKOv/kuCm6IoRUGN4DlQ5f+MHjCjj2Xw=" |
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 base = require("../base"); | |
var util = require("util"); | |
/** | |
* Create an NOJ Module | |
* @param baseurl | |
* @returns {nbut} | |
*/ | |
exports.create = function(baseurl) { | |
return new nbut(baseurl); |
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 base = require("../base"); | |
var util = require("util"); | |
/** | |
* Create an NOJ Module | |
* @param baseurl | |
* @returns {nbut} | |
*/ | |
exports.create = function(baseurl) { | |
return new nbut(baseurl); |
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
SELECT "persons".* FROM "persons" | |
INNER JOIN "passports" AS "passport" | |
ON ("persons"."passport_id" = "passport"."id") , "persons" | |
INNER JOIN "persons" AS "bestFriend" | |
ON ("persons"."bestfriend_id" = "bestFriend"."id") | |
WHERE ("persons"."name" = $1) LIMIT 1 | |
{ [Error: table name "persons" specified more than once] | |
severity: 'ERROR', | |
code: '42712', |
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
q = q.where(exp.evaluate({ | |
eql: function (operands) { | |
var attribute = operands[0], | |
value = operands[1]; | |
return table[attribute].equal(value); | |
}, | |
notEql: function (operands) { | |
var attribute = operands[0], | |
value = operands[1]; |
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
or: function (operands) { | |
var res; | |
while (operands.length > 1) { | |
res = operands.shift().or(operands); | |
} | |
return res; | |
}, | |
and: function (operands) { | |
var res; | |
while (operands.length > 1) { |
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
q = q.where(exp.evaluate({ | |
eql: function (operands) { | |
debugger; | |
var attribute = operands[0], | |
value = operands[1]; | |
return table[attribute].equal(value); | |
}, | |
notEql: function (operands) { | |
debugger; | |
var attribute = operands[0], |
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
function require_superadmin(req, cb) { | |
cb(req.user && req.user.superadmin); | |
} | |
function require_user(req, cb) { | |
cb(req.user); | |
} | |
function anyone(req, cb) { | |
cb(true); |