Skip to content

Instantly share code, notes, and snippets.

View bslatner's full-sized avatar

Bryan Slatner bslatner

  • Slatner Enterprises, Inc.
  • Charlotte, NC
View GitHub Profile
@bslatner
bslatner / ExampleCall.fs
Last active October 31, 2022 15:42
Code for making rest API requests in F# using the RestSharp library
// StartResult would be the type of the response. Must be marked with [<CLIMutable>]
let response =
restWithResponse<StartResult> (
POST >> toResource "stopwatch/{type}/{key}/start" >> atUrl config.Url
>> withUrlSegment "type" stopwatchType
>> withUrlSegment "key" key
>> withFormValue "owner" owner
>> withExpectedStatusOk
)

Keybase proof

I hereby claim:

  • I am bslatner on github.
  • I am bslatner (https://keybase.io/bslatner) on keybase.
  • I have a public key ASBJtRi9vnVLeArX6WObR_5gY8C1ygAW_e-LyNhMG4O4JQo

To claim this, I am signing this object:

@bslatner
bslatner / Problem14.fsx
Last active January 4, 2016 19:31
Project Euler 14
#load "Helpers.fs"
open Helpers
let next n =
match n with
| Even64 -> n/2L
| Odd64 -> 3L*n+1L
let collatzLength start =
@bslatner
bslatner / Day7.fs
Created December 23, 2015 20:47
Advent of Code, day 7
module Day7
open System
open System.Collections.Generic
type InputValue =
| IntValue of uint16
| Wire of string
type Gate =