Avatar 💻

recca0120 技術筆記

Software Developer / 技術筆記

  1. 首頁
  2. 彙整
  3. 分類
  4. 標籤
  5. 搜尋
  6. Showcase
  7. 關於我
    1. 夜晚模式

紀錄

2026 72
2024 3
2023 11
2022 13
2020 15
更多

分類

PHP Laravel Testing DevOps Frontend Database AI Tools Python MacOS

標籤雲

Testing Laravel Php TypeScript Claude Code JavaScript Ai-Agent PHPUnit Python SQLite Composer Linux Vitest AWS Blade Cloudflare Developer-Tools Devops Docker Guzzle
Featured image of post pytest 入門:assert 就夠了,不需要記 self.assertEqual
Python Testing

pytest 入門:assert 就夠了,不需要記 self.assertEqual

pytest 跟 unittest 最大的差距不是功能多寡,而是寫起來有多舒服。assert 直接用,失敗訊息自動展開,fixture 比 setUp/tearDown 靈活很多。

2026 年 3 月 30 日
English
Pytest Testing Python Fixture Unit-Testing Parametrize
Featured image of post Docker Image 瘦身:先用 dive 找出問題,再對症下藥
DevOps

Docker Image 瘦身:先用 dive 找出問題,再對症下藥

不要猜 Docker image 為什麼大,用 docker image history 和 dive 直接看。找到問題之後針對性修,比套用技巧清單更有效率。從 1.25GB 壓到 139MB 的實際過程。

2026 年 3 月 29 日
English
Docker Dockerfile Devops Dive Optimization Container Multi-Stage
Featured image of post sslh:443 port 同時跑 HTTPS 和 SSH,一個 port 多個服務
Tools

sslh:443 port 同時跑 HTTPS 和 SSH,一個 port 多個服務

sslh 是 protocol multiplexer,讓 SSH、HTTPS、OpenVPN 共用同一個 port。最常見的用途是把 SSH 藏在 443,穿透只開放 HTTP/HTTPS 的嚴格防火牆。

2026 年 3 月 28 日
English
Sslh Ssh Networking Security Linux
Featured image of post reverse_ssh:用標準 SSH 語法管理反向連線,穿透防火牆不需要 VPN
Tools

reverse_ssh:用標準 SSH 語法管理反向連線,穿透防火牆不需要 VPN

reverse_ssh 把 SSH 反向:目標機主動連回 server,operator 再用原生 SSH 語法連進去。支援 HTTP/WebSocket/TLS 多種 transport 穿防火牆,SCP/SFTP/port forwarding 全部可用。

2026 年 3 月 27 日
English
Ssh Reverse-Shell Security Networking Golang Firewall Tunnel
Featured image of post yazi:Rust 寫的終端機檔案管理器,vim 鍵位、圖片預覽、Alacritty 解法
Tools

yazi:Rust 寫的終端機檔案管理器,vim 鍵位、圖片預覽、Alacritty 解法

yazi 是 Rust 寫的非同步終端機檔案管理器,vim 鍵位、圖片預覽、Lua 外掛、整合 fzf/zoxide。Alacritty 不支援圖片協議,macOS 用 Chafa,Linux 用 Überzug++ 搭配 X11/Wayland。

2026 年 3 月 26 日
English
Yazi Terminal Rust File-Manager Alacritty
Featured image of post reptyr:SSH 忘開 tmux 也救得回來,把 process 移進去
Tools

reptyr:SSH 忘開 tmux 也救得回來,把 process 移進去

reptyr 用 ptrace 把已在執行的 process 重新附加到新的 terminal。SSH 忘開 tmux 就跑了長時間任務,或者想把 background process 移進 screen,reptyr 一個指令搞定。

2026 年 3 月 25 日
English
Reptyr Linux Terminal Tmux Ssh Process Rescue
Featured image of post SQL NULL 的兩個陷阱:JOIN 撈不到資料、UNIQUE 限制失效
Database

SQL NULL 的兩個陷阱:JOIN 撈不到資料、UNIQUE 限制失效

各資料庫對 NULL 的解釋不同,衍生兩個常見問題:JOIN 欄位都是 NULL 時資料撈不到,以及 UNIQUE 欄位允許多筆 NULL 導致限制失效。MySQL、PostgreSQL、SQLite、SQL Server 行為各不同。

2026 年 3 月 24 日
English
Sql MySQL Postgresql SQLite Database
Featured image of post ky + p-limit:並發控制加上內建 retry,批次請求的完整解法
Frontend

ky + p-limit:並發控制加上內建 retry,批次請求的完整解法

ky 處理單一請求的 retry、timeout、auth hook,p-limit 控制同時執行的數量。兩個工具各司其職,批次打 100 個 API 不怕 429 也不怕網路抖動。

2026 年 3 月 23 日
English
Ky TypeScript JavaScript Concurrency P-Limit Api Rate-Limiting
Featured image of post fetch 並發控制:用 p-limit 限制同時請求數量,避免打爆 API
Frontend

fetch 並發控制:用 p-limit 限制同時請求數量,避免打爆 API

Promise.all 同時發出 100 個請求,server 很容易回 429 或直接掛掉。用 p-limit 搭配 fetch 限制同時執行的請求數量,只需要一行設定,不需要自己寫 semaphore。

2026 年 3 月 22 日
English
Fetch JavaScript TypeScript Concurrency P-Limit Api Rate-Limiting
Featured image of post auto-venv:Fish Shell 自動啟用 Python 虛擬環境,cd 進去就好
Python Tools

auto-venv:Fish Shell 自動啟用 Python 虛擬環境,cd 進去就好

auto-venv 是 Fish shell plugin,切換目錄時自動啟用和關閉 Python venv,支援 .venv、venv、.env、env 四種命名,用 git root 判斷範圍,相容 z、zoxide 等跳轉工具。

2026 年 3 月 21 日
English
Fish Python Venv Automation Shell Virtualenv
1 2 3 4 5 6 7 8 9 12
© 2020 - 2026 recca0120 技術筆記
recca0120 on GitHub
使用 Hugo 建立
主題 Stack 由 Jimmy 設計