R's Workshop

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

Difference between Docker Save and Export

Docker 提供兩種輸出 image/container 成壓縮檔的方式: save/load 和 export/import 主要的差異是: docker save 將 docker image (包含 parent layers, tags, versions) 轉成壓縮檔, docker load 將還原所有的 layers 資訊 docker export 將 docke... Read more

Array Initialization with Named Initializers

C99 之後提供了 named initializers 功能. 在初始化 array 時, 可以透過 enumuraion constant 來設定 array 特定欄位的初始值. 但要注意的是, C++ 不支援此功能. Read more

Use Vim to Diff Two Directories

Command line 用習慣了, 所以想在 Vim 上做出像是 Meld 一樣的 directory diff 功能. 基本上只要裝一個 dirdiff vim plugin, 就可以做到囉. Read more