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
import { z, type ZodDiscriminatedUnionOption } from "zod"; | |
const RESOLVING = Symbol("mapOnSchema/resolving"); | |
export function mapOnSchema<T extends z.ZodTypeAny, TResult extends z.ZodTypeAny>( | |
schema: T, | |
fn: (schema: z.ZodTypeAny) => TResult, | |
): TResult; | |
export function mapOnSchema(schema: z.ZodTypeAny, fn: (schema: z.ZodTypeAny) => z.ZodTypeAny): z.ZodTypeAny { |
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
/* eslint-disable react-refresh/only-export-components */ | |
import { | |
createMemoryHistory, | |
createRootRoute, | |
createRoute, | |
createRouter, | |
useRouterState, | |
type NotFoundRouteProps, | |
} from "@tanstack/react-router"; | |
import { createContext, useContext, type ReactNode } from "react"; |
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
{ | |
"log": { | |
"version": "1.2", | |
"creator": { | |
"name": "Firefox", | |
"version": "117.0" | |
}, | |
"browser": { | |
"name": "Firefox", | |
"version": "117.0" |
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
type RuleName = string; | |
type TokenName = string; | |
type Ast = { type: string; args: Ast[] }; | |
// Stack frame for executing grammar rules | |
type Frame = { | |
/** Current rule being executed */ | |
rule: RuleName; | |
/** Position within instruction array */ |
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
#!/usr/sbin/dtrace -C -s | |
#pragma D option quiet | |
#pragma D option switchrate=10hz | |
inline int af_inet = 2; /* AF_INET defined in bsd/sys/socket.h */ | |
inline int af_inet6 = 30; /* AF_INET6 defined in bsd/sys/socket.h */ | |
#define HEADER "%-6s %-16s %-8s %-30s %-5s %8s %s\n" | |
#define HEADERD "%-6d %-16s %-8s %-30s %-5d %8d %s\n" |
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
#!/usr/sbin/dtrace -w -C -s | |
#pragma D option quiet | |
inline int af_inet6 = 30; /* AF_INET6 defined in bsd/sys/socket.h */ | |
inline string CHARLES = "Charles"; | |
syscall::connect*:entry | |
{ |