Skip to content

Instantly share code, notes, and snippets.

View benjaminplee's full-sized avatar

Benjamin Lee benjaminplee

  • World Wide Technology
  • St. Louis, MO
View GitHub Profile
@benjaminplee
benjaminplee / Registers In Piet PoC
Created October 2, 2010 04:02
Proof of concept showing stack-size-aware macros for native piet commands
<!DOCTYPE html>
<html>
<head>
<script class="jsbin" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<meta charset=utf-8 />
<title>Registers/Variables in Piet - Proof Of Concept</title>
</head>
<body>
<h1>Registers/Variables in Piet/QuickPiet - Proof of Concept</h1>
<p>
@benjaminplee
benjaminplee / ContractPrice.user.js
Created August 2, 2010 19:20
Adds context menu functions for loading and displaying contract prices
// ==UserScript==
// @name ContractPrice
// @namespace http://yardspoon.com
// @description Displays curret contract prices
// @include http://baseball.fantasysports.yahoo.com/b1/161295/*
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js
// @require http://jquery-json.googlecode.com/files/jquery.json-2.2.min.js
// ==/UserScript==
function process_name_text(original) {
:reverseplayer2name
duplicate
push 1
subtract
not
goto donereverseplayer2name NOWHERE
duplicate
push 1
subtract
push 3
@benjaminplee
benjaminplee / Piet! Language Spec
Created March 14, 2010 15:40
QuickPiet: a simplified language spec to design algorithms in Piet; minus the pictures
# QuickPiet commands listed below with their effect/explanation to the right after the arrow (-->)
# These commands follow the actions available with the Piet programming languages with some
# small changes to allow algorithms to be tested without the need of creating valid Piet images.
# Original Piet information can be found at http://www.dangermouse.net/esoteric/piet.html
# Just as in Piet, this language spec assumes a single "infinite" stack and a linear command execution order.
# Blank lines should be ignored.
# An implicit "end" command is present at the bottom of the document.
<system.webServer>
...
<handlers>
<clear />
<add name="MonoRail64" path="*.rails" verb="*" type="" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll" resourceType="Unspecified" requireAccess="Script" allowPathInfo="false" preCondition="classicMode,runtimeVersionv2.0,bitness64" responseBufferLimit="4194304" />
<add name="MonoRail" path="*.rails" verb="*" type="" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" resourceType="Unspecified" requireAccess="Script" allowPathInfo="false" preCondition="classicMode,runtimeVersionv2.0,bitness32" responseBufferLimit="4194304" />
<add name="UrlRewriting64" path="*" verb="*" type="" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll" resourceType="Unspecified" requireAccess="None" allowPathInfo="false" preCondition="classicMode,runtimeVersionv2.0,bitness64" responseBufferLimit="4194304" />
<add na
@benjaminplee
benjaminplee / monorail_iis7_setup_web_config_snipit.xml
Created February 25, 2010 22:37
snipit of web.config for .Net app setting up handlers for MonoRail in IIS 7
<system.webServer>
...
<handlers>
<clear />
<add name="MonoRail64" path="*.rails" verb="*" type="" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll" resourceType="Unspecified" requireAccess="Script" allowPathInfo="false" preCondition="classicMode,runtimeVersionv2.0,bitness64" responseBufferLimit="4194304" />
<add name="MonoRail" path="*.rails" verb="*" type="" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" resourceType="Unspecified" requireAccess="Script" allowPathInfo="false" preCondition="classicMode,runtimeVersionv2.0,bitness32" responseBufferLimit="4194304" />
<add name="UrlRewriting64" path="*" verb="*" type="" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll" resourceType="Unspecified" requireAccess="None" allowPathInfo="false" preCondition="classicMode,runtimeVersionv2.0,bitness64" responseBufferLimit="4194304" />
<add na