vault backup: 2022-09-28 19:13:41
Affected files: .obsidian/workspace 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/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/UML.md 03. Programming/演算法.md 04. 資料收集/99. templates/blogHeader.md 04. 資料收集/99. templates/date.md 04. 資料收集/99. templates/front matter.md 04. 資料收集/99. templates/note.md 04. 資料收集/99. templates/table.md 04. 資料收集/99. templates/thisWeek.md 04. 資料收集/99. templates/日記.md 04. 資料收集/99. templates/讀書筆記.md 04. 資料收集/Linux/CLI/cut.md 04. 資料收集/Linux/CLI/scp.md 04. 資料收集/Linux/CLI/timedatectl.md 04. 資料收集/Linux/Programming.md 04. 資料收集/Linux/Ubuntu.md 04. 資料收集/Tool Setup/Hardware/RaspberryPi.md 04. 資料收集/Tool Setup/Software/Chrome.md 04. 資料收集/Tool Setup/Software/Obisidian.md 04. 資料收集/Tool Setup/Software/SublimeText.md 04. 資料收集/Tool Setup/Software/VirtualBox.md 04. 資料收集/Tool Setup/Software/Visual Studio Code.md 04. 資料收集/Tool Setup/Software/Windows Setup.md 04. 資料收集/Tool Setup/Software/Windows Terminal.md 04. 資料收集/Tool Setup/Software/freefilesync.md 04. 資料收集/Tool Setup/Software/vim.md 04. 資料收集/名言佳句.md 04. 資料收集/架站/Gitea.md 04. 資料收集/架站/HTTP Server/Apache.md 04. 資料收集/架站/HTTP Server/Nginx/Reverse Proxy(Layer4).md 04. 資料收集/架站/Pelican blog.md 04. 資料收集/架站/Proxmox VE.md 04. 資料收集/架站/SWAG Reverse proxy.md 04. 資料收集/架站/Storj.md 04. 資料收集/架站/Trojan.md 04. 資料收集/每週外食.md 04. 資料收集/科技/802.11.md 04. 資料收集/科技/HDR Sensor.md 04. 資料收集/科技/量子電腦.md 04. 資料收集/科技/鋰電池.md 04. 資料收集/興趣嗜好/RC/Traxxas Sledge.md 04. 資料收集/興趣嗜好/RC/好盈電變調整中立點.md 04. 資料收集/興趣嗜好/RC/差速器調教教學.md 04. 資料收集/興趣嗜好/模型/舊化作例.md 04. 資料收集/興趣嗜好/軍武/虎式.md 04. 資料收集/讀書筆記/20201201 - 學習如何學習.md 04. 資料收集/讀書筆記/20201218 - Kotlin權威2.0.md 04. 資料收集/讀書筆記/20201224 - 寫作是最好的自我投資.md 04. 資料收集/讀書筆記/20210119 - 中產悲歌.md 04. 資料收集/讀書筆記/20210220 - 最高學習法.md 04. 資料收集/讀書筆記/20210320 - 最高學以致用法.md 04. 資料收集/讀書筆記/20210406 - 精準購買.md 04. 資料收集/讀書筆記/20210723 - 高手學習.md 04. 資料收集/讀書筆記/20220526 - 深入淺出設計模式.md 04. 資料收集/讀書筆記/20220619 - 精確的力量.md 04. 資料收集/軟體工具/IPFS.md 04. 資料收集/軟體工具/MkDocs.md 04. 資料收集/軟體工具/Obsidian.md 04. 資料收集/軟體工具/docker.md 04. 資料收集/軟體工具/git/apply.md 04. 資料收集/軟體工具/git/submodule.md 04. 資料收集/軟體工具/youtube-dl.md 04. 資料收集/面試準備/技术面试最后反问面试官的话.md
This commit is contained in:
2
04. 資料收集/軟體工具/IPFS.md
Normal file
2
04. 資料收集/軟體工具/IPFS.md
Normal file
@@ -0,0 +1,2 @@
|
||||
- Source code: https://github.com/ipfs/ipfs
|
||||
- Document: https://docs.ipfs.io/
|
||||
29
04. 資料收集/軟體工具/MkDocs.md
Normal file
29
04. 資料收集/軟體工具/MkDocs.md
Normal 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
|
||||
```
|
||||
63
04. 資料收集/軟體工具/Obsidian.md
Normal file
63
04. 資料收集/軟體工具/Obsidian.md
Normal 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)
|
||||
- [介紹:[Obs#26] Dataview外掛: 製作索引筆記利器;動態查詢筆記資料 - YouTube](https://www.youtube.com/watch?v=dkWA7Qd0CLA&list=PLWg9zacwOnwfcpVm5pAKgOHms7PntsgJS&index=18)
|
||||
25
04. 資料收集/軟體工具/docker.md
Normal file
25
04. 資料收集/軟體工具/docker.md
Normal 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
|
||||
```
|
||||
36
04. 資料收集/軟體工具/git/apply.md
Normal file
36
04. 資料收集/軟體工具/git/apply.md
Normal 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
|
||||
```
|
||||
27
04. 資料收集/軟體工具/git/submodule.md
Normal file
27
04. 資料收集/軟體工具/git/submodule.md
Normal 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
|
||||
```
|
||||
30
04. 資料收集/軟體工具/youtube-dl.md
Normal file
30
04. 資料收集/軟體工具/youtube-dl.md
Normal file
@@ -0,0 +1,30 @@
|
||||
## youtube-dl
|
||||
### List format
|
||||
```shell
|
||||
youtube-dl -F <YOUTUBE_URL>
|
||||
```
|
||||
|
||||
e.g.
|
||||
```shell
|
||||
youtube-dl -F https://www.youtube.com/watch?v=Pbzn79TSRO0
|
||||
```
|
||||
|
||||
### Download
|
||||
```shell
|
||||
youtube-dl -f <FORMAT_ID> <YOUTUBE_URL>
|
||||
```
|
||||
|
||||
### Download video-only & audio-only & merge to MKV
|
||||
```shell
|
||||
youtube-dl -f <VIDEO_ONLY_ID>+<AUDIO_ONLY_ID> --merge-output-format mkv <YOUTUBE_URL>
|
||||
```
|
||||
|
||||
e.g.
|
||||
```shell
|
||||
youtube-dl -f 313+251 --merge-output-format mkv https://www.youtube.com/watch?v=Pbzn79TSRO0
|
||||
```
|
||||
|
||||
### Download video to MP3
|
||||
```shell
|
||||
youtube-dl -i --extract-audio --audio-format mp3 --audio-quality 0 https://www.youtube.com/watch?v=IruVsWrfPqs
|
||||
```
|
||||
Reference in New Issue
Block a user