Skip to content

Instantly share code, notes, and snippets.

@jacobgardner
jacobgardner / pandemic.md
Created December 18, 2012 20:06
Pandemic Variants

Pandemic Variants

Organized Religion

###Glossary

  • Priest - Player represented by a pawn
  • Convert - Converted group of people represented by an infection piece.
@jacobgardner
jacobgardner / snape.py
Last active December 16, 2015 02:09
Snape Framework
'''
This module contains a class to represent a snape board. Snape is a game where you try to feed snape as many apples as you can without letting snape run into himeself. Every time your snape eats an apple, your snape grows in size.
'''
from __future__ import print_function
import random
from collections import namedtuple
import itertools
EMPTY = 0
UP = 1
import snape
import argparse
import os
DIRECTION = snape.RIGHT
def move(b):
global DIRECTION
if b.head.x == 0 and b.head.y == b.height - 1:
DIRECTION = snape.DOWN
Processor Information:
Vendor: GenuineIntel
CPU Family: 0x6
CPU Model: 0x3a
CPU Stepping: 0x9
CPU Type: 0x0
Speed: 2401 Mhz
8 logical processors
4 physical processors
HyperThreading: Supported
This file has been truncated, but you can view the full file.
26342-39ab1.glog - 8515
26342-4a958.glog - 6954
26344-a19c2.glog - 8703
26345-1c4d3.glog - 14505
26346-b347a.glog - 9524
26348-f11a3.glog - 15462
26349-b624a.glog - 21856
26350-4077d.glog - 12819
26351-11399.glog - 23327
26352-ecf30.glog - 11683
from collections import namedtuple
die = [
[1, 1, 2, 3, 4, 5],
[1, 1, 2, 3, 4, 5],
[1, 1, 2, 3, 4, 5],
[1, 1, 2, 3, 4, 5],
[1, 1, 2, 3, 4, 5],
]
function setup() {
function test() {
}
}
@jacobgardner
jacobgardner / .htacess
Created July 22, 2015 18:46 — forked from ryanfitton/.htacess
This snippet is great to use if you have recently switched your Wordpress website over to HTTPS only. Paste this snippet into your .htaccess and overwrite the standard Wordpress code at the top of the file.
# BEGIN WordPress
# Test
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{SERVER_PORT} !^443$
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]
RewriteBase /
RewriteRule ^index\.php$ - [L]
const TIMESTEP = 10; // 100 updates per second => 10ms = 0.01s => 1frame / 0.01s = 100fps
function renderLoop() {
// Do Renderer Things here
window.requestAnimationFrame(renderLoop);
}
window.requestAnimationFrame(renderLoop)
set position(vec) {
const diff = vec.clone().subtract(this._lowerLeft);
this._lowerLeft = vec;
this._upperRight.add(diff);
}
get position() {
return this._lowerLeft;