因為工作會同時 ssh 好幾台 server, 常常不小心在錯的 server 上下指令 … “Orz 為了避免認錯 server, 只好在每台 server 的 bash prompt 設定不同顏色作為識別. 基於每次改顏色都在網路上亂找, 這邊紀錄一下常遇到的問題. Read more 22 Mar 2022 - less than 1 minute read
Google 的 git-repo 在 v2.19 後修改了每個 git project 的 .git/ softlink 方式. (參考 commit 2a089cf.) 這造成我用 docker 的 overlayfs 特性省 source code 空間的手法 (mount .repo 進 docker container) 失效. 所以目前的 workaround 方法就是指定 re... Read more 16 Mar 2022 - less than 1 minute read
使用 Gerrit 管理 git projects 時, 使用者的 commit 會先 push 到一個 review branch, 形成一個 Gerrit change. 等 review 和 CI 流程跑完 (reviewed+2/verified+1), 使用者從 Gerrit submit change 後, commit 才會正式 submit 到 git repository ... Read more 15 Mar 2022 - 1 minute read
Linux 預設一個 page 的大小是 4KB. Macro PAGE_SIZE 定義在每個 arch 的資料夾下 但在 embedded system 上, 為了有效使用記憶體 (e.g. 避免 internal fragmentation), 有可能會修改 PAGE_SIZE. 除了直接看 code 外, 這裡提供兩種方法從執行中的系統中確認 page size. Read more 23 Feb 2022 - less than 1 minute read
這篇紀錄一下 Dockerfile 中 ADD 和 COPY 使用上的差異. 先講結論: 除了新增一個需要解壓縮的檔案到 image 時使用 ADD 外, 絕大部分的情況下都建議使用 COPY. Read more 21 Feb 2022 - 1 minute read