Just Writing Something

A record of blog improvements, including multilingual support, SEO optimization, and a personalized logo generated by ChatGPT.

 · 2 min · 289 words

Short URL in Hugo

A guide to implementing short URL redirects in Hugo static sites, featuring both manual HTML redirect pages and an automated Go-based solution for generating redirect pages.

 ·  · 2 min · 288 words · ringsaturn

Auto center with caption for images in Hugo

Create a file: layouts/_default/_markup/render-image.html: 1 2 3 4 5 6 <figure class="align-center "> <img loading="lazy" src="{{ .Destination | safeURL }}#center" alt="{{ .PlainText }}" > {{ with .Text }} <figcaption><p>{{ . | safeHTML }}</p></figcaption> {{ end }} </figure> Then magic happens: 1 ![sample](https://blog-assets.ringsaturn.me/pic/nmc-bin/RADAR_L3_MST_CREF_GISJPG_Tiles_CR_20250126_13_06_3_2_6.png) Render as: sample

 · 1 min · 45 words · ringsaturn
China’s first WSR-88D Doppler weather radar (Image source: [The Paper](https://www.thepaper.cn/newsDetail_forward_26004388))

Historical Fragments of China's Meteorological Radars

Some historical fragments discovered while researching.

 ·  · 11 min · 5139 words · ringsaturn

Better Python Project Maintenance

This article introduces two major pain points in Python project maintenance\nand their solutions: 1) Passwordless publishing using PyPI’’s Trusted Publishers\nwith GitHub Actions, and 2) Ultra-fast dependency locking with the uv tool. It also\ndiscusses version management when depending on machine learning frameworks like\nPyTorch, providing specific configuration examples.\n

 · 4 min · 676 words · ringsaturn

What Does the Python Version Number x.y Actually Mean?

At work, we use uv to manage Python projects, which allows us to quickly install dependencies and lock sub-dependency versions. After returning from a period of leave, I routinely updated the packages on my computer and noticed that uv had a new version, so I updated it. However, after updating the uv.lock file in a project, I found that many wheels for dependencies had disappeared from the lock file. For example, here’s the configuration of the pyproject.toml file: ...

 · 3 min · 441 words · ringsaturn

Better work status

I want to share 2 storirs about me on handling work status: Short term remote work Get more focus time in the morning Life in Suzhou Back in the summer of 2021, my house rental was canceled by the owner, and I had to move to another place. By then, the renting prices in Beijing were too high for me to rent a house. Fortunately, I was lucky enough to book a house one month after my current house was canceled. So, I needed to find a place to live for one month. My friend decided to move to Suzhou, a city near Shanghai, which is much more affordable than Beijing. For a month, I sat in a coffee shop and worked remotely. ...

 · 3 min · 509 words · ringsaturn

Publish crates documentation to GitHub Pages

 · 1 min · 127 words

Building a High-Performance Elevation API

This article is reposted from Building a High-Performance Elevation API At ColorfulClouds Technology(彩云科技, “cai yun” in Pinyin for 彩云), we are committed to providing users with meteorological data at higher temporal and spatial resolutions. Over the years, we have consistently faced a challenge: due to limitations in elevation data resolution, outdoor activity enthusiasts, particularly those involved in hiking and cross-country activities, often experience noticeable discrepancies between ColorfulClouds’ data and their actual experiences. This issue is especially prominent in mountainous and plateau regions with dramatic elevation changes. ...

 · 3 min · 1040 words · ringsaturn

Creating Elevation RGB Tiles Around Mount Fuji

TLDR A few days ago, while searching for information, I discovered MapTiler’s elevation profile visualization page, which works excellently: This is really well done, and it’s entirely implemented in the browser https://t.co/R1vQMbdYAo pic.twitter.com/IyTYy5Fxo1 — ringsaturn.me (@ringsaturn_me) January 10, 2024 On their official blog, I found a 2019 post mentioning that the technique encodes elevation data into the RGB channels of an image and then decodes it in the browser. This allows elevation visualization directly in the browser—especially for continuous profile data—by downloading a few images to plot a continuous elevation curve. ...

 · 5 min · 871 words · ringsaturn