Skip to content

Instantly share code, notes, and snippets.

Verifying that +christophertriolo is my Bitcoin username. You can send me #bitcoin here: https://onename.io/christophertriolo
diff --git a/controllers/game.io.js b/controllers/game.io.js
index cd905e8..2c011da 100644
--- a/controllers/game.io.js
+++ b/controllers/game.io.js
@@ -2,12 +2,18 @@
* Game Server Side Socket IO
*/
+// Constants
+
@ctriolo
ctriolo / settle.js
Created April 26, 2012 22:30
Settle Test Users
{
"id": "100003791479818",
"access_token": "AAAFKj288DR4BAEwx1kpWcBh2KjgQ7eerRfpRKFRP2wnPXadwgldgqWewtcmGdOPIZA4lqYq9g9dIPFYWZAtAuZBZBIxcwkupkbxZCySkd4Or7DiS6qsi4",
"login_url": "https://www.facebook.com/platform/test_account_login.php?user_id=100003791479818&n=L2WEtxLdkiJY7pC",
"email": "nvegzll_martinazziwitz_1335479202\u0040tfbnw.net",
"password": "1861814392"
}
{
"id": "100003777319772",
/**
* Dice Image
*/
.board-container {
position: relative;
}
#dice-image-container {
position: absolute;
@ctriolo
ctriolo / Game.js
Created March 26, 2012 20:48
Game Design
/**
* Game.js
*
* Sever side Game Object
*/
function Game() {...};
Game.prototype._validateMethodCall = function(method_name, caller_player) {
switch (this.state) {
@ctriolo
ctriolo / board_object.js
Created March 20, 2012 23:14
Settle Objects
Board = {
'hexes': [ {object Hex}, {object Hex}, ... ],
'intersections': [ {object Intersection}, {object Intersections}, ... ],
'edges': [ {object Intersection}, {object Intersection}, ... ],
'grid' [
[ index_of_hex, index_of_hex, ... ], // Maybe after board creation it would be good to get rid of this?
[ index_of_hex, index_of_hex, ... ],
[ index_of_hex, index_of_hex, ... ],
],
'gridWidth': 5,
/*
* Title: tutorial.c
* Author: Christopher Triolo
* Build & Run:
* $ gcc -Isrc --std=c99 tutorial.c /path/to/mongo-c-driver/src/*.c -I /path/to/mongo-c-driver/src/ -o tutorial
* $ ./tutorial
* connection succeeded
* ...
* connection closed
*/
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Server Software: nginx/0.7.67
Server Hostname: localhost
Server Port: 80
Document Path: /128KB
Document Length: 131072 bytes
/*
* Example of SERVER-1389
* Download the official mongo-c-driver
* Place SERVER-1389.c into mongo-c-driver/
* Compile with gcc:
* $ gcc -Isrc --std=c99 src/*.c SERVER-1389.c -o SERVER-1389
* Run a mongod with default settings (127.0.0.1:27017)
* Run SERVER-1389:
* $ ./SERVER-1389
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking 127.0.0.1 (be patient)
Server Software: Apache/2.2.15
Server Hostname: 127.0.0.1
Server Port: 80