Ways to keep setTimeout/setInterval from being paused in Edge browsers

When the edge browser goes into the background, the setTimeout timer in its web page may be suspended due to performance optimisation policies until the page regains focus again. There are two ways to avoid this. Method 1: Turn off edge efficiency mode Press Alt + F in edge browser and select Settings -> System and Performance -> Optimize Performance. You can also enter the address edge://settings/system in the address bar and enter to go directly to the settings page.

Collecting Kubernetes Log Data with OpenTelemetry Collector

Previously we described how to collect metrics data from a Kubernetes cluster with the OpenTelemetry Collector, and next we’ll take a look at how to collect logging data from a cluster. Installing Loki First we need to deploy Loki to collect log data, again we’ll use Helm Chart for a quick deployment, but note that again we don’t need to deploy any log collectors as we’ll be using the OpenTelemetry Collector to collect the log data and then send it to Loki.

Collecting Kubernetes Metrics Data with OpenTelemetry Collector

Kubernetes has become a widely adopted industry tool, and the need for observability tools continues to grow. In response, OpenTelemetry has created a number of different tools to help Kubernetes users observe their clusters and services. Next we will start monitoring the Kubernetes cluster using OpenTelemetry and will focus on collecting metrics and logs from the Kubernetes cluster, nodes, pods, and containers and enabling the cluster to support services that emit OTLP data.

PHP date and time processing functions in detail

Working with dates and times is a common task in web development, and PHP provides a number of powerful date and time handling functions such as strtotime, date and DateTimeImmutable::createFromFormat. These functions make it easy to convert between different time formats, perform date and time calculations, and format output. In this article, we’ll take a closer look at the usage and advantages of these three functions. 1. strtotime function The strtotime function is used to convert human-readable date and time strings to Unix timestamps.

Happy 32nd birthday Linux Kernel!

On 26 August 1991, Linus Benedict Torvalds, a Finnish university student, told the members of the comp.os.minix newsgroup that he was working on the operating system as a “hobby”. This date is therefore considered by many enthusiasts to be the real birthday of the Linux Kernel. In an email, Linus said that the operating system he was working on was just a hobby project, and would not be as large and specialised as GNU.

Replacing ngrok with Cloudflare Tunnel's TryCloudflare

Recently, I’ve been trying Cloudflare Tunnel service, which is a free service that allows you to set up a tunnel between your local network and Cloudflare network, so that external networks can connect to your local service through Cloudflare’s Edge. However, Cloudflare Tunnel is a little bit tricky to set up, there are a lot of steps and you need to create a Cloudflare account beforehand. However, I found that Cloudflare also provides a TryCloudflare or Quick Tunnels service, which is also free, but you don’t even need to create a Cloudflare account to use this service, you just need to install the cloudflared utility and you can start using it directly.

Performance Impact of Pre-allocating Slice Memory in Golang

When I review code, I often focus on whether the initialization of slice in the code allocates the expected memory space, i.e., anything that var init []int64 I ask to change to init := make([]int64, 0, length) format as much as possible. But there’s no quantitative idea of how much of an impact this improvement will have on performance, it’s just dogmatically required. This blog will go over the theoretical basis for preallocated memory to improve performance, quantitative measurements, and tools to automate detection and discovery.