IT Blog
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Write
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
      • Invitee
    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Sharing URL Help
Menu
Options
Versions and GitHub Sync Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Write
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
Invitee
Publish Note

Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

Your note will be visible on your profile and discoverable by anyone.
Your note is now live.
This note is visible on your profile and discoverable online.
Everyone on the web can find and read all notes of this public team.
See published notes
Unpublish note
Please check the box to agree to the Community Guidelines.
View profile
Engagement control
Commenting
Permission
Disabled Forbidden Owners Signed-in users Everyone
Enable
Permission
  • Forbidden
  • Owners
  • Signed-in users
  • Everyone
Suggest edit
Permission
Disabled Forbidden Owners Signed-in users Everyone
Enable
Permission
  • Forbidden
  • Owners
  • Signed-in users
Emoji Reply
Enable
Import from Dropbox Google Drive Gist Clipboard
   owned this note    owned this note      
Published Linked with GitHub
Subscribed
  • Any changes
    Be notified of any changes
  • Mention me
    Be notified of mention me
  • Unsubscribe
Subscribe
--- title: Programming Cheat Sheet date: 2025-08-27 tags: programming categories: programming collaborate: https://hackmd.io/5nNUgUfYQRGQRtJH7Jyozw --- # Algorithm ## OCW 1. [Hello 演算法](https://www.hello-algo.com/zh-hant/) 1. [csdiy.wiki](https://csdiy.wiki/en/) 1. [RePublic of CS](https://republic-of-cs.gitbook.io/e) 1. [The Missing Semester of Your CS Education](https://missing.csail.mit.edu/) 1. [Learn Git Branching](https://learngitbranching.js.org/) # Software ## 縮寫 - SDLC(Software Development Life Cycle,軟體開發生命週期) ## 名詞用法 - [TechTerms.com](https://techterms.com) - [程序代码中,怎么区分status和state?](https://www.zhihu.com/question/21994784) | | State | Status | |------------|----------------------------------------|-------------------------------------------| | 定義 | 表示具備明確轉換流程的狀態 | 表示單一、靜態的狀態或屬性 | | 轉換關係 | 狀態之間有明確的遷移關係 | 狀態之間沒有明確的轉換流程 | | 範例 | TCP 狀態(SYN_SENT、ESTABLISHED 等) | HTTP 狀態碼(200、404 等)、啟用/停用標記 | ## Project Management 1. [Quire](https://quire.io) <!-- ========================================================== --> ## Meaning of Abbreviations | Shortcut | Description | |:---------------- |:--------------------- | | <kbd>PR</kbd> | Pull Request | | <kbd>PTAL</kbd> | Please Take A Look | | <kbd>TBR</kbd> | To Be Reviewed | | <kbd>TL;DR</kbd> | Too Long; Didn’t Read | | <kbd>LGTM</kbd> | Looks Good To Me | | <kbd>SGTM</kbd> | Sounds Good To Me | | <kbd>TBD</kbd> | To Be Done | <!-- ========================================================== --> ## Environment <!-- 1. [docker](...) 1. [py-dependency](....) 1. [remote-dev](...) --> <!-- ========================================================== --> ## Linux 1. [FOSS Linux](https://www.fosslinux.com/) 1. [Linux Journey](https://linuxjourney.com/) ## Docker ##### Installation 1. [適用於Ubuntu與WSL的Nvidia Docker安裝方式](https://youtu.be/3Od1gTKUwTY) 1. [Tensorflow with GPU on Windows WSL using Docker](https://youtu.be/YozfiLI1ogY) 1. [【技術分享】重灌後,安裝 GPU 驅動以及 Docker](https://ntust-sims-lab.github.io/it-blog/install_gpu_docker_ubuntu2004/) 1. [Manage Docker as a non-root user](https://docs.docker.com/engine/install/linux-postinstall/) ##### Setup 1. [How to Use a .dockerignore File: A Comprehensive Guide with Examples](https://hn.mrugesh.dev/how-to-use-a-dockerignore-file-a-comprehensive-guide-with-examples) 1. [How to use Docker Build Args and Environment Variables](https://refine.dev/blog/docker-build-args-and-env-vars/) ##### docker network-alias 1. [談談 docker network-alias](https://blog.maxkit.com.tw/2017/04/docker-network-alias_30.html) ##### docker stopsignal ##### Book or Video 1. [不可不知的 Docker 開發部署實戰筆記:網站工程師一定要會的 8大核心能力](https://www.tenlong.com.tw/products/9786263333086) 1. [Virtual Machine (VM) vs Docker](https://youtu.be/a1M_thDTqmU?si=rBzQCVE0YonERAiP) ##### Error 1. [Docker Desktop WSL ext4.vhdx too large](https://stackoverflow.com/questions/70946140/docker-desktop-wsl-ext4-vhdx-too-large) 1. [設定 super user - nvidia-docker :权限被拒绝](https://cloud.tencent.com/developer/ask/sof/106208583) 1. [Docker image platform compatibility issue with MAC Silicon processors(M1/M2)](https://medium.com/@email.bajaj/docker-image-platform-compatibility-issue-with-mac-silicon-processors-m1-m2-ee2d5ea3ff0e) 1. [Solution for docker: invalid reference format: repository name must be lowercase](https://forum.codewithmosh.com/t/solution-for-docker-invalid-reference-format-repository-name-must-be-lowercase/10630) 1. [when using docker compose 3.8 getting 'version is unsupported' error](https://stackoverflow.com/questions/61344927/when-using-docker-compose-3-8-getting-version-is-unsupported-error) ## Moby 1. [The Moby Project](https://github.com/moby/moby/tree/master) # Python <!-- ========================================================== --> ## Design Pattern ##### 基本 - [Python 寫程式的「底線」:7 種使用技巧](https://haosquare.com/python-underscore/) - [Abstract Method - [Python物件導向]Python多型(Polymorphism)實用教學](https://www.learncodewithmike.com/2020/01/python-polymorphism.html) - [geoff_spacetime/變數命名慣例](https://www.threads.net/@geoff_spacetime/post/C-WfyS2zcqd?xmt=AQGzzlS9UXNGDnBhZtUt9kdmJB45NOEHuBbKKxqm4pgoDQ) - [Python 的檢查及測試工具箱](https://medium.com/pyladies-taiwan/python-的檢查及測試工具箱-eda71af68c19) ##### State Design Pattern 1. [The State Design Pattern in Python Explained](https://www.youtube.com/watch?v=5OzLrbk82zY) ##### Class 1. [Python dataclass 教學:輕鬆定義資料類別](https://haosquare.com/python-dataclass/) 1. [Python Property 教學:保護變數資料的 Getter 與 Setter](https://haosquare.com/python-property/) 1. [Python Type Hints 教學:我犯過的 3 個菜鳥錯誤](https://haosquare.com/python-type-hints-3-beginner-mistakes/) 1. [Pydantic: Simplifying Data Validation in Python](https://realpython.com/python-pydantic/) ##### Enum 1. [Python Enum 枚舉教學:有條理管理常數集合的好工具](https://haosquare.com/python-enum/) ##### Documentation 1. [mkdocstrings/griffe](https://github.com/mkdocstrings/griffefv) 1. [Mintlify](https://mintlify.com/) > Meet the next generation of documentation. AI-native, beautiful out-of-the-box, and built for developers 1. [Top 6 Tools to Turn Code into Beautiful Diagrams](https://youtu.be/jCd6XfWLZsg?si=B4BemSK_x2dlCOhc) 1. [Diagrams as Code](https://diagrams.mingrammer.com/) ##### Project 1. [astral-sh/uv](https://github.com/astral-sh/uv) > An extremely fast Python package installer and resolver, written in Rust. 1. [astral-sh/rye](https://github.com/astral-sh/rye) > a Hassle-Free Python Experience 1. [cookiecutter](https://github.com/cookiecutter/cookiecutter) > A cross-platform command-line utility that creates projects from cookiecutters (project templates), e.g. Python package projects, C projects. 1. [pypa/hatch](https://github.com/pypa/hatch) > Modern, extensible Python project management ##### Flow Chart 1. [cdfmlr/pyflowchart](https://github.com/cdfmlr/pyflowchart) 1. [PYTHON 自動產生 FLOWCHART !](https://www.8890.tw/python-自動產生-flowchart/) ##### Pipeline 1. [Data PIPELINE - Orchest](https://orchest.readthedocs.io/en/stable/#) 1. [airflow使用指南-机器学习工程自动化](https://blog.csdn.net/weixin_42010722/article/details/121453151) ##### Docker > 減少 Image 大小 | 參數 | 解釋 | |:--------------------------------- | ----------------------------------------------------- | | `PIP_DISABLE_PIP_VERSION_CHECK=1` | 關閉 pip 在執行時檢查「pip 本身是否有新版」的提示 | | `PIP_NO_CACHE_DIR=1` | 讓 pip 安裝套件時不要保留下載的 wheel 或壓縮檔快取 | | `PYTHONDONTWRITEBYTECODE=1` | 讓 Python 不要在執行時生成 `.pyc / __pycache__` 檔案 | | `PYTHONUNBUFFERED=1` | 讓 Python 輸出(stdout/stderr)不經過快取,直接 flush | # Database ## NoSQL 1. [SQL & MongoDB Query Comparison](https://notes.boshkuo.com/docs/MongoDB/sql-mql-comparison) ## SQL 1. [近似索引](https://www.alibabacloud.com/help/tc/polardb/polardb-for-postgresql/approximate-index#37f006dd29xum) # Julia # SRE __Site Reliability Engineering__ ## Termindology 1. Chaos Engineering - 混沌工程 ## Article 1. [✨️什麼是混沌工程(Chaos Engineering)](https://www.threads.net/@og_programming/post/DCwaIksPw2l) # CI/CD <!-- ========================================================== --> ## Termindology 1. Infrastructure as Code _IaC_ 1. GitOps <!-- ========================================================== --> ## Version Control ##### Distributed Version Control System,DVCS ##### Center Version Control System ##### Team Foundation Version Control, TFVC ##### git ##### DVC > ML Experiments Management with Git 1. [Data Version Control | Git for Data & Models | ML Experiments Management](https://dvc.org) 1. [Data Version Control With Python and DVC](https://realpython.com/python-data-version-control/) ##### elementary > Open-source data observability for analytics engineers 1. https://github.com/elementary-data/elementaryelementary <!-- ========================================================== --> ## Workflow/Pipeline/MLops ##### Crontab - [Ubuntu 排程設定 :Crontab 排程使用教學](https://jqnets.com/blog/ubuntu-排程設定-:crontab-排程使用教學/) ##### Jenkins ##### Github action - [What's the difference between a GitHub action and a workflow?](https://dev.to/github/whats-the-difference-between-a-github-action-and-a-workflow-2gba) - [Actionforge is a VS Code Extension to Build GitHub Workflows Visually](https://www.infoq.com/news/2024/03/actionforge-github-action-gui/) ##### Airflow ##### mage-ai > The modern replacement for Airflow. Build, run, and manage data pipelines for integrating and transforming data. 1. https://github.com/mage-ai/mage-ai ##### wandb > A tool for visualizing and tracking your machine learning experiments. 1. https://github.com/wandb/wandb ##### Drone CI ##### Flyte 1. An open-source orchestrator that facilitates building production-grade data and ML pipelines ##### datachecks > Datachecks is an open-source data monitoring tool that helps to monitor the data quality of databases and data pipelines. It identifies potential issues, including in the databases and data pipelines. It helps to identify the root cause of the data quality issues and helps to improve the data quality. 1. https://github.com/waterdipai/datachecks <!-- ========================================================== --> ## Logs ##### hydra > A framework for elegantly configuring complex applications 1. https://github.com/facebookresearch/hydra ##### whylogs > The open standard for data logging 1. https://github.com/whylabs/whylogs <!-- ========================================================== --> # git ## Articles 1. [菜雞新訓記 (1): 使用 Git 來進行版本控制吧](https://github.com/Igouist/hello-git) 2. [What is Git? Our beginner’s guide to version control](https://github.blog/developer-skills/programming-languages-and-frameworks/what-is-git-our-beginners-guide-to-version-control/) 3. [Git Commit Message 這樣寫會更好,替專案引入規範與範例](https://wadehuanglearning.blogspot.com/2019/05/commit-commit-commit-why-what-commit.html) 4. [How to write a good commit message | git tutorial](https://youtu.be/g9-X6fR2eYA) 5. [Conventional Commits 1.0.0](https://www.conventionalcommits.org/en/v1.0.0/) 6. [requarks/changelog-action](https://github.com/requarks/changelog-action) 7. [🔄 全面掌握 Git 撤銷:詳細解析在 4 種不同層級下的操作方式](https://blog.o-w-o.cc/archives/git-revert-tutorial) 8. [Igouist/hello-git](https://github.com/Igouist/hello-git) 9. [開發 Git 的人所推薦的 .gitconfig 設定](https://blog.gslin.org/archives/2025/02/27/12274/開發-git-的人所推薦的-gitconfig-設定/) 10. [偉大的 Git commit message rules](https://hackmd.io/@howhow/git_commit) ## Commit message 1. [pre-commit](https://pre-commit.com/) 1. [Husky](https://typicode.github.io/husky/) 1. [I Do this for every commit and why you should too!](https://www.youtube.com/watch?v=NK4uXmkGMSU) 1. [MichaelCurrin/auto-commit-msg](https://github.com/MichaelCurrin/auto-commit-msg) 1. [Git Squash: How to Condense Your Commit History](https://www.cloudbees.com/blog/git-squash-how-to-condense-your-commit-history) 1. [Smoother rebases with auto-squashing Git commits](https://andrewlock.net/smoother-rebases-with-auto-squashing-git-commits/) 1. [Git Squash Simplified](https://dev.to/pb/git-squash-simplified-3ba1) 1. [gitmoji](https://gitmoji.dev/) 1. [di-sukharev/opencommit](https://github.com/di-sukharev/opencommit) ## Command ```bash # 列出所有曾經有 commit 過的文件 git log --pretty=format: --name-only --diff-filter=A | sort -u ``` ```bash # 刪除所有跟 a.txt 相關的紀錄 git filter-branch --force --index-filter 'git rm --cached --ignore-unmatch a.txt' --prune-empty --tag-name-filter cat -- --all ``` ## Commit message Convention | Type | Description | |:------------------- |:-------------------------------------------------------- | | <kbd>feat</kbd> | Add new features | | <kbd>chore</kbd> | Build process or auxiliary tool changes | | <kbd>fix</kbd> | Fix some bugs | | <kbd>refactor</kbd> | A code change that neither fixes a bug or adds a feature | | <kbd>style</kbd> | Change coding style | | <kbd>docs</kbd> | Write new documentation | ## Branch Naming Convention | Type | Description | |:--------------- |:-------------------------------------- | | <kbd>wip</kbd> | Works in progress | | <kbd>feat</kbd> | Feature | | <kbd>bug</kbd> | Bug fix or experiment | | <kbd>junk</kbd> | Throwaway branch created to experiment | ## Rebase - [What does "pick" in Git's interactive rebase do?](https://stackoverflow.com/questions/45563865/what-does-pick-in-gits-interactive-rebase-do) - [About Git rebase](https://docs.github.com/en/get-started/using-git/about-git-rebase) | Commands | Description | |:----------------- |:------------------------------------------------------------- | | <kbd>pick</kbd> | 保留該提交,不進行任何更改 | | <kbd>reword</kbd> | 修改該提交的提交訊息 | | <kbd>edit</kbd> | 挑選該提交,並在應用該提交時停止,以便你可以進行修改 | | <kbd>squash</kbd> | 將該提交與前一個提交合併成一個提交 | | <kbd>fixup</kbd> | 與 squash 類似,但用於合併提交而無需保留該提交的提交訊息 | | <kbd>exec</kbd> | 執行一個 shell 命令。這允許你在 rebase 過程中執行自定義的命令 | # Web ## API - [API Parrot](https://apiparrot.com/) - https://levelup.gitconnected.com/api-design-101-from-basics-to-best-practices-a0261cdf8886 - [在 FastAPI Routes 以外無痛複用 Depends 的方法](https://j-sui.com/2024/10/26/use-fastapi-depends-outside-fastapi-routes/) # Open Source ## Alternative 1. [OpenAlternative](https://openalternative.co) 1. [Collecting the Best Free AI APIs for You](https://freeaihunter.com) 1. [Githunt](https://kamranahmed.info/githunt) ## Mentorship 1. [給薪的遠端開源實習大比拼:GSoC vs Outreachy](https://hackmd.io/@9ukei/r1YtFu2vi) # AI ## MCP - [GitHub MCP Registry](https://github.com/mcp) - [OSS MCP Community Registry](https://github.com/modelcontextprotocol/registry/)

