vault backup: 2022-09-26 18:39:43

Affected files:
.obsidian/workspace
03. 資料收集/HTTP Server/Nginx.md
03. 資料收集/Hobby/RC.md
03. 資料收集/Hobby/模型/Traxxas Sledge.md
03. 資料收集/Hobby/模型/舊化作例.md
03. 資料收集/Hobby/軍武/虎式.md
03. 資料收集/Programming/COM/20210726 - COM Interface.md
03. 資料收集/Programming/DB/MySQL.md
03. 資料收集/Programming/DB/sqlite.md
03. 資料收集/Programming/Design Pattern.md
03. 資料收集/Programming/FFMPEG/00. Introduction.md
03. 資料收集/Programming/FFMPEG/01. Setup.md
03. 資料收集/Programming/FFMpeg.md
03. 資料收集/Programming/Flask.md
03. 資料收集/Programming/Media Foundation/20210604 - Windows media foundation.md
03. 資料收集/Programming/OpenCV.md
03. 資料收集/Programming/OpenGL.md
03. 資料收集/Programming/Python/argparse.ArgumentParser.md
03. 資料收集/Programming/Python/decorator.md
03. 資料收集/Programming/Python/logging.md
03. 資料收集/Programming/Python/opencv.md
03. 資料收集/Programming/Python/subprocess.md
03. 資料收集/Programming/Python/threading.md
03. 資料收集/Programming/Python/tkinter.md
03. 資料收集/Programming/Python/檢測工具.md
03. 資料收集/Programming/QT/Dropdown button.md
03. 資料收集/Programming/QT/QVariant.md
03. 資料收集/Programming/QT/Qt.md
03. 資料收集/Programming/Qt.md
03. 資料收集/Programming/UML.md
03. 資料收集/Programming/演算法.md
03. 資料收集/架站/03. Trojan.md
03. 資料收集/架站/Gitea.md
03. 資料收集/架站/HTTP Server/Apache.md
03. 資料收集/架站/HTTP Server/Nginx/Reverse Proxy(Layer4).md
03. 資料收集/架站/Pelican blog.md
03. 資料收集/架站/Proxmox VE.md
03. 資料收集/架站/SWAG Reverse proxy.md
03. 資料收集/架站/Storj.md
03. 資料收集/架站/Trojan.md
03. 資料收集/科技/802.11.md
03. 資料收集/科技/HDR Sensor.md
03. 資料收集/科技/量子電腦.md
03. 資料收集/科技/鋰電池.md
03. 資料收集/軟體工具/IPFS.md
03. 資料收集/軟體工具/MkDocs.md
03. 資料收集/軟體工具/Obsidian.md
03. 資料收集/軟體工具/docker.md
03. 資料收集/軟體工具/git/apply.md
03. 資料收集/軟體工具/git/submodule.md
This commit is contained in:
2022-09-26 18:39:43 +08:00
parent 95a804e0da
commit 2f312a4575
50 changed files with 15 additions and 440 deletions

View File

@@ -0,0 +1,2 @@
- Source code: https://github.com/ipfs/ipfs
- Document: https://docs.ipfs.io/

View File

@@ -0,0 +1,29 @@
https://www.mkdocs.org/
## Commands
`mkdocs new [dir-name]` - Create a new project.
`mkdocs serve` - Start the live-reloading docs server. Goto `http://127.0.0.1:8000` to view WEB pages.
`mkdocs build` - Build the documentation site.
`mkdocs build --clean` - Clean the output folder.
`mkdocs -h` - Print help message and exit.
## Theme
#### Change theme to [mkdocs-material](https://squidfunk.github.io/mkdocs-material/getting-started/)
1. Install by pip
```
pip install mkdocs-material
```
2. Modify `mkdocs.yml`
```
site_name: RobotRunDoc
nav:
- Home: index.md
- 'User Guide':
- 'Installation': 'Installation/installation.md'
- 'APIs': 'APIs/Kong.md'
- About: about.md
theme:
name: material <-- HERE
```

View File

