Skip to content

Instantly share code, notes, and snippets.

@rojepp
rojepp / keybase.md
Created February 9, 2015 08:49
keybase.md

Keybase proof

I hereby claim:

  • I am rojepp on github.
  • I am rojepp (https://keybase.io/rojepp) on keybase.
  • I have a public key whose fingerprint is 2F43 7281 95CC CDEE 64CA D69B B2FE AC41 C9E1 4019

To claim this, I am signing this object:

@rojepp
rojepp / toNullable.fs
Last active August 29, 2015 14:17
toNullable
let toNullable x : System.Nullable<_> =
match x with
| Some v -> System.Nullable<_>(v)
| _ -> System.Nullable()
// Extension for use from F#
type Option<'t> with
member this.ToNullable () =
toNullable (box this |> unbox)
open System
open System.IO
let illegalPathChars =
let chars = Path.GetInvalidPathChars ()
chars
let checkPathForIllegalChars (path:string) =