备忘录
python 画图配置中英文
中文 宋体 + 英文 New Roman
try:
import mksci_font
mksci_font.config_font() # 可以配置 rcParams
print("中文字体配置成功 (mksci_font)。")
except ImportError:
print("警告:未能导入 mksci_font 模块。尝试使用系统字体(如 SimHei)。")
try:
plt.rcParams['font.sans-serif'] = ['SimHei', 'Arial Unicode MS', 'Microsoft YaHei']
plt.rcParams['axes.unicode_minus'] = False
print("已尝试配置备选系统字体(如 SimHei)。")
except Exception as font_e:
print(f"配置系统字体失败:{font_e}。可能无法正确显示中文。")
MacBook 清理键盘
黑屏 + 锁键盘,很简单的功能。
appstore cleaner
Drawio 配置字体
下载 https://cdn.rogeeer.com/bak/simsun.ttf
安装字体,然后在 drawio 设置即可
配置 zsh、ohmyzsh
将默认 shell 改为 zsh
- 包管理器下载 zsh
- 命令
chsh -s /bin/zsh
更改,如果权限问题不能更改,则可以在~/.bashrc
最后一行加入exec /bin/zsh
使用
下载 ohmyzsh https://ohmyz.sh/
配置
~/.zshrc
插件
plugins=(git sudo extract zsh-syntax-highlighting zsh-autosuggestions zsh-history-substring-search zsh-completions)
### 内置插件 ### git sudo extract ### 其他插件下载模板 git clone https://github.com/zsh-users/{插件名称}.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/{插件名称} ## 常用的插件 ### 命令自动补全 git clone https://github.com/zsh-users/zsh-autosuggestions.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions ### 语法高亮 git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting ### 历史命令搜索 git clone https://github.com/zsh-users/zsh-history-substring-search.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-history-substring-search ### 增强补全 git clone https://github.com/zsh-users/zsh-completions.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-completions
主题...
别名...
.gitignore 模板
https://github.com/github/gitignore