R's Workshop

GCC Switch Fallthrough Warning

GCC 7 之後多了一個新的 warning 選項, -Wimplicit-fallthrough, 檢查 switch 中的每個 case 的最後一個 statement 是否為 break 或 return. 若程式邏輯需要 fall through 的話, 需要加特殊的註解, 來避免 GCC 產生 warning, Read more

Detect Lgoin via SSH in Shell

讓 shell 在 SSH 登入時換個顏色區分, 避免 SSH login 遠端時, 因為 hostname 長得太像而將指令下在錯誤的 shell. Read more

Multipass: Ubuntu VMs on Demand

Multipass 是 Canonical 打造的 hypervisor-based virtualization 工具. 目的是讓使用者在不同平台上 (Windows, Mac, and Linux) 都能快速建立 Ubuntu VMs. Read more

Create Branches with Git-Repo

Git-Repo 可以用來同時管理多個 git repository, 適合用在大型專案, e.g. SDK 的開發上. 通常, 我只要在我負責的 component 的 git repository 上 commoit code 就好. 但在整合或 debug 時, 還是有機會動到別的 git repositories. 要在每個每個 git repositories 都建 branch ... Read more

SSH Login using Hostname and Login without Password

每次 login server 都要打一長串帳號 + IP + port + 密碼打到有點煩. 紀錄一下偷懶的方法: (1) 免打密碼, (2) 使用 hostname 代替 IP address Read more