@@ -0,0 +1,63 @@
## 使用
### 操作
- `Ctrl-Enter`: 可以增加TODO的框框或是用來更改框框的狀態
### 自訂快速鍵
- `Alt+Insert`: 插入樣板
- `Ctrl + Shift + <-`: 摺疊所有標題 ^e897a3
- `Ctrl + Shift + ->`: 展開所有標題 ^5587cd
### 搜尋
`file:` 開頭來指定指**只搜尋檔名**
`content:` 開頭來指定**只指搜尋內容**
`tag:` 開頭來搜尋標籤,例: `tag:#mydata`
`path:` 來搜尋特定路徑下的檔案,路徑必須要用`""`包圍,例:`path:"path/to/foder" search_name`
## 設定
目前所使用的theme是`Obsdn-dark-rmx`
CSS路徑`<vault>/obsidian.css`
### CSS
#### 讓中文字型使用**微軟正黑體**
```
.CodeMirror pre.CodeMirror-line {
font-size: 14px;
font-family: Fira Code, Microsoft JhengHei, Source Code Pro, monospace;
}
```
不用照抄,重點是在`font-family`裡面,加入`Microsoft JhengHei`,愈前面優先順序愈大。
#### 顯示**Bullet Point Relationship Lines**
```
/*=== Bullet Point Relationship Lines ===*/
.cm-hmd-list-indent, ul ul {
position: relative;
}
.cm-hmd-list-indent::before, ul ul::before {
content:'';
border-left: 1px solid rgba(0, 122, 255, 0.55);
position: absolute;
}
.cm-hmd-list-indent::before {
left: 0;
top: -5px;
bottom: -4px;
}
ul ul::before {
left: -11px;
top: 0;
bottom: 0;
```
`obsidian.css`最後端加入上面的CSS就可以顯示**Bullet Point Relationship Lines**,如:
![[Pasted image 20201206094618.png]]
來源:
- https://www.youtube.com/watch?v=ea9hkXem1f4
- https://gist.github.com/emisjerry/36d1d115ae22cd0902fc528875f86414
## Plugin
### Dataview
- [Source code](https://github.com/blacksmithgu/obsidian-dataview)
- [介紹:[Obs26] Dataview外掛: 製作索引筆記利器;動態查詢筆記資料 - YouTube](https://www.youtube.com/watch?v=dkWA7Qd0CLA&list=PLWg9zacwOnwfcpVm5pAKgOHms7PntsgJS&index=18)

View File

@@ -0,0 +1,25 @@
## Container
### list container
`docker ps`會列出執行中的container但是停止的不會
```bash
sudo docker ps
```
如果也要列出已停止的container
```bash
sudo docker ps -a
```
### 刪除container
Container必須是停止狀態才可以刪除
```bash
sudo docker rm <CONTAINER_ID>
```
## Image
### list images
```bash
sudo docker image ls
or
sudo docker images
```

View File

@@ -0,0 +1,36 @@
## apply
`git diff` 生出一個 diff 檔,而 `git apply` 把這個 diff 檔 apply 到某個 branch 上。
```
git diff ${A_COMMIT_HASH} ${B_COMMIT_HASH} > xxx.patch
git apply xxx.patch
```
- 如果在 `git apply` 的過程中遇到 trailing whitespace error 的話,可以參考這篇文章:[git - My diff contains trailing whitespace - how to get rid of it? - Stack Overflow](https://stackoverflow.com/questions/14509950/my-diff-contains-trailing-whitespace-how-to-get-rid-of-it),透過加入 `--whitespace=warn``--whitespace=nowarn` 參數來解決。
- [^1]
[^1]: [(2018 iThome 鐵人賽) Day 11: 使用 Git 時如何做出跨 repo 的 cherry-pick - iT 邦幫忙::一起幫忙解決難題,拯救 IT 人的一天](https://ithelp.ithome.com.tw/articles/10194972)
### Trouble shooting
- 如果在Windows上git clone遇到例如`error: invalid path``fatal: unable to checkout working tree`
```
$ gclogi git@github.com-logi:LogiVideoFW/VC_Bolide_TableHub.git
Cloning into 'VC_Bolide_TableHub'...
remote: Enumerating objects: 159, done.
remote: Counting objects: 100% (159/159), done.
remote: Compressing objects: 100% (134/134), done.
remote: Total 85001 (delta 71), reused 84 (delta 21), pack-reused 84842
Receiving objects: 100% (85001/85001), 599.21 MiB | 6.18 MiB/s, done.
Resolving deltas: 100% (17824/17824), done.
error: invalid path 'zynqLNX/kernel-source/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/aux.c'
fatal: unable to checkout working tree
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry with 'git restore --source=HEAD :/'
```
有可能是因為檔名與NTFS規則有所衝突解法
```
cd <REPO_NAME>
git config core.protectNTFS false; git reset --hard HEAD
```

View File

@@ -0,0 +1,27 @@
## 建立 Git Submodule
```
git submodule add <repository> [<local_path>]
```
新增之後,用 git status 會發現多了兩個東西需要 commit
![[20220608152709_git_submodule.png|450]]
第一個檔案 .gitmodules裡面紀錄 submodule 的對應關係,內容大概像這樣:
```
[submodule "RobotRunQA"]
path = RobotRunQA
url = git@github.com-logi:JuiwenHsu/RobotRunQA.git
```
接下來剩3個步驟
1. 提交 `.gitmodule``git add .gitmodule ; git push origin master`
2. 跟git說我們有新增一個submodule`git submodule init`
3. 把submodule pull下來`git submodule update`
## Clone repository and submodule
當clone一個有submodule的repo的時候我們還需要 `git submodule init``git submodule update` ,例如:
```
git clone https://xxx/xxx.git
cd xxx
git submodule init
git submodule update
```