This file contains hidden or 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 | |
type Machine = | |
{ program: string | |
data: byte[] | |
ip: int | |
dp: int | |
output: string | |
} |
This file contains hidden or 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 "nuget: Yzl" | |
open Yzl.Core | |
let stages = Yzl.seq "stages" << Yzl.liftMany | |
let stage = Yzl.str "stage" | |
let job (name: string) = Yzl.map name | |
let tags = Yzl.seq "tags" << Yzl.liftMany | |
let image = Yzl.str "image" | |
let script = Yzl.seq "script" << Yzl.liftMany | |
let variables vs = "variables" .= [for k,v in vs -> k .= v] |
This file contains hidden or 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
/// +--------------------------------------+ | |
/// | | | |
/// | Decider | | |
/// | | | |
/// | Jérémie Chassaing | | |
/// | @thinkb4coding | | |
/// +--------------------------------------+ | |
// A decider is a structure define by 7 parameters: |
This file contains hidden or 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
| Method | Mean | Error | StdDev | Ratio | RatioSD | | |
|-------------- |---------:|--------:|--------:|------:|--------:| | |
| UseSpan | 241.7 ns | 2.98 ns | 2.64 ns | 1.00 | 0.00 | | |
| UseCollection | 403.4 ns | 5.58 ns | 5.22 ns | 1.67 | 0.03 | |
This file contains hidden or 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 | |
type LicencePlate = LicencePlate of string | |
module LicencePlate = | |
open System.Text.RegularExpressions | |
let plateEx = Regex @"^[0-9]{3}-[0-9]{3}$" | |
let parse input = |
This file contains hidden or 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 | |
// this is our basis to define values over time. | |
// It will be the basis for our data. | |
// we define a Period with a start and en Time | |
// start is included, end is excluded (closed on the left, open on the right) | |
// this way, of consecutive periods px and py we known that px.End = py.Start | |
type Period = { Start: DateTime; End: DateTime } |
This file contains hidden or 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 title = "Functional Event Sourcing" | |
let speaker = "Jérémie Chassaing" | |
let company = "d-edge / Availpro Hospitality Tech" | |
let twitter = @"thinkb4coding" | |
let blog = "https://thinkbeforecoding.com" | |
//------------------------------------------ | |
System.Environment.CurrentDirectory <- __SOURCE_DIRECTORY__ | |
#load ".paket/load/netstandard2.0/main.group.fsx" |
This file contains hidden or 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
. $env:UserProfile\AppData\Local\GitHub\shell.ps1 | |
Function Start-SSHAgent{ | |
param( | |
[Parameter(Mandatory=$false,ValueFromPipeline=$true)] | |
[string]$socketfile="/tmp/.ssh-socket", # Used as input to ssh-agent, which expects POSIX format paths | |
[Parameter(Mandatory=$false)] | |
[string]$pidFile="$env:TEMP\.ssh-agent-pid" # Used as input to Out-File which expects Windows format paths | |
) |
This file contains hidden or 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 Hopac | |
open Hopac.Infixes | |
open NodaTime | |
open Logary | |
open Logary.Metrics.Reservoirs | |
open Logary.Configuration | |
open Logary.Targets | |
open Metric | |
module PointName = |
This file contains hidden or 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
. $env:UserProfile\AppData\Local\GitHub\shell.ps1 | |
$r = ssh-agent -s | |
[regex]::Matches($r,"SSH_AUTH_SOCK=([^;]+);") | % { $env:SSH_AUTH_SOCK = $_.Groups[1] } | |
[regex]::Matches($r,"SSH_AGENT_PID=(\d+);") | % { $env:SSH_AGENT_PID = $_.Groups[1] } | |
ssh-add $env:UserProfile\.ssh\github_rsa |
NewerOlder