Skip to content

Instantly share code, notes, and snippets.

View thinkbeforecoding's full-sized avatar
🤘

Jérémie Chassaing thinkbeforecoding

🤘
View GitHub Profile
#r @"..\packages\SharpDX.2.5.0\lib\net40\SharpDX.dll"
#r @"..\packages\SharpDX.Direct3D11.2.5.0\lib\net40\SharpDX.Direct3D11.dll"
#r @"..\packages\SharpDX.DXGI.2.5.0\lib\net40\SharpDX.DXGI.dll"
#r @"..\packages\SharpDX.Toolkit.2.5.0\lib\net40\SharpDX.Toolkit.dll"
#r @"..\packages\SharpDX.Toolkit.Game.2.5.0\lib\net40\SharpDX.Toolkit.Game.dll"
#r @"..\packages\SharpDX.Toolkit.Graphics.2.5.0\lib\net40\SharpDX.Toolkit.Graphics.dll"
open System
open SharpDX
open SharpDX.Toolkit
@thinkbeforecoding
thinkbeforecoding / Json.fs
Created August 9, 2013 12:37
JObj for Newtonsoft.Json in F#
module Json
open System
open Newtonsoft.Json
type JObj =
| JNull
| JInt of int64
| JString of string
| JFloat of float
@thinkbeforecoding
thinkbeforecoding / PureFunc
Created July 27, 2013 22:08
Pure functions for Event Sourcing
Decide:
Command -> State -> Event list
ApplyStateChange:
State -> Event -> State
function Upgrade-ESProjections {
<#
.SYNOPSIS
Upgrades projections for EventStore v2.
.DESCRIPTION
Start the EventStore v2 on existing data.
Run this Cmdlet with the store http endpoint and user credentials.
Restart the EventStore v2. Projections should be updated.
@thinkbeforecoding
thinkbeforecoding / gist:5305933
Created April 3, 2013 22:15
F# Statically resolved types
let inline count (counter: ^T) =
let value = (^T: (member Count : int) counter)
value
using System;
using System.IO;
using System.Net;
using System.Reactive.Concurrency;
using System.Reactive.Disposables;
using System.Reactive.Linq;
namespace NodeSharp
{
class Program
using System;
using System.IO;
using System.Net;
using System.Reactive.Concurrency;
using System.Reactive.Disposables;
using System.Reactive.Linq;
namespace NodeSharp
{
class Program