Skip to content

Commit fc28155

Browse files
committed
Enhance documentation and examples across various notes
- Updated DMN documentation with detailed tables and syntax explanations. - Added FAQ section to esbuild notes, outlining unsupported features. - Included insights on supported data types in orpc documentation. - Improved TypeScript FAQ with additional references and best practices. - Enhanced tsconfig documentation with command examples. - Expanded ShadowDOM notes with detailed explanations on open vs closed modes. - Updated CSS-in-JS documentation with new libraries and resources. - Added references to Mono Icons and Nerd Fonts in icon documentation. - Updated image links in various stories to point to the attic repository. - Improved formatting and clarity in multiple markdown files.
1 parent 5077531 commit fc28155

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+608
-198
lines changed

notes/ai/dev/agents.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ title: AGENTS.md
88
- 支持 Codex, Amp, Jules, Cursor, Factory, RooCode
99
- 参考
1010
- https://agents.md/
11+
- Calude Code https://github.com/anthropics/claude-code/issues/6235
1112
- 类似
1213
- CLAUDE.md
1314
- GEMINI.md
1415
- https://github.com/search?q=path:**/CLAUDE.md&type=code
1516
- https://github.com/search?q=path:**/settings.local.json&type=code
16-

notes/ai/dev/litellm/README.md

Lines changed: 0 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -54,61 +54,6 @@ title: LiteLLM
5454
- 配置文件支持从 S3 读取
5555
- `LITELLM_CONFIG_BUCKET_{TYPE,NAME,OBJECT_KEY}`
5656

57-
## config.yaml
58-
59-
- https://docs.litellm.ai/docs/proxy/configs
60-
61-
```yaml
62-
include:
63-
- model_config.yaml
64-
65-
model_list:
66-
router_settings:
67-
litellm_settings:
68-
general_settings:
69-
environment_variables:
70-
```
71-
72-
```yaml
73-
model_list:
74-
- model_name: glm-4.5
75-
litellm_params:
76-
model: openai/glm-4.5
77-
litellm_credential_name: zhipu_credential
78-
79-
- model_name: glm-4.5-air
80-
litellm_params:
81-
model: openai/glm-4.5-air
82-
litellm_credential_name: zhipu_credential
83-
84-
- model_name: '*'
85-
litellm_params:
86-
model: openai/glm-4.5-air
87-
litellm_credential_name: zhipu_credential
88-
89-
credential_list:
90-
- credential_name: zhipu_credential
91-
credential_values:
92-
api_base: os.environ/ZHIPU_API_BASE
93-
api_key: os.environ/ZHIPU_API_KEY
94-
credential_info:
95-
description: '智普'
96-
```
97-
98-
**支持通配符**
99-
100-
```yaml
101-
model_list:
102-
- model_name: xai/*
103-
litellm_params:
104-
model: xai/*
105-
api_key: os.environ/XAI_API_KEY
106-
107-
litellm_settings:
108-
check_provider_endpoint: true
109-
```
110-
111-
11257
# FAQ
11358

11459
## got an unexpected keyword argument 'thinking'.

notes/ai/dev/mcp/mcp-awesome.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ tags:
6969
- unrestricted
7070
- PostgreSQL MCP
7171
- Playwright MCP
72+
- https://github.com/microsoft/playwright-mcp#tools
7273
- Slack MCP
7374
- Google Sheets MCP
7475
- Sentry MCP
@@ -289,3 +290,43 @@ services:
289290
- https://github.com/caol64/wenyan-mcp
290291
- https://github.com/caol64/wenyan
291292
- Markdown文章排版美化工具,支持微信公众号、今日头条、知乎等平台。
293+
294+
## Prometheus
295+
296+
- Prometheus
297+
- https://github.com/pab1it0/prometheus-mcp-server
298+
- https://github.com/idanfishman/prometheus-mcp
299+
300+
## Chrome DevTool MCP
301+
302+
- https://github.com/ChromeDevTools/chrome-devtools-mcp/
303+
304+
```json
305+
{
306+
"mcpServers": {
307+
"chrome-devtools": {
308+
"command": "pnpx",
309+
"args": ["chrome-devtools-mcp@latest"]
310+
}
311+
}
312+
}
313+
```
314+
315+
```
316+
Verify in the browser that your change works as expected.
317+
318+
A few images on localhost:8080 are not loading. What's happening?
319+
320+
Why does submitting the form fail after entering an email address?
321+
322+
The page on localhost:8080 looks strange and off. Check what's happening there.
323+
324+
Localhost:8080 is loading slowly. Make it load faster.
325+
326+
Please check the LCP of web.dev.
327+
```
328+
329+
- Linux / MacOS `$HOME/.cache/chrome-devtools-mcp/chrome-profile-$CHANNEL`
330+
- Windows `%HOMEPATH%/.cache/chrome-devtools-mcp/chrome-profile-$CHANNEL`
331+
- https://github.com/ChromeDevTools/chrome-devtools-mcp#tools
332+
- --connect-url

