Skip to content

Instantly share code, notes, and snippets.

View yamyamyuo's full-sized avatar
🎯
Focusing

yamyamyuo

🎯
Focusing
View GitHub Profile
快捷键 功能
cmd + shift + p 打开命令菜单
cmd + t 模糊搜索工作目录下的文件
cmt + b 搜索已经打开的文件
ctrl + 0 焦点移动到文件目录
cmd + \ 隐藏左侧目录树
ctrl + [ 目录中展开结点
ctrl + ] 目录中缩起结点
d / a / m 对目录选中的结点进行 删除 / 添加 / 移动
@yamyamyuo
yamyamyuo / delete_git_submodule.md
Created December 18, 2018 06:00 — forked from myusuf3/delete_git_submodule.md
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule
@yamyamyuo
yamyamyuo / test-datetime-json-dumps.py
Created October 10, 2018 08:24 — forked from drmalex07/test-datetime-json-dumps.py
Create JSON dumps aware of datetime.datetime objects, in Python. #json #python #dumps #datetime
import json
import datetime
'''Create an encoder subclassing JSON.encoder.
Make this encoder aware of our classes (e.g. datetime.datetime objects)
'''
class Encoder(json.JSONEncoder):
def default(self, obj):
if isinstance(obj, datetime):
return obj.isoformat()