代码片段的重点是要用的时候就在手边
记 gist 里的有几个会回去看的,现用现找太痛苦了
Dash,每个代码片段都绑定了短语,我把很长的又常用的都放 Dash 里
安装 nvm
curl -o-
https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash
Debian 上装 docker
apt-get install -y apt-transport-https ca-certificates curl gnupg2 software-properties-common && \
curl -fsSL
https://download.docker.com/linux/$(. /etc/os-release; echo "$ID")/gpg | sudo apt-key add - && \
apt-key fingerprint 0EBFCD88 && \
add-apt-repository "deb [arch=amd64]
https://download.docker.com/linux/$(. /etc/os-release; echo "$ID") $(lsb_release -cs) stable" && \
apt-get update && apt-get install -y docker-ce docker-ce-cli
containerd.io安装 docker-compose
(
LATEST_URL=`curl -Ls -o /dev/null -w %{url_effective}
https://github.com/docker/compose/releases/latest`
COMPOSE_VERSION=${LATEST_URL##*/}
DOWNLOAD_URL=
https://github.com/docker/compose/releases/download/${COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m`
sudo curl -L ${DOWNLOAD_URL} -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
)
甚至几个同事的 ssh key 也在里头
Dash Snippet 已经被我视作随时可以输出内容的记事本了