Avatar 💻

recca0120 技術筆記

Software Developer / 技術筆記

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

紀錄

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

分類

PHP Laravel Testing Frontend DevOps Database Tools AI Python MacOS

標籤雲

Laravel Php Testing Javascript PHPUnit Python Sqlite Typescript Ai-Agent Claude-Code Composer Linux Aws Blade Developer-Tools Devops Docker Guzzle MCP Mockery
Featured image of post League Period:PHP 時間區間處理的瑞士刀
PHP

League Period:PHP 時間區間處理的瑞士刀

用原生 DateTime 比較兩個時間區間是否重疊,要寫一堆 if 判斷。League Period 用不可變物件封裝時間區間,內建重疊、包含、間隙、交集等操作,一行搞定。

2026 年 4 月 6 日
English
Php Period Datetime League Scheduling Immutable
Featured image of post Strauss:Mozart 的繼承者,WordPress 外掛依賴隔離的更好選擇
PHP

Strauss:Mozart 的繼承者,WordPress 外掛依賴隔離的更好選擇

Strauss 是從 Mozart fork 出來的 Composer 依賴前綴工具,解決了 Mozart 幾個已知問題:支援 files autoloader、常數前綴、license 合規、零設定開箱即用。WordPress 外掛開發的現代選擇。

2026 年 4 月 5 日
English
Strauss Composer Wordpress Php Namespace
Featured image of post Mozart:WordPress 外掛的 Composer 依賴隔離工具
PHP

Mozart:WordPress 外掛的 Composer 依賴隔離工具

WordPress 外掛共用一個 PHP process,不同外掛用同一個 library 的不同版本就會炸。Mozart 把你的 vendor 依賴加上自訂 namespace 前綴,徹底隔離,不跟別人衝突。

2026 年 4 月 4 日
English
Mozart Composer Wordpress Php Namespace
Featured image of post pytest-mock:用 mocker fixture 讓 mock 更乾淨
Python Testing

pytest-mock:用 mocker fixture 讓 mock 更乾淨

pytest-mock 提供 mocker fixture,把 unittest.mock.patch 整合進 pytest 的生命週期,不需要手動 start/stop,也不用 with 或 decorator。spy 保留原始行為同時追蹤呼叫,stub 測回調。

2026 年 4 月 3 日
English
Pytest Mock Testing Python Spy Stub Unittest
Featured image of post 我用 Vibe Coding 做了一個全球開發者排行榜
Frontend

我用 Vibe Coding 做了一個全球開發者排行榜

分享用 Astro + Svelte 5 + Three.js vibe coding 出 CodeAtlas 全球開發者排行榜的過程,從 GitHub API 資料收集到 3D 地球儀互動體驗。

2026 年 4 月 3 日
English
Astro Svelte Three.js GitHub API Vibe Coding
Featured image of post Typer:用 type hint 寫 CLI,不需要記 argparse API
Python

Typer:用 type hint 寫 CLI,不需要記 argparse API

Typer 是 FastAPI 同作者寫的 CLI 框架,底層是 Click,但你不需要學 Click API。Type hint 就是 CLI 的規格,自動產生 help、shell 補全、子命令,把一堆 scripts 整理成一個工具。

2026 年 4 月 2 日
English
Typer Cli Python Click Argparse Automation
Featured image of post blinker:Python 的 signal 系統,讓模組之間不直接呼叫
Python

blinker:Python 的 signal 系統,讓模組之間不直接呼叫

blinker 是 Python 輕量的 signal/event 系統,Flask 內部用它處理 request_started、request_finished 等事件。拿來做模組解耦、plugin 架構、避免 circular import 都很合適。

2026 年 4 月 1 日
English
Blinker Signal Python Flask Event
Featured image of post polyfactory:不要手刻測試假資料,讓 type hint 自動生成
Python Testing

polyfactory:不要手刻測試假資料,讓 type hint 自動生成

polyfactory 根據 Python type hint 自動產生測試資料,支援 dataclass、Pydantic v2、TypedDict、msgspec。搭配 pytest fixture 用,省掉每次寫測試都要 hardcode 一堆假資料的麻煩。

2026 年 3 月 31 日
English
Polyfactory Pytest Testing Python Pydantic Dataclass Factory Fixture
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
1 2 3 4 5 6 10
© 2020 - 2026 recca0120 技術筆記
recca0120 on GitHub
使用 Hugo 建立
主題 Stack 由 Jimmy 設計