Preface

Metabase is an open-source data analysis tool that is easy to operate and can connect to various data sources. Although its data analysis capabilities are not as powerful as Excel, Metabase is sufficient for daily use. Moreover, I am more capable of writing SQL than clicking Excel sheets, so Metabase is a good choice for me.

Read more »

For developers, installing MySQL isn’t difficult, but it often involves several steps. I’ve documented a Docker Compose template that can directly launch a pre-configured MySQL container for development.

Docker compose

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
version: '3'
services:
mysql:
image: mysql:5.7
container_name: mysql
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: '123456'
ports:
- 43306:3306
volumes:
- mysql_data:/var/lib/mysql
command: mysqld --character-set-server=utf8 --collation-server=utf8_general_ci --character-set-client-handshake=FALSE
healthcheck:
test: out=$$(mysqladmin ping -h 127.0.0.1 -u root --password=$$MYSQL_ROOT_PASSWORD); echo $$out | grep 'mysqld is alive' || { echo $$out; exit 1; }
start_period: 0s
interval: 5s
timeout: 3s
retries: 2

volumes:
mysql_data:
external: true

Configuration Explanation

Read more »

Introduction to Glances

There are many configurable widgets in Dashy, among which the most practical one is resource monitoring. Displaying CPU usage on the panel is not useful for me —— I am more concerned about which program is causing high CPU usage. However, the Glances software on which this feature depends is very practical.

Glances is similar to the top command, which can display system resource usage. However, it is better in the following aspects:

  • More comprehensive and user-friendly data display;
  • It can display the resource usage of each container —— in this respect, it surpasses Portainer. Portainer can only display the resource usage of one container in chart form.
  • It can run in server mode. We can monitor resource usage through a browser, which is very convenient.

image-20240408112645115

Glances is relatively lightweight, only displaying the current resource situation without recording historical data. And what I need is precisely this kind of lightweight yet comprehensive resource monitoring software.

Read more »

Preface

Dashy is an open-source customizable dashboard software that requires self-deployment. My use case is to place links of frequently visited websites. This post mainly documents some problems encountered during installation and usage.

Installation

Read more »

Preface

Recently, I’ve been using Python to write web crawlers for downloading manga (see previous posts on LANraragi). A typical page of a manga like this:

image-20240329132644183

All the data on this webpage can be retrieved using BeautifulSoup, and only one communication is needed per page. However, downloading images is different: each image requires a separate communication, and the response body is often quite large. Obviously, images don’t need to be downloaded sequentially, otherwise, it would waste a lot of time.

AIOHTTP is an asynchronous HTTP client/server module, which is very suitable for this scenario. Through asynchronous programming, it can maximize the performance of the network (and the server). This article focuses on introducing the basic usage of AIOHTTP, without going into details about how it works.

Read more »
0%