Skip to content

Instantly share code, notes, and snippets.

View Jian-Min-Huang's full-sized avatar
🪄
Go Go Go !

黃健旻 Vincent Huang Jian-Min-Huang

🪄
Go Go Go !
View GitHub Profile
@Jian-Min-Huang
Jian-Min-Huang / gist:bf210d417416a6b49b7e9ba32c986b0d
Last active October 1, 2026 14:18
macos-terminal-apps-for-neovim-lazyvim.md

macOS Terminal Apps for Neovim + LazyVim

調查日期:2026-09-30。只引用各專案官方文件、官方原始碼庫、官方 issue/discussion 與 Apple 支援文件。

結論先行

  • 多數 macOS + Neovim 使用者的現代預設:Ghostty。 原生 macOS UI、Metal、連字/grapheme、Kitty graphics、分頁與分割,加上簡潔文字設定。不過遠端 terminfo 仍需處理;台灣使用者也應實測自己的注音/速成輸入法。
  • 重度中文輸入、原生 macOS 工作流或 tmux 使用者的保守選擇:iTerm2。 功能成熟,tmux -CC、Sixel、Kitty graphics、shell integration 都齊;代價是設定較 GUI 導向,而且啟用連字時不能使用 GPU renderer。
  • 需要可程式化設定、內建 SSH 與跨機 multiplexer:WezTerm。 Lua 設定和本機/遠端 mux 是這組最完整;學習與設定成本也最高。
  • 重視終端協定、鍵盤控制與 sessions:kitty。 功能密度高、SSH kitten 很實用;沒有 Sixel,UI 與操作概念較不像原生 Mac app。
#!/bin/zsh
# Read JSON input from stdin
input=$(cat)
# Extract values using jq
CURRENT_TIME=$(date "+%Y-%m-%d %H:%M:%S")
MODEL_DISPLAY=$(echo "$input" | jq -r '.model.display_name // "unknown"')
CURRENT_DIR=$(echo "$input" | jq -r '.workspace.current_dir // "."')
TOTAL_COST=$(echo "$input" | jq -r '.cost.total_cost_usd // 0' | xargs printf "%.2f")

Rules

  • 買了就要用;用不到就賣掉
  • 按鍵類型不重複
  • 量產鍵盤品牌不重複
  • 團購套件
    • 65%
  • WKL
@Jian-Min-Huang
Jian-Min-Huang / OptSample.java
Last active December 18, 2022 15:31
Optional Note Part1
public class OptSample {
public void demoOpt() {
String requestBody = sendPost();
// 頭部
// of -> 確定不為 Null 的值
// ofNullable -> 可能為 Null 的值
Optional.of(requestBody).orElse("Empty Body");
Optional.ofNullable(requestBody).orElse("Empty Body");
@Jian-Min-Huang
Jian-Min-Huang / arrow-ext.kt
Last active July 2, 2022 16:59
Some note from learning Arrow-kt
fun <T> T?.catchErrWhenNull(tw: Throwable): Either<Throwable, T> = Either.Companion.catch { this ?: throw tw }
fun <T> Either<Throwable, T?>.flattenCatchErrWhenNull(tw: Throwable): Either<Throwable, T> =
when (this) {
is Either.Left -> this
is Either.Right -> Either.Companion.catch {
this.value ?: throw tw
}
}
@Jian-Min-Huang
Jian-Min-Huang / brand.md
Last active April 10, 2022 12:45
My Brands

3C

  • Apple
    • iPhone 13 Pro Max
    • MacBook Pro
    • Magic Mouse
    • Magic Trackpad
    • Watch
    • Airpods Pro
@Jian-Min-Huang
Jian-Min-Huang / Pinecone Burn Firmware.md
Last active February 22, 2026 14:38
Pinecone Burn Firmware