w32tm /config /manualpeerlist:"time.cloudflare.com" /syncfromflags:manual /update
w32tm /resync
| import * as https from 'https'; | |
| interface Config { | |
| domain: string; | |
| email: string; | |
| apiToken: string; | |
| } | |
| interface ServiceDesk { | |
| id: string; |
| #pragma once | |
| #include <mutex> | |
| #include <chrono> | |
| #include <functional> | |
| #include <thread> | |
| #include <format> | |
| #include <entt/entt.hpp> |
| # | |
| # Watch for changes | |
| # | |
| function watch { | |
| [CmdletBinding()] | |
| param ( | |
| [Parameter(Mandatory = $true)] | |
| [string[]]$Watch, | |
| [Parameter(Mandatory = $true)] |
| import { DirectusClient } from "@directus/sdk"; | |
| export interface BindableClient { | |
| with: < | |
| Client extends DirectusClient<any>, | |
| Extension extends object, | |
| >( | |
| createExtension: (client: Client) => Extension, | |
| ) => this & Extension; |
w32tm /config /manualpeerlist:"time.cloudflare.com" /syncfromflags:manual /update
w32tm /resync
| // -------------------------------------------------------- | |
| // v1 | |
| $button: component( | |
| name("Button"), | |
| type("button"), | |
| props( | |
| prop(size, (default large)), | |
| ), | |
| ); |
| import { z } from "zod"; | |
| import { query } from "@/lib/api/middlewares/with-query"; | |
| import { responses } from "@/lib/api/responses"; | |
| import { get, route } from "@/lib/api/route"; | |
| import { locales } from "@/server/middlewares/with-locales"; | |
| import { db } from "@/server/middlewares/with-db"; | |
| export const { GET } = route( |
| // Utilities | |
| declare const TAG: unique symbol; | |
| type TAG = typeof TAG; | |
| export type Tagged<TagSymbol extends symbol> = { | |
| readonly [TAG]: TagSymbol; | |
| }; | |
| export type WithTag<TagSymbol extends symbol, Target> = Tagged<TagSymbol> & |
| // PoC, has problems with type matching in case array | |
| type Case<V extends boolean = any, T = any> = [V, T]; | |
| type Switch<T extends readonly any[], Fallback = never> = | |
| T extends [infer Head, ...infer Rest] ? [Head] extends [[true, infer V]] ? V : | |
| Switch<Rest> : Fallback; | |
| type Default<V> = [true, V]; |