You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Instantly share code, notes, and snippets.
Brian Anglin
anglinb
👋 I love all software & security things. Past: @github@Snapchat CS `18 USC
I didn't really follow the LanguageBreak instructions because I didn't care about most of the features + I was curious to do it myself, but the LanguageBreak github repo was invaluable for debugging
prisma + effect-ts integration - client which returns effects instead of promises
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
Goals: Add links that are reasonable and good explanations of how stuff works. No hype and no vendor content if possible. Practical first-hand accounts of models in prod eagerly sought.
Composite github action to improve CI time with yarn 3+ / node-modules linker.
Why
Although @setup/node as a built-in cache option, it lacks an opportunity regarding cache persistence. Depending on usage, the action below might give you faster installs and potentially reduce carbon emissions (♻️🌳❤️).
object literal for country info using ISO 2 as key
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
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
Did you ever run into some issue where a job would behave slightly different in you CI environment than on your
local machine? Did you ever wish you could run just a few commands in a shell on your build machine?
These are, of course rhetorical questions. And if you're using Github Actions to run your CI jobs, you'll
have noticed that this use case is not supported at all. Can't create a nice walled garden if anyone could
just run a CI job, after all. There are some workarounds (e.g. https://github.com/nektos/act), but since
they're not officially supported they can be a bit unstable. Also, even they usually don't reproduce the
exact environment found on github's servers.
Sources of latency in Node.js, and how to diagnose them
I used to be responsible for several language agents at AppDynamics, including the Node.js agent. Here's what I learned (caveat: these notes came together in 2016-2017, and the Node world moves very quickly! The community is always adding new sources of telemetry and higher-level abstractions that make it easier to write good Node code.):
Diagnosing common performance problems in Node.js services
"Context" means the user request, route handler, middleware, 3rd-party module, helper, or callback where the problem is. (Many of the functions involved in a user request are anonymous, which means that further narrowing down context is a challenge).
The "best" signal for a particular problem is the one that detects the problem and rules out the most other possibilities (e.g., event loop max tick length can indicate several different problems, and there are better signals that would more quickly narrow down these specific problems).