Running xUbuntu on a SDCard

Finally, I decided to install xUbuntu on a 256GB SDCard as the 16GB built-in emmc drive on a chromebook (Dell P22T) is too small for a desktop system.

Undoubtly, SDCard is slow and easier to be broken. So I took the following actions to the file system and hope they can help solve both issues:

  1. Turning off atime.
  2. Disabling the journal feature.

GitHub: [support question] How to find all my comments #58062

XUbuntu Fix long beep after a few minutes playing a video or audio

sudo vim /etc/modprobe.d/alsa-base.conf
# add this line at the end of the file & save
options snd_sof sof_debug=1

Reference

SqlSugar: Connection open error . The given key '25971' was not present in the dictionary.

Solution: put charset=utf8mb4 into the connection string.

My New Productivity Hacks

Muscle Memory Makeover

Docker just streamlined Docker Compose by integrating it as a plugin. Great news, but it means us old hats need to retrain our fingers. Here's a quick fix for your .bashrc to keep things smooth:

alias docker-compose='docker compose'

MySQL in a Flash

As a programmer and Linux admin, I juggle multiple MySQL servers with different group suffixes. Typing --defaults-group-suffix every time was a drag. This handy bash function saves the day:

m() {
  mysql --defaults-group-suffix=$1
}

Now, connecting to a database is as easy as:

m specific-suffix

This keeps your workflow concise and saves you precious keystrokes. Put them into you .bashrc or .zshrc now and let our life easier!