-
Functional Pull-Oriented Dependency Injection - Every function receives dependencies through a
deps
parameter. No imports of other functions, no side effects in pure functions. -
Result Type Pattern - Functions that can fail return
Result<T, E>
. Functions that cannot fail return values directly. -
Deep Imports Only - No barrel files. Import directly from specific files:
import {...} from '@tinkerbot/pure/git.ts'
-
Workspace Protocol - Internal dependencies use
workspace:*
protocol in package.json
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 Flarm = {"some other kind of opaque object":true; [Symbol.dispose]():void} | |
export const Flarm = type({"'some other kind of opaque object'":'true'}) |
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
/* | |
https://gist.github.com/subtleGradient/e7cef476dee252c1529903cd2487f441 | |
MooTools gang ✊ | |
shamelessly stolen from Daniel Steigerwald's Evolu | |
then modified / extended by Tom Aylott | |
https://github.com/evoluhq/evolu-private/blob/main/packages/common/src/Result.ts | |
*/ /* |
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 "server-only" | |
import { StreamingFragment } from "@frens/reframe/Micro.ClientComponents" | |
import { ReactElement } from "react" | |
import { AsyncIterable$forEach } from "../etc/AsyncIterable$forEach" | |
import { MaybePromise, RenderQ } from "../types" | |
interface FragmentSubscriptionProps<Event> { | |
signal: AbortSignal | |
fallback?: ReactElement |
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 -S bun | |
import { readdir } from "fs/promises" | |
// Function to read and format file content | |
async function readFileContent(filePath: string): Promise<string> { | |
const file = Bun.file(filePath) | |
const content = await file.text() | |
const extension = filePath.split(".").pop() | |
if (extension === "md" || extension === "mdx") return content.replace(/^(#+) /gm, "#$1 ") // increase heading levels by 1 | |
const codeBlockSyntax = getSyntaxForExtension(extension) |
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
/// <reference types="@frens/reframe/micro-apps" /> | |
import ui, { clientManifest, missingClientComponents as todo } from "@frens/reframe/Micro.ClientComponents" | |
import React from "react" | |
import ReactServerDOMServer, { type BundlerConfig } from "react-server-dom-webpack/server" | |
import { PassThrough } from "stream" | |
import { withAsyncIterableTimeout } from "../AsyncIterableTimeout" | |
type GenUI = (props: { ui: typeof ui; todo: typeof todo }) => React.ReactNode |
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 bun | |
import { $, BunFile, file } from "bun" | |
type CFBundleDocumentType = { | |
CFBundleTypeName: "Content" | |
CFBundleTypeRole: "QLGenerator" | |
LSItemContentTypes: ["public.data", "public.content", ...string[]] | |
LSTypeIsPackage: false | |
NSPersistentStoreTypeKey: "XML" |
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 lool | |
print Hello, World! or something like that |
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
#!/bin/bash | |
function filter_until_hung() { | |
local match_string="$1" | |
shift | |
local cmd=("$@") | |
local tmpfifo=$(mktemp -u) | |
mkfifo "$tmpfifo" | |
"${cmd[@]}" >"$tmpfifo" 2>&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
#!/usr/bin/env bun | |
import { $, BunFile, file } from "bun" | |
type CFBundleDocumentType = { | |
CFBundleTypeName: "Content" | |
CFBundleTypeRole: "QLGenerator" | |
LSItemContentTypes: ["public.data", "public.content", ...string[]] | |
LSTypeIsPackage: false | |
NSPersistentStoreTypeKey: "XML" |
NewerOlder