Skip to content

Instantly share code, notes, and snippets.

(function() {
var players = {};
var standings = [];
var rounds = [];
var WIN_POINTS = 3;
var DRAW_POINTS = 1;
var LOSE_POINTS = 0;
var addPlayer = function(name) {
@johnstorm
johnstorm / pullall
Created May 31, 2012 17:25
Github Pull Everything Script - You must be in the folder that contains all of the projects to be updated, ex: cd C:/Projects/
for file in *; do if [ -d $file ]; then cd $file; git pull; cd ..; fi done
@johnstorm
johnstorm / IsTheTreeSorted.c
Created October 21, 2011 21:45
A single line implementation of checking if a tree is sorted.
#include <stdio.h>
#include <limits.h>
// A macro to return a string of word true or false based on the evaluation given.
#define boolToString(_bool_) ((_bool_) ? "true" : "false")
// A very simple tree
typedef struct _TreeNode
{
struct _TreeNode *left;