各类资源帖汇总
整理的日常使用中的一下小技巧、好用的三方库等
一、资源帖
二、实用技巧
1. nbconvert:ipynb格式转换
HTML、LaTeX、PDF、Reveal JS、md、ReStructured Text (rst)、executable script
安装:
pip install nbconvert使用:
cd到脚本所在文件夹
jupyter nbconvert --to markdown xxxxxx.ipynb
https://pypi.org/project/nbconvert/
2. 国内源安装ohmyzsh
在国内 gitee 找 oh-my-zsh 克隆
# 里面代码和官方的有微调,有兴趣可自己对比下 https://gitee.com/pocmon/ohmyzsh # 使用 curl 安装 sh -c "$(curl -fsSL https://gitee.com/pocmon/ohmyzsh/raw/master/tools/install.sh)" # 使用 wget 安装 sh -c "$(wget -O- https://gitee.com/pocmon/ohmyzsh/raw/master/tools/install.sh)"
作者:别瞄我链接:https://www.jianshu.com/p/0915d29f2010来源:简书著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。
3. .DS_Store文件的gitignore问题
御剑长歌
于 2022-02-12 21:45:14 发布
.DS_Store 是什么
Mac OS X 使用 .DS_Store 文件来存储文件夹特定的元数据信息。它们是在 Mac OS X Finder 访问的每个文件夹中创建的,甚至是网络宗卷和外部设备。文件夹级别的自定义存储在 DS_Store 文件中,例如自定义图标、图标位置、图标大小、窗口位置、列表视图、自定义背景图片或颜色等。DS_Store 文件旨在不显眼,这就是为什么它们具有 . 在他们的名字前面,这向 UNIX 文件系统表明该文件是不可见的。
在一个目录下打开终端
ls -a
这个命令可以显示所有文件,通过这样的方式就可以看到 .DS_Store
删除 .DS_Store
如果项目中还没有自动生成的 .DS_Store 文件,那么直接将 .DS_Store 加入到 .gitignore 文件就可以了。如果项目中已经存在 .DS_Store 文件,那就需要先从项目中将其删除,再将它加入到 .gitignore
删除 .DS_Store 文件没有什么大的影响,只会暂时丢失这个目录的元数据,重新打开目录后系统就会重新生成。
查询当前目录 所有的 .DS_Store
1 find . -name '*.DS_Store'
删除当前目录的.DS_Store
1 find . -name '*.DS_Store' -type f -delete
删除所有目录的.DS_Store
1 sudo find / -name “.DS_Store” -depth -exec rm {} \;
git 全局忽略配置
1. 创建 .gitignore_global (在终端中)
vim ~/.gitignore_global
在当前用户下创建 .gitignore_global ,把需要全局忽略的文件类型设置于此
在 .gitignore_global 文件中:
step1: 按a进行编辑
step2: 输入
.DS_Store
step3: 按ESC,在输入 " :wq " 后回车。
2. 在 ~/.gitconfig 中引入 .gitignore_global
vim ~/.gitconfig
同上面的步骤,只是在文本最后增加以下内容:
[core]
excludesfile = ~/.gitignore_global
版权声明:本文为CSDN博主「御剑长歌」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/weixin_40392053/article/details/122901655
4.使用shell快捷路径访问windows特殊文件夹
| Shell 快捷路径 | 对应文件夹 |
|---|---|
| shell:AccountPictures | 用户头像 |
| shell:AddNewProgramsFolder | 控制面板\所有控制面板项\获得程序 |
| shell:Administrative Tools | Windows 管理工具,C:\Users\usernameAppData\Roaming\Microsoft\Windows\Start Menu\Programs\Administrative Tools |
| shell:AppData | 类似%appdata%,C:\Users\username\AppData\Roaming |
| shell:Application Shortcuts | 应用程序快捷方式,C:\Users\BusernameAppData\Local\Microsoft\Windows\Application Shortcuts |
| shell:AppsFolder | Applications虚拟文件夹 |
| shell:AppUpdatesFolder | 已安装更新 |
| shell:Cache | IE缓存文件夹,C:\Users\username\AppData\Local\Microsoft\Windows\INetCache |
| shell:Games | 游戏 |
| shell:History | IE浏览历史,C:\Users\username\AppData\Local\Microsoft\Windows\History |
| shell:HomeGroupFolder | 家庭组 |
| shell:ImplicitAppShortcuts | C:\Users\username\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\ImplicitAppShortcuts |
| shell:Libraries | Windows 库 |
| shell:Links | 链接文件夹,C:\Users\username\Links |
| shell:Local AppData | C:\Users\username\AppData\Local |
| shell:LocalAppDataLow | C:\Users\username\AppData\LocalLow |
| shell:MusicLibrary | 音乐库 |
| shell:My Music | 音乐 |
| shell:My Pictures | 图片 |
| shell:My Video | 视频 |
| shell:NetHood | C:\Users\username\AppData\Roaming\Microsoft\Windows\Network Shortcuts |
| shell:NetworkPlacesFolder | 网络 |
| shell:Personal | 文档 |
| shell:PicturesLibrary | 图片库 |
| shell:PrintersFolder | 所有控制面板项\打印机 |
| shell:PrintHood | C:\Users\username\AppData\Roaming\Microsoft\Windows\Printer Shortcuts |
| shell:Profile | 用户配置文件夹 |
| shell:ProgramFiles | C:\Program Files |
| shell:ProgramFilesCommon | C:\Program Files\Common Files |
| shell:ProgramFilesCommonX86 | C:\Program Files (x86)\Common Files |
| shell:ProgramFilesX86 | C:\Program Files (x86) |
| shell:Programs | C:\Users\username\AppData\Roaming\Microsoft\Windows\Start Menu\Programs |
| shell:Public | C:\Users\Public |
| shell:PublicAccountPictures | C:\Users\Public\AccountPictures |
| shell:PublicGameTasks | C:\ProgramData\Microsoft\Windows\GameExplorer |
| shell:PublicLibraries | C:\Users\Public\Libraries |
| shell:Quick Launch | 快速启动,C:\Users\username\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch |
| shell:Recent | 最近使用的项目,C:\Users\username\AppData\Roaming\Microsoft\Windows\Recent |
| shell:RecycleBinFolder | 回收站 |
| shell:ResourceDir | C:\Windows\Resources |
| shell:Ringtones | C:\Users\username\AppData\Local\Microsoft\Windows\Ringtones |
| shell:Roaming Tiles | C:\Users\username\AppData\Local\Microsoft\Windows\RoamingTiles |
| shell:SavedGames | 保存的游戏 |
| shell:Searches | 保存的搜索 |
| shell:SearchHomeFolder | Windows Search |
| shell:SendTo | 发送到文件夹,C:\Users\username\AppData\Roaming\Microsoft\Windows\SendTo |
| shell:Start Menu | 开始菜单,C:\Users\username\AppData\Roaming\Microsoft\Windows\Start Menu |
| shell:Startup | 当前用户「启动」文件夹,C:\Use\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup |
| shell:SyncCenterFolder | 控制面板\所有控制面板项\同步中心 |
| shell:SyncResultsFolder | 控制面板\所有控制面板项\同步中心\同步结果 |
| shell:SyncSetupFolder | 控制面板\所有控制面板项\同步中心\同步设置 |
| shell:System | C:\Windows\System32 |
| shell:SystemCertificates | C:\Users\username\AppData\Roaming\Microsoft\SystemCertificates |
| shell:SystemX86 | C:\Windows\SysWOW64 |
| shell:Templates | C:\Users\username\AppData\Roaming\Microsoft\Windows\Templates |
| shell:User Pinned | 任务栏和开始菜单 固定项,C:\Users\username\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned |
| shell:UserProfiles | C:\Users |
| shell:UsersFilesFolder | 当前用户配置文件夹 |
| shell:UsersLibrariesFolder | 用户库 |
| shell:VideosLibrary | 视频库 |
| shell:Fonts | C:\Windows\Font |
| shell:Windows | C:\Windows |

浙公网安备 33010602011771号