notes/ai/inference/README.md

Lines changed: 29 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -24,27 +24,35 @@ title: 推理
2424

2525
---
2626

27-
| metric | stand for | meaning |
28-
| ----------- | --------------------- | -------------------------- |
29-
| TTFT | Time to First Token | 首个Token延迟 |
30-
| TPOT | Time Per Output Token | 每输出Token延迟 |
31-
| IPS | Inferences Per Second | 每秒推理次数 |
32-
| TPS | Tokens Per Second | 每秒生成Token数 |
33-
| PTS | Prefill Tokens/Second | Prefill阶段每秒处理Token数 |
34-
| PTT | Prefill Total Time | Prefill总耗时 |
35-
| DTT | Decode Total Time | Decode总耗时 |
36-
| KV Cache | KV Cache Usage | KV缓存使用量 |
37-
| KV Hit |
38-
| RPS | Requests Per Second | 每秒请求数 |
39-
| QPS | Queries Per Second | 每秒查询数 |
40-
| CCU | Concurrent Users | 并发用户数 |
41-
| ITL | Input Token Length | 输入Token长度 |
42-
| OTL | Output Token Length | 输出Token长度 |
43-
| P50/P95/P99 | Percentile Latency | 百分位延迟 |
44-
| GPU Util | GPU Utilization | GPU利用率 |
45-
| Memory | Memory Usage | 内存使用量 |
46-
| E2E Latency |
47-
| TkPS |
27+
| metric | stand for | meaning |
28+
| -------------- | ------------------------ | ------------------------------ |
29+
| TTFT | Time to First Token | 首个Token延迟 |
30+
| TPOT | Time Per Output Token | 每输出Token延迟 |
31+
| TGT | Token Generation Time | Token生成总时间(不含TTFT) |
32+
| E2E Latency | End-to-End Latency | 端到端总延迟 |
33+
| ITL | Inter-Token Latency | Token间延迟 |
34+
| IPS | Inferences Per Second | 每秒推理次数 |
35+
| TPS | Tokens Per Second | 每秒生成Token数 |
36+
| TkPS | Throughput (Tokens/Sec) | 吞吐量(Token/秒) |
37+
| PTS | Prefill Tokens/Second | Prefill阶段每秒处理Token数 |
38+
| PTT | Prefill Total Time | Prefill总耗时 |
39+
| DTT | Decode Total Time | Decode总耗时 |
40+
| RPS | Requests Per Second | 每秒请求数 |
41+
| QPS | Queries Per Second | 每秒查询数 |
42+
| CCU | Concurrent Users | 并发用户数 |
43+
| ITL | Input Token Length | 输入Token长度 |
44+
| OTL | Output Token Length | 输出Token长度 |
45+
| P50/P95/P99 | Percentile Latency | 百分位延迟 |
46+
| KV Cache | KV Cache Usage | KV缓存使用量 |
47+
| KV Hit | KV Cache Hit Rate | KV缓存命中率 |
48+
| GPU Util | GPU Utilization | GPU利用率 |
49+
| Memory | Memory Usage | 内存使用量 |
50+
| Batch Size | Batch Size | 批处理大小 |
51+
| Context Length | Context Length | 上下文长度 |
52+
53+
```
54+
Tokenization | Prefill | Decode | Detokenization | First Token
55+
```
4856

4957
- 延迟
5058
- 单次推理延迟

notes/ai/service/claude-code.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ npm install -g @anthropic-ai/claude-code
3131

3232
CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1 claude
3333

34+
ANTHROPIC_BASE_URL= ANTHROPIC_AUTH_TOKEN= ANTHROPIC_MODEL= claude
35+
3436
npx -y ccusage blocks --live
3537
npx -y ccusage session
3638

