Skip to content

Instantly share code, notes, and snippets.

View 7sharp9's full-sized avatar

Dave Thomas 7sharp9

  • Moirae Software Engineering Ltd
  • UK
  • X @7sharp9_
View GitHub Profile
namespace FSHelloSceneKit
open System
open MonoTouch.UIKit
open MonoTouch.Foundation
open MonoTouch.SceneKit
type FSHelloSceneKitViewController () =
inherit UIViewController()
module EasyLayout
open System
open System.Drawing
open Microsoft.FSharp.Quotations
open Microsoft.FSharp.Quotations.Patterns
open Microsoft.FSharp.Quotations.DerivedPatterns
open MonoTouch.Foundation
open MonoTouch.UIKit
http.createServer(function (request, response) {
var uri = url.parse(request.url).pathname;
if(uri=='/pong') {
response.writeHead(200, {'Content-Type': 'text/plain'});
response.end('PONG');
} else if ((match = uri.match(/^\/echo\/(.*)$/)) != null) {
response.writeHead(200, {'Content-Type': 'text/plain'});
response.end(match[1]);
@7sharp9
7sharp9 / barbershop.scala
Created July 1, 2011 11:48 — forked from toluju/barbershop.scala
A better scala barbershop simulator.
import scala.actors.Actor
import scala.actors.Actor._
import scala.util.Random
import scala.collection.{immutable, mutable}
val rand = new Random()
case class Customer(id: Int) {
var shorn:Boolean = false
}