reset mac usb

This is how to reset SMC on most modern Mac laptops, none of which have a removable battery:

Shutdown your MacBook Air / MacBook Pro
Connect the power adapter to the Mac
On the MacBook / Pro’s keyboard, hold down the Shift+Control+Option keys and the Power button at the same time
Release all keys and the power button at the same time – the little light on the MagSafe adapter may change colors briefly to indicate the SMC has reset
Boot your Mac as usual

http://osxdaily.com/2010/03/24/when-and-how-to-reset-your-mac-system-management-controller-smc/

https://support.apple.com/zh-cn/HT201295

k8s 铲掉重来

kubespray 安装的 k8s 在 dev 环境经常要把 kubernetes 删干净重来。清理方式和安装习惯有关系,只记录 kubespray 安装习惯的清理操作。

kubespray + CentOS7

systemctl stop etcd
systemctl stop kubelet

清理所有 docker

docker stop `docker ps -a -q`
docker rm `docker ps -a -q`
docker rmi `docker images -a -q`

停止 docker

systemctl stop docker

查看依赖的文件,逐个清理

cat /etc/systemd/system/etcd.service
cat /etc/systemd/system/docker.service
cat /etc/systemd/system/kubelet.service
rm -rf /var/lib/etcd
rm -f /etc/etcd.env
rm -rf /etc/ssl/etcd/
rm -rf /usr/local/bin/etcd*
rm -rf /etc/cni
rm -rf /etc/kubernetes
rm -rf /var/lib/kubelet
rm -rf /usr/local/bin/kube*
rm -rf /root/.kube
df -h | grep /var/lib/kubelet/pods | awk '{print $NF}' | xargs umount