Fix Post Resources

I use some liquid markups in Jekyll, they are not available in Hugo. I made a script to convert them: import re from pathlib import Path CURRENT = Path(__file__).resolve().parent posts = CURRENT.parent.joinpath(r"content\post") mds = posts.glob("*.md") for md in mds: content = md.read_text(encoding="utf8") target = [] # working: ![tree](/assets/Tree.png) for line in content.split("\n"): # ![img]({{ site.url }}/assets/sgame-new-match-ui.png) if "site.url" in line: line = re.sub(r"{{ *site.url *}}", "", line) # content = content.replace("{{ site.url }}", "") # print(line) elif "relative_url" in line: print("from:", line) # {{ 'assets/package-result.png' | relative_url }} line = re.sub(r"{{ *'(.+)' *\| *relative_url *}}", r"/\1", line) print(line) target.append(line) md.write_text("\n".join(target), encoding="utf8") I get some whitespace differences, but I git rid of them by: ...

January 10, 2025

Migrate to Hugo

Inspiration: https://nicolasfella.de/about/ Install scoop install hugo On Linux: - run: git submodule update --init --recursive - run: sudo apt -y install wget - run: wget https://github.com/gohugoio/hugo/releases/download/v0.140.2/hugo_0.140.2_linux-amd64.deb - run: sudo dpkg -i hugo_0.140.2_linux-amd64.deb - run: hugo Migrate create an empty directory, don’t store anything in it (yet) run: hugo import jekyll <jekyll dir> <new dir> deploy I use firebase hosting. it’s great. after thoughts I run to issues when use ruby. more on that later. Old blog was still functioning: https://blog-sodacris.web.app/

January 10, 2025

Venture back to Cpp and Qt

Prologue I realized that my Windows knowledge was insufficient. A hate to Windows comes from the fact that I don’t understand it - that includes Win32 app. looking back - first job My first Job was for Win32 app. The entry test was to write a MFC calculator. (I remebered that a girl failed that test. Where she is now?) After that I changed some UI. Then I was instructed to do some testing. The code was hard to understand. And what they are doing makes no sense to me. The hardware was bad. There is no internet. The house was bad. ...

December 31, 2024

Tech setup in the city

Initial setup Got my computer. unpacked. Plugged in. Boot! First is OOBE. First use this to Bypass the network. Then create two accounts: One for Admin, another for local user. The default OS comes with an Windows 11 home license. In this mode you can’t change display language, and there are other limitations. Go to Taobao (Aliexpress) and buy a Pro license! You can seek guidance with the customer service. For my experience, I bought the wrong key, and have to buy another upgrading-key. ...

December 17, 2024

Moving to city center

Start Old sayings goes: A cunning rabbit has three burrows. Well I only have one. so I’m trying to make a second. Go I go to my old rented house at city center, hoping to improve it. Matress is very important. The first several days are hard. Then the fitted sheets are the turning point. The silk feeling, the easy to clean, are way better than the flat sheets. My mother make a living by spinning. I understand it’s importance now. ...

December 17, 2024

Why I'm closing your Github Issue

Just watched this. The idea of Unobtrusive JavaScript was great.

December 3, 2024

Job research, C#, and other stuff

Job search As I reading I find some words about perform a job analysis. I does that and find that a newly founded company is looing for C# programmer. After some search I found another nearby company is looking for C# programmer too. It remind me of v2rayN. It looks like that it was built using C#. about C# I’m against Microsoft products. I don’t know why. But over the years I tried to avoid Microsoft technologies as much as possible, such as Visual Studio. ...

December 2, 2024

Remove GitHub Pages (or switch to Firebase Hosting)

When learning stuff, I always want to try it on my personal blog, such as styles, and colors. Recently I read about [color contrast][1] and want to try it. However, I find my styles didn’t apply. I login to server and restarted all apps. I changed css in generated site. I forced referesh in browser. Nothing works. Finally I realized that it might be cloudflare issue. I logged in and find caching was enabled again. ...

December 2, 2024

Using css layers and L/a/b to create a dark theme

Well for a long time dark theme is a pain. Recently as I learning CSS, I find that css layers can help. I also spend a lot time inspecting Google custom search engine styles. The @layer is available since March 2022, so it’s pretty new. The result is as follows: github.com. But some colors are too bright. L*a*b color space Then I find that there are some color system as Lab. It’s using 4 basic colors, and L channel can adjust brightness. ...

December 1, 2024

Retry Flutter another time

Well I retried flutter. I realized it’s open source, so I downloaded its source. First I want to use MinGW. I find it’s source for Visual Studio. I changed but it didn’t work. I inspected the script. Start script is using cryptic bat. So I spend a fair amount time rewrite it using PowerShell: https://github.com/flutter/flutter/compare/master...soda92:flutter-fork:pwsh-script Then I realized there are some timestamp thing. I deleted them and it recompiles. But then I find that there is a flutter engine. It’s prebuilt using VS. rebuild it would be much pain. ...

November 30, 2024