Skip to content

Category: Tech

all about software engineering and technology

How to play Steam/Nintendo Switch online games in China with international servers

I like to play online games. But when I came to China, I realized that not only China has a Great Firewall (GWF), but China also have a separate account system. All game accounts in China can only be used in China, and your international game accounts (steam account in my case) must be connected to a China account (Perfect World account/完美世界). That also mean some games have separate version for China and outside China (international). For example, CSGO and Dota 2. Play Steam/Nintendo Switch online games in China Basically you have two options playing online games in China like…

1 Comment

Javascript Donut Animation

Couple of days ago I watched a Youtube video about donut animation by Lex Fridman. So I decided to copy-pasted his code and made a Javascript’s requestAnimationFrame( ) version of it. Since I didn’t make any delay for the animation, I was surprised how the browser can keep the frame rate around 60fps in my laptop. 🙂 Original donut article made by Andy Sloane at Andy made a great explanation about the algorithm, and even made an optimized version of it (without math sin/cos library) here: Live version: Github code: – tt-

Comments closed

Javascript Bezier Curve Animation Library

I wrote a Javascript bezier curve animation library. I can’t seem to find any javascript bezier animation library that can handle multiple degree, so I made one myself. You can download it from the github here: Live example You  can see the live example here: You can download the live example html file (or clone it from the github repository), then dissect the content inside. The usage is pretty simple, and I think it should cover most custom animation cases. I use requestAnimationFrame( ) method for a better performance (it will be paused when the tab is inactive…

Comments closed

WeChat Mini Program wx.reportPerformance Library

Github link: Tencent’s WeChat Mini Program has a very robust native performance report tool. But I can’t find any library/util functions that utilize this tool. So, I decided to make one for my own usage, and as well make a tutorial on how to implement it in your projects. You can start by download the code from my repository here. The code should run out of the box in the WeChat Devtool. Make sure you’re using the latest version of WeChat devtool. About wx.reportPerformance wx.reportPerformance function can send performance data from client’s device, which means the data provided will…

Comments closed

How to Use Magic Mouse 2 with Windows 11

TLDR: Driver link I just purchased a space gray magic mouse 2 this week. A lot of reviews saying that magic mouse has terrible ergonomics. But my work requires me to do a lot of scrolling, either for browsing internet or viewing design files. So, I decided to get myself a space gray magic mouse 2. Despite the fact that Apple discontinuing their space gray accessories. The package came with some bonus accessories, such as black charging thunderbolt cable, mouse pad, small mouse pouch, and also black matte surface protector, pretty neat 🙂 Everything was perfect when I connected…


Naive String and Boyer Moore Javascript Implementation

Github link: I need a string search algorithm in one of my frontend project. String.protoype.indexOf( ) is of course good. It also accept start index as a second parameter. I made a simple function with indexOf( ) that return array of indexes. While googling about this topic, I found some interesting algorithms, which naive string search and boyer moore. So, I decided to try implementing both out of curiosity. Naive String Search Being the simplest string matching algorithm, I can’t find any research paper who developed the algorithm. Probably this method is the default method every freshmen at…

Comments closed

How to Update to Windows 11 beta

Yesterday I received an email about Windows 11, they made an announcement that their beta is now available in the Beta Channel. You can read their original post here. I decided to give it a go~ Update to Windows 11 beta steps: Make sure to make a backup of your files before you begin with the whole process You can enroll for Windows Insider program notifications here, after you enroll to the program, you will get the latest updates about Windows 11 Go to Settings, search for Windows Insider Program. Click Get Started, and choose your Insider Program channel. Here…

Comments closed