Skip to content

Instantly share code, notes, and snippets.

View dbrxnds's full-sized avatar

David dbrxnds

  • Amsterdam, The Netherlands
  • 20:34 (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.
{"nodes":[{"id":1,"callFrame":{"functionName":"(root)","scriptId":"0","url":"","lineNumber":-1,"columnNumber":-1},"hitCount":0,"children":[2,433,434,438,607,621,624,629,1224,1225,1256,1257,1262]},{"id":2,"callFrame":{"functionName":"","scriptId":"81","url":"node:internal/main/run_main_module","lineNumber":0,"columnNumber":0},"hitCount":0,"children":[3]},{"id":3,"callFrame":{"functionName":"executeUserEntryPoint","scriptId":"71","url":"node:internal/modules/run_main","lineNumber":74,"columnNumber":30},"hitCount":0,"children":[4]},{"id":4,"callFrame":{"functionName":"Module._load","scriptId":"63","url":"node:internal/modules/cjs/loader","lineNumber":866,"columnNumber":23},"hitCount":0,"children":[5]},{"id":5,"callFrame":{"functionName":"Module.load","scriptId":"63","url":"node:internal/modules/cjs/loader","lineNumber":1078,"columnNumber":32},"hitCount":0,"children":[6]},{"id":6,"callFrame":{"functionName":"Module._extensions..js","scriptId":"63","url":"node:internal/modules/cjs/loader","lineNumber":1249,"column
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.
[{"name":"hot-reloader","duration":55,"timestamp":82022564045,"id":3,"tags":{"version":"14.1.3","isTurbopack":false},"startTime":1710488116627,"traceId":"d6ee368abb03d095"},{"name":"start","duration":2,"timestamp":82022564640,"id":4,"parentId":3,"tags":{},"startTime":1710488116627,"traceId":"d6ee368abb03d095"},{"name":"get-version-info","duration":586183,"timestamp":82022564757,"id":5,"parentId":4,"tags":{},"startTime":1710488116627,"traceId":"d6ee368abb03d095"},{"name":"clean","duration":231,"timestamp":82023150985,"id":6,"parentId":4,"tags":{},"startTime":1710488117214,"traceId":"d6ee368abb03d095"},{"name":"get-page-paths","duration":606,"timestamp":82023152102,"id":8,"parentId":7,"tags":{},"startTime":1710488117215,"traceId":"d6ee368abb03d095"},{"name":"create-pages-mapping","duration":339,"timestamp":82023152733,"id":9,"parentId":7,"tags":{},"startTime":1710488117215,"traceId":"d6ee368abb03d095"},{"name":"create-entrypoints","duration":1948,"timestamp":82023153090,"id":10,"parentId":7,"tags":{},"startTime
@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",