Skip to content

Instantly share code, notes, and snippets.

View troygoode's full-sized avatar
🤓
Building nerdy stuff.

Troy Goode troygoode

🤓
Building nerdy stuff.
View GitHub Profile
@troygoode
troygoode / MySurvey2010.cs
Created January 21, 2011 18:25
Example of versionned survey object.
// survey definitions
public abstract class SurveyDefinition{
public string Id{ get; set; }
public string Survey{ get; set; }
public string Version{ get; set; }
public abstract Survey Generate();
}
public class MySurvey2010 : SurveyDefinition{
Yi = Stativus.createStatechart()
Yi.addState "StateA1",
globalConcurrentState:'default_states',
states: [
name: "StateA1B1",
substatesAreConcurrent: true,
states: [
name: "StateA1C1"
,
name: "StateA1C2"
#!/bin/bash
export APP_ENV=$1
shift
if [ -z "$APP_ENV" ]; then
echo "Usage: $(basename $0) APP_ENV [ARGUMENTS...]"
echo "ARGUMENTS are forwarded to $(which env)"
exit 1
fi
<!DOCTYPE html>
<html>
<head>
<title>Example</title>
</head>
<body>
<!-- this is the DOM template for our o_O app below -->
<div id="team">
<p bind='text: teamname(); css: css()' />
@troygoode
troygoode / collection-issue.html
Created March 27, 2012 14:56
o_O: Collection Issue?
<!DOCTYPE html>
<html>
<head>
<title>Example</title>
</head>
<body>
<!-- this is the DOM template for our o_O app below -->
<div id="viewmodel">
<ul bind="foreach: people">
@philfreo
philfreo / stripe_rev.py
Last active December 17, 2015 03:28
Calculate how much active/current subscription revenue you have for all your Stripe customers, considering discounts, trials, etc.
from __future__ import division
import collections
from texttable import Texttable
by_status = collections.defaultdict(list)
per_page = 100
offset = 0
while True:
public class ಠ_ಠAttribute : Attribute
{
}
[ಠ_ಠ]
public class Manager
{
// 1000s of lines here
}