Skip to content

Instantly share code, notes, and snippets.

View remove-all-from-docker.sh
# Stop all containers
docker stop `docker ps -qa`
# Remove all containers
docker rm `docker ps -qa`
# Remove all images
docker rmi -f `docker images -qa `
# Remove all volumes
@cleiveliu
cleiveliu / shell_snippets.md
Last active Apr 5, 2021
Useful linux command
View shell_snippets.md

一些 linux 命令

  • 修改系统时间:
> timedatectl set-timezone Asia/Shanghai
  • run es
@cleiveliu
cleiveliu / docker-cn-mirror.md
Last active Feb 20, 2021
docker cn mirror, docker仓库代理
View docker-cn-mirror.md

source
修改配置文件 /etc/docker/daemon.json

{
    "registry-mirrors": [
        "https://docker.mirrors.ustc.edu.cn",
        "https://hub-mirror.c.163.com"
    ]
}
@cleiveliu
cleiveliu / Python-context-manager-example.md
Last active Aug 13, 2021
Python context manager example
View Python-context-manager-example.md

source

import contextlib
import sys


def your_task():
    print("The test !")
@cleiveliu
cleiveliu / settings.json
Last active Apr 5, 2021
vscode base settings, Python
View settings.json
{
"python.pythonPath": "venv/bin/python",
"python.analysis.extraPaths": [],
"python.autoComplete.extraPaths": [],
"files.watcherExclude": {
"**/node_modules": true,
"**/bower_components": true,
"**/venv/**": true,
"**/.git/**": true,
},