Skip to content

Instantly share code, notes, and snippets.

import random
# The die
class d(object):
def __init__(self, sides):
super(d, self).__init__()
self.sides = sides
def __mul__(self, rolls):
@campaul
campaul / pandemic.md
Last active August 29, 2015 13:57
Rules for Pandemic IRC Game

Yelpidemic Rules

Setup

When the game starts, all players are either healthy or infected. 1/6th of players will start infected. All players start with 0 antidotes.

Actions

Actions can be performed by sending messages to the bot.

status

Do yelpidemic status to have the bot private message your status to you.

@campaul
campaul / dywypi_setup
Last active August 29, 2015 13:57
Setting up dywypi
Be in your virtualenv first
Clone dywypi somewhere outside your project
git clone https://github.com/eevee/dywypi.git
cd into dywypi
do `python setup.py develop`
dywypi is now installed for your virtualenv. You can update it by coming back to this directory and doing `git pull`
cd into your porject
// Old Test Files
foo.bar.baz = function() {
window.setUp = function() {
// Set up
}
window.testFoo = function() {
// A test
}
@campaul
campaul / otr-fingerprints
Last active December 19, 2015 12:19
OTR Fingerprints
456D7BC4 6B19C7A7 F2136C0C 24B43C27 85AB4C8D
EB67EE95 3DF5AEDA AB4D3C81 A784D0E7 98AF49A0
940AAD6D 130F674D 7C9C99B9 CA6C4CD7 35DC21DA
0B1FCE0E 61A29864 737DF8BD 47413821 94CFF83D
119A3473 7C31A5B9 E20A6024 5DA365D8 F360071A
@campaul
campaul / lru.js
Created December 19, 2012 06:50
A concise JavaScript LRU cache.
this.cache = (function() {
// Inserts a node into a circular double linked list
var insert = function(head, node) {
return (((node.prev = head.prev).next = node).next = head).prev = node;
};
// Removes a node from a circular double linked list
var remove = function(node) {
return ((node.prev.next = node.next).prev = node.prev) && node;
};
@campaul
campaul / resume.tex
Last active October 2, 2015 23:37
LaTeX source for my resume.
\documentclass[margin, 11pt]{res}
\usepackage{enumitem}
\usepackage{setspace}
\setlength{\oddsidemargin}{-.125in}
\setlength{\topmargin}{-.125in}
\setlength{\textheight}{10in}
\begin{document}