This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" LeetCode Python 本地测试模板 @Lightblues 221102 | |
https://github.com/Lightblues/Leetcode/blob/main/notes/leetcode_guide.py | |
本模板是什么? 用于本地测试 LeetCode 的代码, 试图还原Leetcode的测试环境 | |
直接复制测试用例, 可以在本地编辑器中调试. | |
导入了常见的包函数, 可以直接使用 (并且可以方便查到这些函数是来自哪些包的, 熟悉库函数) | |
提供了类测试函数, 直接测试需要实现类的那种题目 | |
为什么要在本地测试? | |
代码留存, 方便日后查看 | |
本地调试, 相较于LC的在线编辑器这一功能稍微好一些 | |
代码编辑器有更好的自动补全等方便的功能 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
/* Latex Workshop 配置模板 @Easonshi @221028 macOS系统, 但Linux基本类似 | |
方案: TexLive/MacTex + VSCode + Latex Workshop | |
流程 | |
安装 MacTex: https://www.tug.org/mactex/. | |
实际上网络环境好的话可以直接 brew install mactex, 然后配置 PATH 即可 (`PATH=$PATH:/Library/TeX/texbin`) | |
安装 Latex Workshop 插件. https://github.com/James-Yu/LaTeX-Workshop | |
插件的使用相关问题建议直接到 repo搜索. | |
配置 settings.json. 也即本文件. | |
我的 Latex 编辑会放在一个统一的文件夹下 git管理, 因此可以放在项目的 `.vscode/setting.json`; 当然也可以选择放全局配置. | |
配置说明 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
/* vscode 配置参考 参见 https://lightblues.github.io/techNotes/os/vscode/ | |
v1 221011 @Lightblues | |
本文档是什么? vscode的全局配置文件, 主要是vscode及其插件的配置项. | |
在command中搜索 `Preference: Open User Settings (JSON)` 即可打开 (对应的命令是 `@command:workbench.action.openSettingsJson`) | |
对应了 `Preference: Open User Settings` 是可视化的编辑 | |
地址: 例如在macOS中是 `~/Library/Application Support/Code/User/settings.json`, 该目录下还有vscode的其他配置文件. | |
主要内容 & 作用 | |
以下主要包括: 1) vscode 的基本配置项; 2) 常用语言的简单配置; 3) 其他一些插件 推介/配置. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/local/bin/python3 | |
""" @220325 | |
增量同步. 根据 filename_map 所定义的文件映射, 增量同步md文件和图片文件夹. | |
需求: 在个人笔记中书写, 部分同步到个人博客. (前者实时更新, 后者仅作同步) | |
同步规则: | |
从下面定义 document_dir 同步到 technote_dir. | |
同步文件列表根据 filename_map.py 所定义 | |
filename_map 格式例子 | |
```python |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" @220404 | |
移动文档中引用的图片到对应的文件夹下. 保证文中所有引用的图片都是在本地的 media 目录下. | |
使用: `python move_media.py <md_path1> ...` 其中path可以是相对路径 | |
使用场景: 1) 在一份文档中编写好内容后, 将其中部分转移到新的文档中; 2) 文档修改了名字. | |
TODO: | |
- 下载网络图片 | |
- 清理功能. | |
""" |