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
@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);
@bpanahij
bpanahij / loadmatches.js
Created October 23, 2012 21:00
Load Matches Controller in progress
formatMatchBookmakerTypeIndex
@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();
<?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
Verifying that +brianj is my openname (Bitcoin username). https://onename.com/brianj
@bpanahij
bpanahij / ubuntu-compass-ruby
Created September 22, 2015 23:51 — forked from stephanetimmermans/ubuntu-compass-ruby
Install Compass+Ruby on Ubuntu 14.04
#https://gorails.com/setup/ubuntu/14.04
sudo apt-get update
sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties
sudo apt-get install libgdbm-dev libncurses5-dev automake libtool bison libffi-dev
curl -L https://get.rvm.io | bash -s stable
source ~/.rvm/scripts/rvm
echo "source ~/.rvm/scripts/rvm" >> ~/.bashrc
rvm install 2.1.2
rvm use 2.1.2 --default

Keybase proof

I hereby claim:

  • I am bpanahij on github.
  • I am brianjohnson (https://keybase.io/brianjohnson) on keybase.
  • I have a public key whose fingerprint is EDC5 7472 F5B5 DA7A 9D74 0344 3A9E 0438 CC8F 8132

To claim this, I am signing this object:

@bpanahij
bpanahij / index.html
Created November 28, 2015 03:01 — forked from anonymous/index.html
Reaction // source https://jsbin.com/jotanay
<!DOCTYPE html>
<html>
<head>
<script src="https://code.jquery.com/jquery.min.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<script src="http://fb.me/react-with-addons-0.13.3.js"></script>
<meta charset="utf-8">
<title>Reaction</title>
<style id="jsbin-css">
@bpanahij
bpanahij / index.html
Created November 28, 2015 04:09 — forked from anonymous/index.html
Reaction // source https://jsbin.com/jotanay
<!DOCTYPE html>
<html>
<head>
<script src="https://code.jquery.com/jquery.min.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<script src="http://fb.me/react-with-addons-0.13.3.js"></script>
<meta charset="utf-8">
<title>Reaction</title>
<style id="jsbin-css">
@bpanahij
bpanahij / Moto
Last active November 28, 2015 04:21
Moto React
class Wheel extends React.Component {
constructor (props) {
super(props);
this.props.image = "https://s3.amazonaws.com/code_brian/react/Front+Wheel.png";
}
render() {
var styles = {
wheel: {