Skip to content

Instantly share code, notes, and snippets.

View bpanahij's full-sized avatar

Brian P Johnson bpanahij

  • San Francisco, CA
View GitHub Profile
Verifying that +brianj is my openname (Bitcoin username). https://onename.com/brianj
<?php
/**
* See for Original: http://tonylandis.com/php/php-text-tables-class/
* Modified by Brian Johnson on 2013-07-09
*/
class ArrayToColorTextTable
{
/**
* @var array The array for processing
@bpanahij
bpanahij / loadmatches.js
Created October 23, 2012 21:00
Load Matches Controller (incomplete)
var client = require('./client'),
helpers = require('../core/helpers'),
db = require('../core/db'),
fs = require('fs');
var line = require('../model/line');
client.on('Kp_Client_LoadMatchesAction', function (query, socket, callback) {
tlog(query);
var start = new Date().getTime();
@bpanahij
bpanahij / loadmatches.js
Created October 23, 2012 21:00
Load Matches Controller in progress
formatMatchBookmakerTypeIndex
@bpanahij
bpanahij / asyncPattern.js
Created October 23, 2012 20:27
Asyn Pattern Anonymous Function
var lineFunctions = [];
matches.forEach(function (match) {
lineFunctions.push(
function (callback) {
//some function
});
});
async.parallel(lineFunctions, function (allResults) {
console.log(allResults);