Skip to content

Instantly share code, notes, and snippets.

View dbrxnds's full-sized avatar

David dbrxnds

  • Amsterdam, The Netherlands
  • 16:53 (UTC +02:00)
View GitHub Profile
@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",