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
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
// 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
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 |
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
#i "nuget: C:/Users/scyth/repos/Perla/src/nupkg" | |
#i "nuget: https://api.nuget.org/v3/index.json" | |
#r "nuget: Newtonsoft.Json, 12.0.3" | |
#r "nuget: CalceTypes, 1.0.2" | |
open System.IO | |
open System.Xml | |
open Newtonsoft.Json | |
open type System.Text.Encoding |
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
const sizeOrMax\((size: number, max: number) => number) = | |
do(size,max) size > max ? max : size | |
export tag MemeEditor | |
css .row | |
d: flex; fld: column | |
css footer | |
d:flex; fld:column; m:auto | |
css canvas |
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: Reducible, 0.2.0" | |
open Morris.Reducible | |
type UserReducer = | |
| EmailDelta of string option | |
| AgeDelta of int option | |
| NameDelta of string option | |
type User = |
NewerOlder