Illustration for Adding a Cool Web Background with Canvas-Nest.js

Adding a Cool Web Background with Canvas-Nest.js

Today on Advanced Blog , I discovered a stunning webpage background effect where dynamic lines form triangles and other geometric patterns that respond to mouse movements. To implement this on your own site, simply add the following code before </body> : <script src="//cdn.bootcss.com/canvas-nest.js/1.0.0/canvas-nest.min.js"></script> Refresh the page to see the effect. If it doesn't appear, verify the placement – this code must not be inserted between <head> and </head> ! However, this introduces an issue: when server-to-user speeds are slow (e.g., during peak-hour network congestion between China and the US), the browser won't detect the need to load this JavaScript until reaching the code's position near the page bottom. Consequently,...

Displaying Fun Things in Telnet

Telnet is one of the oldest network protocols released in 1969, yet it remains enduringly popular due to its simple implementation and ability to enable various interesting applications. Some developers have created Nyancat that can be viewed in Telnet terminals, as well as Star Wars animations accessible via Telnet. To see the ASCII version of Star Wars in your terminal, enter the following command (Windows 7+ users need to enable Telnet Client first via Control Panel > Programs and Features > Turn Windows features on or off): telnet towel.blinkenlights.nl To view Nyancat, enter: telnet nyancat.dakko.us You can also set up a similar Telnet service on your own server to display custom content. We'll use CMatrix (which shows the digital rain from The Matrix) as an example:...

Combining Google China Satellite Imagery and Amap in Leaflet

A few days ago, I used the Leaflet JavaScript module for a project that required maps. However, when searching for map data sources, I found that Amap's satellite imagery cannot be zoomed to high precision outside mainland China, showing no satellite imagery for that area; while Google China's satellite imagery lacks street information. After some research, I discovered that Amap's satellite imagery consists of two layers: the satellite layer and the street layer. Moreover, both Amap and Google China maps use China's "Mars Coordinate System" encryption, meaning their maps can be directly overlaid without misalignment. By combining Amap's street layer with Google China's satellite layer, we obtain an electronic map that supports high-precision zooming while displaying street information....

Illustration for Enabling Color Display in Bash

Enabling Color Display in Bash

The default Bash command line in Linux is always black text on a white background, which can appear somewhat monotonous. However, we can add a few lines of commands to make Bash display information in color. This not only enhances visual appeal but also helps highlight important content. Edit the .profile file in your home directory: nano ~/.profile ``` Add the following at the end of the file: export LS_OPTIONS='--color=auto' eval "`dircolors`" alias ls='ls $LS_OPTIONS' alias ll='ls $LS_OPTIONS -l' alias l='ls $LS_OPTIONS -lA' PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u\[\033[00m\]@\[\033[01;36m\]\h\[\033[00m\]:[\[\033[01;34m\]\w\[\033[00m\]]\$ ' ``` Save and exit, then either restart Bash or enter: source ~/.bashrc ``` You will now see a colorful command line....

A Hosts File to Block Putian Hospitals

In the 1980s, Chen Deliang from Dongzhuang Town became locally famous as an itinerant doctor treating skin diseases (scabies) using his self-developed folk remedies. He later took on disciples and expanded nationwide. Initially posting advertisements for sexually transmitted diseases and skin conditions on utility poles, they earned their "first bucket of gold" across mainland China before shifting to TV and newspaper ads. Their primary treatments included STDs, rhinitis, body odor, hepatitis, rheumatism, and skin diseases. The Putian system is primarily controlled by four families: the Zhans, Lins, Chens, and Huangs. These itinerant doctors initially contracted hospital departments,...

Illustration for Show Earth Satellite Images with PHP and Javascript

Show Earth Satellite Images with PHP and Javascript

The Himawari 8 weather satellite is one of the Himawari satellites made by JAXA, weighs around 3500kg and has an expected lifespan of over 15 years. The satellite was successfully launched on October 7, 2014 with the H2A rocket and is mainly used to monitor storm clouds, tsunamis, and active volcanos. After launch, in addition to preventing natural disasters, Japan also released photos taken by the satellite on the Internet, which can be downloaded by enthusiasts. The photo is released on the official website at http://himawari8.nict.go.jp/ m and is updated every 10th minute (like 9:30, 9:40...), with a 30-minute delay (the photo you see at 10:00 is taken at 9:30). Next, we're going to investigate how to obtain these pictures. With the network monitor functionality of the browser,...

How to Fix Slow OpenSSH Login

Today when connecting to an Azure China virtual machine, I noticed extremely slow login response. Even with a good network environment, it took over ten seconds to display the password prompt. After searching on Google, I discovered the issue was caused by DNS reverse lookup. OpenSSH performs a reverse lookup on your IP during login to determine if your IP is on the system's blacklist. However, China Telecom doesn't provide reverse lookup for residential IP addresses, causing OpenSSH to wait until the lookup times out before establishing the connection. The solution is simply to disable reverse lookup. sudo nano /etc/ssh/sshd_config # Add "UseDNS no" at the end of the file, then save and close sudo service ssh restart If the connection remains slow after this configuration,...

Using the Latest Version of Flash on Ubuntu Firefox

About a year ago, Adobe ceased new feature development for its Flash plugin on Linux systems, providing only security updates. The Linux version of Flash remained at version 11.2, while the latest Windows version had already advanced to 15.0. However, Adobe collaborated with Google to develop Pepper Flash, which is integrated into the Chrome browser. Both Chrome and its built-in Pepper Flash have consistently stayed up-to-date on Linux. This raises the question: Since Pepper Flash is exclusive to Chrome, how can we make it work in Firefox? Some hoped Mozilla would actively support Pepper Flash, but the Firefox development team rejected the proposal: https://bugzilla.mozilla.org/show_bug.cgi?id=729481 Consequently,...

Compiling and Installing App Inventor on Ubuntu

App Inventor is a simple Android programming tool developed by MIT. By dragging and dropping objects on a webpage and setting up code in a flowchart-like manner, you can generate your own Android applications. If you install App Inventor's companion software on your Android phone or tablet, you can modify the interface on your computer and see changes reflected instantly on your mobile device. MIT provides an online version of App Inventor accessible through email registration. However, their website runs on Google App Engine. As we all know, Google's services have poor accessibility in China. Therefore, it's best to install it locally for uninterrupted programming. Download the source code First, you'll need a GitHub account. Visit https://github....

Installing Closed-Source Driver for BCM4331 Network Card on Ubuntu

The Ubuntu system supports a wide range of devices out-of-the-box because it includes numerous open-source drivers provided by the community. However, open-source drivers often suffer from stability and performance issues compared to official drivers. Due to licensing restrictions, closed-source drivers cannot be bundled with the installation media, so users typically need to install them immediately after setting up Ubuntu. As noted by Zhihu user Deng Boyuan: http://www.zhihu.com/question/22776909 Windows消失后:一时间世界人民给石油工地的电脑装上Linux和新开发的Linux上的工业软件,但是圈内就石油设备的驱动问题分成两派,美国的开源原教旨主义者坚持在墨西哥湾的钻井平台上使用开源驱动,导致产能大大下降;大庆油田被cnbeta的技术宅装上了5种桌面8种发行版并逐一美化跑分,而且要用石油设备放个Bad Apple,...