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
package me.tunaxor.htmx | |
import io.ktor.server.application.* | |
import io.ktor.server.request.* | |
import io.ktor.server.response.* | |
import kotlinx.html.CommonAttributeGroupFacade | |
enum class HxSwap { | |
InnerHTML, | |
OuterHTML, |
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
#r "nuget: TheBlunt" | |
open TheBlunt | |
module Common = | |
let RequiedMark = | |
pchar | |
(fun c -> c = '!') | |
(fun c -> $"$%c{c} is not a valid required mark.") |
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
export interface ISwitchCameraArgs { | |
deviceId?: string | |
} | |
export interface IStartCameraArgs { | |
constraints?: MediaStreamConstraints; | |
retryCount?: number; | |
} | |
export interface ICameraDevice extends MediaDeviceInfo { |
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 Routerish | |
type QueryValue = | |
| String of string option | |
| StringValues of string list | |
type RoutePart = | |
| Segment of segment: string | |
| ParamSegment of paramname: string | |
| Query of query: Map<string, QueryValue> |
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
export interface ISwitchCameraArgs { | |
deviceId?: string | |
} | |
export interface IStartCameraArgs { | |
constraints?: MediaStreamConstraints; | |
retryCount?: number; | |
} | |
export interface ICameraDevice extends MediaDeviceInfo { |
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
// differentiate the kind of payload you want to take | |
type AdditionPayload = | |
| Integers of int * int | |
| Strings of string * string | |
module Operations = | |
// handle your integers | |
let private addInts a b = a + b | |
// handle your strings |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Document</title> | |
</head> | |
<body> | |
<script> |
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
#!/usr/bin/env -S dotnet fsi | |
#r "nuget: MongoDB.Driver" | |
#r "nuget: MongoDB.Driver.GridFS" | |
#r "nuget: Mondocks.Net" | |
#r "nuget: Spectre.Console" | |
open System | |
open System.IO | |
open Spectre.Console | |
open MongoDB.Driver |
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
module Commands = | |
open FSharp.SystemCommandLine | |
open FSharp.SystemCommandLine.Aliases | |
type RunConfiguration with | |
static member FromString(value: string) = |
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
module MyFunctions | |
let add a b = a + b | |
let printValue value = printfn "%s" value |
NewerOlder