R's Workshop

Gerrit Submit Types vs. Git Commands

使用 Gerrit 管理 git projects 時, 使用者的 commit 會先 push 到一個 review branch, 形成一個 Gerrit change. 等 review 和 CI 流程跑完 (reviewed+2/verified+1), 使用者從 Gerrit submit change 後, commit 才會正式 submit 到 git repository ... Read more

Linux Page Size

Linux 預設一個 page 的大小是 4KB. Macro PAGE_SIZE 定義在每個 arch 的資料夾下 但在 embedded system 上, 為了有效使用記憶體 (e.g. 避免 internal fragmentation), 有可能會修改 PAGE_SIZE. 除了直接看 code 外, 這裡提供兩種方法從執行中的系統中確認 page size. Read more

Difference between Docker ADD and COPY commands

這篇紀錄一下 Dockerfile 中 ADD 和 COPY 使用上的差異. 先講結論: 除了新增一個需要解壓縮的檔案到 image 時使用 ADD 外, 絕大部分的情況下都建議使用 COPY. Read more

Use Multi-stage Builds to Generate Smaller Docker Images

縮減 image size 除了使用之前提到的 docker export/import 方法外, 另一個作法就是使用 docker 在 v17.05 開始提供的 multi-stage builds 來建制 docker image. Read more

Linux Timestamp: atime, mtime, ctime

Linux 的檔案有三個 timestamp: atime: the time of last data access mtime: the time of last data modification ctime: the time the file status last changed Read more