Skip to content

Instantly share code, notes, and snippets.

# 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 April 5, 2021 13:42
Useful linux command

一些 linux 命令

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

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 August 13, 2021 03:19
Python context manager example

source

import contextlib
import sys


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