摘要: 如果你已经在网上找了很多方法了,那建议你再试试这个。 1,进入WSL2,去除WSL1遗留的环境变量 ``` shell unset DOCKER_HOST ``` 2,设置Docker-Desktop指定运行的wsl2环境,默认是docker-desktop ![image](https://img 阅读全文
posted @ 2023-08-11 18:49 百猎 阅读(140) 评论(0) 推荐(0) 编辑
摘要: Django自身提供测试类、工具 ## django.test.Client 他的作用是模拟客户端。提供一系列的方法,例如get、post、delete、login等其中login是用django自身的验证,特殊之处是实例化的Client可以拿到session、cookie【**Client.coo 阅读全文
posted @ 2023-07-03 16:37 百猎 阅读(34) 评论(0) 推荐(0) 编辑
摘要: 在更改mac电脑ip网络时,提示BasicIPv6ValidationError。 百度搜索采用关闭ipv6的方法。但是不管用。 终端命令: networksetup -setv6off Ethernet 最后还是通过终端命令设置ip解决问题。 networksetup -setmanual Eth 阅读全文
posted @ 2020-12-18 09:39 百猎 阅读(878) 评论(0) 推荐(0) 编辑
摘要: 安装rabbitmq-server yum install -y rabbitmq-server 开启后台管理 rabbitmq-plugins enable rabbitmq_management 设置启动项 systemctl enable rabbitmq-server 启动 systemct 阅读全文
posted @ 2019-11-06 09:56 百猎 阅读(451) 评论(0) 推荐(0) 编辑
摘要: // 注意上面的集合要和下面的集合名称相同 db.rand_web_test.find( { 'content': /^.*要替换的字符串.*$/ } ).forEach( function (item) { var tmp = String(item.content) tmp = tmp.repl 阅读全文
posted @ 2019-09-23 16:52 百猎 阅读(2657) 评论(0) 推荐(0) 编辑
摘要: 之前使用阿里云日志服务,按照文档安装了ilogtail。后面不需要了,却找不到卸载文档。仔细查看ilogtail的安装脚本后,发现里面有卸载方法。 wget http://logtail-release-cn-hangzhou.oss-cn-hangzhou.aliyuncs.com/linux64 阅读全文
posted @ 2019-09-20 09:59 百猎 阅读(1463) 评论(0) 推荐(0) 编辑
摘要: test.py 内容 # 运行前,请先安装pyyaml模块 # pip3 install -i https://pypi.douban.com/simple/ pyyaml==5.1.1 import yaml import os f = open(r'test.yaml') y = yaml.lo 阅读全文
posted @ 2019-07-29 17:09 百猎 阅读(880) 评论(0) 推荐(0) 编辑