Skip to content

Instantly share code, notes, and snippets.

View Neftedollar's full-sized avatar
😎
wearing glasses

Roman Melnikov Neftedollar

😎
wearing glasses
View GitHub Profile
type ColumnSelector = { Name: string; ColumnName: string }
type RowSelector = { Name: string; RowName: string }
type SetValueArgs = { Name: string; RowName: string; ColumnName: string; Value: string }
type SetDefaultValueArgs = { Name: string; RowName: string; Value: string }
type Command =
| Create of string
| AddColumn of ColumnSelector
(*
WHAT'S GOING ON HERE?!
Sometimes you don't care about a particular type, you're interested in one field only, let's say `EntityId`.
Instead of using interface (which isn't even possible if don't own a type),
we can do structural typing in F# using SRTP and Active Patterns.
Active patterns are not required for this, but they do make code much easier to use.
*)
// So we have 2 types with field `EntityId: string`:
@peterychuang
peterychuang / 0001-udev-Add-Apple-SPI-Keyboard-and-Touchpad.patch
Created August 4, 2017 06:00
Enable touch-size-based palm rejection and disable touchpad while typing for Apple SPI Keyboard and Touchpad under libinput
From a3febd1a49f259049d0d9650e297590b56d71ae4 Mon Sep 17 00:00:00 2001
From: "Peter Y. Chuang" <peteryuchuang@gmail.com>
Date: Fri, 4 Aug 2017 00:24:36 +0200
Subject: [PATCH libinput] udev: Add Apple SPI Keyboard and Touchpad
This enables touch-size-based palm rejection and disable-while-typing
touchpad feature for the SPI keyboards and touchpads inside the 12-inch
MacBooks and 2016 or later MacBook Pros.
---
udev/90-libinput-model-quirks.hwdb | 8 ++++++++
#if INTERACTIVE
#I @"C:\Tools\MongoDB-CSharp\MongoDB.Linq\bin\Debug"
#r "MongoDB.Driver.dll"
#r "MongoDB.Linq.dll"
#r "FSharp.PowerPack.Linq.dll"
#r "System.Core.dll"
#endif
open System
open MongoDB.Driver