Saturday 10 June 2023

Disable Laptop Touch Pad in PowerShell

Why do I need this script?

If you hate your laptop's touchpad like I do, high chances are you have a crappy "HID-compliant touch pad" like me. I got them on two of my Dell laptop. But don't worry, here is how to disable it through a simple script.

1.Simply run `Set-ExecutionPliicy Unrestricted` in PowerShell as Administrator

2.Download this script and righ lick to run in powershell.

3.Run it again if your touchpad is back to live.

If the script doesn't work for you

1.Find your touchpad's device name in Device Manager. It's normally listed under "Human Interface Devices"

2.Change the "$DeviceName" in the first line of the script.

3.Right click the script and "Run with PowerShell".

Why don't use "Scheduled Task" to run this script on system boot?

My touch pad "revives" after the system wakes from sleep, and I have to manually enable and disable it again. This script is more convenient.

Besides, sometimes I have to use the touchpad when I'm outside, and the reviving "feature" can be convenient.


I Left Grammarly for ChatGPT

A few months ago, I realized that ChatGPT had a much better ability to polish my English writing, and since then, I haven't opened Grammarly even once. If one day ChatGPT replaces Grammarly, I will be happy.

To my knowledge, many students and researchers in China who are non-native English speakers rely on Grammarly to find grammar errors and improve their writing. However, the price is about $30 per month or $12 if paid annually. What it provides seems very limited nowadays compared to ChatGPT. Besides, I dislike that they never offer any kind of education discount despite their huge student user base.

Many people, myself included, are praising ChatGPT. It is excellent in many ways and deserves this praise, but I think it's more like the existing solutions are too bad, which makes ChatGPT seem so great.

After Failing the CSC Scholarship

Recently, I applied for the Chinese Government Scholarship and unfortunately, I did not make the cut. While my family and friends are trying to comfort me and see it as a failure, I am actually relieved.

The application process was long and the waiting period was even longer. But now that I didn't get the scholarship, I can see it as a blessing in disguise. One of the requirements of the scholarship is a two-year service period back in China after graduation. While this may seem like a small price to pay for a fully-funded scholarship, it would have tied me down to a specific career path and location for at least two years.

Now that I am not bound by the scholarship, I am free to explore my options and choose a career path that truly aligns with my interests and passions. I can also choose to work in any location without any restrictions.

So, to all the scholarship applicants out there who didn't make the cut, don't give up. Keep pushing forward and trust that everything happens for a reason. Who knows, maybe your failure will lead you to even greater success in the future.

Another ChatGPT UI

I finally finished writing my react based ChatGPT UI. It's purely frontend, this mean I don't need Docker or Vercel or any other similar service to use it, instead only a static file server is enough.

While it is a simple piece of software, it is a significant accomplishment for me. After almost a decade, I have finally picked up JavaScript again and created a small piece of software! You can access the code on GitHub (you will need a API key from OpenAI).

I have attempted to relearn JavaScript (mainly the new frameworks) numerous times in the past, but I often found myself falling into the "tutorial hell." Whenever I encountered even the slightest problem, I would start Googling "xxx sucks" or "xxx alternative." Unfortunately, I would frequently come across individuals promoting a new framework as the ultimate solution, claiming that it was "much better than xxx."

When I'm about to switch to a different framework again, I stumbled upon a YouTube video discussing common mistakes programmers make, including falling into the dreaded "tutorial hell." This made me realize that I had been stuck in a cycle of constantly following tutorials without truly understanding the concepts behind them. In an effort to break free from this cycle, I made the decision to stick with React and resist the temptation to switch frameworks yet again. Although I faced numerous challenges with JavaScript, React, and MUI, I persevered and pushed through.