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
{ | |
"description": "Capslock: short press toggles language, hold or with modifiers acts as command+control+option+shift", | |
"manipulators": [ | |
{ | |
"conditions": [ | |
{ | |
"input_sources": [{ "language": "en" }], | |
"type": "input_source_if" | |
} | |
], |
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
open System | |
open System.Data | |
open System.Text.Json | |
open Microsoft.FSharp.Core | |
type request = { path: string; body: string; headers: (string * string) list } | |
type response = { body: string; code: int; headers: (string * string) list } | |
type 'env context = { request: request; response: response; env: 'env } | |
type 'env handler = 'env context -> 'env context option |
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 Application.Domain | |
open System | |
open Application.Domain | |
open Common | |
open System.Collections.Generic | |
open System.Threading.Tasks | |
open Application | |
open FSharp.UMX |
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
public record GetFirstNameState() : IChatState | |
{ | |
public ChatView View() => ChatView.Multiple( | |
ChatView.WithText("Enter first name"), | |
ChatView.WithTextHandler(OnText) | |
); | |
private async ValueTask<IChatState> OnText(TextMessage msg) | |
{ | |
return new GetLastName(msg.Text); |
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
#load @"paket-files/fsprojects/Chessie/src/Chessie/ErrorHandling.fs" | |
type Continuation<'output, 'next> = 'output -> 'next | |
module TerminalDsl = | |
open Chessie.ErrorHandling | |
type Terminal<'next> = | |
| WriteLine of string * Continuation<unit, 'next> | |
| ReadLine of unit * Continuation<string, 'next> |
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
open System.Collections.Generic | |
type xSet<'Id, 'T when 'Id : comparison and 'T : equality>(itemId, source: Map<'Id, 'T>) = | |
let mkNew source = xSet(itemId, source) | |
member val private HashCode = hash source | |
override this.GetHashCode() = this.HashCode | |
override this.Equals other = |
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
open System | |
open System.Collections.Generic | |
let inline ( ^ ) f x = f x | |
type Terminal<'next> = | |
| WriteLine of string * (unit -> 'next) | |
| ReadLine of unit * (string -> 'next) |
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
using System; | |
using System.Threading.Tasks; | |
using Microsoft.AspNetCore.Http; | |
using Microsoft.Extensions.Logging; | |
using Udr.Application; | |
namespace Udr.Web | |
{ | |
public class ExceptionHandler : IMiddleware | |
{ |
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
public static class Ext | |
{ | |
public static IObservable<string> AnonymousConsume(this IDatabase db, string topic, int prefetchCount = 100, CancellationToken? cancellationToken = null) | |
{ | |
async Task<(string[], string lastPos)> SafeRead(string position) | |
{ | |
try | |
{ | |
var msgs = await db.StreamReadAsync(topic, position, prefetchCount); | |
var items = msgs.SelectMany(s => s.Values) |
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
using System; | |
using System.IO; | |
using System.Linq; | |
using System.Threading; | |
using System.Threading.Tasks; | |
using OpenQA.Selenium; | |
namespace SeleniumExt | |
{ | |
public static class DriverExt |
NewerOlder