Skip to content

Instantly share code, notes, and snippets.

public static class HtmlDocumentExtensions
{
public static object ExecuteScript( this HtmlDocument document, string methodName, object[] args )
{
dynamic body = document.NativeElement;
object script = body.document.script;
return script.GetType().InvokeMember( methodName, System.Reflection.BindingFlags.InvokeMethod, null, script, args );
}
}
@bcatcho
bcatcho / gist:3631002
Created September 5, 2012 05:21
Platerformer Prototype in UDK
//=============================================================================
// SPG_GameInfo
//
// Game info which spawns the player controller, pawn and HUD for the player.
//
// Copyright 1998-2011 Epic Games, Inc. All Rights Reserved.
//=============================================================================
class SPG_GameInfo extends SimpleGame;
// Variable which references the default pawn archetype stored within a package
@bcatcho
bcatcho / gist:3741315
Created September 18, 2012 04:47
UDK Camera
/**
* Camera: defines the Point of View of a player in world space.
* Copyright 1998-2012 Epic Games, Inc. All Rights Reserved.
*/
class Camera extends Actor
notplaceable
native(Camera)
dependson(EngineBaseTypes)
transient;
@bcatcho
bcatcho / gist:3870245
Created October 11, 2012 04:49
Example request/response for tscclass create student api call
Request:
{
"CourseCode":"70456",
"DisplayName":"Jax",
"PinCode": "12345"
}
Response:
{
"AccessToken":
@bcatcho
bcatcho / columnyProto.lua
Created October 13, 2012 17:30
Dramatically changing how water flow works to based off of pressure, volume, mass, density... it's in a half working state
--# Scratch
-- TRiver
-- Algorithm for flowing water:
-- Terms:
-- P = flow power. 2 power == 2 block slices
-- N = a river node
-- n.wl = water level for a node
-- n.wgl = water or ground level
-- Invariant:
@bcatcho
bcatcho / Codea_Common.lua
Created October 16, 2012 03:05
Added a new debug method and a namespace for all debug methods "dbg"
--# Debug
dbg = {}
setmetatable(dbg, { __index = dbg })
dbg.traceback = function()
local level = 1
while true do
local info = debug.getinfo(level, "Sl")
if not info then break end
@bcatcho
bcatcho / common.lua
Created October 28, 2012 20:47
the algorithm works in its simplest of forms but doesn't handle switching direction of flow
--# Debug
dbg = {}
setmetatable(dbg, { __index = dbg })
dbg.traceback = function()
local level = 1
while true do
local info = debug.getinfo(level, "Sl")
if not info then break end
@bcatcho
bcatcho / code.lua
Created November 9, 2012 08:34
CodeaProject:Common Test update
--# CaptureCode
local code = ""
function Tab(tabName)
local tabCode = debug.getinfo(2)
if #code > 0 then code = code.."\n" end
code = code.."--# "..tabName.."\n"..tabCode.source
end
function SaveTabs(key)
[core]
autocrlf = true
[diff]
tool = bc3
[difftool "bc3"]
cmd = \"c:/program files (x86)/beyond compare 3/bcomp.exe\" \"$LOCAL\" \"$REMOTE\"
[merge]
tool = bc3
[mergetool]
prompt = false
& ("C:\Windows\Microsoft.NET\Framework64\v4.0.30319\msbuild.exe") /nologo `
../Ask3Cloud/Ask3Cloud.sln `
/p:SkipInvalidConfigurations=true `
/p:TargetProfile="Dev" `
/t:"publish;Build" `
/p:Configuration="Release" `
/p:Platform="Any CPU" `
/p:RunCodeAnalysis="False" `
/v:minimal