会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
平凡之路
生命在于折腾,生命不息,折腾不止。 ----LSC
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
···
24
下一页
2022年6月11日
在PhpStrom中配置Docker作为本地开发环境
摘要: 准备镜像 docker pull phpswoole/swoole 配置php解释器 创建测试文件 #!/usr/bin/env php <?php declare(strict_types=1); use Swoole\Http\Request; use Swoole\Http\Response;
阅读全文
posted @ 2022-06-11 16:52 LiShiChao
阅读(88)
评论(0)
推荐(0)
2022年6月6日
Python判断实例对象真与假
摘要: 起步 当需要if obj 或者 not obj判断一个实例对象的真假时,Python解释器会优先调用魔法方法__bool__()。如果没有该方法,就调用__len__()。如果两个方法都没有,总是返回True __bool__()方法仅支持返回布尔值 __len__()方法仅支持返回>=0的整数 示
阅读全文
posted @ 2022-06-06 20:27 LiShiChao
阅读(123)
评论(0)
推荐(0)
2022年4月22日
wrk压测
摘要: 安装wrk # 克隆源码 git clone https://github.com/wg/wrk.git # 编译 make 压测 # 使用5个连接,5条线程,运行压力测试10秒 ./wrk -c 5 -d 10s -t 5 --latency http://baidu.com wrk接口压测总结
阅读全文
posted @ 2022-04-22 13:00 LiShiChao
阅读(190)
评论(0)
推荐(0)
2022年3月26日
python协程(asyncio)到底需不需要加锁?
摘要: 转载:https://v3u.cn/a_id_208
阅读全文
posted @ 2022-03-26 11:12 LiShiChao
阅读(133)
评论(0)
推荐(0)
2022年3月22日
vue history 模式 nginx 配置了刷新还是404
摘要: vue项目配置二级目录,刷新后404 nginx配置 location /vue { alias /www/vue; # vue项目路径 index index.html; try_files $uri $uri/ /index.html =404; }
阅读全文
posted @ 2022-03-22 13:56 LiShiChao
阅读(97)
评论(0)
推荐(0)
2022年3月9日
python生成加密密码
摘要: 安装模块 pip install passlib 生成加密密码 python -c "from passlib.hash import sha512_crypt; import getpass; print sha512_crypt.encrypt('123')"
阅读全文
posted @ 2022-03-09 11:58 LiShiChao
阅读(128)
评论(0)
推荐(0)
ansible使用记录
摘要: ping测试 ansible pyproxy -m ping 执行shell命令 ansible pyproxy -m shell -a "ip a" 拷贝目录 ansible pyproxy -m synchronize -a "src=/opt/ops/test dest=/data delet
阅读全文
posted @ 2022-03-09 11:02 LiShiChao
阅读(35)
评论(0)
推荐(0)
2022年3月4日
GoLand使用
摘要: 创建项目时指定环境变量 GOPROXY=https://goproxy.cn,direct 添加go fmt和goimports
阅读全文
posted @ 2022-03-04 15:52 LiShiChao
阅读(41)
评论(0)
推荐(0)
2022年3月3日
nginx转发tcp
摘要: 安装依赖模块 yum install nginx-mod-stream 配置转发 # 与http区块平级 stream { upstream redis_6383 { server 127.0.0.1:6383; } server { listen 6386; proxy_pass redis_63
阅读全文
posted @ 2022-03-03 11:47 LiShiChao
阅读(102)
评论(0)
推荐(0)
2022年3月2日
docker 端口映射 及外部无法访问问题
摘要: 最终版本: 启动docker并进行端口映射后,docker会在iptables中添加DNAT规则,将收到的对应端口的包转换ip并进行转发,同时添加规则将所有来自docker网域的ip进行转换。 但是在Centos7上出现docker可以正常访问外网,但是外网发出的请求在经过eth1接收转发后送达不到
阅读全文
posted @ 2022-03-02 15:00 LiShiChao
阅读(290)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
···
24
下一页
公告