- Install .NET Core >= 2.1.3 so you have access to
dotnet tool install
. - Install Fake 5.0 with
dotnet tool install fake-cli -g
. - Install Fake Templates with
dotnet new -i "fake-template::*"
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
namespace Utility | |
{ | |
using System; | |
using System.Runtime.CompilerServices; | |
using System.Threading.Tasks; | |
internal sealed class LazyAsync<T> | |
{ | |
public T Value => valueL.Value; |
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
public static partial class LinqExtensions | |
{ | |
public static Maybe<C> SelectMany<A, B, C>(this Maybe<A> ma, Func<A, Maybe<B>> f, Func<A, B, C> select) => ma.Bind(a => f(a).Map(b => select(a, b))); | |
} |
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
using Microsoft.Extensions.Logging; | |
using Orleans; | |
using Orleans.Configuration; | |
using Orleans.Hosting; | |
using System; | |
using System.Threading.Tasks; | |
namespace Orleans2GettingStarted | |
{ | |
internal static class ClientDevelopmentHelpers |
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
// F<'a> is any type with member 'map' of type ('a -> 'b) -> F<'a> -> F<'b> | |
type F<'a> = QIL<'a> | |
and S<'a> = F<Q<'a>> | |
and Q<'a> = | |
private | |
| Step of Step<'a> | |
| Bind of IBind<'a> | |
with | |
static member lift (k : F<'a>) : Q<'a> = Step (Suspend (fun () -> S<_>.map (Yield >> Step) k)) |
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
module Tree = | |
type NodeId = | Id of string | |
with | |
member this.unapply = match this with | Id x -> x | |
[<AutoOpen>] | |
module internal Node = | |
[<AbstractClass>] | |
type NodeBase<'a> () = class | |
member val internal Children : NodeBase<'a> list = [] with get, set |
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
# generated by Git for Windows | |
test -f ~/.profile && . ~/.profile | |
test -f ~/.bashrc && . ~/.bashrc | |
#from http://stackoverflow.com/questions/33220492/ps1-bash-command-substitution-not-working-on-windows-10 | |
# Reset | |
Off="\[\e[0m\]" # Text Reset | |
# Regular Colors |
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
namespace Utility.Monads | |
[<AutoOpen>] | |
module MaybeMonad = | |
type MaybeBuilder() = | |
member this.Zero() = this.Return () | |
member this.Bind(m, f) = Option.bind f m | |
member this.Return(x) = Some x | |
member this.ReturnFrom(x) = x | |
member this.Yield(x) = Some x |
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
using System; | |
namespace FSM.BankAccount | |
{ | |
public abstract class BankAccountState | |
{ | |
public static readonly BankAccountState ZeroBalanceState = new ChoiceTypes.ZeroBalanceState(); | |
public static readonly BankAccountState ActiveState = new ChoiceTypes.ActiveState(); | |
public static readonly BankAccountState OverdrawnState = new ChoiceTypes.OverdrawnState(); | |
public static readonly BankAccountState ClosedState = new ChoiceTypes.ClosedState(); |
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
# Git branch in prompt. | |
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
} | |
export PS1="\u@\h \W\[\033[32m\]\$(parse_git_branch)\[\033[00m\] $ " |
NewerOlder