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
<?xml version="1.0" encoding="UTF-8"?> | |
<configuration> | |
<system.webServer> | |
<handlers> | |
<remove name="httpplatformhandler" /> | |
<add name="httpplatformhandler" path="*" verb="*" modules="httpPlatformHandler" resourceType="Unspecified" /> | |
</handlers> | |
<httpPlatform | |
stdoutLogEnabled="true" | |
stdoutLogFile="./logs/SuaveIIS.log" |
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
static class LibGit2SharpForLinqPad | |
{ | |
[DllImport("kernel32.dll", CharSet = CharSet.Unicode, SetLastError = true)] | |
static extern bool SetDllDirectory(string lpPathName); | |
[DllImport("kernel32.dll", CharSet = CharSet.Unicode, EntryPoint = "GetDllDirectory", SetLastError = true)] | |
static extern uint GetDllDirectoryPInvoke(uint length, StringBuilder lpPathName); | |
static string GetDllDirectory() | |
{ |
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
{ | |
"fileTypes": [ | |
"paket.dependencies" | |
], | |
"foldingStartMarker": "", | |
"foldingStopMarker": "", | |
"name": "Paket", | |
"patterns": [ | |
{ | |
"include": "#line" |
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
// Adapted from https://github.com/broofa/node-uuid/ | |
// Under MIT License | |
// tslint:disable:no-bitwise | |
function getRandomFromMathRandom() { | |
const result = new Array(16); | |
let r = 0; | |
for (let i = 0; i < 16; i++) { |
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.Diagnostics | |
open System.Threading | |
[<Struct>] | |
type Vector = | |
val X: float32 | |
val Y: float32 | |
val Z: float32 |
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
module WindowsPath = | |
open System | |
open System.IO | |
let path = lazy (Environment.GetEnvironmentVariable("PATH").Split(';') |> List.ofArray) | |
let pathExt = lazy (Environment.GetEnvironmentVariable("PATHEXT").Split(';') |> List.ofArray) | |
let find names = | |
path.Value | |
|> Seq.collect (fun dir -> names |> List.map (fun name -> Path.Combine(dir, 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
namespace BlackFox.CommandLine | |
/// Escape arguments in a form that programs parsing it as Microsoft C Runtime will successfuly understand | |
/// Rules taken from http://www.daviddeley.com/autohotkey/parameters/parameters.htm#WINARGV | |
module MsvcrCommandLine = | |
open System.Text | |
let escapeArg (arg : string) (builder : StringBuilder) = | |
let needQuote = arg.Contains(" ") || arg.Contains("\t") | |
let rec escape (builder: StringBuilder) pos = |
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
module Term | |
let private esc = string (char 0x1B) | |
let private csi = esc + "[" | |
let printsequencef f = Printf.kprintf (fun s -> System.Console.Write(esc + s)) f | |
let printcsif f = Printf.kprintf (fun s -> System.Console.Write(csi + s)) f | |
let resetToInitialState() = printsequencef "c" | |
let cursorUp (rows: int) = printcsif "%iA" rows | |
let cursorDown (rows: int) = printcsif "%iB" rows |
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
let genByteArray = Gen.arrayOf Arb.generate<byte> | |
let genJValue = | |
Gen.oneof | |
[ | |
Arb.generate<int> |> Gen.map JValue | |
Arb.generate<UInt32> |> Gen.map JValue | |
Arb.generate<bool> |> Gen.map JValue | |
Arb.generate<char> |> Gen.map JValue | |
Arb.generate<DateTime> |> Gen.map JValue |
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 "../packages/FSharp.Compiler.Service/lib/net45/FSharp.Compiler.Service.dll" | |
open System | |
open System.IO | |
open System.Threading | |
open System.Threading.Tasks | |
open System.Net | |
open Microsoft.FSharp.Compiler | |
open Microsoft.FSharp.Compiler.Ast | |
open Microsoft.FSharp.Compiler.Interactive.Shell |