Skip to content

Instantly share code, notes, and snippets.

View olalonde's full-sized avatar

Oli olalonde

View GitHub Profile
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
$ 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
#
{
"partial_tree": {
"data": {
"value": 37618,
"hash": "epzhNrElpCnpqNS4gdqFD4hn75hIfPzKM/WmNS9Dxq0="
},
"left": {
"data": {
"value": 24614,
"hash": "mVHpwxFubNXJKOv/kuCm6IoRUGN4DlQ5f+MHjCjj2Xw="
var base = require("../base");
var util = require("util");
/**
* Create an NOJ Module
* @param baseurl
* @returns {nbut}
*/
exports.create = function(baseurl) {
return new nbut(baseurl);
var base = require("../base");
var util = require("util");
/**
* Create an NOJ Module
* @param baseurl
* @returns {nbut}
*/
exports.create = function(baseurl) {
return new nbut(baseurl);
@olalonde
olalonde / asdfsa
Last active December 18, 2015 13:29
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',
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];
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) {
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],
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);