RSS feed iconGitHub logo

Hey, I'm Greg, welcome to my blog!

Next.js getServerSideProps interception

2023-01-294 minutes readJavaScript, React, Next.js

Next.js can seem stuck fetching getServerSideProps result on client-side navigations. The approach outlined in the article bypasses making that network request, resulting in snappier UI, suitable for highly-interactive web applications.

Read more

Catch rejections in every Promise chain

2022-10-197 minutes readJavaScript, Node.js

In Node.js, omitting catching a rejection in at least one Promise chain leads to an unhandledRejection event and the process being usually killed.

Read more

JavaScript's promised convenience

2022-10-1812 minutes readJavaScript

JavaScript Promise's then function offers extra convenience. Is it harmful, though?

Read more

Representing wizard state in TypeScript

2022-09-0910 minutes readTypeScript

My solution to describing the state of a multi-step wizard in TypeScript.

Read more

Fixing accidental git submodule changes

2022-08-107 minutes readgit

How to fix unintentionally changing a git submodule hash to leave no trace of a mistake on your branch.

Read more

Neovim highlights are extmarks

2022-08-084 minutes readneovim

While trying to contribute to nvim-ts-rainbow I discovered that highlights in Neovim are implemented using extmarks.

Read more

HiDPI in i3

2022-07-038 minutes readsystem-configuration

My journey to using HiDPI in i3 and finally getting the full benefits of having a 4k monitor.

Read more

Options based on generic parameters

2022-07-035 minutes readTypeScript

Two approaches in TypeScript to changing the type of an options parameter based on a generic function parameter.

Read more

Collecting multiple errors in fp-ts

2022-07-0214 minutes readfp-ts, TypeScript

The fp-ts library puts errors to the forefront and helps write type-safe code that correctly reports errors. Collecting errors from multiple operations can sometimes lead to boilerplate code. Let's see if there is a way to make that code shorter.

Read more

Indexing articles on my blog

2022-06-1812 minutes readblog

How to avoid duplicate work when serving pages for my blog? Building up indexes that summarize the articles in a concise format is one solution to this problem.

Read more