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 AnyVariant = { type: string }; | |
| type PayloadOf<U extends AnyVariant, K extends U["type"]> = | |
| Extract<U, { type: K }> extends infer Member | |
| ? Member[K & keyof Member] | |
| : never; | |
| type Handler<U extends AnyVariant, R> = { | |
| [K in U["type"]]: (payload: PayloadOf<U, K>) => R; | |
| }; |
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
| <!-- templates/index.html --> | |
| {{ template "layout" . }} | |
| {{ define "title" }}Home{{ end }} | |
| {{ define "content" }} | |
| <h1>Home</h1> |
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
| package main | |
| import ( | |
| "log" | |
| "math/rand" | |
| "net/http" | |
| "time" | |
| "github.com/starfederation/datastar-go/datastar" | |
| ) |
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
| export type JsonObject = { [key: string]: Jsonifiable }; | |
| export type Jsonifiable = | |
| | string | |
| | number | |
| | boolean | |
| | null | |
| | undefined | |
| | Jsonifiable[] | |
| | JsonObject; |
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
| import { | |
| unstable_readConfig, | |
| unstable_convertConfigBindingsToStartWorkerBindings, | |
| } from "wrangler"; | |
| import * as fs from "node:fs"; | |
| import * as z from "zod"; | |
| import tmp from 'tmp'; | |
| const WranglerOverrides = z.object({ |
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
| console.log( | |
| JSON.stringify({ | |
| result: "hello world", | |
| json: JSON.stringify({ | |
| hello: "world", | |
| }), | |
| }), | |
| ); |
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
| #!/usr/bin/env python3 | |
| from pathlib import Path | |
| import os | |
| from typing import List | |
| from typing import TypedDict | |
| src = Path("/home/mschulte/Videos/39th-gate-music-video") | |
| dst = Path("/tmp/nix-shell.i4wVnT/tmp.0BRU2RIDOa/overlays") | |
| max_size_mb = 10_000 |
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
| # nix-kube-generators.url = "github:farcaller/nix-kube-generators"; | |
| # ... | |
| # pkgs = import nixpkgs { | |
| # inherit system; | |
| # overlays = [ | |
| # (final: prev: { | |
| # lib = prev.lib.extend ( | |
| # _: _: { | |
| # kube = nix-kube-generators.lib { pkgs = final; }; | |
| # } |
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
| klib = nixidy.inputs.nix-kube-generators.lib { inherit pkgs; }; | |
| find-crds = | |
| chart: | |
| let | |
| crd-filepath-file = | |
| pkgs.runCommand "find-crds" | |
| { | |
| nativeBuildInputs = with pkgs; [ | |
| ripgrep |
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
| $ kubectl get svc --all-namespaces | rg 105 | |
| kubectl get svc --all-namespaces | |
| NAMESPACE NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE | |
| authelia authelia ClusterIP 10.43.211.45 <none> 80/TCP 3h25m | |
| default docker-registry ClusterIP 10.43.48.244 <none> 5000/TCP 7d1h | |
| default kubernetes ClusterIP 10.43.0.1 <none> 443/TCP 27d | |
| demo postgres ClusterIP 10.43.120.212 <none> 5432/TCP 3h25m | |
| demo trade ClusterIP 10.43.136.135 <none> 80/TCP 3h25m | |
| demo2 drawback-backend ClusterIP 10.43.86.192 <none> 8000/TCP 3h18m | |
| demo2 drawback-frontend ClusterIP 10.43.113.133 <none> 80/TCP |
NewerOlder