notes/ai/service/langfuse.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,8 @@ docker run --name langfuse-web \
4141
-a STDOUT \
4242
langfuse/langfuse:3
4343
```
44+
45+
## Insight
46+
47+
- Trace - 一次完整执行会话
48+
- Observation - 执行过程中的具体步骤

notes/dev/dev-practice.md

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,106 @@ tags:
1010
- 不同项目使用不同 localhost 作为 origin, 可以避免跨域问题
1111
- 例如 project1.localhost, project2.localhost
1212
- 这些都会解析为 127.0.0.1
13+
14+
```json title=".claude/setting.json"
15+
{
16+
"permissions": {
17+
"allow": [
18+
"mcp__context7",
19+
"mcp__feishu__contact_v3_user_batchGetId",
20+
"mcp__feishu__docx_v1_document_rawContent",
21+
"mcp__feishu__im_v1_chat_list",
22+
"mcp__feishu__im_v1_chatMembers_get",
23+
"mcp__feishu__im_v1_message_list",
24+
"mcp__feishu__wiki_v2_space_getNode",
25+
"mcp__feishu-docs",
26+
"mcp__gitlab__get_project",
27+
"mcp__linear__get_user",
28+
"mcp__linear__list_issues",
29+
"mcp__linear__list_my_issues",
30+
"mcp__playwright",
31+
"mcp__todoist__find-projects",
32+
"mcp__todoist__find-tasks",
33+
"mcp__todoist__get-overview",
34+
"Bash(awk:*)",
35+
"Bash(cat:*)",
36+
"Bash(clear:*)",
37+
"Bash(cp:*)",
38+
"Bash(curl:*)",
39+
"Bash(cut:*)",
40+
"Bash(date:*)",
41+
"Bash(df:*)",
42+
"Bash(diff:*)",
43+
"Bash(du:*)",
44+
"Bash(echo:*)",
45+
"Bash(env:*)",
46+
"Bash(find:*)",
47+
"Bash(git add:*)",
48+
"Bash(git commit:*)",
49+
"Bash(git diff:*)",
50+
"Bash(git log:*)",
51+
"Bash(git pull:*)",
52+
"Bash(git push:*)",
53+
"Bash(git rev-parse:*)",
54+
"Bash(git shortlog:*)",
55+
"Bash(git tag:*)",
56+
"Bash(grep:*)",
57+
"Bash(head:*)",
58+
"Bash(history:*)",
59+
"Bash(less:*)",
60+
"Bash(ls:*)",
61+
"Bash(man:*)",
62+
"Bash(mkdir:*)",
63+
"Bash(more:*)",
64+
"Bash(mv:*)",
65+
"Bash(pnpm add:*)",
66+
"Bash(pnpm list:*)",
67+
"Bash(pnpm vitest*)",
68+
"Bash(ps:*)",
69+
"Bash(pwd:*)",
70+
"Bash(rm:*)",
71+
"Bash(sed:*)",
72+
"Bash(sort:*)",
73+
"Bash(tail:*)",
74+
"Bash(top:*)",
75+
"Bash(touch:*)",
76+
"Bash(tr:*)",
77+
"Bash(tree:*)",
78+
"Bash(uname:*)",
79+
"Bash(whoami:*)",
80+
"Bash(xargs:*)",
81+
"WebFetch(domain:base-ui.com)",
82+
"WebFetch(domain:daisyui.com)",
83+
"WebFetch(domain:docs.anthropic.com)",
84+
"WebFetch(domain:github.com)",
85+
"WebFetch(domain:open.feishu.cn)",
86+
"WebFetch(domain:raw.githubusercontent.com)",
87+
"WebSearch",
88+
"Write(**/*.local.md)"
89+
]
90+
}
91+
}
92+
```
93+
94+
## AGENTS.md
95+
96+
```md
97+
# RULES
98+
99+
- use "context7" tool for api docs checking
100+
- may use "playwright" tool to verify storybook stories
101+
- use "zod" for schema definition and validation
102+
- DONT use `nullable()` use `nullish()` instead
103+
- try to avoid using transform, use `z.coerce` instead
104+
- place `export const Type = z.infer<TypeSchema>` above `TypeSchema`
105+
- React
106+
- using v19
107+
- no need to forwardRef
108+
- avoid using React namespace like `React.ReactNode`, using `ReactNode` instead
109+
- TypeScript
110+
- avoid using `null`, use `undefined` or optional field instead
111+
- NEVER use `enum` , use `Object.freeze({__proto__:null} as const)` instead
112+
- NEVER use `namespace`, use `export * as XYZ from './xyz.mod'` instead
113+
- HTML
114+
- `<button>` should always have `type` attribute
115+
```

notes/dev/dict.md

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2267,6 +2267,31 @@ try to get the other instance of the resource. In the unfortunate case it might
22672267

22682268
- https://tjj.gz.gov.cn/stats_newtjyw/zjtj/tjzs/content/post_8540550.html
22692269

2270+
## Cost vs Price
2271+
2272+
- Cost - 成本
2273+
- 向内看
2274+
- 生产者(卖方) 所投入的全部资源和费用的总和
2275+
- 内部视角
2276+
- 通常包括
2277+
- 原材料成本:制造产品所需的材料费用。
2278+
- 人力成本:员工的工资、福利等。
2279+
- 研发成本:产品设计和技术开发过程中的投入。
2280+
- 运营成本:场地租金、水电费、设备折旧等。
2281+
- 营销和销售成本:广告、推广和销售人员的开销。
2282+
- Price - 价格
2283+
- 向外看
2284+
- 销售时标定的金额
2285+
- 消费者(买方) 需要支付的钱
2286+
- 外部视角
2287+
- 影响因素
2288+
- 生产成本 (Cost):价格必须高于成本才能盈利。
2289+
- 期望利润 (Profit Margin):商家希望从每个产品中赚多少钱。
2290+
- 市场供需关系 (Supply and Demand):商品稀缺时价格上涨,过剩时价格下跌。
2291+
- 品牌价值与定位 (Brand Value):高端品牌可以设定更高的价格。
2292+
- 竞争对手定价 (Competition):需要参考同类产品的市场价格。
2293+
- 消费者感知价值 (Perceived Value):消费者认为这个产品值多少钱。
2294+
22702295
## 常见读音错误
22712296

22722297
> 文字只是工具
@@ -2352,7 +2377,7 @@ try to get the other instance of the resource. In the unfortunate case it might
23522377

23532378
## Abbr
23542379

2355-
| abbr. | latin | en |
2380+
| abbr. | latin | en |
23562381
| ---------- | --------------- | ----------- |
23572382
| no., №, Nº | numero | number |
23582383
| lb | lībra (balance) | pound |

notes/languages/go/go-lint.md

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -32,30 +32,6 @@ CONF
3232
gosec -conf gosec.conf.json ./...
3333
```
3434

