Skip to content

Instantly share code, notes, and snippets.

View frankhale's full-sized avatar
🎮
writing games

Frank Hale frankhale

🎮
writing games
View GitHub Profile
@frankhale
frankhale / index.html
Created November 7, 2011 13:39
Montauk Hello,World - Index view
%%Master=App%%
{{message}}
@frankhale
frankhale / app.html
Created November 7, 2011 13:42
Montauk Hello,World - master view
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Hello, World!</title>
</head>
<body>
%%View%%
</body>
</html>
@frankhale
frankhale / SampleMaster.html
Created May 23, 2012 03:35
Sample Aurora Master Page
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>{{title}}</title>
%%Head%%
</head>
<body>
%%View%%
</body>
@frankhale
frankhale / SampleAction.html
Created May 23, 2012 03:37
Sample Aurora Action View
%%Master=SomeMasterPage%%
[[
<!-- Any HEAD includes you want would go here -->
]]
<div class="content">
{{content}}
</div>
@frankhale
frankhale / ReflectionExample.cs
Created May 23, 2012 04:20
Simple C# Reflection Example
using System;
using System.Linq;
using System.Reflection;
namespace ReflectionExample
{
[AttributeUsage(AttributeTargets.Method)]
class Foo : Attribute
{
public string Bar { get; private set; }
@frankhale
frankhale / LINQJoin.cs
Created May 26, 2012 05:04
LINQ join which returns differences
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication4
{
class A
{
public string Name { get; set; }
@frankhale
frankhale / DynamicDictionary.cs
Created May 31, 2012 21:22
This is a .NET 4 Dynamic Dictionary
public class DynamicDictionary : DynamicObject
{
private Dictionary<string, object> _members = new Dictionary<string, object>();
public bool IsEmpty()
{
if (_members.Keys.Count() > 0)
{
return false;
}
@frankhale
frankhale / LambdaTest.cs
Created June 15, 2012 02:58
Just a little test of lambda's
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace LambdaTest
{
class Program
{
static void Main(string[] args)
@frankhale
frankhale / StripHtml.cs
Created August 2, 2012 21:25
Strip HTML using HtmlAgilityPack
public static string StripHtml(this string value)
{
HtmlDocument htmlDoc = new HtmlDocument();
htmlDoc.LoadHtml(value);
if (htmlDoc == null)
return value;
StringBuilder sanitizedString = new StringBuilder();
@frankhale
frankhale / noworky.cs
Created December 17, 2012 05:41
Trying to understand binary trees, I'm getting there but there is still some more to do.
public class BSPTreeNode<T>
{
public T Data { get; set; }
public BSPTreeNode<T> Parent { get; set; }
public BSPTreeNode<T> Left { get; set; }
public BSPTreeNode<T> Right { get; set; }
}
public class BSPTree<T>