Useful when you need to analyze cold starts from many Lambdas with a single cloudwatch query.
Useful when you need to analyze cold starts from many Lambdas with a single cloudwatch query.
1️⃣ Lambda #1 uploads the HTML to S3 and queues requests
2️⃣ SQS FIFO for async processing and deduplication
3️⃣ Lambda #2 downloads HTML, converts to Markdown, extracts content via Bedrock and saves to Notion
1️⃣ Lambda #1 uploads the HTML to S3 and queues requests
2️⃣ SQS FIFO for async processing and deduplication
3️⃣ Lambda #2 downloads HTML, converts to Markdown, extracts content via Bedrock and saves to Notion
I built this for the AWS Lambda Hackathon!
I built this for the AWS Lambda Hackathon!
You can abuse this for a Git alias to avoid typing the commit message in double quotes:
`gc my commit message`
You can abuse this for a Git alias to avoid typing the commit message in double quotes:
`gc my commit message`
It's probably a stupid idea, but I couldn't resist and quickly implemented @vitest.dev custom matcher
It's probably a stupid idea, but I couldn't resist and quickly implemented @vitest.dev custom matcher
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...
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...
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
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
The next step would be to use template literal types to parse the parameters and return type from the query string.
The next step would be to use template literal types to parse the parameters and return type from the query string.
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-...
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-...
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...
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...
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.
/
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.
/
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...
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...
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...
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...
Just increment the package version and push it to GitHub and it will do the rest.
github.com/JS-DevTools/...
Just increment the package version and push it to GitHub and it will do the rest.
github.com/JS-DevTools/...
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...
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...
I'm working on unit tests for my AWS SignatureV4 fetch library. It tests several body types (string, Blob, Uint8, ...) but the FormData tests kept failing.
Turns out every new Request generates a random number as separator in the body
I'm working on unit tests for my AWS SignatureV4 fetch library. It tests several body types (string, Blob, Uint8, ...) but the FormData tests kept failing.
Turns out every new Request generates a random number as separator in the body
Last year, I created a sample workflow and PR that has since received more than 300 comments from a hundred different people.
github.com/zirkelc/gith...
Maybe this is something that GitHub Actions should make easier
Last year, I created a sample workflow and PR that has since received more than 300 comments from a hundred different people.
github.com/zirkelc/gith...
Maybe this is something that GitHub Actions should make easier
A workaround is to tell VSCode to treat certain files as JSON with comments. For example, turbo.json can be treated as *.jsonc
A workaround is to tell VSCode to treat certain files as JSON with comments. For example, turbo.json can be treated as *.jsonc
github.com/zirkelc/snap...
github.com/zirkelc/snap...
With web pages, we only have anchors if we're lucky. CSS selectors were possible, but they break when the layout changes.
With web pages, we only have anchors if we're lucky. CSS selectors were possible, but they break when the layout changes.
A git diff for the lock file can check if npm dependencies were changed in a branch.
Here is a simple post-merge git hook to automatically run npm install on git switch.
A git diff for the lock file can check if npm dependencies were changed in a branch.
Here is a simple post-merge git hook to automatically run npm install on git switch.