Chris Cook

Chris Cook @zirkelc

About: I post things so I don’t forget them

Joined:
May 16, 2021

Chris Cook
articles - 68 total

Lambdalet.AI: Reinventing the bookmarklet

I would like to present Lambdalet.AI, my submission for the AWS Lambda Hackathon. Lambdalet.AI...

Learn More 24 5Jul 10

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,...

Learn More 17 1Jun 17

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: Add to .zshrc: alias gc='git add -A && git commit -m "$*"' Then run: `gc my commit message`

A post by Chris Cook

Learn More 0 0Feb 2

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...

Learn More 66 6Jan 27

Unique Symbols: How to Use Symbols for Type Safety

If you’ve spent some time working with React, you might have stumbled upon React Query’s...

Learn More 20 3Jan 15

Buffer Logs and Flush Automatically on Error with Powertools for Lambda

The latest release of AWS Powertools for Lambda makes it easier to extend the Logger with custom...

Learn More 21 1Dec 18 '24

How To Remove Dynamic Values From Snapshot With Serializers

Snapshot tests in Jest and Vitest are powerful tools for detecting unexpected changes in your code's...

Learn More 10 0Dec 14 '24

Creating a TypeScript CLI for Your Monorepo

I like to create local CLIs for my Monorepo to automate tasks like build and deploy. These tasks...

Learn More 77 13Dec 1 '24

Middleware for Step Functions: Automatically Store and Load Payloads from Amazon S3

I would like to introduce middy-store, a new library I built over the last couple of months. I've...

Learn More 24 4Aug 20 '24

What's a Valuable Skill You Should Have?

There are certain skills that I always admire in other people. For example, when someone is fluent in...

Learn More 3 5Jul 30 '24

Collect Logs and Metrics from non-AWS Server using CloudWatch Agent

Most AWS services provide logs or metrics to CloudWatch, which you can use to monitor your system's...

Learn More 12 0Jul 29 '24

Optional vs. Undefined: How To Check for Optional Properties

In TypeScript, a property is considered optional if it can be omitted from an object, meaning it can...

Learn More 13 0Jul 27 '24

Highlights: Extract Highlighted Text from Images using OCR and CV in your Browser

One of my first posts on DEV.to was about extracting highlighted text from images using OCR and...

Learn More 15 0Jul 23 '24

The Fastest Way to Download from Amazon S3 (using Raycast)

If you are a heavy Amazon S3 user like me, you might have wondered if there is a quick way to...

Learn More 11 1Jun 20 '24

Excluding Dependencies: Bundling for Node and the Browser

I stumbled upon this feature just yesterday, and it's one of those things that I'd like to never...

Learn More 7 0May 24 '24

The Puppeteer Language Experiment

If you're using Puppeteer for automation, tests, or web scraping, you've likely encountered the...

Learn More 5 0May 21 '24

A Simple Way to Sign AWS Requests with Signature V4

In a previous article, I explored the challenges of using Lambda Function URLs with IAM authorization...

Learn More 19 2Mar 27 '24

Format and Parse Amazon S3 URL

Amazon S3 URLs come in different flavors. There are those starting with s3:, http:, or https:. Then,...

Learn More 11 1Mar 10 '24

Solving the Puzzle: Lambda Function URLs with IAM Authorization and CloudFront Custom Domains

In this short article, I'd like to share some insights I gained from a recent issue involving the...

Learn More 16 3Jan 29 '24

TypeScript: The Unexpected Magic of Generics

Over the weekend, I stumbled across an interesting TypeScript feature that I wasn't aware of. I...

Learn More 6 2Jan 9 '24

Websites with AWS: Hosting with Private S3 Bucket

In my first post of this series, I delved into the classic approach to hosting a S3 website with...

Learn More 28 4Oct 3 '23

Running on Lambda: Serverless Reader View with Chrome and Readability

Do you remember the Firefox Reader View? It's a feature that removes all unnecessary components like...

Learn More 22 5Sep 25 '23

Websites with AWS: Single Page Applications

In my previous post, I explained how straightforward it is to host a static website on S3 with HTTPS...

Learn More 45 13Sep 11 '23

Serverless Plugin: Exporting Environment Variables and Stack Outputs

I recently published my serverless-exports-plugin for the Serverless Framework. While it shares...

Learn More 12 1Aug 21 '23

Websites with AWS: Hosting, HTTPS and Custom Domain

Hosting websites like static sites or single page applications on Amazon S3 is a charm. However, it...

Learn More 29 3Aug 16 '23

Assertions: How to Assert Conditions and Types

The asserts statement was introduced in TypeScript 3.7. It's a special type of function signature...

Learn More 31 1Jul 28 '23

How To Spy on Classes

Spying in Jest allows us to mock classes while keeping the original implementation intact. A spy can...

Learn More 30 3Jun 28 '23

Extracting Class Methods: How To Derive an Interface From a Class

In object-oriented programming (OOP), we usually define an interface and implement that interface in...

Learn More 24 1Jun 25 '23

Template Literal Types: How To Type Strings

Template literal types are essentially types for strings. By defining the pattern that a string must...

Learn More 19 3Jun 14 '23

Stringify and Parse Errors in JavaScript

The Error object in JavaScript doesn't serialize to JSON with all its properties by default. That's...

Learn More 27 2Jun 2 '23