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

A tree

November 28, 2024

Package MSYS2 application to end users

You can use ldd to view dependencies, then copy the related dll: https://web.archive.org/web/20240620214721/https://janw.name/posts/3-msys2-dlls/ Here is an example makefile (please use the code in solution https://stackoverflow.com/a/60906375/12291425, or use this gist): it can save a hassle; create a file named GNUmakefile or Makefile and paste the content, then run make dist: targets := prog.exe my_library.dll my_plugin.dll CXX := g++ CXXFLAGS := -c -g -O0 -MMD -pedantic -Wall -Wextra -Wconversion -Wno-unused -Wno-unused-parameter -Werror -Wfatal-errors -UNDEBUG -std=c++17 -Wno-missing-braces -Wno-sign-conversion all: $(targets) .PHONY: all %.dll: %.o $(CXX) -shared -g -O0 -o $@ $< # by implicit rule, my_plugin.o will be compiled from my_plugin.cpp # by implicit rule, my_library.o will be compiled from my_library.cpp prog.exe: prog.o my_library.dll g++ -o prog.exe prog.o -g -O0 -L. -lmy_library files := $(wildcard *.dll *.o *.d *.exe) distfiles := $(wildcard dist/*.dll dist/*.exe) clean: rm $(files) 2>/dev/null || true rm $(distfiles) 2>/dev/null || true .PHONY: clean dist: all rm -r dist 2>/dev/null || true mkdir dist 2>/dev/null || true cp *.dll *.exe dist @# extra $ is needed in awk in makefile cd dist; ldd $(targets) | grep /ucrt64 | awk '{print $$3}' | xargs -i cp {} . @# if you make sure you are running UCRT, you can remove the following line cd dist; ldd $(targets) | grep /mingw64 | awk '{print $$3}' | xargs -i cp {} . cd dist; explorer . || true .PHONY: dist To clean up, run make clean. ...

November 25, 2024

Flutter retry

I have followed the NDC conference, and recently they uploaded many new videos. It’s because Copenhagen Developer festival. One vide caught my interest: https://www.youtube.com/watch?v=2cduK6oGBMI Seems very great, and firebase is free. I have already know flutter in College. but it’s been years, mabye it has become better? So let’s go: install I have already installed Android studio. The next is Flutter SDK and Firebase SDK. The tutorial suggests VSCode Extension, it will install Flutter automatically. ...

November 19, 2024