Jiayu's Blog

Blog subtitle

A shell command to list all Go versions

Here's a shell command that will list all available Go versions similar to the output of rbenv install -l or nvm ls-remote: wget -q -O- golang.org/dl | sed -n -E 's/.*toggle(Visible)?" id="(go.*)">/\2/p' | sort | uniq Running it gives the following output:

Radar overlay and timestamping with ImageMagick

On the Rain Areas page at the Meteorological Service Singapore website, you can see exactly where it's raining in Singapore at the moment: http://www.weather.gov.sg/weather-rain-area-50km/ The page is updated at five-minute intervals. It's useful for determining whether it'll start raining soon—it's more likely if it's already raining in your immediate vicinity.

Quick URL to ASN lookups

I'm often curious about how various websites are hosted. One piece of information which can give you a clue is the autonomous system (AS) which the IP of the website falls under. We can use a combination of tools to find this.

Telegrammetry: Stats for Telegram

Last week, I set up a short pipeline comprised of a Python script which received updates from the Telegram API and logged them, Filebeat to ingest the output into Elasticsearch, and a Kibana dashboard to visualise the data. Here's what the dashboard looks like:

Methods for obfuscating sequential IDs

Auto-incrementing integer IDs are often used as unique row identifiers in many databases, whether specified explicitly by the user or implicitly by the database engine. These sequential IDs may be a source of information leakage, allowing third-parties to infer statistics about or simply enumerate your data.

Life and death in black and white

After my previous post on PBM and PNG images and ImageMagick, I was interested in doing some more image manipulation, and decided to explore ways to create PNG files by generating visualisations of elementary cellular automata. This post provides some background information about cellular automata before that.

A simple HTTPS reverse proxy

Over the past decade, there has been a concerted push towards HTTPS across the internet. On many platforms, setting up HTTPS is usually a single click away or even automatic, in no small part thanks to the rise of Let's Encrypt making certificates much more accessible.

vi mode

Recently, I read an article about the history of the Vim text editor: Where Vim Came From Tracing the long lineage of software that brought us Vim. https://twobithistory.org/2018/08/05/where-vim-came-from.html I found the following excerpt from the article rather amusing:

Hosting your own web fonts

I've replaced Source Code Pro with a variant of Iosevka as the monospace font for my blog theme! While Source Code Pro is available on Google Fonts and could be included from there with a single line of code, Iosevka wasn't, so a bit more work was needed.