摘要:1、Windows 上查看环境变量方法 以查看 GOPATH 为例。 普通命令行查看 GOPATH: echo %GOPATH% PowerShell 上查看 GOPATH: echo $env:GOROOT 2、安装 protoc 上 https://github.com/google/proto
阅读全文
摘要:// C++20新线程 jthread 体验代码 // // 编译(编译本代码,-pedantic 不是必须的): // g++ -std=c++20 -Wall -pedantic -pthread -static-libstdc++ C++20_jthread.cpp -o C++20_jthr
阅读全文
摘要:下载:https://github.com/eyjian/libmooon/blob/master/shell/find_deleted_files.sh。 #!/bin/sh # 查找被删除但仍然占据磁盘的文件 dirs=(`ls -l --time-style=long-iso /proc 2>
阅读全文
摘要:以 Redis-6.0.6 为例,先从仓库将镜像拉下来: docker pull redis:6.0.6 Redis 的配置文件和数据文件不能放在镜像中,这里选择容器中的目录和宿主机上一致,这样更方便管理。以 /data/redis 为 Redis 的主目录,配置文件放在目录 /data/redis
阅读全文
摘要:FLUSHALL和FLUSHDB是单机命令,所以清空集群需要在所有Master节点上均执行一次。下载:https://github.com/eyjian/redis-tools/blob/master/clear_redis_cluster.sh #!/bin/bash # Batch to cle
阅读全文