Windows Terminal Notes

快捷键

  • 切换 Tab 快捷键

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    
    "keybindings":
    [
        // Copy and paste are bound to Ctrl+Shift+C and Ctrl+Shift+V in your defaults.json.
        // These two lines additionally bind them to Ctrl+C and Ctrl+V.
        // To learn more about selection, visit https://aka.ms/terminal-selection
        { "command": {"action": "copy", "singleLine": false }, "keys": "ctrl+shift+c" },
        { "command": "paste", "keys": "ctrl+shift+v" },
    
        // Press Ctrl+Shift+F to open the search box
        { "command": "find", "keys": "ctrl+shift+f" },
    
        // Press Alt+Shift+D to open a new pane.
        // - "split": "auto" makes this pane open in the direction that provides the most surface area.
        // - "splitMode": "duplicate" makes the new pane use the focused pane's profile.
        // To learn more about panes, visit https://aka.ms/terminal-panes
        { "command": { "action": "splitPane", "split": "auto", "splitMode": "duplicate" }, "keys": "alt+shift+d" },
    
        { "command": { "action": "switchToTab", "index": 0 }, "keys": "alt+1" },
        { "command": { "action": "switchToTab", "index": 1 }, "keys": "alt+2" },
        { "command": { "action": "switchToTab", "index": 2 }, "keys": "alt+3" },
        { "command": { "action": "switchToTab", "index": 3 }, "keys": "alt+4" },
        { "command": { "action": "switchToTab", "index": 4 }, "keys": "alt+5" },
        { "command": { "action": "switchToTab", "index": 5 }, "keys": "alt+6" },
        { "command": { "action": "switchToTab", "index": 6 }, "keys": "alt+7" },
        { "command": { "action": "switchToTab", "index": 7 }, "keys": "alt+8" },
        { "command": { "action": "switchToTab", "index": 8 }, "keys": "alt+9" }
    ]
  • 放置位置

docker notes

教程

docker compose 功能速查

docker 命令速查手册 cheat sheet

container

快捷创建 container

  • docker run

创建后台 container

  • docker run -d

后台运行,detach container

  • Ctr + P Ctrl + Q

前台运行 container

  • docker attach

执行命令,开启的 container

  • docker exec <container> <your-command>

运行状态查询 container

  • docker ps -a

列出 container

  • docker ps
  • docker container ls

重命名 container

  • docker rename

删除 container

  • docker rm -f <container>
删除所有终止的容器
  • docker container prune
  • 我的命令

sed notes

windows sed 类似工具

Cheat Sheet

多行处理

范围表示

  • "3,4a hello"
  • "3,$a hello"

    • $ –> 到行尾

insert 前面插入

  • sed -e "3i hello"

append 后面追加

  • sed -e "3a hello"

delete 删除

  • sed -e "3,5d"

change 修改

  • sed -e "3c hello" –> 修改成 hello

print 打印输出

  • sed -n "3,4p" —> 与 -n 连用

单行编辑

简单替换

  • sed -e "s/root/my-name/"

替换次数

  • sed -e "s/root/my-name/3"

全局替换

  • sed -e "s/root/my-name/3g"

支持正则 regex

  • echo "home/demo.ZIP" | sed -e "s\.ZIP$/.zip/3g"
  • 注意