Compare commits
2 Commits
bcf70f33c0
...
38a68bca34
| Author | SHA1 | Date | |
|---|---|---|---|
| 38a68bca34 | |||
| 46f620adde |
@@ -7,3 +7,6 @@
|
|||||||
| [witr](witr.md) | 追溯行程祖先,解釋某個 process 或 port 為什麼在跑 |
|
| [witr](witr.md) | 追溯行程祖先,解釋某個 process 或 port 為什麼在跑 |
|
||||||
| [whatcable](whatcable.md) | 查 USB-C 連接埠與線材實際能力(macOS) |
|
| [whatcable](whatcable.md) | 查 USB-C 連接埠與線材實際能力(macOS) |
|
||||||
| [frogmouth](frogmouth.md) | 在終端機瀏覽 Markdown 的 TUI 工具 |
|
| [frogmouth](frogmouth.md) | 在終端機瀏覽 Markdown 的 TUI 工具 |
|
||||||
|
| [syncthing](syncthing.md) | 點對點即時同步檔案,去中心化、無雲端 |
|
||||||
|
| [ghostty](ghostty.md) | GPU 加速、原生的終端機模擬器 |
|
||||||
|
| [jetbrains-mono-nerd-font](jetbrains-mono-nerd-font.md) | JetBrains Mono 等寬字型 + Nerd Font 圖示 |
|
||||||
|
|||||||
36
ghostty.md
Normal file
36
ghostty.md
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
# Ghostty 文件
|
||||||
|
|
||||||
|
GPU 加速、原生的終端機模擬器。版本 1.3.1。
|
||||||
|
|
||||||
|
參考:<https://ghostty.org>
|
||||||
|
|
||||||
|
## 安裝
|
||||||
|
|
||||||
|
```sh
|
||||||
|
brew install --cask ghostty
|
||||||
|
```
|
||||||
|
|
||||||
|
`xterm-ghostty` terminfo 隨 App 一併安裝,不用另外處理。
|
||||||
|
|
||||||
|
## 設定
|
||||||
|
|
||||||
|
設定檔位於 `~/.config/ghostty/config`,每行一個 `key = value`。改完按 `Cmd+Shift+,` reload 或重開 App。
|
||||||
|
|
||||||
|
```
|
||||||
|
font-family = JetBrainsMono Nerd Font
|
||||||
|
```
|
||||||
|
|
||||||
|
搭配 [font-jetbrains-mono-nerd-font](jetbrains-mono-nerd-font.md) 使用可正確顯示 Nerd Font 圖示。
|
||||||
|
|
||||||
|
不想手改設定檔,可用網頁版產生器視覺化調整、即時預覽再匯出:<https://ghostty.zerebos.com>(原始碼 <https://github.com/zerebos/ghostty-config>)。
|
||||||
|
|
||||||
|
## 常用快捷鍵
|
||||||
|
|
||||||
|
| 快捷鍵 | 說明 |
|
||||||
|
|------|------|
|
||||||
|
| `Cmd+Shift+,` | reload 設定檔 |
|
||||||
|
| `Cmd+N` | 開新視窗 |
|
||||||
|
| `Cmd+T` | 開新分頁 |
|
||||||
|
| `Cmd+D` | 垂直分割 |
|
||||||
|
| `Cmd+Shift+D` | 水平分割 |
|
||||||
|
| `Cmd+,` | 開啟設定檔 |
|
||||||
26
jetbrains-mono-nerd-font.md
Normal file
26
jetbrains-mono-nerd-font.md
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
# JetBrains Mono Nerd Font 文件
|
||||||
|
|
||||||
|
JetBrains Mono 等寬字型,加上 Nerd Font 補綴的大量圖示字元(icon glyphs)。
|
||||||
|
|
||||||
|
參考:<https://www.nerdfonts.com>
|
||||||
|
|
||||||
|
## 安裝
|
||||||
|
|
||||||
|
```sh
|
||||||
|
brew install --cask font-jetbrains-mono-nerd-font
|
||||||
|
```
|
||||||
|
|
||||||
|
字型檔會裝到 `~/Library/Fonts`。
|
||||||
|
|
||||||
|
## 用途
|
||||||
|
|
||||||
|
- 終端機 / 編輯器等寬字型,提供 ligatures 與清晰的程式碼字形。
|
||||||
|
- Nerd Font 版本額外內嵌 Powerline、檔案類型、Git 等圖示,供 starship、eza、lsd、tmux 狀態列等工具顯示圖示。
|
||||||
|
|
||||||
|
## 在終端機設定字型名稱
|
||||||
|
|
||||||
|
設定時字型名稱用 `JetBrainsMono Nerd Font`(注意無空格的 `JetBrainsMono`)。例如 [Ghostty](ghostty.md):
|
||||||
|
|
||||||
|
```
|
||||||
|
font-family = JetBrainsMono Nerd Font
|
||||||
|
```
|
||||||
54
syncthing.md
Normal file
54
syncthing.md
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
# Syncthing 檔案同步
|
||||||
|
|
||||||
|
持續性、點對點的檔案同步程式,在兩台以上裝置間即時雙向同步。去中心化、沒有中央伺服器、資料不經過第三方雲端,裝置間走 TLS 加密。開源(MPLv2)。版本 2.1.2。
|
||||||
|
|
||||||
|
參考:<https://docs.syncthing.net/>
|
||||||
|
|
||||||
|
## 安裝
|
||||||
|
|
||||||
|
```sh
|
||||||
|
brew install syncthing
|
||||||
|
```
|
||||||
|
|
||||||
|
## 啟動
|
||||||
|
|
||||||
|
```sh
|
||||||
|
brew services start syncthing # 開機自動啟動的背景服務
|
||||||
|
brew services restart syncthing # 升級後重啟
|
||||||
|
|
||||||
|
# 或不裝背景服務,只跑一次
|
||||||
|
syncthing --no-browser --no-restart
|
||||||
|
```
|
||||||
|
|
||||||
|
啟動後在瀏覽器開 <http://127.0.0.1:8384> 進 Web GUI 設定。
|
||||||
|
|
||||||
|
## 運作方式
|
||||||
|
|
||||||
|
- 每台裝置有唯一的 **Device ID**(裝置憑證推導出的密碼學指紋)
|
||||||
|
- 兩台裝置互相交換 Device ID 即建立信任連線
|
||||||
|
- 建立 **Folder** 並分享給指定裝置,即開始雙向同步
|
||||||
|
- 透過本地/全域探索與中繼找到彼此,無需固定 IP
|
||||||
|
|
||||||
|
## 常用 CLI
|
||||||
|
|
||||||
|
| 指令 | 說明 |
|
||||||
|
|------|------|
|
||||||
|
| `syncthing --version` | 印出版本 |
|
||||||
|
| `syncthing cli show system` | 顯示系統狀態(含本機 Device ID) |
|
||||||
|
| `syncthing cli config devices list` | 列出已配對裝置 |
|
||||||
|
| `syncthing cli config folders list` | 列出同步資料夾 |
|
||||||
|
| `syncthing generate` | 產生設定與金鑰(首次啟動用) |
|
||||||
|
| `syncthing --no-browser` | 啟動時不自動開瀏覽器 |
|
||||||
|
| `syncthing --gui-address=<addr>` | 指定 GUI 監聽位址 |
|
||||||
|
|
||||||
|
## 安全模型
|
||||||
|
|
||||||
|
- Release 二進位檔以 GPG 簽章;自動升級用編譯進去的 ECDSA 簽章驗證
|
||||||
|
- macOS 與 Windows 二進位檔有程式碼簽章
|
||||||
|
- 裝置間連線一律 TLS 加密
|
||||||
|
|
||||||
|
## 社群與回報
|
||||||
|
|
||||||
|
- 官方論壇:<https://forum.syncthing.net/>
|
||||||
|
- Bug 回報:<https://github.com/syncthing/syncthing/issues>
|
||||||
|
- 安全性問題:寄 security@syncthing.net(勿走公開管道)
|
||||||
Reference in New Issue
Block a user