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 exampleTask = Task.FromResult("I'm great developer."); | |
let getStringWithAsyncCore () = task { | |
return! exampleTask | |
} | |
[<Benchmark>] | |
let getStringWithAsync () = task { | |
return! getStringWithAsyncCore() | |
} |
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
[<RequireQualifiedAccess>] | |
module Household.Libraries.Jwt | |
open System | |
open System.IdentityModel.Tokens.Jwt | |
open System.Security.Cryptography | |
open Microsoft.IdentityModel.Tokens | |
[<Literal>] |
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 Household.Libraries.Password | |
//https://github.com/dotnet/AspNetCore/blob/master/src/Identity/Extensions.Core/src/PasswordHasher.cs | |
//#load "/Users/landsman/projects/private/cookbook/.paket/load/main.group.fsx" | |
open System | |
open System.Runtime.CompilerServices | |
open System.Security.Cryptography | |
open Microsoft.AspNetCore.Cryptography.KeyDerivation |
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
//add this as pre-request script on postman collection | |
const moment = require("moment") | |
const { | |
apiRoot, | |
authPath, | |
username, | |
password, | |
bearerTokenValidUntil | |
} = pm.variables.toObject(); |
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 App | |
open Elmish | |
type State = | |
{ CurrentUser: string option } | |
type Msg = | |
| SignIn of string | |
| SignOut |