Skip to content

Instantly share code, notes, and snippets.

View dbrxnds's full-sized avatar

David dbrxnds

  • Amsterdam, The Netherlands
  • 00:50 (UTC +01:00)
View GitHub Profile
@dbrxnds
dbrxnds / tsx.patch
Created January 29, 2026 15:49
tsx react 19 transform fix patch
diff --git a/dist/index-B4SIRlEU.cjs b/dist/index-B4SIRlEU.cjs
index 806b1b1d60bebf1851af27642a56c17faf8f7984..8e2ae9f6b28ea41385972960a049acc24feba1e3 100644
--- a/dist/index-B4SIRlEU.cjs
+++ b/dist/index-B4SIRlEU.cjs
@@ -13,4 +13,4 @@
`;case 114:return"\r";case 120:return String.fromCharCode(be(2));case 117:return function(){const e=L.charCodeAt(k);let A;return e===123?(++k,A=be(L.indexOf("}",k)-k),++k,A>1114111&&M()):A=be(4),A<=65535?String.fromCharCode(A):(A-=65536,String.fromCharCode(55296+(A>>10),56320+(1023&A)))}();case 116:return" ";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:L.charCodeAt(k)===10&&++k;case 10:return"";case 56:case 57:M();default:if(n>=48&&n<=55){let e=L.substr(k-1,3).match(/^[0-7]+/)[0],A=parseInt(e,8);return A>255&&(e=e.slice(0,-1),A=parseInt(e,8)),k+=e.length-1,n=L.charCodeAt(k),e==="0"&&n!==56&&n!==57||M(),String.fromCharCode(A)}return je(n)?"":String.fromCharCode(n)}}h(EA,"k");function be(n){const e=k;let A=0,i=0;for(let s=0;s<n;++s,++k){let a,c=L.charCodeA
@dbrxnds
dbrxnds / procedure-result.ts
Created January 16, 2026 08:28
Effect + tRPC ProcedureResult utility.
import { Cause, Data, Effect, Predicate, type Types } from "effect"
declare const ProcedureResultTaggedErrorBrand: unique symbol
export interface TaggedError<
Tag extends string = string,
Serialized extends { readonly _tag: Tag } = { readonly _tag: Tag },
> {
readonly _tag: Tag
readonly [ProcedureResultTaggedErrorBrand]: Serialized
@dbrxnds
dbrxnds / gist:41bd83a5a66bb70cb86cf2e05653d296
Created June 4, 2024 08:25
sudo perf trace $(which bun) --filter orderpicker typecheck
? ( ): bun/1021226 ... [continued]: execve()) = 0
0.024 ( 0.001 ms): bun/1021226 brk() = 0x564a5249d000
0.030 ( 0.001 ms): bun/1021226 arch_prctl(option: 0x3001, arg2: 0x7ffdf08cfa30) = -1 EINVAL (Invalid argument)
0.052 ( 0.003 ms): bun/1021226 mmap(len: 8192, prot: READ|WRITE, flags: PRIVATE|ANONYMOUS) = 0x7f1b8673f000
0.057 ( 0.004 ms): bun/1021226 access(filename: 0x86770d90, mode: R) = -1 ENOENT (No such file or directory)
0.065 ( 0.004 ms): bun/1021226 openat(dfd: CWD, filename: 0x8676f21b, flags: RDONLY|CLOEXEC) = 3
0.070 ( 0.002 ms): bun/1021226 newfstatat(dfd: 3, filename: 0x8676fee9, statbuf: 0x7ffdf08ceb80, flag: 4096) = 0
0.074 ( 0.003 ms): bun/1021226 mmap(len: 103151, prot: READ, flags: PRIVATE, fd: 3) = 0x7f1b86725000
0.078 ( 0.001 ms): bun/1021226 close(
This file has been truncated, but you can view the full file.
const { withSentryConfig } = require("@sentry/nextjs")
const INTERNAL_PACKAGES = [
"@mrb/mysql",
"@mrb/utils",
"@mrb/serverless",
"@mrb/ui",
"@mrb/mailer",
"@mrb/form",
"@mrb/translations",
@dbrxnds
dbrxnds / trace
Created March 15, 2024 07:38
Next.js 14.1.3 trace
This file has been truncated, but you can view the full file.
@dbrxnds
dbrxnds / transformer.ts
Last active May 6, 2025 10:16
Mantine v6 to v7 - createStyles to CSS modules basic codemod
import { API, Collection, FileInfo, JSCodeshift } from "jscodeshift"
import fs from "fs"
export default function transformer(file: FileInfo, api: API) {
const j = api.jscodeshift
const source = j(file.source)
const createStylesCalls = j(file.source).find(j.CallExpression, {
callee: {
name: "createStyles",