Use Suspense + ErrorBoundary with data fetching


What Is Suspense & ErrorBoundary, Exactly?

Posted by Joey Yu on March 15, 2022

How to set up Flow in React Project


What’s Flow?

Flow is a static type checker developed by Meta (aka, Facebook), Inc. There are some cool features in Flow:

  • Type Annotations
  • Enum
  • Union Types
  • Maybe Types

Posted by Joey Yu on March 15, 2022

Useful Java Techniques


In this article, I will list some useful techniques that can be used in our daily life as a developer.

Convert PriorityQueue to Array

PriorityQueue<int[]> pq = new PriorityQueue<>();
int[][] result = pq.toArray(new int[pq.size()][2]);

Posted by Joey Yu on July 3, 2020

How to create a GitLab scheduled pipeline


GitLab supports pipeline schedules that can be used to also run pipelines at specific intervals, see [here]. One typical usage is to run some administration jobs periodically, for instance, rotate database password every 90 days to meet security compliance. A regular GitLab pipeline consists of multiple stages/jobs. One typical example is as follows:

stages:
  - build
  - admin_jobs
  - test
  - deploy

And the admin_jobs stage is where the rotate_db_password resides in.

Posted by Joey Yu on June 26, 2020