国内从 Docker Hub 拉取镜像有时会遇到困难,此时可以配置镜像加速器。
Dockerized 实践 https://github.com/y0ngb1n/dockerized
国内从 Docker Hub 拉取镜像有时会遇到困难,此时可以配置镜像加速器。
Dockerized 实践 https://github.com/y0ngb1n/dockerized
select pid, query | |
from pg_stat_activity | |
where datname = 'table' | |
and wait_event_type = 'Lock'; | |
select 'select pg_cancel_backend( ''' || pid || ''');' pid | |
from pg_stat_activity | |
where datname = 'table' | |
and wait_event_type = 'Lock'; |
CREATE DEFINER=`root`@`localhost` PROCEDURE `database`.`name`() | |
BEGIN | |
DECLARE pre_name BIGINT; | |
DECLARE ageVal INT; | |
DECLARE i INT; | |
SET pre_name=862362681; | |
SET ageVal=100; | |
SET i=1; | |
WHILE i < 1000000 DO | |
INSERT shop(name,union_id, open_id) VALUES(CONCAT(pre_name,'@qq.com'),CONCAT(i ,'unionId'),CONCAT(i,'openId')); |
# Backup | |
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
# Restore | |
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
环境:shadowsocks、windows | |
本地ss端口设置(这里1080) | |
cmd命令行:(不用socks5)(临时设置)(也可放置环境变量) | |
set http_proxy=http://127.0.0.1:1080 | |
set https_proxy=http://127.0.0.1:1080 | |
ps:一定要用cmd命令行,千万别用powershell !!! | |
简易测试命令:curl https://www.google.com(别用ping) |
git config --global credential.helper store |
export GOROOT=/usr/lib/go-1.10 | |
export GOPATH=/home/lu/gowork | |
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin |