My new blog posts
Example use of stream pipe and transform in Node.js. Useful for processing large data and passing it through another process.
If you want to perform data streaming in Node.js, for example, to replace all strings using a global RegEx, reading the entire data and processing it at once will use more memory than processing the data in chunks or partially. The code below shows you how to replace the string /Lorem\sipsum/g wi...
A guide to setting up multiple profiles for Cloudflare Warp on a single device
If you are using the Cloudflare Zero Trust or Cloudflare Warp, And you have to switch between your personal and your work Cloudflare account. This article is for setting up a Mac profile for both workspaces. To do that Cloudflare provide 2 options for macOS, Option one is using the MDM file that ...
Running a secure home server by Cloudflare Zero Trust, Cloudflare Tunnel, and connecting from the public internet by Cloudflare Warp Client.
This is an article about running a secure home server by Cloudflare Zero Trust and Cloudflare Tunnel. You can connect from the public internet using Cloudflare Warp Client and the SSH server. Prerequisites Cloudflare Account (Free tier) Docker SSH Server Cloudflare Zero Trust Cloudflare Zero Tr...
A guild to deploy Astro Hybrid Rendering site on Cloudflare Pages and Cloudflare Functions. plus Cloudflare KV binding
This tutorial will show how to deploy Astro hybrid rendering site on Cloudflare Pages Introduction Since Astro allow to determines which pages should be static or service side rendering (SSR). read more about hybrid rendering Github Example https://github.com/lisuify/lisuify/tree/perf/web/package...
Separate critical CSS for inline HTML and non-critical CSS for asynchronous load for a better performance page load.
Why inline Critical CSS? Critical CSS includes only the styles needed to render the Above the Fold of a webpage. By delivering these styles inline in the HTML document, the browser can render this content without having to wait for the entire external CSS file to load. Non-critical CSS can load l...
Make Recoil persistent for Cross-Platform React Applications. worked for iOS, Android, Website, and PWA.
Capacitor Preferences Capacitor Preferences is a Capacitor plugin to allow Capacitor applications to store persistent data. The Preferences API provides a simple key/value persistent store for lightweight data. Mobile OSs may periodically clear data set in window.localStorage, so this API should ...
My useful kubectl commands cheat sheet and Google Kubernetes Engine cluster (GKE) set up
As a developer sometimes I need to debug or investigate problems on the cloud machine. so I create this cheat sheet to note the commands. And it might be good to share with people who are just getting started with the Kubernetes. Pod, Namespace, and Deployment to using kubectl, the reader need to...