/images/avatar.png

A software developer with 14+ years of experience.

I focus on Windows desktop application development in C/C++ with Visual Studio.

Force Open Links in Corresponding Native App in iOS

Since Twitter changed its name to X, I can no longer tap on twitter.com links in my iPhone to open them in the native twitter/X app, but instead it just launches the default browser and opens the link. This is really annoying. I have tried restarting my iPhone several times, and even uninstalled and reinstalled X, but all to no avail. Until I found this post: Why in the heck can’t I get twitter links in discord or texts to open in the twitter app instead of browser?

Snap windows

Some users in the company forum complained that it was not easy to arrange document windows so that they can nicely tile with each other. Although there is already a built-in tile feature provided by the MFC framework, they want a way to resize adjacent windows all together. I was assigned to implement this in Origin and I immediately realize two things: This is somewhat due to the limitation of Origin still using the MDI framework.

Export data from Wacai app

I have been using Wacai app for 8 years. Maybe because of habit, I have not changed to use other apps. However, recently I can’t stand the splash ads. Oftentimes if my phone shakes a little when opening the app, it jumps to the ad page. So I started to think about exporting the data. But this app requires a membership to export data. I guess user data is the product itself.

Open repo in WSL with Git Extensions

I cloned a repo in WSL in order to build an OpenWrt firmware, but I couldn’t open it with Git Extensions: Even after clicking on the Trust this repository button, it still fails to open. I fixed it by manually running this command: 1 git config --global --add safe.directory '%(prefix)///wsl.localhost/Ubuntu/home/kenny/immortalwrt-mt798x' Reference: https://github.com/gitextensions/gitextensions/issues/9954

Recover deleted ZeroTier member node

The problemI accidentally deleted the wrong member node in my ZeroTier network. Unfortunately the node is running on a router with OpenWRT installed which is far away from my place, I have to devise an easy way for my parents to help me set it up again. The troubleBased on some research online and my observation, my understanding is that once you deleted a member node, it’s also banned from re-joining the network.

Using key-based authentication for SSH

1 Generating key pairOn Microsoft’s website there’s already a post for this: https://learn.microsoft.com/en-us/windows-server/administration/openssh/openssh_keymanagement Run PowerShell with administrative access. Run ssh-keygen to generate an RSA key pair. 1 PS C:\Users\kenny> ssh-keygen You will be prompted to enter the file location. I use id_rsa_test here. 1 Enter file in which to save the key (C:\Users\kenny/.ssh/id_rsa): C:\Users\kenny\.ssh\id_rsa_test Then enter a passphrase to protect the key. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in C:\Users\kenny/.

Auto renew SSL certificate with ZeroSSL through acme.sh in Synology

1 Register a ZeroSSL account and generate EAB credentialsHere’s the link to create EAB credentials: https://app.zerossl.com/developer 2 Create a scheduled task to run a script that auto renew the certificate 2.1 Prepare the script and folderCreate a folder /volume1/docker/acme Put this script in the folder and name the script file as my_update_ssl.sh. Note: I am using 5001 as HTTPS port for my DSM, you may change it or remove it if you use HTTP instead.