Skip to content

Instantly share code, notes, and snippets.

I have my model here:
// transactionmodel.js
function TransactionModel() {
var pg = require('pg');
var connectionString = "pg://chartjes:******@localhost:5432/ibl_stats";
this.client = new pg.Client(connectionString);
this.client.connect();
this.getCurrent = function(callback) {
// Front controller for our API
var application_root = __dirname;
var express = require("express");
var path = require("path");
var pg = require('pg');
var app = express.createServer();
var model = require('transactionmodel);
var tm = new model.TransactionModel(pg);
@markstory
markstory / gist:1711119
Created January 31, 2012 15:38 — forked from chartjes/gist:1711104
Hands On Node File System Exercise #3
var fs = require('fs');
function readFiveBytes(filePosition) {
var readFile = function (err, fd) {
if (err) {
console.log(err.message);
return;
}
<?php
$options = array(
'repo' => '/Users/predominant/Projects/cakephp/2.0/.git',
'titleOrder' => array(
'dev', 'alpha', 'beta', 'rc',
),
'regex' => '/(?<version>[\d\.]+)(?:-(?<title>[a-zA-Z]+)(?:(?<iteration>\d)?))?/',
'formats' => array(
'plaintext' => '| awk \'{print "Commit: ["$1"]\n"; $1=""; print "-"$0"\n"}\'',
'lighthouse' => '| awk \'{print "#### Commit: ["$1"](http://github.com/cakephp/cakephp/commit/"$1")\n"; $1=""; print $0"\n"}\'',