2017年10月12日 星期四

Sierra密技: 找回你的”任何來源”選項


sudo spctl --master-disable

OS X SSD 啟動 TRIM 功能

在 OS X 10.10.4 下,如果用家正使用第三方 SSD 而又希望開啟 TRIM 功能的話,只需在終端機中輸入「 sudo trimforce enable 」指令,經過 2 次確認並重新啟動系統後 TRIM 指令便會正式生效。

trimforce-command

2017年9月8日 星期五

終端機操作


馬上將游標移到最前面
Ctrl-a

馬上將游標移到最後面
Ctrl-e

刪除游標後的所有字串
Ctrl-k

刪除游標前的所有字串
Ctrl-u

2017年9月7日 星期四

Docker - cAdvisor

cAdvisor (Container Advisor) provides container users an understanding of the resource usage and performance characteristics of their running containers. It is a running daemon that collects, aggregates, processes, and exports information about running containers. Specifically, for each container it keeps resource isolation parameters, historical resource usage, histograms of complete historical resource usage and network statistics. This data is exported by container and machine-wide.

# docker pull google/cadvisor

# docker run \
--volume=/:/rootfs:ro \
--volume=/var/run:/var/run:rw \
--volume=/sys:/sys:ro \
--volume=/var/lib/docker/:/var/lib/docker:ro \
--volume=/dev/disk/:/dev/disk:ro \
--publish=8080:8080 \
--detach=true \
--name=cadvisor \
google/cadvisor