Following instructions from the excellent https://www.rinkeby.io/
A full node lets you access all state. There is a light node (state-on-demand) and wallet-only (no state) instructions as well,
Following instructions from the excellent https://www.rinkeby.io/
A full node lets you access all state. There is a light node (state-on-demand) and wallet-only (no state) instructions as well,
Last week I spent a lot of time trying to deploy an F# ASP.NET Core app (a Giraffe app, specifically) to Azure because the information to complete all the steps was scattered in several places. So I'm writing this hopefully it will save the pain to others :)
The following steps are mostly taken from this guide and it's only necessary to do them once:
(* | |
An incomplete implementation of a type-safe SQL query in F#. | |
The idea is that a query is built up clause by clause, by representing | |
each additional clause being added on to the query as a state transition | |
between different types of queries. We capture these different types as | |
phantom types to make sure that only valid transitions (query clause | |
additions) as defined by us can be carried out. | |
The final result is a 'total query' that can be converted to a string, |
let ParallelThrottledIgnore (startOnCallingThread:bool) (parallelism:int) (xs:seq<Async<_>>) = async { | |
let! ct = Async.CancellationToken | |
let sm = new SemaphoreSlim(parallelism) | |
let count = ref 1 | |
let res = TaskCompletionSource<_>() | |
let tryWait () = | |
try sm.Wait () ; true | |
with _ -> false | |
let tryComplete () = | |
if Interlocked.Decrement count = 0 then |
// From https://github.com/jet/kafunk/blob/master/src/kafunk/Utility/BoundedMb.fs | |
[<AutoOpen>] | |
module internal Kafunk.BoundedMb | |
// TODO: https://github.com/fsprojects/FSharpx.Async | |
open System | |
open System.Collections.Generic |
let timeoutNone (timeoutMs:int) (a:Async<'a>) : Async<'a option> = async { | |
let! ct = Async.CancellationToken | |
let res = TaskCompletionSource<_>() | |
use cts = CancellationTokenSource.CreateLinkedTokenSource ct | |
res.Task.ContinueWith (fun _ -> cts.Cancel ()) |> ignore | |
use timer = new Timer((fun _ -> res.TrySetResult None |> ignore), null, timeoutMs, Timeout.Infinite) | |
Async.StartThreadPoolWithContinuations ( | |
a, | |
(fun a -> res.TrySetResult (Some a) |> ignore), | |
(fun e -> res.TrySetException e |> ignore), |
This tutorial was created by Shopify for internal purposes. We've created a public version of it since we think it's useful to anyone creating a GraphQL API.
It's based on lessons learned from creating and evolving production schemas at Shopify over almost 3 years. The tutorial has evolved and will continue to change in the future so nothing is set in stone.
// Phantom types - http://web.archive.org/web/20100615031841/http://blog.matthewdoig.com/?p=138 | |
// Rather than DUs, just use simple marker interfaces | |
type Zero = interface end | |
type Succ<'length> = interface end | |
type Phantom<'a,'length> = Phantom of 'a list | |
let toList (Phantom l) = l | |
let nil = Phantom [] : Phantom<_,Zero> |
$userPath = $env:USERPROFILE | |
$pathExclusions = New-Object System.Collections.ArrayList | |
$processExclusions = New-Object System.Collections.ArrayList | |
$pathExclusions.Add('C:\Windows\Microsoft.NET') > $null | |
$pathExclusions.Add('C:\Windows\assembly') > $null | |
$pathExclusions.Add($userPath + '\AppData\Local\Microsoft\VisualStudio') > $null | |
$pathExclusions.Add('C:\ProgramData\Microsoft\VisualStudio\Packages') > $null | |
$pathExclusions.Add('C:\Program Files (x86)\MSBuild') > $null | |
$pathExclusions.Add('C:\Program Files (x86)\Microsoft Visual Studio 14.0') > $null |