Chris Cook
@zirkelc.dev
📤 313
📥 405
📝 210
software engineer at heart ❤️ co-founder of
http://flyweight.io
aws community builder
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.
3 months ago
0
0
0
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!
loading . . .
3 months ago
1
0
0
reposted by
Chris Cook
AWS Community Builder Blog Posts
4 months ago
✍️ New blog post by
Chris Cook
Flatten Array of Arrays using JSONata for AWS Step Functions
#aws
#programming
#tutorial
#javascript
loading . . .
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,...
https://dev.to/aws-builders/flatten-array-of-arrays-using-jsonata-for-aws-step-functions-3klb
0
1
1
If your using JSONata instead of JSONPath for your AWS Step Function workflow, here's how you can flatten an array of arrays:
4 months ago
1
0
0
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.
4 months ago
0
0
0
Using a reasoning model for coding feels like driving a sports car in stop-and-go traffic
5 months ago
0
0
0
Long lived AWS IAM credentials for the management console would be nice
5 months ago
0
0
0
Glad it's open source
github.com/gskinner/reg...
add a skeleton here at some point
6 months ago
0
0
0
Looks like my favorite Regex testing site is down 😭
regexr.com
loading . . .
Site not found · DreamHost
The owner of this domain has not yet uploaded their website.
https://regexr.com/
6 months ago
0
1
1
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...
loading . . .
harmony:typeof_null [ES Wiki]
https://web.archive.org/web/20160331031419/http://wiki.ecmascript.org:80/doku.php?id=harmony:typeof_null
6 months ago
0
0
0
Maybe soon we can use response streaming from AWS Lambda with
@trpc.io
👀
github.com/trpc/trpc/pu...
loading . . .
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...
https://github.com/trpc/trpc/pull/6680
7 months ago
0
1
0
Found this TODO in my codebase 😄 If I make a PR, will
@vitest.dev
accept it? 👀
7 months ago
0
1
0
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...
loading . . .
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', () => { ...
https://github.com/vitest-dev/vitest/discussions/7324
7 months ago
0
1
0
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`
9 months ago
0
1
0
I can't emphasize enough how great this post about quantization is!
add a skeleton here at some point
9 months ago
0
1
0
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/"
9 months ago
0
0
0
I wrote a follow up on this topic on
@dev.to
dev.to/zirkelc/type...
add a skeleton here at some point
9 months ago
0
2
0
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...
add a skeleton here at some point
9 months ago
0
1
0
I always wondered how people create these beautiful terminal recordings.
github.com/asciinema/as...
loading . . .
GitHub - asciinema/asciinema: Terminal session recorder 📹
Terminal session recorder 📹. Contribute to asciinema/asciinema development by creating an account on GitHub.
https://github.com/asciinema/asciinema
9 months ago
0
0
0
TIL Press the . key on any repository to switch
github.dev
github.com/github/dev
loading . . .
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.
https://github.com/github/dev
9 months ago
0
1
0
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!"
9 months ago
0
0
0
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
9 months ago
0
1
0
I wish VSCode would accept S3 URLs Cmd+P, paste S3 URL, enter and it opens the file
9 months ago
0
0
0
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...
9 months ago
0
1
0
Just found out about Microsofts' GenAIScript and not sure how to feel about it Anyone tried it yet?
github.com/microsoft/ge...
loading . . .
GitHub - microsoft/genaiscript: Automatable GenAI Scripting
Automatable GenAI Scripting. Contribute to microsoft/genaiscript development by creating an account on GitHub.
https://github.com/microsoft/genaiscript
9 months ago
0
0
0
Vitest v3 has just been released 👀
github.com/vitest-dev/v...
loading . . .
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...
https://github.com/vitest-dev/vitest/releases/tag/v3.0.0
9 months ago
0
0
0
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
9 months ago
1
0
0
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...
add a skeleton here at some point
9 months ago
0
1
0
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.
9 months ago
0
3
1
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
loading . . .
GitHub - unjs/unbuild: 📦 A unified JavaScript build system
📦 A unified JavaScript build system. Contribute to unjs/unbuild development by creating an account on GitHub.
https://github.com/unjs/unbuild
9 months ago
0
3
0
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.
9 months ago
0
1
0
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
9 months ago
0
0
0
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-...
9 months ago
0
2
0
@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...
10 months ago
0
2
0
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...
loading . . .
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
https://github.com/freshollie/jest-dynalite
10 months ago
0
2
0
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.
10 months ago
0
0
0
reposted by
Chris Cook
Thorsten Ball
10 months ago
In case you didn't know: In GitHub-flavored Markdown you can use <kbd> to specify keyboard input. Makes your shortcuts look ✨pretty✨
4
62
4
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...
add a skeleton here at some point
10 months ago
0
1
0
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.
10 months ago
0
0
1
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. /
10 months ago
1
3
1
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...
10 months ago
0
0
0
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-...
loading . . .
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".
https://github.com/zirkelc/aws-sigv4-fetch/issues/19
10 months ago
0
0
0
ElectroDB in my opinion is the best library to work with DynamoDB
github.com/tywalch/elec...
loading . . .
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
https://github.com/tywalch/electrodb
10 months ago
0
1
0
Wild that you can implement merge sort as type in TypeScript
github.com/saiashirwad/...
loading . . .
https://github.com/saiashirwad/type-dsa/blob/main/src/merge-sort.ts
10 months ago
0
2
0
My Wife: „what are you reading about?“ Me: „how to scale a website with a million checkboxes“ 👀
add a skeleton here at some point
10 months ago
0
1
0
Enjoying a nice holiday read about One Million Checkboxes by
@itseieio.bsky.social
eieio.games/blog/one-mil...
loading . . .
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.
https://eieio.games/blog/one-million-checkboxes/
10 months ago
0
0
1
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...
10 months ago
0
1
0
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/...
10 months ago
0
1
0
@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.
10 months ago
1
4
2
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...
10 months ago
0
1
0
Load more
feeds!
log in