With this combination it is fairly easy to get things done in Rust and utilize it in JavaScript. Yay!
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
#!/usr/bin/env bash | |
set -euo pipefail | |
ARGS=$@ | |
CARGO_HOME=${CARGO_HOME-} | |
CARGO_PKG_NAME=${CARGO_PKG_NAME-} | |
if [[ "$CARGO_PKG_NAME" = "proptest" ]] | |
then |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
Date: January 4, 2018
For a number of [reasons][0], I, Marcus Griep, have recently set up a new OpenPGP key, and will be transitioning away from my old one.
The old key will continue to be valid for some time, but I prefer all future correspondence to come to the new one. I would also like this
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 Api | |
open Freya.Machines.Http | |
let root = HttpMachine.Freya <| freyaMachine { | |
exists false | |
gone true | |
} |
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
// Decompiled with JetBrains decompiler | |
// Type: Microsoft.FSharp.Core.OptionModule | |
// Assembly: FSharp.Core, Version=4.4.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a | |
// MVID: 58348223-904C-F4DA-A745-038323823458 | |
// Assembly location: C:\dev\neoeinstein\visualfsharp\release\net40\bin\FSharp.Core.dll | |
// Compiler-generated code is shown | |
// IL code is shown in comments | |
using Microsoft.FSharp.Collections; | |
using System; |
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
FROM debian:jessie | |
EXPOSE 8080 | |
RUN apt-get update && \ | |
apt-get install -y libunwind8 libicu52 && \ | |
rm -rf /var/lib/apt/lists/* | |
ADD bin/Release/netcoreapp1.3/debian.8-x64/publish/* /usr/local/lib/freya-svc/ | |
ENTRYPOINT /usr/local/lib/freya-svc/freya-poc |
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
// Source: https://github.com/neoeinstein/Hopac.Plus/blob/master/src/Hopac.Plus/Supervision.fs | |
namespace Hopac.Plus.Supervision | |
open Hopac | |
open Hopac.Infixes | |
open Hopac.Plus | |
open Hopac.Plus.Extensions | |
type Policy = | |
| Restart |
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 Fable.Import | |
open System | |
open Fable.Core | |
open Fable.Import.JS | |
module EventStore = | |
type [<Erase>] Initializer<'state> = unit -> 'state | |
type [<Erase>] EventHandler<'state,'event> = System.Func<'state,EventEnvelope<'event>,'state> | |
and [<Erase>] EventHandler<'state,'event,'metadata> = System.Func<'state,EventEnvelope<'event,'metadata>,'state> |
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 Auth0 | |
( AuthenticationState(..), AuthenticationError, AuthenticationResult | |
, Options, defaultOpts | |
, LoggedInUser, UserProfile, Token | |
, showLock, showLockSignal | |
, mapResult | |
) where |
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
// Your location of the Jwt source | |
#I @"packages/System.IdentityModel.Tokens.Jwt/lib/net45" | |
#r "System.IdentityModel.Tokens.Jwt.dll" | |
#r "System.IdentityModel" | |
open System.IdentityModel.Tokens | |
let token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWUsImV4cCI6MTU3NzgzNjgwMCwiaXNzIjoiSVNTVUVSIiwiYXVkIjoiQVVESUVOQ0UifQ.POsywz2VWFrISYj8PBFaeOsPMqaEaQIOJ1eZyaM9JsA" | |
let secretSecurityKey = InMemorySymmetricSecurityKey(System.Text.Encoding.UTF8.GetBytes("secret\000\000\000\000\000\000\000\000\000\000")) | |
let tokenParams = TokenValidationParameters(IssuerSigningKey = secretSecurityKey,ValidAudience="AUDIENCE",ValidIssuer="ISSUER") | |
let handler = JwtSecurityTokenHandler() |
NewerOlder