extractRecordOptions(anyZodSchema)
generates automatically a correct object { fields: "...", expand: "..." }
which can be passed to the pocketbase sdk.
We can use the same schema to parse/validate and strongly type the response.
extractRecordOptions(anyZodSchema)
generates automatically a correct object { fields: "...", expand: "..." }
which can be passed to the pocketbase sdk.
We can use the same schema to parse/validate and strongly type the response.
# Edit this configuration file to define what should be installed on | |
# your system. Help is available in the configuration.nix(5) man page | |
# and in the NixOS manual (accessible by running ‘nixos-help’). | |
{ config, pkgs, ... }: | |
{ | |
imports = | |
[ # Include the results of the hardware scan. | |
./hardware-configuration.nix |
export type Signal<T> = ReturnType<typeof createSignal<T>> | |
export function createSignal<Value>(initialValue: Value): { | |
subscribe: (listener: (v: Value) => void) => () => void | |
val: Value | |
} { | |
let value = initialValue | |
const listeners: ((v: Value) => void)[] = [] | |
function subscribe(listener: (v: Value) => void) { |
<!-- | |
@component | |
Allows to create responsive containers with a fixed aspect ratio. | |
Uses container queries to determine the size of the container. | |
The contained element will be as large as possible while maintaining the aspect ratio. | |
@example | |
```tsx | |
<div class="outer h-[100svh] grid grid-rows-[auto_1fr_auto]"> |
node_modules | |
dist | |
coverage | |
.eslintrc.js |
import { ApolloServer, gql } from "apollo-server-micro" | |
import cookieSession from "cookie-session" | |
const ONE_HOUR = 60 * 60 * 1000 | |
const typeDefs = gql` | |
type Query { | |
hello: String! | |
} | |
` |
I hereby claim:
To claim this, I am signing this object:
#!/bin/bash | |
# Finds a process by regexp then terminates | |
# it, including all subprocesses | |
# usage: ./terminate <PROCESS_NAME_OR_PATTERN> | |
kill -TERM -- -$(pgrep -f "$1") | |