Skip to content

Instantly share code, notes, and snippets.

@aaronmu
aaronmu / fix-ubuntu-18.10-on-dell-xps-9570
Last active December 1, 2018 13:25 — forked from leoheck/fix-ubuntu-18.10-on-dell-xps-9570
Fix Ubuntu 18.10 on Dell XPS 9570
#
# Run this from the Live USB.
#
#############################
# EDIT YOUR PARTITIONS HERE #
#############################
root_partition=/dev/nvm0n1p2
sudo mount ${root_partition} /mnt
@aaronmu
aaronmu / Async.fs
Created January 2, 2019 22:18 — forked from kspeakman/Async.fs
Helpers
namespace Utils
module Async =
let retn x =
async { return x }
let lift f =
f >> retn
module WerknemerInRooster
module Types =
open System
open Common.Validation
type Werknemer = {
WerknemerId : string
WerknemerInternalId : Guid
RoosterId : Guid
type ChangesRequestSchemeBasedOnXForwardedProto(next : RequestDelegate) =
member this.Invoke(context : HttpContext) =
let xForwardedProto = context.Request.Headers.["X-Forwarded-Proto"]
if xForwardedProto = (StringValues "https") then
context.Request.Scheme <- "https"
else
()
next.Invoke(context)
namespace Fsion
open System.Threading
[<Struct;NoEquality;NoComparison>]
type Cancel =
private
| Cancel of bool ref * children: Cancel list ref
module internal Cancel =
type Timed<'T> =
{ Timestamp: DateTimeOffset
Value: 'T }
type Clock = unit -> DateTimeOffset
let Timed (c: Clock) v =
{ Timestamp = c ()
Value = v }