Feng's Notes Isn't coding fun?

How to queue up jobs in nodejs

I have a service written with nodejs when I found some requests took too long to process. so I decided to queue up the requests and process them one by one. I used Celery in python projects before, so I was looking for something similar in nodejs. Then I found Bull which is a Redis-based queue for Node. Here are some essential notes that would be helpful if you want to use Bull in your project.

How to Build An Browser Extension Plugin 2023

I use several browser extensions in my daily work. One of the most useful one is youtube-playback-speed-co it is so simple yet so powerful and saved me a lot of time on adjusting the playback speed of youtube videos. Then I wonder how it works and if I can make one myself. So I did some research and here is what I found.

Github Action Manual Approval Practice

Our team has been using github action for CI/CD for a while. It’s very convenient and easy to use. We use it to build docker images, push to docker registry and deploy to kubernetes cluster. But there is one thing that we are trying to improve, that is we want to have a manual approval step before deploying to production. We tried many methods but none of them works well until we found this manual-workflow-approval action.

Self-Host Wordpress on K8s

As I mentioned in my previous post I have setup a kubernetes(k3s) cluster on my home server. I was thinking how I could use this then I decided to host a blog site using the most used CMS on the internet, Wordpress. Here I would explain how I did it.

Build Your Own Sql Chatbot with Langchain and Streamlit

I have just built a sql chatbot for local data using langchain and streamlit. I found the whole process surprisingly smooth with these two great tools, I put here how I built this and some thoughts alongside. In case you don’t know what langchain and streamlit are, here is a brief introduction. Langchain in my mind is a tool to connect to all kinds of language models(e.g. openai) and provide interfaces to easily using them.

Troubleshooting Cloudflare Image Upload with Node

I was working on testing upload images to Cloudflare using their API. The task was supposed to be simple because cloudfare have some code samples here, however I was having trouble getting it to work. As I’m using node+axios , the sample code on document is like

How to set up a full-stack home server

I will explain in this article how to deploy and serve a kubenetes cluster(k3s) using your home laptop/PC. I will also show you how to expose your services to the internet with cloudflare tunnel. I will use a simple web app as an example to show how to build a full-stack application and serve it with the home server. Here is the overview of the architecture setup. The laptop running all these stuff is a 7 year old Thinkpad with Interl i5 + 16G Mem installed with Ubuntu

A Dev's Guide to K8s Deployment

[This is a note first published internally, I copied here for backup ] Although I have deployed a couple of apps in our k8s cluster, I find it still tricky to go through the whole journey fluently. I took some notes and put them down here for a memo. Hope it helps developers like me who are still experiencing k8s issues from time to time. The deployment steps Local Test So you have a Dockerfile in your project and a docker engine running on your machine

How to Test a Kong Plugin

Kong is a popular API gateway we are proactively using. Sometimes we need to develop plugins to meet specific architecture/business needs.

再读黑客与画家

第一次读这本书竟然已经是五年前了,最近在推上看到有人提及,就又回去翻了一下。还是有很多新感受(或者说记起来很多已经忘了的点),在这里梳理一下。