Latest Blog

in docker-compose.yml, what does this mean?ports: – “${BACKEND_PORT:-80}:80”
May 11, 2023 | No Comments

In a Docker Compose file (docker-compose.yml), the ports section is used to expose network ports for services defined in the file. It allows containers to listen on specified ports and make them accessible from outside the Docker environment. In the given example, the ports section is using the following format: This line maps the host […]

Read More

I like to use Prometheus to monitor a web app, how can I not expose /metrics to the world?
May 11, 2023 | No Comments

To use Prometheus to monitor a web application and prevent exposing the /metrics endpoint to the public internet, you can follow these steps: By following these steps, you can ensure that the Prometheus metrics endpoint (/metrics) is not accessible to the public internet. The metrics can only be scraped by the Prometheus instance located within […]

Read More

Forbes Real Time Billionaires List
November 22, 2022 | No Comments

Forbes Real Time Billionaires List Intro List of billionaires sorted by the Realtime estimation of net worths by Forbes Screenshot How to Get Forbes Real Time Billionaires List? The Real-Time Billionaires List Permalink of This post

Read More

HOW TO SET UP MULTIPLE WEBSITES USING APACHE2

How to set up multiple websites using apache2?
December 23, 2020 | No Comments

Add content for the websites The content of the apache2 websites on Ubuntu is in We can put the website content (php, html files) in the subdirectories of the above path, such as Set up Apache2 This article uses Ubuntu as an example. The files we need to edit are in First, add a new […]

Read More

leetcode 322 coin change

ALGORITHMS PRACTICE LEETCODE 322 Coin Change
December 20, 2020 | No Comments

Here is the question. I came up with the answer without looking the answer, bottom up dynamic programming (dp) is not a very easy to design at the beginning. Starting from top down + cache, I wrote it a few times, and simplified it a little bit each time, and finally passed the OJ. Python […]

Read More

how to create a xml site for a Wordpress site

How to create a XML sitemap for your WordPress site?
December 18, 2020 | No Comments

What is a XML sitemap? In short, a XML sitemap is a list of web pages contained in a website. Its purpose is to allow search engines, mainly Google’s web crawlers, to discover the site and add the web pages within that site to its search index. A newly created website is a completely isolated […]

Read More

Leetcode 222 solution

Algorithms Practice Leetcode 222 Count Complete Tree Nodes in C++ and Java
December 18, 2020 | No Comments

Problem Statement Definition of a complete binary tree from Wikipedia:In a complete binary tree every level, except possibly the last, is completely filled, and all nodes in the last level are as far left as possible. It can have between 1 and 2h nodes inclusive at the last level h. Example: The easiest way is to traverse […]

Read More