Skip to content

Instantly share code, notes, and snippets.

View jcolebrand's full-sized avatar

J. Cole Brand jcolebrand

View GitHub Profile

Keybase proof

I hereby claim:

  • I am jcolebrand on github.
  • I am jcolebrand (https://keybase.io/jcolebrand) on keybase.
  • I have a public key whose fingerprint is D791 F373 603E EBB4 13FA AF32 7800 2A82 A1EC E4C1

To claim this, I am signing this object:

{
_id: uint, //gives us format :101123 for replies, etc
owner_id: int,
text: String,
room: int, // id of room
starred: [user_id], // ids of users
flagged: [user_id], // ids of users
timestamp: timestamp, // all timestamps are in unix from UTC
deleted: timestamp, // null indicates not deleted
deletedBy: user_id, // indicates who deleted the message
@jcolebrand
jcolebrand / Message.json
Created August 26, 2011 20:52 — forked from yojimbo87/Message.json
DB structures
{
_id: uint, //gives us format :101123 for replies, etc
owner_id: int,
text: String,
room: int, // id of room
starred: [user_id], // ids of users
flagged: [user_id], // ids of users
timestamp: timestamp, // all timestamps are in unix from UTC
deleted: timestamp, // null indicates not deleted
deletedBy: user_id, // indicates who deleted the message
@jcolebrand
jcolebrand / ancillary.css
Created September 15, 2011 18:04
Just a thing I did ~ "ghost text"
.untouched {
color: #777;
}
@jcolebrand
jcolebrand / markdown.nanorc
Created September 17, 2011 19:23
markdown nanorc
syntax "markdown" "\.txt$"
# Quotations
color cyan "^>.*"
# Emphasis
color green "_.*_"
color green "\*.*\*"
# Strong emphasis
color brightgreen "\*\*.*\*\*"
color brightgreen "__.*__"
# Underline headers
@jcolebrand
jcolebrand / main.js
Created September 19, 2011 16:00
Hmmm...
var fs = require('fs');
var router = {
resource: function(path,methods){
console.log(path);
console.log(methods);
}
},
module = {};
@jcolebrand
jcolebrand / meek stv results
Created October 12, 2011 20:22
dba.se election 1
OpenSTV version 1.7 (http://www.OpenSTV.org/)
Suggested donation for using OpenSTV for an election is $50. Please go to
http://www.OpenSTV.org/donate to donate via PayPal, Google Checkout, or
Amazon Payments.
Certified election reports are also available. Please go to
http://www.openstv.org/certified-reports for more information.
Loading ballots from file dba-stackexchange-com-2011-election-results.blt.
@jcolebrand
jcolebrand / Index.html
Created October 13, 2011 17:58
For Jenan
<html xmlns="http://www.w3.org/1999/xhtml">
@jcolebrand
jcolebrand / keypresscallback.js
Created November 11, 2011 17:35
Goes with my gist 1219990
function SearchFieldKeypressCallBack(event, value) {
//if they entered anything, else use the default like on page load
if (value) {
//TIM: I was debouncing/throttling here
GenerateReportTilesOnSuccess(GetItemsByText(value));
} else {
GenerateReportTilesOnSuccess(reportList.list);
}
}
@jcolebrand
jcolebrand / MapReduce.cs
Created November 16, 2011 23:48
Just to be an ass
namespace OX.MapReduce
{
using System;
using System.Linq;
using System.Threading.Tasks;
public static class MapReduce
{
public static Task<T> Start<U, V, T>(Func<U, V> m, Func<V[], T> r, params U[] i) {
return R(r, C(m, i));