# Tips 因為我很懶,這邊就當我的筆記本,長話短說,就留下一點點小筆記 - Windows XP 並沒有支援 C++17 的讀寫鎖 - 因為 [AcquireSRWLockExclusive](https://learn.microsoft.com/en-us/windows/win32/api/synchapi/nf-synchapi-acquiresrwlockexclusive) 是從 Windows 7 才開始支援 - Gnome 43 在 Wayland 的 system tray 幾乎都會失效。解法:appindicator + libappindicator - GTK 2 跟 3 都要裝 - MSVC17 的 range-base loop 對於 attribute 有 compiler bug - [細節](https://developercommunity.visualstudio.com/t/compiler-bug-on-parsing-maybe-unused-in-range-base/209488) - podman (應該說是 user namespace 中的 sub-uid 問題) - sudo usermod --add-subuids 10000-65536 ${USER} - sudo usermod --add-subgids 10000-65536 ${USER} - podman system migrate - Ubuntu 的 /bin 是 softlink 到 /usr/bin - ![](https://i.imgur.com/birKnjy.png) - 然後我在我 bin 的 app 裡面用到 ../xxx 就跟預期不同 = = - boost regex 底層疑似有用到 \_\_libc_single_threaded 這讓我移植 alpine 困難 - [\_\_libc_single_threaded](https://www.gnu.org/software/gnulib/manual/gnulib.html#Glibc-sys_002fsingle_005fthreaded_002eh) - Python generator object 在 one-line for loop 取出來的值有一層 generator 包裝 - 也就是說這兩個不相同: - `l = [].append(fn for _, fn in getmembers(module, isfunction))` - ```python l = [] for _, fn in getmembers(module, isfunction): l.append(fn) ``` - ![](https://i.imgur.com/c7ghzHx.png) - 寬螢幕英文是 ultrawide screen, 有個可以控制 window 版面的 gnome 工具叫做 gtile - TLS in Windows before vista - https://learn.microsoft.com/en-us/windows/win32/dlls/using-thread-local-storage-in-a-dynamic-link-library - http://www.nynaeve.net/?p=189 - Grub 在 2023 Dec 20, 即 2.12 版,default enable shim-lock 會讓沒有支援 shim-lock 的機器壞掉,[GRUB Manual 2.12](https://www.gnu.org/software/grub/manual/grub/html_node/UEFI-secure-boot-and-shim.html) - 緩解措施是 `--disable-shim-lock` - https://bbs.archlinux.org/viewtopic.php?id=287024 - ![image](https://hackmd.io/_uploads/SJWr1WAqT.png) - https://wiki.archlinux.org/title/Unified_Extensible_Firmware_Interface/Secure_Boot - https://www.cnblogs.com/wswind/p/archlinux-secure-boot.html - 有時候 mirror 會爆炸,但我懶的自己敲 - `sudo reflector --verbose --latest 5 --sort rate --save /etc/pacman.d/mirrorlist` - ubuntu 太舊 mirror 沒了 - `sed -i -e 's/archive.ubuntu.com\|security.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list`