35-
## golangci-lint
36-
37-
38-
```go
39-
//nolint
40-
//nolint:golint,unused
41-
//nolint:golint,unused // 解释说明
42-
```
43-
44-
```bash
45-
VER=1.50.1
46-
# curl -LO https://github.com/golangci/golangci-lint/releases/download/v$VER/golangci-lint-$VER-darwin-amd64.tar.gz
47-
curl -LO https://echo.wener.cc/https://github.com/golangci/golangci-lint/releases/download/v$VER/golangci-lint-$VER-darwin-amd64.tar.gz
48-
tar zxvf golangci-lint-$VER-darwin-amd64.tar.gz
49-
mv golangci-lint-$VER-darwin-amd64/golangci-lint ~/go/bin/
50-
```
51-
52-
- https://golangci-lint.run/usage/configuration/
53-
- https://golangci-lint.run/usage/linters
54-
- Support of generics [#2649](https://github.com/golangci/golangci-lint/issues/2649)
55-
- [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action)
56-
- https://github.com/golangci/golangci-lint/blob/master/.golangci.yml
57-
- https://github.com/github/git-sizer/blob/master/.golangci.toml
58-
5935
## revive
6036

6137
- [mgechev/revive](https://github.com/mgechev/revive)

notes/languages/go/go-module.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,14 @@ go install github.com/path/to/bin@latest # 安装
4242
go mod tidy -go=1.17
4343
# 用 1.6 选择逻辑 然后升级 1.7
4444
go mod tidy -go=1.16 && go mod tidy -go=1.17
45+
46+
47+
# 独立的工具 mod 能避免依赖冲突问题
48+
# go.tool.mod
49+
go mod init -modfile=go.tool.mod example.com/tool
50+
51+
go get -tool -modfile=go.tool.mod github.com/golangci/golangci-lint/v2/cmd/golangci-lint
52+
go tool -modfile=go.tool.mod golangci-lint run
4553
```
4654

4755
```go-mod

0 commit comments

Comments
 (0)