Import from clipboard

Paste your markdown or webpage here...

Advanced permission required

Your current role can only read. Ask the system administrator to acquire write and comment permission.

This team is disabled

Sorry, this team is disabled. You can't edit this note.

This note is locked

Sorry, only owner can edit this note.

Reach the limit

Sorry, you've reached the max length this note can be.
Please reduce the content or divide it to more notes, thank you!

Import from Gist

Import from Snippet

or

Export to Snippet

Are you sure?

Do you really want to delete this note?
All users will lose their connection.

Create a note from template

Create a note from template

Oops...
This template has been removed or transferred.
Upgrade
All
  • All
  • Team
No template.

Create a template

Upgrade

Delete template

Do you really want to delete this template?
Turn this template into a regular note and keep its content, versions, and comments.

This page need refresh

You have an incompatible client version.
Refresh to update.
New version available!
See releases notes here
Refresh to enjoy new features.
Your user state has changed.
Refresh to load new user state.

Sign in

Forgot password

or

By clicking below, you agree to our terms of service.

Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
Wallet ( )
Connect another wallet

New to HackMD? Sign up

Help

  • English
  • 中文
  • Français
  • Deutsch
  • 日本語
  • Español
  • Català
  • Ελληνικά
  • Português
  • italiano
  • Türkçe
  • Русский
  • Nederlands
  • hrvatski jezik
  • język polski
  • Українська
  • हिन्दी
  • svenska
  • Esperanto
  • dansk

