Replacing Docker with Podman for your VSCode DevContainers

Replacing Docker with Podman for VSCode DevContainers This is a walkthrough of how to replace Docker with Podman, and configure VSCode to use its VSCode DevContainer for both single and multiple-container scenarios. While this walkthrough is targeted for Windows WSL2 environment, it theoretically would work with other platforms (such as Linux and Intel Mac) 1. Installing Podman Remove Docker Desktop Install Podman: https://www.redhat.com/sysadmin/podman-windows-wsl2 . /etc/os-release sudo sh -c "echo 'deb http://download....

December 30, 2021 · 3 min · 447 words · Hao Luo

Serving Hugo on Azure with Continuous Integration

Why? In my last post, I walked through how to configure your Azure blob and CDN to serve your static website. The deployment script outlined in that post is fine for a simple blog site. However, it is not a solution if you have a site that is contributed by multiple people. Everytime anyone pushes, they would get a merge conflict on the generated content, or they can force push and risk losing other changes....

September 25, 2017 · 6 min · 1084 words · Hao Luo

Serving Your Static Sites with Azure Blob and CDN

Update: The Blob Storage team has implemented the Static Website feature. Please go check/try it out! Problem I would like to store and serve this web site on Azure Blob Storage. Here are the criteria: Everything should be served from Blob Storage (No App Services, No VMs, and no Azure Functions) Clean URLs (blog.lifeishao.com instead of blog.lifeishao.com/index.html) Uses HTTPS (because SEO) Why? Performance If your website is just a bunch of static assets, it shouldn’t require a dedicated server to just serve your static assets....

May 24, 2017 · 7 min · 1407 words · Hao Luo

Custom NodeJs Deployment on Azure Web App

One of the advantages of using Azure Web App is how easy it is to deploy a NodeJS app. If you have an app as simple as this one, Azure Web App will pick it up, install all the node dependencies, and serve the app on port 80. And you are done!!! Unfortunately, a lot of times, you might want to venture outside the comfort of auto-deploy land, and do some customization....

March 24, 2017 · 5 min · 959 words · Hao Luo

Serving Static Assets in Restify

Serving Static Assets in Restify NodeJS While Restify is branded as a REST Framework, there are instances where we want to put a static html along with the API. For example, if we want to serve up the API documentation or built a Bot and serve up an UI. Four lines of Code If you are looking to serve up static assets from the root path(ie http://example.com/), and all your static assets are in the public directory, these are the four lines of code you need if you are using restify v5+...

March 21, 2017 · 1 min · 146 words · Hao Luo

Gre Math Formulas

Introduction I’m making this for someone I care about. Fractions $ a/b * x/y = (a*x) / (b*y) $ $ a/(b/c) = (a*c) / b $ $ (a/b)/c = a/(b*c) $ $ 1/(1/y) = y $ $ 1/(a/b) = b/a $ Factors $ (a + b) (a - b) = a^2 - b^2 $ Fractals $ a^b * a^c = a^(b+c) $ $ (a^b)^x = a^(b*x) $ $ a^0 = 1 $ (when $ a !...

July 30, 2016 · 2 min · 249 words · Hao Luo

Power of Transformers (not these robots ↑)

About a year ago, I was tasked to write an API for a mobile application for the Dean of Students office. While the main functionalities were finalized, the app’s development was still in its infancy. This means that the API’s output and how it would be best-suited for the app’s consumption was still very much undefined. We had to use transformers to separate the API’s logic layer from its presentation....

January 5, 2016 · 2 min · 309 words · Hao Luo

Thoughts on Card Validate

I was looking at a small package that I wrote a few years ago, and I think it’s a good mental exercise to reevaluate my own code once in a while. Background The purpose of the package is to quickly check for the type of credit card given a small sample (say as a user is typing). Also validate the credit card again the Luhn algorithm which is the algorithm used by most CC companies....

January 5, 2016 · 2 min · 310 words · Hao Luo

Delivering Hugo with Dokku (and Docker)

I’m trying to learn how to use dokku to deploy this hugo site. … and it’s deployed now!!

December 3, 2015 · 1 min · 18 words · Hao Luo