The problem: on my M2 mac mini with a Logi Ergo MX bluetooth mouse, every time I make the mac mini to sleep, it immediately wakes up, which I guess is caused by the mouse. So I need to turn off the mouse first, then use keyboard shortcuts to make the mini sleep.

The steps:

System Settings –> Keyboard –> Keyboard Shortcuts … –> (Left panel) App Shortcuts –> “+” –> Select “Application” as “All Applications”, “Menu Title ” as “Sleep”, and “Keyboard Shortcut” as what key combination you press, e.g. Shift + Option + Command + S

First, confirm if zswap is supported (“y” means yes)

# cat /boot/config-`uname -r` | grep -i zswap

Next, check if it’s enabled (“N” means no)

# cat /sys/module/zswap/parameters/enabled

If the above result is “N” (no), then enable it

echo Y | sudo tee /sys/module/zswap/parameters/enabled

Now check again and it should be enabled

# cat /sys/module/zswap/parameters/enabled

Amazon no longer provides the option to filter by specific sellers. I mostly buy items sold and ship by itself. Well, the current fix is adding the below string to the end of browser URL:


For example, when searching “nvme enclosure”, the default URL is like below, and it lists mostly 3rd-party sellers:

But if you add “&emi=ATVPDKIKX0DER” to the end of above URL:

now the searching results are sold by itself.


The problem:

I’m using a 2015 MBP Pro, and I can SSH into a Ubuntu 22.04 desktop computer (with OpenSSH) in the same WiFi LAN.

After I suspend the Ubuntu machine, I want to wake it up from macOS.

The solution:

1. On Ubuntu machine, enable wake-on-wireless-lan (WoWLAN)

iw phy0 wowlan show
# if it shows "WoWLAN is disabled"
sudo iw phy0 wowlan enable magic-packet disconnect
iw phy0 wowlan show
# now it should show WoWLAN is enabled

Also, get the MAC address for later use

ip addr show $(awk 'NR==3{print $1}' /proc/net/wireless | tr -d :) | awk '/ether/{print $2}'

2. On macOS machine, use wakeonlan command to wake up

# if wakeonlan not installed
brew install wakeonlan

The problem: after “Check for updates…” and “Update now”, VS Code for macOS never restart or actually update (after it is manually restarted). This problem was reproduced on macOS 10.15.4 and VS Code 1.41.0

The solution: run

$ sudo rm -Rf ~/Library/Caches/


This SO post has a good explanation of what `afterEvaluate` does. Just a quote:

The afterEvaluate is useful in the root gradle file of a multi project build when you want to configure specific items based on the configuration made in subprojects

Please backup you data. No joking. I messed up my boot loader and lost my 16.04 Ubuntu once.
My system config is different from yours, so please understand (and may change) every steps before you execute it.

Also note: both Ubuntu 18.04 and Windows 10 use UEFI mode boot.

I have a Dell XPS 13 (9343) with Ubuntu 18.04, and I want to install Windows 10 on it.

Step 1. Allocate space for Windows installation
I used GParted to reduce the size of my existing Ubuntu partition, so I can allocate space for Windows. (Because the Ubuntu partition is for boot, I used Ubuntu’s tool Startup Disk Creator to create a LiveCD to boot from first).
After resizing /dev/sda* (the partition for my Ubuntu installation), I got 80GB unallocated space on my disk /dev/sda.
(Note: I suggest to create a FAT partition from this unallocated space first. If leave it unallocated, I got some error in Step 3 when installing Windows, so I need to get back to GParted again to create a partition).

Step 2. Create Windows USB boot media
I tried the method in this detailed article how to create Windows 10 bootable USB on Ubuntu, but my XPS 13 can’t boot from the created USB.
Finally I need to first create a Windows 10 VM in VirtualBox, and then use the official Create Installation Media Tool from Microsoft. This is a bit tedious. So I suggestion you to try the above linked method first. Only note is, if you are using a recent ISO with larger than 4GB files, you need to format the USB as NTFS.

Step 3. Install Windows 10
Use the created USB bootable to install Windows on the unallocated space (or new created partition, see Notes in Step 1).

After successfully installed Windows 10 and reboot, on my XPS 9343 I can press F12 to enter the boot menu, and select either “ubuntu” or “windows” under the UEFI boot menu.