Documents

Help & Tutorial

How to use Book mode

Slide Example

API Docs

Edit in VSCode

Install browser extension

Contacts

Feedback

Discord

Send us email

Resources

Releases

Pricing

Blog

Policy

Terms

Privacy

Cheatsheet

Syntax Example Reference
# Header Header 基本排版
- Unordered List
  • Unordered List
1. Ordered List
  1. Ordered List
- [ ] Todo List
  • Todo List
> Blockquote
Blockquote
**Bold font** Bold font
*Italics font* Italics font
~~Strikethrough~~ Strikethrough
19^th^ 19th
H~2~O H2O
++Inserted text++ Inserted text
==Marked text== Marked text
[link text](https:// "title") Link
![image alt](https:// "title") Image
`Code` Code 在筆記中貼入程式碼
```javascript
var i = 0;
```
var i = 0;
:smile: :smile: Emoji list
{%youtube youtube_id %} Externals
$L^aT_eX$ LaTeX
:::info
This is a alert area.
:::

This is a alert area.

Versions and GitHub Sync
Get Full History Access

  • Edit version name
  • Delete

revision author avatar     named on  

More Less

Note content is identical to the latest version.
Compare
    Choose a version
    No search result
    Version not found
Sign in to link this note to GitHub
Learn more
This note is not linked with GitHub
 

Feedback

Submission failed, please try again

Thanks for your support.

On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

Please give us some advice and help us improve HackMD.

 

Thanks for your feedback

Remove version name

Do you want to remove this version name and description?

Transfer ownership

Transfer to
    Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

      Link with GitHub

      Please authorize HackMD on GitHub
      • Please sign in to GitHub and install the HackMD app on your GitHub repo.
      • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
      Learn more  Sign in to GitHub

      Push the note to GitHub Push to GitHub Pull a file from GitHub

        Authorize again
       

      Choose which file to push to

      Select repo
      Refresh Authorize more repos
      Select branch
      Select file
      Select branch
      Choose version(s) to push
      • Save a new version and push
      • Choose from existing versions
      Include title and tags
      Available push count

      Pull from GitHub

       
      File from GitHub
      File from HackMD

      GitHub Link Settings

      File linked

      Linked by
      File path
      Last synced branch
      Available push count

      Danger Zone

      Unlink
      You will no longer receive notification when GitHub file changes after unlink.

      Syncing

      Push failed

      Push successfully