会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
这就是经典
我随便写写你随便看看
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
7
8
···
18
下一页
2022年2月8日
如何写出最简洁的python 依赖列表 requirements.txt
摘要: 问题 曾经一直习惯使用 pip freeze > requirements.txt ,它确实方便,无需动脑,一条命令万事大吉。但最后生成的 requirements.txt很有可能非常臃肿。但这个文件经常需要在打包二进制可执行程序的时候用到,这里推荐手动维护的方式,使得requirements.tx
阅读全文
posted @ 2022-02-08 16:14 略略略——
阅读(291)
评论(0)
推荐(0)
2022年1月28日
zsh在每条命令完成之后输出空行(不包含首次打开终端)
摘要: desired output Last login: Fri Jan 28 17:05:06 on ttys002 ➜ ~ cd .. ➜ /Users 实现方法 在 ~/.zshrc 中加入: precmd() { precmd() { echo } } 即可实现在每条命令完成之后输出空行,且首次
阅读全文
posted @ 2022-01-28 17:10 略略略——
阅读(176)
评论(0)
推荐(0)
git 更新项目中子模块的版本
摘要: 假设 .gitmodules 是这样的: [submodule "abc"] path = abc url=git@github.com:me/abc.git 之前一直以为有了这个文件子模块就会自动拉取最新版本的代码,其实不是的,需要手动指定和变更。 正确做法 git submodule updat
阅读全文
posted @ 2022-01-28 14:27 略略略——
阅读(3391)
评论(0)
推荐(0)
git 切换到本地不存在但远端存在的分支
摘要: 使用背景 比如有人往remote推送了一个新的分支,自己本地没有,但想同步到本地 git switch 首先 git branch -r ,找到你需要的那个分支名称 origin/HEAD -> origin/master origin/newBranch git switch newBranch
阅读全文
posted @ 2022-01-28 11:07 略略略——
阅读(572)
评论(0)
推荐(1)
2022年1月27日
[转载] Shell正则表达式大全
摘要: 以前读书时候一直用的参考网站,竟然已经挂了:http://man.linuxde.net/docs/shell_regex.html 还好有 web archive: https://web.archive.org/web/20210831062203/https://man.linuxde.net
阅读全文
posted @ 2022-01-27 17:31 略略略——
阅读(88)
评论(0)
推荐(0)
python 使用element tree 解析 xml
摘要: 推荐这个文档: https://docs.w3cub.com/python~2.7/library/xml.etree.elementtree 基本概念 ElementTree 代表把整个xml作为一棵树处理 Element 代表树中的一个节点 整体操作,如文件读写,多用ElementTree, 具
阅读全文
posted @ 2022-01-27 17:15 略略略——
阅读(610)
评论(0)
推荐(0)
2021年12月22日
解决子模块的合并冲突
摘要: 问题 试图合并 git checkout develop git pull git checkout feature/branchname git merge develop GitHub显示冲突 This branch has conflicts that must be resolved to
阅读全文
posted @ 2021-12-22 14:06 略略略——
阅读(4407)
评论(1)
推荐(0)
2021年12月8日
解决终端无法访问github.com 的错误
摘要: 错误情况 pac文件中已经添加域名,浏览器可以访问github.com,但终端ping不通。 使用yarn install 安装依赖,一直遇到 fatal: unable to access 'https://github.com/protobuf.js/': LibreSSL SSL_read:
阅读全文
posted @ 2021-12-08 11:23 略略略——
阅读(4973)
评论(0)
推荐(0)
2021年12月6日
匹配驼峰命名、蛇形命名的正则表达式
摘要: Java常用模式,第一个字母小写,strict lower camel case [a-z]+((\d)|([A-Z0-9][a-z0-9]+))*([A-Z])? 可以匹配以下字符串: xmlHttpRequest newCustomerId innerStopwatch supportsIpv6
阅读全文
posted @ 2021-12-06 16:50 略略略——
阅读(1714)
评论(1)
推荐(1)
2021年11月24日
supertest测试,expect不同的状态码,但都能通过
摘要: 问题 it("should return 401 if token has wrong tenant", async ()=>{ request(app).get('/abc').set("Authorization", token).expect(401) }) 然而当我把expect 换成其他任
阅读全文
posted @ 2021-11-24 16:00 略略略——
阅读(67)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
7
8
···
18
下一页
公告