This file contains hidden or 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
"use server"; | |
import { createClient } from "@/lib/supabase/server"; | |
import { revalidatePath } from "next/cache"; | |
import { headers } from "next/headers"; | |
import { redirect } from "next/navigation"; | |
export async function login(formData: FormData) { | |
const supabase = createClient(); |
This file contains hidden or 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 NextCart.Api.Cart; | |
public interface CartEvent { } | |
public record CreateCart(Guid CartId); | |
public record CartCreated(Guid CartId) : CartEvent; | |
public record Cart(Guid Id, int Version = 1) | |
{ |
This file contains hidden or 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
let candidates = """ACRID AIDER AIRED ARDRI AROID BIDER BIRDS BRAID BREID BRIDE CAIRD CARDI CIDER CRIED DAIRY DARIC DARIS DARZI DEAIR DERIG DIARY DICER DIKER DIMER DINAR DINER DIRAM DIRER DIRGE DIRKE DIRKS DIRLS DIRTS DIRTY DIVER DORIC DORIS DRAIL DRAIN DRIBS DRICE DRIED DRIER DRIES DRIFT DRILL DRILY DRINK DRIPS DRIPT DRIVE DROID DROIL DROIT DRUID DURZI EIDER FIORD FIRED FRIED GIRDS GRIDE GRIDS GRIND HIDER HIRED IDLER INDRI IRADE IRIDS IRKED IZARD JERID JIRDS LAIRD LIARD LIDAR LURID MARID MIRED MUDIR MURID NADIR NIDOR PADRI PARDI PRIDE PRIED RABID RADII RADIO RADIX RAIDS RAIRD RANID RAPID REBID REDIA REDID REDIP REIRD RESID RICED RIDER RIDES RIDGE RIDGY RIGID RILED RIMED RINDS RINDY RIPED RIVED RORID RUDIE SIDER SIRED THIRD THRID TIRED TRIAD TRIDE TRIED TRILD UNRID URSID VIRED VIRID WEIRD WIDER WIRED WRIED YAIRD YIRDS YRIVD""" | |
let wordList = candidates.Split(" ") |> List.ofArray | |
let fixedLetters = [(2, 'I')] |> Map.ofList | |
let excludedCharacters = "WE" | |
let includeLetters = [('R', [3]);('D',[4])] |> List.map |
This file contains hidden or 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.IO | |
type Beacon = { | |
X: int | |
Y: int | |
Z: int | |
} | |
type Scanner = { | |
Id: int | |
Beacons: Beacon Set |
This file contains hidden or 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.IO | |
let path = "05-input.data" | |
let sample = """0,9 -> 5,9 | |
8,0 -> 0,8 | |
9,4 -> 3,4 | |
2,2 -> 2,1 | |
7,0 -> 7,4 | |
6,4 -> 2,0 | |
0,9 -> 2,9 |
This file contains hidden or 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.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using System.Threading.Tasks; | |
using Microsoft.AspNetCore.Mvc; | |
using Microsoft.Extensions.Logging; | |
namespace catchall.Controllers | |
{ |
This file contains hidden or 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
[<RequireQualifiedAccess>] | |
module Secret = | |
open Pulumi.Kubernetes.Core.V1 | |
open Pulumi.Kubernetes.Types.Inputs.Core.V1 | |
let base64Encode (str: string) = | |
let bytes = System.Text.Encoding.UTF8.GetBytes(str) | |
System.Convert.ToBase64String(bytes) |
This file contains hidden or 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.Collections.Generic; | |
using System.Linq; | |
using System.Threading.Tasks; | |
namespace MinimalDispatcher | |
{ | |
public interface IHandle<TRequest, TResponse> { | |
Task<TResponse> Handle(TRequest request); |
This file contains hidden or 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
type Connection = { | |
Start: unit -> unit | |
Stop: unit -> unit | |
} | |
type ActiveConnection = { | |
Stop: unit -> ConnectionWrapper | |
} | |
and InActiveConnection = { | |
Start: unit -> ConnectionWrapper | |
} |
This file contains hidden or 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.Diagnostics; | |
using System.Linq; | |
using System.Threading.Tasks; | |
namespace ParallelTest | |
{ | |
class Program | |
{ | |
static void Main(string[] args) |
NewerOlder