A few boxes drawn with Unicode box drawing characters:
╔═╦═╗
╠═╬═╣
║ ║ ║
╚═╩═╝
| #!/usr/bin/env python3 | |
| """ | |
| Recursively scan SRC for directories that contain both Cargo.toml and a real | |
| `target/` subdirectory. Move that target/ to DST mirroring the relative path, | |
| then leave a symlink in place. Idempotent: already-symlinked targets are | |
| skipped. If DST already has a stale `target/` for that crate, it's removed | |
| before the move. | |
| Usage: | |
| move_targets_to_external_disk.py DST [--src SRC] |
| #!/usr/bin/env python3 | |
| """ | |
| Recursively scan the current directory for git repos. For each repo that: | |
| - is not ours (no remote URL contains one of OUR_NAMES) | |
| - has a remote configured | |
| - has at least KEEP_COMMITS commits | |
| - is not already shallow | |
| truncate history to the last KEEP_COMMITS commits using the .git/shallow | |
| mechanism (preserves the HEAD commit SHA), then expire reflog and gc. |
| [ | |
| // 基础编辑 | |
| { "keys": ["super+c"], "command": "copy" }, | |
| { "keys": ["super+v"], "command": "paste" }, | |
| { "keys": ["super+x"], "command": "cut" }, | |
| { "keys": ["super+z"], "command": "undo" }, | |
| { "keys": ["super+shift+z"], "command": "redo" }, | |
| { "keys": ["super+a"], "command": "select_all" }, | |
| // 标签页导航(Vim 风格:h=左,l=右) |
| // engine/utils/json_ptr.h | |
| #pragma once | |
| #include <json/value.h> | |
| #include <memory> | |
| #include <optional> | |
| #include <string> | |
| class JsonPtr { | |
| public: | |
| explicit JsonPtr(const std::shared_ptr<Json::Value>& json) : json_(json) {} |
| # Git aliases compatible with both bash and zsh | |
| ## Functions | |
| function git_main_branch() { | |
| command git rev-parse --git-dir &>/dev/null || return | |
| local ref | |
| for ref in refs/{heads,remotes/{origin,upstream}}/{main,trunk,mainline,default,stable,master}; do | |
| if command git show-ref -q --verify $ref; then | |
| echo ${ref:t} | |
| return 0 |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE KeyboardMappingScheme> | |
| <!-- Written by Qt Creator 4.2.1, 2017-03-27T21:24:06. --> | |
| <mapping> | |
| <shortcut id="CppTools.OpenHeaderSourceInNextSplit"> | |
| <key value="Ctrl+E, F4"/> | |
| </shortcut> | |
| <shortcut id="CppTools.SwitchHeaderSource"> | |
| <key value="F4"/> | |
| </shortcut> |
| { | |
| "title": "Change left ctrl/ left shift to spacebar", | |
| "rules": [ | |
| { | |
| "description": "Change left_ctrl to spacebar if pressed alone, to left_ctrl if pressed with other keys", | |
| "manipulators": [ | |
| { | |
| "from": { | |
| "key_code": "left_control", | |
| "modifiers": { |
| """""""""""""""""""""""""""""" | |
| " XVim config | |
| """""""""""""""""""""""""""""" | |
| set blinkcursor | |
| set tabstop=4 | |
| set softtabstop=4 | |
| set shiftwidth=4 | |
| set expandtab |
| { | |
| "title": "My e changes", | |
| "rules": | |
| [ | |
| { | |
| "description": "spacebar -> right_control (spacebar if pressed alone)", | |
| "manipulators": | |
| [ | |
| { | |
| "from": |