This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
open System | |
open System.IO | |
open System.Net | |
let root = @"c:\inetpub\wwwroot" | |
let listener = new HttpListener() | |
listener.Prefixes.Add "http://*:8080/" | |
listener.Start () | |
let rec procreq ():(unit->unit) = |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (args.Length == 2 && args[1] == "-f") | |
{ | |
sha1(File.ReadAllBytes(args[2])); | |
} | |
else if (args.Length == 1) | |
{ | |
sha1(Encoding.ASCII.GetBytes(args[1])); | |
} | |
else if (args.Length == 0) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// download from http://sourceforge.net/projects/dday-ical/files/ | |
//#r @"DDay.Collections.dll" | |
#r "DDay.iCal.dll" | |
#r "System.Xml.Linq" | |
open System | |
open System.IO | |
open System.Linq | |
open System.Xml | |
open System.Xml.Linq | |
open DDay.iCal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// download from http://sourceforge.net/projects/dday-ical/files/ | |
#r @"DDay.Collections.dll" | |
#r @"DDay.iCal.dll" | |
open DDay.iCal | |
open System | |
open System.Linq | |
new Uri("http://ical.mac.com/ical/Japanese32Holidays.ics") | |
|> iCalendar.LoadFromUri | |
|> Seq.collect (fun x -> x.Events) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using DDay.iCal; | |
using System; | |
using System.Linq; | |
// PM> Install-Package DDay.iCal | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
var cals = iCalendar.LoadFromUri(new Uri("http://ical.mac.com/ical/Japanese32Holidays.ics")); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@{ | |
var comics = new[] { | |
new {Title = "Groo", Publisher = "Dark Horse Comics"}, | |
new {Title = "Spiderman", Publisher = "Marvel"} | |
}; | |
} | |
<h1>Normal</h1> | |
<table border="1"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#r "System.Xml.Linq" | |
open System | |
open System.Xml | |
open System.Xml.Linq | |
open System.IO | |
if fsi.CommandLineArgs.Length < 2 then | |
raise <| new Exception("error: .gan file name not specified.") | |
let Element name (xelem:XElement) = xelem.Element(XName.Get(name)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// PM> Install-Package ChainingAssertion | |
// http://nuget.org/packages/ChainingAssertion | |
// http://chainingassertion.codeplex.com/ | |
using System; | |
using Microsoft.VisualStudio.TestTools.UnitTesting; | |
public class DateHelper | |
{ | |
public static DateTime? ToNullableDate(string input) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Configuration; | |
using System.Web; | |
using System.Web.Configuration; | |
public class MvcApplication : System.Web.HttpApplication | |
{ | |
public override void Init() | |
{ | |
base.Init(); |