Skip to content

Instantly share code, notes, and snippets.

@toomuchpete
toomuchpete / Form.php
Created April 3, 2012 16:36
Lithium Form Helper for Twitter Bootstrap
<?php
namespace app\extensions\helper;
class Form extends \lithium\template\helper\Form {
/**
* String templates used by this helper.
*
* @var array
@toomuchpete
toomuchpete / Proxy.php
Created April 9, 2012 16:29
Lithium Adapter to check other adapters in turn
<?php
namespace app\security\auth\adapter;
use \lithium\security\Auth;
use \lithium\core\Object;
class Proxy extends Object
{
/**
@toomuchpete
toomuchpete / cocos2d_sprite_mod.py
Created October 4, 2012 19:37
changing sprite POC
import cocos
import pyglet
import random
import hashlib
class HelloSprite(cocos.layer.Layer):
is_event_handler = True
def __init__(self):
super( HelloSprite, self ).__init__()
upstream unicorn {
server unix:/tmp/unicorn.sock:;
}
server {
listen 80;
server_name leagues.afdc.local;
root /var/www/leagues.afdc.com/;
access_log /var/log/leagues.afdc.com/access.log;

Thoven's Next 4th Level Spell


Dragon's Breath

You breathe out a blast of energy. Creatures in the affected area take 1d6 points of energy damage per caster level (maximum of 12d6). A successful Reflex save results in half damage. The spell's effect and energy type depend on the type of dragon scale used:

  • Black dragon: 60-foot line of acid.
  • Blue or bronze dragon: 60-foot line of electricity.
@toomuchpete
toomuchpete / five_stages.md
Last active August 29, 2015 14:01
The Five Stages of Bug Grief

#The Five Stages of Bug Grief

###Blame: Have you tried clearing your cache?

###Denial: It works on my machine!

###Suspicion: Oooh... maybe it's not working quite right.

@toomuchpete
toomuchpete / header_timer.py
Last active August 29, 2015 14:03
Time header responses from http/https requests
import socket, ssl, sys, time
from pprint import pprint as pp
from urlparse import urlparse
if len(sys.argv) != 2:
print "ERROR: You must supply a url to profile."
sys.exit(-2)
url = sys.argv[1]
@toomuchpete
toomuchpete / Vagrantfile
Created November 24, 2014 17:42
AFDC Leagues Site
Vagrant.configure("2") do |config|
config.vm.box = "afdc-vm"
config.vm.box_url = "http://files.vagrantup.com/precise64.box"
config.vm.network :private_network, ip: "192.168.33.102"
config.hostsupdater.aliases = %w(www.afdc.local leagues.afdc.local)
config.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--memory", "1024"]
end
@toomuchpete
toomuchpete / food.md
Last active August 29, 2015 14:19
RailsConf 2015 Food Recommendations