Posts

  • Host a static website with a custom domain over HTTPS using Google Cloud Storage and Cloudflare

    Motivation One way to host a static website for free with a custom domain over HTTPS is to take advantage of a cloud computing provider’s free tier: Start a small instance part of the free tier and let it run indefinitely, e.g. GCP’s f1-micro VM instance in the us-west1, us-central1,...

  • Querying 10GB of data with PostgreSQL, pgAdmin and Docker Compose

    postgres logo

    Let’s imagine you have a dataset in CSV format you would like to run some SQL queries against. The dataset is small enough to store locally on your machine, but large enough to make importing it into a database non trivial. In this post, we will take a ~10GB CSV...

  • Set state callbacks in React, a counter example

    In React, we can set state in a functional component, e.g. const [myState, setMyState] = useState(""); setMyState("myValue"); useState is a React hook that returns a pair of values: the current state myState and a function setMyState that when called updates the current state myState. In the snippet above, we pass...

  • How to do a clean install of Ubuntu

    ubuntu logo

    Download the ISO From the official Ubuntu website, download the ISO disk image of the version of Ubuntu you would like to install. The size of the ISO file is usually quite large, e.g. over a gigabyte, so the download might take a while. Once it is downloaded, if you...

  • A minimal React with asynchronous Redux example

    In the previous post, we used a simple example to show how application state in React can be managed with Redux. In this post, we use the example below to show how application state in React can be managed asynchronously with Redux. What do we mean by asynchronous? In the...