Sign in

Chris Cook

@zirkelc.dev
327 followers 405 following 210 posts

software engineer at heart ❤️ co-founder of flyweight.io aws community builder

PostsRepliesMedia
Chris Cook @zirkelc.dev · 28/07/2025
TIL you can use `@entity.Attributes.Lambda.Function` to group messages from multiple different log groups. Useful when you need to analyze cold starts from many Lambdas with a single cloudwatch query.
010
Chris Cook @zirkelc.dev · 10/07/2025
Here's Lambdalet.AI - an AI-powered bookmarking and read-it-later service. It saves any page you're reading into your own Notion database — full text, fully searchable, zero fuss. I built this for the AWS Lambda Hackathon!
110
Reposted by Chris Cook
AWS Community Builder Blog Posts @awscmblogposts.bsky.social · 17/06/2025
✍️ New blog post by Chris Cook Flatten Array of Arrays using JSONata for AWS Step Functions #aws #programming #tutorial #javascript
dev.to
Flatten Array of Arrays using JSONata for AWS Step Functions
The Map state of AWS Step Functions returns an array of arrays as a result. For further processing,...
011
Chris Cook @zirkelc.dev · 18/06/2025
If your using JSONata instead of JSONPath for your AWS Step Function workflow, here's how you can flatten an array of arrays:
110
Chris Cook @zirkelc.dev · 11/06/2025
It would be nice if there was a way to pause Lambdas while waiting for a HTTP response. Like fire of a few requests, the Lambda goes into hibernate and automatically resumes when all requests have concluded.
000
Chris Cook @zirkelc.dev · 09/06/2025
Using a reasoning model for coding feels like driving a sports car in stop-and-go traffic
000
Chris Cook @zirkelc.dev · 27/05/2025
Long lived AWS IAM credentials for the management console would be nice
000
Chris Cook @zirkelc.dev · 22/04/2025
Glad it's open source github.com/gskinner/reg...
github.com
GitHub - gskinner/regexr: RegExr is a HTML/JS based tool for creating, testing, and learning about Regular Expressions.
RegExr is a HTML/JS based tool for creating, testing, and learning about Regular Expressions. - gskinner/regexr
000
Chris Cook @zirkelc.dev · 22/04/2025
Looks like my favorite Regex testing site is down 😭 regexr.com
regexr.com
Site not found · DreamHost
The owner of this domain has not yet uploaded their website.
010
Chris Cook @zirkelc.dev · 20/04/2025
In 2011, there was an proposal to change the type of null `typeof null === null` Too bad it didn't get accepted web.archive.org/web/20160331...
web.archive.org
harmony:typeof_null [ES Wiki]
000
Chris Cook @zirkelc.dev · 07/04/2025
Maybe soon we can use response streaming from AWS Lambda with @trpc.io 👀 github.com/trpc/trpc/pu...
github.com
feat: support lambda response streaming by zirkelc · Pull Request #6680 · trpc/trpc
Closes #4474 🎯 Changes This PR adds support for AWS Lambda response streaming. Response streaming is only supported by Lambda Function URLs, not by API Gateway. I decided to add a new adapter awsLa...
010
Chris Cook @zirkelc.dev · 18/03/2025
Found this TODO in my codebase 😄 If I make a PR, will @vitest.dev accept it? 👀
010
Chris Cook @zirkelc.dev · 12/03/2025
I started a discussion for a new asymmetric matcher for @vitest.dev that checks if a property does not exist. Basically, the opposite of `expect.anything()`, could be named `expect.nothing()` Would love to get some feedback 🙏 github.com/vitest-dev/v...
github.com
Asymmetric matcher for property NOT exists (opposite of `anything`) · vitest-dev vitest · Discussion #7324
Hey, is there a way check if an object does not have a certain property? Basically, the opposite of expect.anything(): import { expect, test } from 'vitest' test('object has "apples" key', () => { ...
010
Chris Cook @zirkelc.dev · 02/02/2025
TIL `$*` captures all positional arguments into a space separated string You can abuse this for a Git alias to avoid typing the commit message in double quotes: `gc my commit message`
010
Chris Cook @zirkelc.dev · 31/01/2025
I can't emphasize enough how great this post about quantization is!
010
Chris Cook @zirkelc.dev · 29/01/2025
It's funny, @sindresorhus.bsky.social has a package for literally everything I search for. I should probably prefix my Google searches with "site:github.com/sindresorhus/"
000
Chris Cook @zirkelc.dev · 28/01/2025
I wrote a follow up on this topic on @dev.to dev.to/zirkelc/type...
dev.to
TypeScript CLI: Automate Build and Deploy Scripts
I would like to follow up on my previous post about TypeScript CLIs. Here's how I want to proceed: I...
020
Chris Cook @zirkelc.dev · 27/01/2025
Building and deploying a React app to a static hosting service like Amazon S3 and CloudFront is a good example for a CLI in TypeScript. Adding Listr2 and Execa to create an easily extensible CLI with `build` and `deploy` command. asciinema.org/a/DFlVSxmoWD...
asciinema.org
untitled
Recorded by zirkelc
010
Chris Cook @zirkelc.dev · 27/01/2025
I always wondered how people create these beautiful terminal recordings. github.com/asciinema/as...
github.com
GitHub - asciinema/asciinema: Terminal session recorder 📹
Terminal session recorder 📹. Contribute to asciinema/asciinema development by creating an account on GitHub.
000
Chris Cook @zirkelc.dev · 25/01/2025
TIL Press the . key on any repository to switch github.dev github.com/github/dev
github.com
GitHub - github/dev: Press the . key on any repo
Press the . key on any repo. Contribute to github/dev development by creating an account on GitHub.
010
Chris Cook @zirkelc.dev · 24/01/2025
It's so funny how confident LLMs are when they make mistakes. The model generates invalid code. You specifically ask them about lines of code. The model confidently explains how it works. You give them the error. The model is like "Ah, you're absolutely right - I apologize for my mistake!"
000
Chris Cook @zirkelc.dev · 23/01/2025
What if `expect(obj).toMatchPrompt("...")` was a thing It's probably a stupid idea, but I couldn't resist and quickly implemented @vitest.dev custom matcher
010
Chris Cook @zirkelc.dev · 20/01/2025
I wish VSCode would accept S3 URLs Cmd+P, paste S3 URL, enter and it opens the file
000
Chris Cook @zirkelc.dev · 18/01/2025
I love how you can use TypeScripts' unique symbols as a parking spot for types 👀 Here's a simple query helper function to attach the result type to an object and infer it back later I've shared a complete example on @dev.to: dev.to/zirkelc/uniq...
010
Chris Cook @zirkelc.dev · 18/01/2025
Just found out about Microsofts' GenAIScript and not sure how to feel about it Anyone tried it yet? github.com/microsoft/ge...
github.com
GitHub - microsoft/genaiscript: Automatable GenAI Scripting
Automatable GenAI Scripting. Contribute to microsoft/genaiscript development by creating an account on GitHub.
000
Chris Cook @zirkelc.dev · 16/01/2025
Vitest v3 has just been released 👀 github.com/vitest-dev/v...
github.com
Release v3.0.0 · vitest-dev/vitest
Vitest 3 is here! There are a few breaking changes, but we expect the migration to be smooth. This release page lists all changes made to the project during the beta. For the migration guide, pleas...
000
Chris Cook @zirkelc.dev · 16/01/2025
I noticed that Vercels' popular `ms` pkg for converting time units to milliseconds uses 365.25 as a multiplier for the days in a year. I know this is to account for leap years, but is that the right assumption to make here? Effectively this means that `ms(1y) != ms(365d)` without ppl knowing it
100
Chris Cook @zirkelc.dev · 15/01/2025
Here's @tkdodo.eu original post where I saw this pattern for the first time. It's also the first time that using TypeScripts' `unqiue symbol` has made any sense to me. tkdodo.eu/blog/the-que...
010
Chris Cook @zirkelc.dev · 15/01/2025
Inspired by React Query's `queryOptions()`, I made a little helper to add the type of the parameter and the return type to the query definition (yes, I know about ORM). The next step would be to use template literal types to parse the parameters and return type from the query string.
030
Chris Cook @zirkelc.dev · 15/01/2025
I just stumbled upon `unbuild` from @unjs.io Bundling for ESM and CJS is already super easy thanks to `tsup`, but `unbuild` looks even nicer! github.com/unjs/unbuild
github.com
GitHub - unjs/unbuild: 📦 A unified JavaScript build system
📦 A unified JavaScript build system. Contribute to unjs/unbuild development by creating an account on GitHub.
030
Chris Cook @zirkelc.dev · 13/01/2025
Some packages like Chalk by @sindresorhus.bsky.social are so popular that you can literally run for years without issues before you notice that you missed to declare it as dependency.
010
Chris Cook @zirkelc.dev · 13/01/2025
I think I've finally found an efficient way to use LLMs for writing articles: 0. Draft article 1. Ask LLM to check the logic: does it make sense? No text changes 2. Ask LLM to fix spelling and grammar. No rewrites, only proofreading 3. Ask LLM to rewrite the text. Keep ideas, express them better
000
Chris Cook @zirkelc.dev · 12/01/2025
I released `aws-sigv4-sign` today. It contains the core logic for signing requests with AWS SigV4, but does not use the fetch API The question now is: if you use fetch, then use `aws-sigv4-fetch`. In all other cases (axios, got, ky, node:https...) use `aws-sigv4-sign` www.npmjs.com/package/aws-...
020
Chris Cook @zirkelc.dev · 10/01/2025
@arethetypeswrong doesn't support @pnpm.io `publishConfig` to override package.json export fields when using live types As workaround, we can run pnpm pack, extract the tarball name and pass it to @arethetypeswrong to check the types: `pnpm pack | tail -n1 | xargs attw` github.com/arethetypesw...
020
Chris Cook @zirkelc.dev · 10/01/2025
I use jest-dynalite to run DynamoDB locally to avoid mocking database calls. It's so fast that I can create the necessary items before each test and reset the whole database between test. It's really good! Btw, despite the name, it works with well @vitest.dev github.com/freshollie/j...
github.com
GitHub - freshollie/jest-dynalite: Jest preset to run Dynalite (DynamoDB local) per test runner
Jest preset to run Dynalite (DynamoDB local) per test runner - freshollie/jest-dynalite
020
Chris Cook @zirkelc.dev · 07/01/2025
It's crazy to think how different the experience must be for someone starting out in programming today vs. 15 years ago due to remote work and AI. When I started working in 2009, I learned so much by just sitting next to a person and watching them program.
000
Reposted by Chris Cook
Thorsten Ball @thorstenball.com · 07/01/2025
In case you didn't know: In GitHub-flavored Markdown you can use <kbd> to specify keyboard input. Makes your shortcuts look ✨pretty✨
4624
Chris Cook @zirkelc.dev · 05/01/2025
Ordinal dates with year-dayOfYear (YYYY-DDD) even have an ISO standard. And the math is so simple, because days are absolute (24*60*60 s) whereas months are relative (28/30/31 d). Basically you only need to know if the year has 365 or 366 days. en.wikipedia.org/wiki/Ordinal...
010
Chris Cook @zirkelc.dev · 05/01/2025
Date and time is a fascinating topic. You basically only simple arithmetic (plus, minus, multiply, divide) to manipulate a millisecond value. It's weird how we've made it more complicated with calendars and timezones. Using ordinal numbers (day of the year) would simplify so much.
000
Chris Cook @zirkelc.dev · 04/01/2025
TypeScript Function Overloading I used to overload functions where I merge the different parameter names and types into one implementation signature like `startOrLength`. But it get's really messy with more than 2 params. The usage of rest args offers a really nice alternative. /
131
Chris Cook @zirkelc.dev · 02/01/2025
TIL: Vitest has a built-in option to suppress logs during tests. I usually spy on the logger/console object and mock the implementation to disable logging during tests. It turns out Vitest has `onConsoleLog` option to filter or even suppress logs. vitest.dev/config/#onco...
000
Chris Cook @zirkelc.dev · 30/12/2024
Finally closing a long standing issue with AWS SigV4 fetch and Node.js `Request` object and it was quite simple: I didn't copy the `duplex` property to the signed request, which caused a `TypeError` in certain cases 🫣 Luckily, someone pointed my in the right direction github.com/zirkelc/aws-...
github.com
Non-GET requests don't work when passed as a single Request argument · Issue #19 · zirkelc/aws-sigv4-fetch
When passing a non-GET Request object as a single argument, the method is automatically changed to "GET".
000
Chris Cook @zirkelc.dev · 28/12/2024
ElectroDB in my opinion is the best library to work with DynamoDB github.com/tywalch/elec...
github.com
GitHub - tywalch/electrodb: A DynamoDB library to ease the use of modeling complex hierarchical relationships and implementing a Single Table Design while keeping your query code readable.
A DynamoDB library to ease the use of modeling complex hierarchical relationships and implementing a Single Table Design while keeping your query code readable. - tywalch/electrodb
010
Chris Cook @zirkelc.dev · 27/12/2024
Wild that you can implement merge sort as type in TypeScript github.com/saiashirwad/...
github.com
020
Chris Cook @zirkelc.dev · 26/12/2024
My Wife: „what are you reading about?“ Me: „how to scale a website with a million checkboxes“ 👀
010
Chris Cook @zirkelc.dev · 26/12/2024
Enjoying a nice holiday read about One Million Checkboxes by @itseieio.bsky.social eieio.games/blog/one-mil...
eieio.games
One Million Checkboxes · eieio.games
I made a website. It's called One Million Checkboxes. It has one million checkboxes on it - but checking a box checks it for everyone.
000
Chris Cook @zirkelc.dev · 23/12/2024
Looking forward to Vitest v3. I made my first contribution with a new matcher `expect.toBeOneOf()` to check for optional properties that can be undefined or null. main.vitest.dev/api/expect.h...
010
Chris Cook @zirkelc.dev · 23/12/2024
I really like the JS-DevTools/npm-publish action for publishing npm packages from a GitHub workflow. Just increment the package version and push it to GitHub and it will do the rest. github.com/JS-DevTools/...
010
Chris Cook @zirkelc.dev · 19/12/2024
@pkg.pr.new is great for testing PRs of your own forks live. I am working on a PR for the serverles-step-functions plugin to support JSONata. Since I'm not the repo owner, I can't publish a beta version to test it in my app. I could use npm link, but that only works locally.
141
Chris Cook @zirkelc.dev · 18/12/2024
I updated my snapshot plugin for Jest and Vitest Now you can replace or remove multiple properties at once using arrays or regex patterns in your snapshots. Perfect for handling dynamic values like auto-generated IDs or timestamps github.com/zirkelc/snap...
010