Posts

Website Sitemaps Explained: History, Types, and SEO Benefits

Image
  In the early days of the internet, websites were relatively small, and web pages were mainly connected through hyperlinks. Search engine crawlers discovered new content by visiting web pages and following links to other pages, gradually building their search indexes. However, as the internet expanded, the number of web pages increased rapidly, and website structures became more complex. Relying entirely on hyperlinks to discover content gradually became less efficient. To address this challenge, website sitemaps became an important communication tool between websites and search engines. Simply put, a sitemap is a file that organizes a list of website URLs in a specific format. It helps search engines understand which pages are available on a website and provides information about its content structure. The value of sitemaps can be understood from three perspectives: why they were created, what formats they support, and how they help search engines discover website content. 1. Th...

From Phonographs to Digital Audio: The Evolution of Audio Technology and Conversion

Image
  The development of audio technology is a story of how humans have continually overcome the limitations of sound recording, storage, playback, and transmission. From sounds that could only be experienced in real time to physical recordings that could be preserved and replayed, and eventually to digital audio that can be transmitted across the internet in seconds, the way we record and listen to sound has changed dramatically. Throughout this evolution, recording media, digital encoding technologies, and audio formats have continued to advance. Vinyl records, cassette tapes, CDs, MP3, and FLAC are all milestones in the transition from analog audio to the digital age. Understanding this history not only helps us recognize common audio formats but also explains the technology behind audio conversion. 1. From Phonographs to Digital Audio: A Brief History of Audio Playback Before the invention of the phonograph, sound was difficult to preserve. Although people could record musical info...

How to Fix 96% CPU Usage Caused by Swoole Port Conflicts on Ubuntu

Image
  1. Background While maintaining an Ubuntu server, I noticed that the CPU usage suddenly increased to an unusually high level. The server was equipped with an 8-core CPU . Under normal circumstances, CPU usage remained relatively low. However, during one inspection, the CPU usage had reached 96% . At the same time, the server monitoring dashboard showed network traffic of approximately 127 Kb/s. There was no obvious spike in network activity. Since multiple websites were running on this server, including projects built with ThinkPHP and Swoole, I needed to identify which process was responsible for the abnormal CPU consumption. The investigation eventually revealed the root cause: Two different websites were running Swoole services that attempted to listen on the same IP address and port. After correcting the port configuration, CPU usage dropped from 96% to just 2%. This article documents the troubleshooting process and the solution. 2. Check Server Resource Usage The first step ...

How to Update the SSL Domain Certificate After Self-Hosting a JihuLab Code Platform

  Background After deploying a self-hosted JihuLab code platform, the domain's SSL certificate expired, making the management interface inaccessible. Local code could no longer be synchronized with the remote repository. Objective: Update the domain's SSL certificate to restore access to the platform and enable code synchronization. Implementation Steps 1. Locate the Certificate Configuration in JihuLab Run the following command to check the actual certificate paths configured in JihuLab: grep -nEi "external_url|ssl_certificate|ssl_certificate_key|letsencrypt" /etc/gitlab/gitlab.rb The output will look similar to the following: external_url 'https://explore.com' nginx['ssl_certificate'] = "/etc/gitlab/ssl/explore.com.pem" nginx['ssl_certificate_key'] = "/etc/gitlab/ssl/explore.com.key" Based on the configuration above, the certificate files are located in the following directory: /etc/gitlab/ssl/ 2. Download the New Certifi...

How to Add Code Highlighting to Blogger Without Plugins

Most rich-text editors offer a feature that allows you to select specific content and format it as a code block, often with syntax highlighting. However, Blogger's built-in post editor does not provide this functionality, and I really needed it for my technical blog. So, how could I implement code highlighting in Blogger without replacing the existing editor? I initially came up with two ideas: Switch to a different rich-text editor. Add a code block feature to the existing editor. The best solution would have been to replace the editor with another rich-text editor. Unfortunately, Blogger does not provide an option to switch between different editors. The second option was slightly less ideal: modify the existing editor's source code to add a code block button and the logic required to display syntax highlighting. Unfortunately, Blogger does not provide a way to directly modify the editor's source code either. Both approaches had reached a dead end. I asked AI for alternat...

How to Fix PHP 8.2 Fileinfo Installation Failure on Baota (BT) Panel

1. Problem Background Server Environment Item Configuration Operating System Ubuntu 22.04 CPU 2 cores Memory Approximately 2 GiB PHP PHP 8.2.x PHP Build Type NTS Management Panel Baota (BT) Panel PHP Installation Directory /www/server/php/82 Fileinfo Source Directory /www/server/php/82/src/ext/fileinfo The server has limited memory. When installing the PHP Fileinfo extension directly through the Baota panel, the compilation process fails. 2. Error Messages During the Fileinfo installation process in Baota, compilation gets stuck at: libmagic/apprentice.c The following error may then appear: cc: fatal error: Killed signal terminated program cc1 compilation terminated. Eventually, the following error occurs: make: *** [Makefile:xxx: libmagic/apprentice.lo] Error 1 Alternatively, Baota may simply report that the Fileinfo installation failed. 3. Root Cause Although this error appears to be a C compilation error, the actual problem is not necessarily an issue with the Fileinfo source code i...