一、前置工作: 定好目標、定好專案名稱
二、備好系統需求 - paper work with "Claude Desktop"
三、備N好軟體專案,前端,後端,資料庫
四、備好 AI 環境, /mcp,/skills,/hooks
[-]install openspec (此案不用)
[v]install codegraph v1.5 (project) 改用 codebase-memory-mcp 取代。
[v]install gitea-mcp (project)
[v]install matt-skills
[v]setup gitea-mcp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ### 關閉程序 | |
| kill <PID> ## 正常關閉程序(推薦首選) | |
| kill -9 <PID> ## 強制關閉程序(程序卡死時使用) | |
| ### 快速查 PID | |
| > pidof 程式名稱 | |
| ### 用關鍵字搜尋程序 | |
| > ps aux | grep 程式名稱 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Docker 部署指令紀錄 | |
| # - 此例是用在部署 NET8 React in ASP.NET Web App 到 Docker Desktop。 | |
| # - 此例部署到 Docker Desktop 是 HTTP 模式。若要支援 HTTPS 需再加入 TLS/SSL 憑證與相關組態。 | |
| # (prefix) | |
| # - 前置工作:先手動發行專案到 `_publish` 目錄。 | |
| # - 前置工作:切換到專案根目錄。加入 `Dockerfile` 並填寫組態。 | |
| # (CI) | |
| # build (此例 build 只是複製檔案到 docker) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 與 webpack.config.lazy.js 搭配,以進行動態拆分。 | |
| import React, { lazy, Suspense, LazyExoticComponent, useMemo } from "react" | |
| type ComponentType = LazyExoticComponent<React.ComponentType<any>>; | |
| //## 所有作業都需先“註冊” | |
| const funcPool = new Map<string, ComponentType>(); | |
| funcPool.set("HomeIndex", lazy(() => import(/* webpackChunkName: "HomeIndex" */'./Home/HomeIndex'))); | |
| funcPool.set("DEMO001", lazy(() => import(/* webpackChunkName: "DEMO001" */'./Demo/DEMO001/AppForm'))); | |
| funcPool.set("DEMO002", lazy(() => import(/* webpackChunkName: "DEMO002" */'./Demo/DEMO002/AppForm'))); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 連線 on Linux | |
| redis-cli ## 預設 localhost:6379 | |
| redis-cli -h <hostname> -p <port:6379> | |
| 連線 on windows | |
| memurai-cli ## 預設 localhost:6379 | |
| memurai-cli -h <hostname> -p <port:6379> | |
| > PING ## PONG | |
| > SET key value |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private async void Form1_Load(object sender, EventArgs e) | |
| { | |
| // init | |
| cboStatus.SelectedIndex = 0; | |
| // init WebView2 → webAgent | |
| await webAgent.EnsureCoreWebView2Async(null); | |
| webAgent.CoreWebView2.Navigate("https://www.itfseafarers.org/en/abandonment-list/seafarer-abandonment"); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @functions { | |
| public static string MakeFake64(string b64) | |
| { | |
| var f64 = new System.Text.StringBuilder(); | |
| var vistor = b64.GetEnumerator(); | |
| while (vistor.MoveNext()) | |
| { | |
| switch (vistor.Current) | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Created by EIJI on 2014/1/3. | |
| * 民國年日期選擇器 https://codepen.io/not0000/pen/KvvGjr | |
| * 更多資訊可參考原作者文章 http://softmenlouis.blogspot.com/2017/04/blog-post_74.html | |
| */ | |
| (function(){ | |
| var yearTextSelector = '.ui-datepicker-year'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## 檢查版本 | |
| python --version # python 版本 | |
| python -m pip --version # pip 版本 | |
| python -m django --version # django 版本 | |
| django-admin --version # django-admin 版本 | |
| ## 用 django 建立第一個網站 | |
| django-admin startproject mysite # 建立 Django website 並指定名稱為 mysite。 | |
| cd mysite | |
| python manage.py runserver # 啟動 Django website。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /// ref→[Converting Action method call to async Action method call](https://stackoverflow.com/questions/33941583/converting-action-method-call-to-async-action-method-call) | |
| /// 把同步的 Action 叫用轉換成非同步的 Action 叫用。 | |
| /// Action ==> async Action | |
| Execute(()=> { do_some_thing }); | |
| 轉換成:即 Action ==> 非同步化 ==> Task<Func> | |
| ExecuteAsync(async ()=> { do_some_thing_async }); |
NewerOlder