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
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) { |
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
// 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); |
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 fs = require('fs'); | |
function readFiveBytes(filePosition) { | |
var readFile = function (err, fd) { | |
if (err) { | |
console.log(err.message); | |
return; | |
} |
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
<?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"}\'', |