Compare commits

..

91 Commits

Author SHA1 Message Date
1bdd1afdd3 released v1.41.0 2023-11-26 20:06:43 +08:00
b137c67956 doc: update README.md. 2023-11-26 12:05:31 +00:00
feee371c24 doc: update CONTRIBUTING.md. 2023-11-26 12:05:30 +00:00
eaee21d4bf chore: add sponsor badge. 2023-11-26 20:04:04 +08:00
d3b7cfb613 doc: update README.md. 2023-11-22 11:03:08 +00:00
c1e3cdabcf doc: update CONTRIBUTING.md. 2023-11-22 11:03:07 +00:00
5b02481425 doc: Update linux-command.md (#467)
add `tree` command
2023-11-22 19:02:01 +08:00
4e651e3109 doc: update README.md. 2023-10-18 08:09:07 +00:00
4186c93202 doc: update CONTRIBUTING.md. 2023-10-18 08:09:06 +00:00
59509fc94e doc: update docs/lua.md 2023-10-18 16:06:44 +08:00
0acb2ca1f3 doc: update docs/symbol-code.md 2023-10-14 00:10:32 +08:00
a7f85c5268 doc: Update README.md (#102) 2023-10-10 04:09:01 -05:00
c993ed3228 ci: update workflows config. 2023-10-10 15:41:11 +08:00
f11a3bf99e ci: update workflows config. 2023-10-10 15:37:27 +08:00
c51e52b5c5 released v1.40.0 2023-10-10 15:24:13 +08:00
36d2ad88a6 doc: update docs/feds.md 2023-10-10 02:00:26 -05:00
17df489348 doc: update README.md. 2023-10-08 12:01:35 +00:00
8c71fdee72 doc: update CONTRIBUTING.md. 2023-10-08 12:01:35 +00:00
445ba9a5f8 doc: update docs/python.md (#451) 2023-10-08 06:59:56 -05:00
49d5254f2b doc: update README.md. 2023-10-07 17:03:34 +00:00
4bff216f48 doc: update CONTRIBUTING.md. 2023-10-07 17:03:33 +00:00
58425e0318 doc: update docs/ruby.md (#448)
* add doc for pg_upgrade

* add doc for ruby bundle lock
2023-10-07 12:02:00 -05:00
be3818f818 doc: update docs/nginx.md. (#446) 2023-09-28 14:34:56 +08:00
b717b1c67f doc: update docs/nginx.md. (#446) 2023-09-28 14:26:16 +08:00
d4b984c509 doc: update README.md. 2023-09-27 11:00:18 +00:00
2dbfe101c7 doc: update CONTRIBUTING.md. 2023-09-27 11:00:17 +00:00
34434fd402 Correct operator translation (#443) 2023-09-27 18:58:40 +08:00
68b7bf36bb doc: update docs/css.md 2023-09-27 10:34:27 +08:00
5815147509 doc: update README.md. 2023-09-26 12:48:55 +00:00
0b669ed687 doc: update CONTRIBUTING.md. 2023-09-26 12:48:53 +00:00
3c74a22420 doc: Update README.md (#442) 2023-09-26 20:47:11 +08:00
3a0a9f72f7 doc: update README.md. 2023-09-23 10:11:48 +00:00
84fa394a3a doc: update CONTRIBUTING.md. 2023-09-23 10:11:47 +00:00
c70a95e007 doc: update typescript.md (#440)
修正 范型推导出列表字面量内示例代码错误
2023-09-23 18:10:09 +08:00
c9dcfd2829 doc: update README.md. 2023-09-23 09:28:11 +00:00
bc4dea6930 doc: update CONTRIBUTING.md. 2023-09-23 09:28:10 +00:00
106d7aa602 doc: update typescript.md (#439)
修正类型技巧内Capitalize的推导结果
2023-09-23 17:26:33 +08:00
ecb59d8980 doc: update docs/css.md 2023-09-22 08:58:15 +08:00
f6cb68debf doc: Update feds.md 2023-09-20 10:09:02 +08:00
98f5cdd08c doc: update README.md. 2023-09-19 14:41:02 +00:00
355d360720 doc: update CONTRIBUTING.md. 2023-09-19 14:41:01 +00:00
5e12094078 doc: update docs/postgres.md (#436) 2023-09-19 22:39:42 +08:00
71eb82ae3a doc: update README.md. 2023-09-19 09:31:23 +00:00
6e1dc3467e doc: update CONTRIBUTING.md. 2023-09-19 09:31:22 +00:00
fba093f495 doc: Update gitlab-ci.md 2023-09-19 17:29:43 +08:00
34f6bba4a1 doc: Update ci.yml 2023-09-18 17:29:49 +08:00
7597799323 doc: Update README.md 2023-09-18 15:50:48 +08:00
11818ada00 doc: update README.md. 2023-09-16 15:16:12 +00:00
4cb46dc4ea doc: update CONTRIBUTING.md. 2023-09-16 15:16:11 +00:00
6ed219e2e1 doc: Update linux-command.md (#433)
add shortcuts
2023-09-16 23:14:02 +08:00
bffbc128f2 doc: update README.md. 2023-09-15 07:28:03 +00:00
b1ba4282f7 doc: update CONTRIBUTING.md. 2023-09-15 07:28:03 +00:00
bbd3292c8e doc: update docs/python.md (#432) 2023-09-15 15:26:50 +08:00
b14257542f doc: update docs/typescript.md 2023-09-14 10:52:05 +08:00
8f782f6204 doc: update README.md. 2023-09-12 15:23:11 +00:00
8e0df579c3 doc: update CONTRIBUTING.md. 2023-09-12 15:23:09 +00:00
870cc88b2a doc: Update docker.md (#429)
Add shortcuts of exit docker container
2023-09-12 23:21:41 +08:00
0f475095ad doc: Update README.md (#102) 2023-09-12 11:09:43 +08:00
e79adc056d doc: Update README.md 2023-09-12 08:49:24 +08:00
cc2061077c chore: update .refsrc.json 2023-09-11 20:07:21 +08:00
c407dce74b chore(deps): update dependency refs-cli to v1.5.1 2023-09-11 20:02:14 +08:00
08614a6ce8 doc: update docs/c.md (#426) 2023-09-10 15:35:31 +08:00
676c87ffe8 doc: update README.md. 2023-09-10 07:34:11 +00:00
c504469c86 doc: update CONTRIBUTING.md. 2023-09-10 07:34:10 +00:00
b3cf04d323 doc: Update c.md (#426)
修改了初始化,声明和定义的区别注释
2023-09-10 15:32:32 +08:00
5254c49bdd doc: update README.md. 2023-09-07 05:06:47 +00:00
011ee54010 doc: update CONTRIBUTING.md. 2023-09-07 05:06:47 +00:00
6c7d393cff doc: update docs/typescript.md 2023-09-07 12:47:55 +08:00
86c3191501 doc: update README.md. 2023-09-05 06:40:41 +00:00
03160c5ad4 doc: update CONTRIBUTING.md. 2023-09-05 06:40:40 +00:00
f3b532b4d9 doc: update docs/git.md (#425) 2023-09-05 14:39:12 +08:00
24290541e7 doc: update README.md. 2023-09-05 05:03:12 +00:00
e527de9a89 doc: update CONTRIBUTING.md. 2023-09-05 05:03:11 +00:00
fab09b1f13 doc: update docs/fastapi.md (#424) 2023-09-05 12:39:02 +08:00
7bb62ab3c3 doc: update README.md. 2023-09-05 00:18:34 +00:00
4c4f800427 doc: update CONTRIBUTING.md. 2023-09-05 00:18:33 +00:00
a2be0fa8a5 doc: update docs/fastapi.md (#423) 2023-09-05 08:17:10 +08:00
b3e8be65f6 doc: update docs/fastapi.md #422 2023-09-04 11:36:09 +08:00
4d21e9f1cf doc: update README.md. 2023-09-04 02:42:47 +00:00
337bdf3f6f doc: update CONTRIBUTING.md. 2023-09-04 02:42:46 +00:00
80cb879bc8 feat: Add FastAPI (#422) 2023-09-04 10:41:12 +08:00
9e24d8da48 doc: update README.md. 2023-08-30 11:43:14 +00:00
03ea09ed8d doc: update CONTRIBUTING.md. 2023-08-30 11:43:12 +00:00
45fbcae3f9 doc: Update README.md (#102) 2023-08-30 19:41:36 +08:00
78b431ffc7 doc: update README.md. 2023-08-29 01:36:23 +00:00
ab51674496 doc: update CONTRIBUTING.md. 2023-08-29 01:36:22 +00:00
a2a6011b31 doc: update docs/git.md 2023-08-29 09:34:28 +08:00
44bf2fdf10 doc: update docs/typescript.md 2023-08-25 10:15:26 +08:00
98efabd925 doc: update README.md 2023-08-24 17:27:41 +08:00
dc0412ed07 doc: update docs/symbol-code.md 2023-08-24 17:22:48 +08:00
ca05decbc0 feat: add docs/subversion.md (#403) 2023-08-24 14:13:05 +08:00
25 changed files with 1315 additions and 210 deletions

9
.github/FUNDING.yml vendored Normal file
View File

@ -0,0 +1,9 @@
# These are supported funding model platforms
# github: [jaywcjlove]
# patreon: # Replace with a single Patreon username
# open_collective: # Replace with a single Open Collective username
# ko_fi: # Replace with a single Ko-fi username
# tidelift: #npm/mocker-api
# community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
custom: https://jaywcjlove.github.io/#/sponsor

View File

@ -12,7 +12,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
- run: npm install
- run: npm run build
@ -52,7 +52,7 @@ jobs:
Website: https://jaywcjlove.github.io/reference
## Docker
[![Docker Image Version (latest by date)](https://img.shields.io/docker/v/wcjiang/reference)](https://hub.docker.com/r/wcjiang/reference) [![Docker Image Size (latest by date)](https://img.shields.io/docker/image-size/wcjiang/reference)](https://hub.docker.com/r/wcjiang/reference) [![Docker Pulls](https://img.shields.io/docker/pulls/wcjiang/reference)](https://hub.docker.com/r/wcjiang/reference)
[![Buy me a coffee](https://img.shields.io/badge/Buy%20me%20a%20coffee-048754?logo=buymeacoffee)](https://jaywcjlove.github.io/#/sponsor) [![Docker Image Version (latest by date)](https://img.shields.io/docker/v/wcjiang/reference)](https://hub.docker.com/r/wcjiang/reference) [![Docker Image Size (latest by date)](https://img.shields.io/docker/image-size/wcjiang/reference)](https://hub.docker.com/r/wcjiang/reference) [![Docker Pulls](https://img.shields.io/docker/pulls/wcjiang/reference)](https://hub.docker.com/r/wcjiang/reference)
轻松通过 `docker` 部署 `Quick Reference` 网站。
@ -84,7 +84,7 @@ jobs:
id: changelog
uses: jaywcjlove/changelog-generator@main
with:
filter-author: (小弟调调™|github-actions-bot|dependabot|renovate\\[bot\\]|dependabot\\[bot\\]|Renovate Bot)
filter-author: (小弟调调™|github-actions-bot|@github-actions-bot|dependabot|renovate\\[bot\\]|dependabot\\[bot\\]|Renovate Bot)
filter: (^[\s]+?[R|r]elease)|(^[R|r]elease)
- name: Create Release
@ -95,7 +95,9 @@ jobs:
name: ${{ steps.create_tag.outputs.version }}
tag: ${{ steps.create_tag.outputs.version }}
body: |
Documentation ${{ needs.build.outputs.create_tag_version }}: https://raw.githack.com/jaywcjlove/reference/${{ steps.changelog.outputs.gh-pages-short-hash }}/index.html
[![Buy me a coffee](https://img.shields.io/badge/Buy%20me%20a%20coffee-048754?logo=buymeacoffee)](https://jaywcjlove.github.io/#/sponsor)
Documentation ${{ steps.changelog.outputs.tag }}: https://raw.githack.com/jaywcjlove/reference/${{ steps.changelog.outputs.gh-pages-short-hash }}/index.html
Comparing Changes: ${{ steps.changelog.outputs.compareurl }}
${{ steps.changelog.outputs.changelog }}
@ -146,30 +148,30 @@ jobs:
platforms: linux/amd64,linux/arm64
tags: wcjiang/reference:${{steps.changelog.outputs.version}}
# Create Docker Image in Github
- name: Login to the GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# # Create Docker Image in Github
# - name: Login to the GitHub Container Registry
# uses: docker/login-action@v2
# with:
# registry: ghcr.io
# username: ${{ github.actor }}
# password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push image:latest
uses: docker/build-push-action@v3
with:
push: true
context: .
platforms: linux/amd64,linux/arm64
tags: ghcr.io/jaywcjlove/reference:latest
# - name: Build and push image:latest
# uses: docker/build-push-action@v3
# with:
# push: true
# context: .
# platforms: linux/amd64,linux/arm64
# tags: ghcr.io/jaywcjlove/reference:latest
- name: Build and push image:tags
uses: docker/build-push-action@v3
if: steps.create_tag.outputs.successful
with:
push: true
context: .
platforms: linux/amd64,linux/arm64
tags: ghcr.io/jaywcjlove/reference:${{steps.changelog.outputs.version}}
# - name: Build and push image:tags
# uses: docker/build-push-action@v3
# if: steps.create_tag.outputs.successful
# with:
# push: true
# context: .
# platforms: linux/amd64,linux/arm64
# tags: ghcr.io/jaywcjlove/reference:${{steps.changelog.outputs.version}}
# # Create Docker Image in Github
# - name: Login to GitHub registry

View File

@ -12,5 +12,21 @@
},
"github": {
"url": "https://github.com/jaywcjlove/reference"
},
"giscus": {
"src": "https://giscus.app/client.js",
"data-repo": "jaywcjlove/reference",
"data-repo-id": "R_kgDOID2-Mw",
"data-category": "Q&A",
"data-category-id": "DIC_kwDOID2-M84CS5wo",
"data-mapping": "pathname",
"data-strict": "0",
"data-reactions-enabled": "1",
"data-emit-metadata": "0",
"data-input-position": "bottom",
"data-theme": "dark",
"data-lang": "zh-CN",
"crossorigin": "anonymous",
"async": true
}
}

View File

@ -228,32 +228,41 @@ jobs:
<a href="https://github.com/Alex-Programmer-Bro" title="Alex">
<img src="https://avatars.githubusercontent.com/u/115539090?v=4" width="42;" alt="Alex"/>
</a>
<a href="https://github.com/Country-If" title="Maylon">
<img src="https://avatars.githubusercontent.com/u/62837275?v=4" width="42;" alt="Maylon"/>
</a>
<a href="https://github.com/LufsX" title="LufsX">
<img src="https://avatars.githubusercontent.com/u/33221883?v=4" width="42;" alt="LufsX"/>
</a>
<a href="https://github.com/expoli" title="expoli">
<img src="https://avatars.githubusercontent.com/u/31023767?v=4" width="42;" alt="expoli"/>
</a>
<a href="https://github.com/k23223" title="k23223">
<img src="https://avatars.githubusercontent.com/u/57606136?v=4" width="42;" alt="k23223"/>
</a>
<a href="https://github.com/eryajf" title="二丫讲梵">
<img src="https://avatars.githubusercontent.com/u/33259379?v=4" width="42;" alt="二丫讲梵"/>
</a>
<a href="https://github.com/LiuYuan-SHU" title="Yuan Liu">
<img src="https://avatars.githubusercontent.com/u/96400967?v=4" width="42;" alt="Yuan Liu"/>
</a>
<a href="https://github.com/mailbaoer" title="baoer">
<img src="https://avatars.githubusercontent.com/u/5282978?v=4" width="42;" alt="baoer"/>
</a>
<a href="https://github.com/chaos-cn" title="chaos">
<img src="https://avatars.githubusercontent.com/u/71205599?v=4" width="42;" alt="chaos"/>
</a>
<a href="https://github.com/MackDing" title="Blossom">
<img src="https://avatars.githubusercontent.com/u/19878893?v=4" width="42;" alt="Blossom"/>
</a>
<a href="https://github.com/MarioMang" title="MarioMang">
<img src="https://avatars.githubusercontent.com/u/3959555?v=4" width="42;" alt="MarioMang"/>
<a href="https://github.com/Darkiiiiiice" title="Darkiiiiiice">
<img src="https://avatars.githubusercontent.com/u/3959555?v=4" width="42;" alt="Darkiiiiiice"/>
</a>
<a href="https://github.com/qyl27" title="秋 雨落">
<img src="https://avatars.githubusercontent.com/u/53731501?v=4" width="42;" alt="秋 雨落"/>
</a>
<a href="https://github.com/heStudio-Network" title="醉、倾城">
<img src="https://avatars.githubusercontent.com/u/119711513?v=4" width="42;" alt="醉、倾城"/>
<a href="https://github.com/undefined-hestudio" title="undefined">
<img src="https://avatars.githubusercontent.com/u/119711513?v=4" width="42;" alt="undefined"/>
</a>
<a href="https://github.com/webeautiful" title="Albert">
<img src="https://avatars.githubusercontent.com/u/3364316?v=4" width="42;" alt="Albert"/>
@ -279,14 +288,14 @@ jobs:
<a href="https://github.com/ryanhex53" title="ryanhex53">
<img src="https://avatars.githubusercontent.com/u/360426?v=4" width="42;" alt="ryanhex53"/>
</a>
<a href="https://github.com/catcto" title="喵仙人">
<img src="https://avatars.githubusercontent.com/u/5467932?v=4" width="42;" alt="喵仙人"/>
<a href="https://github.com/catcto" title="catcto">
<img src="https://avatars.githubusercontent.com/u/5467932?v=4" width="42;" alt="catcto"/>
</a>
<a href="https://github.com/itldg" title="老大哥">
<img src="https://avatars.githubusercontent.com/u/13432299?v=4" width="42;" alt="老大哥"/>
</a>
<a href="https://github.com/Country-If" title="Maylon">
<img src="https://avatars.githubusercontent.com/u/62837275?v=4" width="42;" alt="Maylon"/>
<a href="https://github.com/wsypower" title="">
<img src="https://avatars.githubusercontent.com/u/31298317?v=4" width="42;" alt=""/>
</a>
<a href="https://github.com/13812700839" title="花殇">
<img src="https://avatars.githubusercontent.com/u/58072506?v=4" width="42;" alt="花殇"/>
@ -303,6 +312,9 @@ jobs:
<a href="https://github.com/CharlotteZeng" title="hanchZ">
<img src="https://avatars.githubusercontent.com/u/19461184?v=4" width="42;" alt="hanchZ"/>
</a>
<a href="https://github.com/ohto-ai" title="Choo">
<img src="https://avatars.githubusercontent.com/u/46275725?v=4" width="42;" alt="Choo"/>
</a>
<a href="https://github.com/Damao2250" title="Damao">
<img src="https://avatars.githubusercontent.com/u/19251992?v=4" width="42;" alt="Damao"/>
</a>
@ -354,7 +366,7 @@ jobs:
<a href="https://github.com/Moeyuuko" title="Moeyuuko">
<img src="https://avatars.githubusercontent.com/u/14266681?v=4" width="42;" alt="Moeyuuko"/>
</a>
<a href="https://github.com/Mo3et" title="Monet Lee">
<a href="https://github.com/mo3et" title="Monet Lee">
<img src="https://avatars.githubusercontent.com/u/34803812?v=4" width="42;" alt="Monet Lee"/>
</a>
<a href="https://github.com/HanaNoryu" title="Noryu">
@ -378,6 +390,9 @@ jobs:
<a href="https://github.com/qinxiongzhou" title="Ryan Zhou">
<img src="https://avatars.githubusercontent.com/u/33239096?v=4" width="42;" alt="Ryan Zhou"/>
</a>
<a href="https://github.com/SkylarLeo" title="SkylarLeo">
<img src="https://avatars.githubusercontent.com/u/107191230?v=4" width="42;" alt="SkylarLeo"/>
</a>
<a href="https://github.com/YLee9527" title="Terry Young">
<img src="https://avatars.githubusercontent.com/u/18697332?v=4" width="42;" alt="Terry Young"/>
</a>
@ -399,8 +414,8 @@ jobs:
<a href="https://github.com/yikuaibro" title="yikuaibro">
<img src="https://avatars.githubusercontent.com/u/44493045?v=4" width="42;" alt="yikuaibro"/>
</a>
<a href="https://github.com/zhu0629" title="Zhu">
<img src="https://avatars.githubusercontent.com/u/13188450?v=4" width="42;" alt="Zhu"/>
<a href="https://github.com/zhu0629" title="cc">
<img src="https://avatars.githubusercontent.com/u/13188450?v=4" width="42;" alt="cc"/>
</a>
<a href="https://github.com/Leaderzhangyi" title="ZinkCas">
<img src="https://avatars.githubusercontent.com/u/46915666?v=4" width="42;" alt="ZinkCas"/>
@ -438,9 +453,6 @@ jobs:
<a href="https://github.com/sunny0826" title="Xudong Guo">
<img src="https://avatars.githubusercontent.com/u/24563928?v=4" width="42;" alt="Xudong Guo"/>
</a>
<a href="https://github.com/gzttcydxx" title="gzttcydxx">
<img src="https://avatars.githubusercontent.com/u/50025185?v=4" width="42;" alt="gzttcydxx"/>
</a>
<a href="https://github.com/hua03" title="hua03">
<img src="https://avatars.githubusercontent.com/u/19561959?v=4" width="42;" alt="hua03"/>
</a>
@ -450,6 +462,9 @@ jobs:
<a href="https://github.com/hweining" title="hweining">
<img src="https://avatars.githubusercontent.com/u/8973985?v=4" width="42;" alt="hweining"/>
</a>
<a href="https://github.com/infanx" title="infanx">
<img src="https://avatars.githubusercontent.com/u/65985757?v=4" width="42;" alt="infanx"/>
</a>
<a href="https://github.com/auroraslot" title="Tang Weize">
<img src="https://avatars.githubusercontent.com/u/48817882?v=4" width="42;" alt="Tang Weize"/>
</a>
@ -504,6 +519,9 @@ jobs:
<a href="https://github.com/hiyms" title="yms">
<img src="https://avatars.githubusercontent.com/u/84654050?v=4" width="42;" alt="yms"/>
</a>
<a href="https://github.com/zhouhw0306" title="zhouhw0306">
<img src="https://avatars.githubusercontent.com/u/82752681?v=4" width="42;" alt="zhouhw0306"/>
</a>
<a href="https://github.com/zxx457" title="zxx457">
<img src="https://avatars.githubusercontent.com/u/114141362?v=4" width="42;" alt="zxx457"/>
</a>
@ -528,8 +546,8 @@ jobs:
<a href="https://github.com/qwxingzhe" title="行者">
<img src="https://avatars.githubusercontent.com/u/7071651?v=4" width="42;" alt="行者"/>
</a>
<a href="https://github.com/binscor" title="郑乃斌">
<img src="https://avatars.githubusercontent.com/u/37325821?v=4" width="42;" alt="郑乃斌"/>
<a href="https://github.com/binscor" title="Zheng Nai Bin">
<img src="https://avatars.githubusercontent.com/u/37325821?v=4" width="42;" alt="Zheng Nai Bin"/>
</a>
<a href="https://github.com/Zeng-qh" title="都一样">
<img src="https://avatars.githubusercontent.com/u/40046415?v=4" width="42;" alt="都一样"/>

108
README.md
View File

@ -2,6 +2,7 @@ Quick Reference
===
<!--rehype:ignore:start-->
[![Buy me a coffee](https://img.shields.io/badge/Buy%20me%20a%20coffee-048754?logo=buymeacoffee)](https://jaywcjlove.github.io/#/sponsor)
[![CI](https://github.com/jaywcjlove/reference/actions/workflows/ci.yml/badge.svg)](https://github.com/jaywcjlove/reference/actions/workflows/ci.yml)
[![Docker Image Version (latest by date)](https://img.shields.io/docker/v/wcjiang/reference)](https://hub.docker.com/r/wcjiang/reference)
[![Docker Image Size (latest by date)](https://img.shields.io/docker/image-size/wcjiang/reference)](https://hub.docker.com/r/wcjiang/reference)
@ -25,6 +26,7 @@ Quick Reference
[Django](./docs/django.md)<!--rehype:style=background: rgb(12 75 51);&class=contributing tag&data-lang=Python-->
[FFmpeg](./docs/ffmpeg.md)<!--rehype:style=background: rgb(0 193 9);&class=contributing-->
[Flask](./docs/flask.md)<!--rehype:style=background: rgb(210 168 255);&class=contributing tag&data-lang=Python-->
[FastAPI](./docs/fastapi.md)<!--rehype:style=background: rgb(210 168 255);&class=contributing tag&data-lang=Python-->
[Flutter](./docs/flutter.md)<!--rehype:style=background: rgb(150 220 254);&class=contributing tag&data-lang=Dart-->
[Gitlab CI/CD](./docs/gitlab-ci.md)<!--rehype:style=background: rgb(226 67 41);&class=contributing-->
[LaTeX](./docs/latex.md)<!--rehype:style=background: rgb(0 128 128);&class=contributing-->
@ -47,6 +49,7 @@ Quick Reference
[Dockerfile](./docs/dockerfile.md)<!--rehype:style=background: rgb(0 72 153);&class=tag&data-lang=Docker-->
[Django](./docs/django.md)<!--rehype:style=background: rgb(12 75 51);&class=contributing tag&data-lang=Python-->
[Flask](./docs/flask.md)<!--rehype:style=background: rgb(210 168 255);&class=contributing tag&data-lang=Python-->
[FastAPI](./docs/fastapi.md)<!--rehype:style=background: rgb(210 168 255);&class=contributing tag&data-lang=Python-->
[Flutter](./docs/flutter.md)<!--rehype:style=background: rgb(150 220 254);&class=contributing tag&data-lang=Dart-->
[Golang](./docs/golang.md)<!--rehype:style=background: rgb(39 160 193);-->
[GraphQL](./docs/graphql.md)<!--rehype:style=background: rgb(214 66 146);-->
@ -80,29 +83,33 @@ Quick Reference
## 前端
[前端导航](./docs/feds.md)<!--rehype:style=background: rgb(35 115 205);&class=tag&data-lang=导航-->
[CSS 3](./docs/css.md)<!--rehype:style=background: rgb(35 115 205);&class=tag&data-lang=CSS-->
[Electron](./docs/electron.md)<!--rehype:style=background: rgb(0 72 153);-->
[Emmet](./docs/emmet.md)<!--rehype:style=background: rgb(122 203 23);-->
[ES 6](./docs/es6.md)<!--rehype:style=background: rgb(122 203 23);&class=tag&data-lang=JS-->
[Styled Components](./docs/styled-components.md)<!--rehype:style=background: rgb(221 60 184);&class=tag&data-lang=CSS-->
[Stylus](./docs/stylus.md)<!--rehype:style=background: rgb(109 161 63);&class=tag&data-lang=CSS-->
[Sass](./docs/sass.md)<!--rehype:style=background: rgb(207 100 154);&class=tag&data-lang=CSS-->
[HTML](./docs/html.md)<!--rehype:style=background: rgb(228 77 39);-->
[JavaScript](./docs/javascript.md)<!--rehype:style=background: rgb(203 183 31);-->
[jQuery](./docs/jquery.md)<!--rehype:style=background: rgb(203 183 31);-->
[Less.js](./docs/lessjs.md)<!--rehype:style=background: rgb(29 54 93);&class=tag&data-lang=CSS-->
[Next.js](./docs/nextjs.md)<!--rehype:style=background: rgb(0 0 0);&class=tag&data-lang=React-->
[React](./docs/react.md)<!--rehype:style=background: rgb(34 143 173);-->
[React Router](./docs/reactrouter.md)<!--rehype:style=background: rgb(244 66 79);&class=tag&data-lang=React-->
[React Native](./docs/react-native.md)<!--rehype:style=background: rgb(34 143 173);&class=tag&data-lang=React-->
[RegEx 正则表达式](./docs/regex.md)<!--rehype:style=background: rgb(149 36 155);-->
[TypeScript](./docs/typescript.md)<!--rehype:style=background: rgb(49 120 198);-->
[Tailwind CSS](./docs/tailwindcss.md)<!--rehype:style=background: rgb(49 120 198);-->
[Vue 2](./docs/vue2.md)<!--rehype:style=background: rgb(64 184 131);-->
[Vue 3](./docs/vue.md)<!--rehype:style=background: rgb(64 184 131);&class=contributing-->
[</> htmx](./docs/htmx.md)<!--rehype:style=background: rgb(52 101 164);&class=contributing-->
<!--rehype:class=home-card-->
## CSS
[CSS 3](./docs/css.md)<!--rehype:style=background: rgb(35 115 205);&class=tag&data-lang=CSS-->
[Styled Components](./docs/styled-components.md)<!--rehype:style=background: rgb(221 60 184);&class=tag&data-lang=CSS-->
[Stylus](./docs/stylus.md)<!--rehype:style=background: rgb(109 161 63);&class=tag&data-lang=CSS-->
[Sass](./docs/sass.md)<!--rehype:style=background: rgb(207 100 154);&class=tag&data-lang=CSS-->
[Less.js](./docs/lessjs.md)<!--rehype:style=background: rgb(29 54 93);&class=tag&data-lang=CSS-->
[Tailwind CSS](./docs/tailwindcss.md)<!--rehype:style=background: rgb(49 120 198);-->
<!--rehype:class=home-card-->
## Nodejs
[Express.js](./docs/expressjs.md)<!--rehype:style=background: rgb(95 151 206);-->
@ -155,11 +162,12 @@ Quick Reference
[Lsof](./docs/lsof.md)<!--rehype:style=background: rgb(16 185 129);-->
[Mitmproxy](./docs/mitmproxy.md)<!--rehype:style=background: rgb(4 92 135);-->
[Netcat](./docs/netcat.md)<!--rehype:style=background: rgb(4 92 135);-->
[Sed](./docs/sed.md)<!--rehype:style=background: rgb(16 185 129);-->
[OpenSSL](./docs/openssl.md)<!--rehype:style=background: rgb(114 20 18);-->
[ps](./docs/ps.md)<!--rehype:style=background: rgb(99 99 99);-->
[Sed](./docs/sed.md)<!--rehype:style=background: rgb(16 185 129);-->
[Systemd](./docs/systemd.md)<!--rehype:style=background: rgb(16 185 129);-->
[SSH](./docs/ssh.md)<!--rehype:style=background: rgb(99 99 99);-->
[Subversion (SVN)](./docs/subversion.md)<!--rehype:style=background: rgb(99 99 99);-->
[Screen](./docs/screen.md)<!--rehype:style=background: rgb(99 99 99);-->
[Sysdig](./docs/sysdig.md)<!--rehype:style=background: rgb(1 171 199);-->
[Tmux](./docs/tmux.md)<!--rehype:style=background: rgb(99 99 99);-->
@ -252,32 +260,41 @@ Quick Reference
<a href="https://github.com/Alex-Programmer-Bro" title="Alex">
<img src="https://avatars.githubusercontent.com/u/115539090?v=4" width="42;" alt="Alex"/>
</a>
<a href="https://github.com/Country-If" title="Maylon">
<img src="https://avatars.githubusercontent.com/u/62837275?v=4" width="42;" alt="Maylon"/>
</a>
<a href="https://github.com/LufsX" title="LufsX">
<img src="https://avatars.githubusercontent.com/u/33221883?v=4" width="42;" alt="LufsX"/>
</a>
<a href="https://github.com/expoli" title="expoli">
<img src="https://avatars.githubusercontent.com/u/31023767?v=4" width="42;" alt="expoli"/>
</a>
<a href="https://github.com/k23223" title="k23223">
<img src="https://avatars.githubusercontent.com/u/57606136?v=4" width="42;" alt="k23223"/>
</a>
<a href="https://github.com/eryajf" title="二丫讲梵">
<img src="https://avatars.githubusercontent.com/u/33259379?v=4" width="42;" alt="二丫讲梵"/>
</a>
<a href="https://github.com/LiuYuan-SHU" title="Yuan Liu">
<img src="https://avatars.githubusercontent.com/u/96400967?v=4" width="42;" alt="Yuan Liu"/>
</a>
<a href="https://github.com/mailbaoer" title="baoer">
<img src="https://avatars.githubusercontent.com/u/5282978?v=4" width="42;" alt="baoer"/>
</a>
<a href="https://github.com/chaos-cn" title="chaos">
<img src="https://avatars.githubusercontent.com/u/71205599?v=4" width="42;" alt="chaos"/>
</a>
<a href="https://github.com/MackDing" title="Blossom">
<img src="https://avatars.githubusercontent.com/u/19878893?v=4" width="42;" alt="Blossom"/>
</a>
<a href="https://github.com/MarioMang" title="MarioMang">
<img src="https://avatars.githubusercontent.com/u/3959555?v=4" width="42;" alt="MarioMang"/>
<a href="https://github.com/Darkiiiiiice" title="Darkiiiiiice">
<img src="https://avatars.githubusercontent.com/u/3959555?v=4" width="42;" alt="Darkiiiiiice"/>
</a>
<a href="https://github.com/qyl27" title="秋 雨落">
<img src="https://avatars.githubusercontent.com/u/53731501?v=4" width="42;" alt="秋 雨落"/>
</a>
<a href="https://github.com/heStudio-Network" title="醉、倾城">
<img src="https://avatars.githubusercontent.com/u/119711513?v=4" width="42;" alt="醉、倾城"/>
<a href="https://github.com/undefined-hestudio" title="undefined">
<img src="https://avatars.githubusercontent.com/u/119711513?v=4" width="42;" alt="undefined"/>
</a>
<a href="https://github.com/webeautiful" title="Albert">
<img src="https://avatars.githubusercontent.com/u/3364316?v=4" width="42;" alt="Albert"/>
@ -303,14 +320,14 @@ Quick Reference
<a href="https://github.com/ryanhex53" title="ryanhex53">
<img src="https://avatars.githubusercontent.com/u/360426?v=4" width="42;" alt="ryanhex53"/>
</a>
<a href="https://github.com/catcto" title="喵仙人">
<img src="https://avatars.githubusercontent.com/u/5467932?v=4" width="42;" alt="喵仙人"/>
<a href="https://github.com/catcto" title="catcto">
<img src="https://avatars.githubusercontent.com/u/5467932?v=4" width="42;" alt="catcto"/>
</a>
<a href="https://github.com/itldg" title="老大哥">
<img src="https://avatars.githubusercontent.com/u/13432299?v=4" width="42;" alt="老大哥"/>
</a>
<a href="https://github.com/Country-If" title="Maylon">
<img src="https://avatars.githubusercontent.com/u/62837275?v=4" width="42;" alt="Maylon"/>
<a href="https://github.com/wsypower" title="">
<img src="https://avatars.githubusercontent.com/u/31298317?v=4" width="42;" alt=""/>
</a>
<a href="https://github.com/13812700839" title="花殇">
<img src="https://avatars.githubusercontent.com/u/58072506?v=4" width="42;" alt="花殇"/>
@ -327,6 +344,9 @@ Quick Reference
<a href="https://github.com/CharlotteZeng" title="hanchZ">
<img src="https://avatars.githubusercontent.com/u/19461184?v=4" width="42;" alt="hanchZ"/>
</a>
<a href="https://github.com/ohto-ai" title="Choo">
<img src="https://avatars.githubusercontent.com/u/46275725?v=4" width="42;" alt="Choo"/>
</a>
<a href="https://github.com/Damao2250" title="Damao">
<img src="https://avatars.githubusercontent.com/u/19251992?v=4" width="42;" alt="Damao"/>
</a>
@ -378,7 +398,7 @@ Quick Reference
<a href="https://github.com/Moeyuuko" title="Moeyuuko">
<img src="https://avatars.githubusercontent.com/u/14266681?v=4" width="42;" alt="Moeyuuko"/>
</a>
<a href="https://github.com/Mo3et" title="Monet Lee">
<a href="https://github.com/mo3et" title="Monet Lee">
<img src="https://avatars.githubusercontent.com/u/34803812?v=4" width="42;" alt="Monet Lee"/>
</a>
<a href="https://github.com/HanaNoryu" title="Noryu">
@ -402,6 +422,9 @@ Quick Reference
<a href="https://github.com/qinxiongzhou" title="Ryan Zhou">
<img src="https://avatars.githubusercontent.com/u/33239096?v=4" width="42;" alt="Ryan Zhou"/>
</a>
<a href="https://github.com/SkylarLeo" title="SkylarLeo">
<img src="https://avatars.githubusercontent.com/u/107191230?v=4" width="42;" alt="SkylarLeo"/>
</a>
<a href="https://github.com/YLee9527" title="Terry Young">
<img src="https://avatars.githubusercontent.com/u/18697332?v=4" width="42;" alt="Terry Young"/>
</a>
@ -423,8 +446,8 @@ Quick Reference
<a href="https://github.com/yikuaibro" title="yikuaibro">
<img src="https://avatars.githubusercontent.com/u/44493045?v=4" width="42;" alt="yikuaibro"/>
</a>
<a href="https://github.com/zhu0629" title="Zhu">
<img src="https://avatars.githubusercontent.com/u/13188450?v=4" width="42;" alt="Zhu"/>
<a href="https://github.com/zhu0629" title="cc">
<img src="https://avatars.githubusercontent.com/u/13188450?v=4" width="42;" alt="cc"/>
</a>
<a href="https://github.com/Leaderzhangyi" title="ZinkCas">
<img src="https://avatars.githubusercontent.com/u/46915666?v=4" width="42;" alt="ZinkCas"/>
@ -462,9 +485,6 @@ Quick Reference
<a href="https://github.com/sunny0826" title="Xudong Guo">
<img src="https://avatars.githubusercontent.com/u/24563928?v=4" width="42;" alt="Xudong Guo"/>
</a>
<a href="https://github.com/gzttcydxx" title="gzttcydxx">
<img src="https://avatars.githubusercontent.com/u/50025185?v=4" width="42;" alt="gzttcydxx"/>
</a>
<a href="https://github.com/hua03" title="hua03">
<img src="https://avatars.githubusercontent.com/u/19561959?v=4" width="42;" alt="hua03"/>
</a>
@ -474,6 +494,9 @@ Quick Reference
<a href="https://github.com/hweining" title="hweining">
<img src="https://avatars.githubusercontent.com/u/8973985?v=4" width="42;" alt="hweining"/>
</a>
<a href="https://github.com/infanx" title="infanx">
<img src="https://avatars.githubusercontent.com/u/65985757?v=4" width="42;" alt="infanx"/>
</a>
<a href="https://github.com/auroraslot" title="Tang Weize">
<img src="https://avatars.githubusercontent.com/u/48817882?v=4" width="42;" alt="Tang Weize"/>
</a>
@ -528,6 +551,9 @@ Quick Reference
<a href="https://github.com/hiyms" title="yms">
<img src="https://avatars.githubusercontent.com/u/84654050?v=4" width="42;" alt="yms"/>
</a>
<a href="https://github.com/zhouhw0306" title="zhouhw0306">
<img src="https://avatars.githubusercontent.com/u/82752681?v=4" width="42;" alt="zhouhw0306"/>
</a>
<a href="https://github.com/zxx457" title="zxx457">
<img src="https://avatars.githubusercontent.com/u/114141362?v=4" width="42;" alt="zxx457"/>
</a>
@ -552,8 +578,8 @@ Quick Reference
<a href="https://github.com/qwxingzhe" title="行者">
<img src="https://avatars.githubusercontent.com/u/7071651?v=4" width="42;" alt="行者"/>
</a>
<a href="https://github.com/binscor" title="郑乃斌">
<img src="https://avatars.githubusercontent.com/u/37325821?v=4" width="42;" alt="郑乃斌"/>
<a href="https://github.com/binscor" title="Zheng Nai Bin">
<img src="https://avatars.githubusercontent.com/u/37325821?v=4" width="42;" alt="Zheng Nai Bin"/>
</a>
<a href="https://github.com/Zeng-qh" title="都一样">
<img src="https://avatars.githubusercontent.com/u/40046415?v=4" width="42;" alt="都一样"/>
@ -565,37 +591,39 @@ Quick Reference
## 国内镜像网站
<!--rehype:wrap-style=text-align: center;max-width: 650px;margin: 0 auto;&class=home-title-reset-->
由于中国国内访问,时常打不开,你可以访问下面镜像网站。推荐自己的[镜像网站](https://github.com/jaywcjlove/reference/discussions/206#discussion-4625735)
由于中国国内访问,时常打不开,你可以访问下面镜像网站(国内打不开的不再收录)。推荐自己的[镜像网站](https://github.com/jaywcjlove/reference/discussions/206#discussion-4625735)
[server.wiki](https://ref.server.wiki)<!--rehype:target=_blank-->
[nihaosi.com](https://refs.nihaosi.com)<!--rehype:target=_blank-->
[quickref.cn](https://quickref.cn)<!--rehype:target=_blank-->
[ecdata.cn](http://ref.ecdata.cn)<!--rehype:target=_blank-->
[aibk.cn](https://quickref.aibk.cn)<!--rehype:target=_blank-->
[jgeek.cn](http://reference.jgeek.cn/)<!--rehype:target=_blank-->
[ecdata.cn](http://ref.ecdata.cn)<!--rehype:target=_blank-->
[quickref.hestudio.net](https://quickref.hestudio.net)<!--rehype:target=_blank&class=contributing&data-info=👆整点自动同步-->
[qiubit.cc](http://ref.qiubit.cc)<!--rehype:target=_blank&class=contributing&data-info=👆每天自动同步-->
[guoxudong.io](https://reference.guoxudong.io/)<!--rehype:target=_blank&class=contributing&data-info=👆每天自动同步-->
[moeyuuko.com](https://ref.moeyuuko.com/)<!--rehype:target=_blank&class=contributing&data-info=👆每天自动同步-->
[defense.ink](https://ref.defense.ink)<!--rehype:target=_blank&class=contributing&data-info=👆每天自动同步-->
[terryyoung.cn](http://ref.terryyoung.cn/)<!--rehype:target=_blank&class=contributing&data-info=👆每周一三五自动同步-->
[quickref.binscor.top](https://quickref.binscor.top)<!--rehype:target=_blank&data-info=👆每天自动同步-->
[srebro.cn](https://ref.srebro.cn)<!--rehype:target=_blank&data-info=👆每天自动同步-->
[haah.net](https://ref.haah.net)<!--rehype:target=_blank&data-info=👆每天自动同步-->
[laoleng.vip](http://bbs.laoleng.vip/reference/)<!--rehype:target=_blank-->
[dbyun.net](https://www.dbyun.net/reference/index.html)<!--rehype:target=_blank-->
[if010.com](https://quickref.if010.com/)<!--rehype:target=_blank-->
[pipecraft.net](https://quickref.pipecraft.net/)<!--rehype:target=_blank&class=contributing&data-info=👆需要梯子-->
[isteed.cc](https://ref.isteed.cc/)<!--rehype:target=_blank-->
[1han.wiki](https://code.1han.wiki/)<!--rehype:target=_blank-->
[linzhe.top](https://linzhe.top/)<!--rehype:target=_blank-->
[xushanxiang.com](https://xushanxiang.com/ref/)<!--rehype:target=_blank-->
[winnerzr01.github.io](https://winnerzr01.github.io/Quick-Reference/index.html)<!--rehype:target=_blank&class=contributing&data-info=👆需要梯子-->
[quickref.hestudio.net](https://quickref.hestudio.net)<!--rehype:target=_blank&class=contributing&data-info=👆整点自动同步-->
[surcode.cn](https://ref.surcode.cn)<!--rehype:target=_blank-->
[cms.im](https://quickref.cms.im/)<!--rehype:target=_blank-->
[nuomiphp.com](https://reference.tool.nuomiphp.com/)<!--rehype:target=_blank-->
[eryajf.net](https://ref.eryajf.net/)<!--rehype:target=_blank&class=contributing&data-info=👆每天自动同步-->
[kjchmc.cn](https://ref.kjchmc.cn/)<!--rehype:target=_blank&class=contributing&data-info=👆实时同步,多线路-->
[qiubit.cc](http://ref.qiubit.cc)<!--rehype:target=_blank&class=contributing&data-info=👆每天自动同步-->
[eryajf.net](https://ref.eryajf.net/)<!--rehype:target=_blank-->
[kjchmc.cn](https://ref.kjchmc.cn/)<!--rehype:target=_blank-->
[aoh.cc](https://aoh.cc/)<!--rehype:target=_blank-->
[quickreference.pages.dev](https://quickreference.pages.dev/)<!--rehype:target=_blank-->
[xhfun.cn](https://ref.xhfun.cn/)<!--rehype:target=_blank&class=contributing&data-info=👆每天自动同步-->
[caitou.org](https://quickref.caitou.org/)<!--rehype:target=_blank&class=contributing&data-info=👆每天自动同步-->
[guoxudong.io](https://reference.guoxudong.io/)<!--rehype:target=_blank&class=contributing&data-info=👆每天自动同步-->
[btaw.cn](https://btaw.cn/qr)<!--rehype:target=_blank&class=contributing-->
[lzw.me](https://lzw.me/x/reference/)<!--rehype:target=_blank-->
[itcent.cn](https://code.itcent.cn/)<!--rehype:target=_blank-->
[moeyuuko.com](https://ref.moeyuuko.com/)<!--rehype:target=_blank&class=contributing&data-info=👆每天自动同步-->
[coolxy.top](https://refer.coolxy.top)<!--rehype:target=_blank-->
[notes-bin.top](https://notes-bin.top)<!--rehype:target=_blank-->
[tangcc.cn](https://web.tangcc.cn)<!--rehype:target=_blank-->
@ -603,22 +631,20 @@ Quick Reference
[trtu.com.cn](https://reference.trtu.com.cn)<!--rehype:target=_blank-->
[lzzzt.cn](https://ref.lzzzt.cn)<!--rehype:target=_blank-->
[kclouder.cn](https://www.kclouder.cn/reference)<!--rehype:target=_blank-->
[defense.ink](https://ref.defense.ink)<!--rehype:target=_blank&class=contributing&data-info=👆每天自动同步-->
[djcoder.com](https://doc.djcoder.com)<!--rehype:target=_blank-->
[qirishuzhai.com](http://qirishuzhai.com/quickref)<!--rehype:target=_blank-->
[longdada.me](https://ref.longdada.me)<!--rehype:target=_blank-->
[xalaok.top](https://ref.xalaok.top)<!--rehype:target=_blank-->
[dadatom.com](https://tools.dadatom.com/reference/)<!--rehype:target=_blank&class=contributing&data-info=👆支持ipv4和ipv6-->
[zhangyuanqian.top](https://reference.zhangyuanqian.top/)<!--rehype:target=_blank-->
[sosloli.com](https://ref.sosloli.com)<!--rehype:target=_blank-->
[chenze.cloud](https://quick.chenze.cloud)<!--rehype:target=_blank-->
[ref.v-ta.com](https://ref.v-ta.com)<!--rehype:target=_blank-->
[terryyoung.cn](http://ref.terryyoung.cn/)<!--rehype:target=_blank&class=contributing&data-info=👆每周一三五自动同步-->
[hao.kim](https://ref.hao.kim)<!--rehype:target=_blank-->
[quickref.binscor.top](https://quickref.binscor.top)<!--rehype:target=_blank&data-info=👆每天自动同步-->
[fxkjnj.com](https://ref.fxkjnj.com/)<!--rehype:target=_blank&data-info=👆每天自动同步-->
[tool.sakura.vin](https://tool.sakura.vin/ref/)<!--rehype:target=_blank-->
[guoyaxue.top](https://reference.guoyaxue.top/)<!--rehype:target=_blank-->
[chenchen.site](https://img.chenchen.site/reference/)<!--rehype:target=_blank-->
[jgeek.cn](http://reference.jgeek.cn/)<!--rehype:target=_blank-->
[itzcy.com](https://reference.itzcy.com/)<!--rehype:target=_blank-->
<!--rehype:class=home-card home-links-->
如果你有资源,可以很方便[部署 web 版](https://github.com/jaywcjlove/reference/issues/102#issue-1451649637),这非常简单,只需要克隆 [gh-pages](https://github.com/jaywcjlove/reference/tree/gh-pages) 分支代码到你的静态服务就可以了,还可以使用 [docker](https://hub.docker.com/r/wcjiang/reference) 快捷部署 web 版。

3
assets/fastapi.svg Normal file
View File

@ -0,0 +1,3 @@
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill="currentColor" height="1em" width="1em">
<path d="M12 0C5.375 0 0 5.375 0 12c0 6.627 5.375 12 12 12 6.626 0 12-5.373 12-12 0-6.625-5.373-12-12-12zm-.624 21.62v-7.528H7.19L13.203 2.38v7.528h4.029L11.376 21.62z"/>
</svg>

After

Width:  |  Height:  |  Size: 286 B

3
assets/subversion.svg Normal file
View File

@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 14 14" height="1em" width="1em">
<path d="M13 11.377V8.223c-1.643.648-3.681 1.278-6.115 1.893-2.267.573-4.229.986-5.885 1.238v.022h12zM1 8.038v2.566a51.332 51.332 0 0 0 5.065-.983c1.481-.374 2.623-.738 3.424-1.09.8-.351 1.17-.648 1.11-.89-.054-.21-.424-.318-1.109-.323-.351.005-.835.03-1.452.075-.618.045-1.387.117-2.305.213-1.425.152-2.608.269-3.55.348-.448.037-.842.066-1.183.085Zm.517 1.475c.03 0 .058.013.08.035a.116.116 0 0 1-.128.191.117.117 0 0 1-.037-.025.072.072 0 0 1-.025-.037c0-.008-.008-.023-.008-.045 0-.03.015-.06.037-.083.023-.022.053-.03.09-.03zm.406 0a.12.12 0 0 1 .082.035.115.115 0 0 1 .033.083c0 .033-.011.06-.034.084a.135.135 0 0 1-.135.024.097.097 0 0 1-.038-.025c-.014-.007-.022-.022-.03-.037-.007-.008-.007-.023-.007-.045 0-.03.007-.06.03-.083a.112.112 0 0 1 .082-.03zm-.405-.755c.03 0 .057.011.08.035.023.022.035.05.035.083 0 .031-.012.06-.035.082a.114.114 0 0 1-.082.035.114.114 0 0 1-.084-.035.115.115 0 0 1-.035-.082c0-.034.008-.062.03-.085a.117.117 0 0 1 .083-.034Zm.405 0c.031 0 .058.011.082.035.022.022.033.05.033.083 0 .031-.011.06-.034.082-.03.022-.053.035-.09.035a.106.106 0 0 1-.083-.035.118.118 0 0 1-.037-.082c0-.034.007-.062.03-.085a.116.116 0 0 1 .082-.034ZM13 3.299v2.406c-.818.05-1.84.138-3.069.267-1.245.135-2.26.24-3.046.307-.788.075-1.357.114-1.705.12-.682.016-1.045-.075-1.098-.277-.053-.224.353-.524 1.223-.885.87-.367 2.025-.735 3.45-1.095a43.649 43.649 0 0 1 4.244-.825zm-.428-.675a81.77 81.77 0 0 0-5.056 1.115C4.793 4.426 2.622 5.11 1 5.787V2.624h11.573z"/>
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@ -18,13 +18,13 @@ int main() {
}
```
使用 `gcc` 编译 `hello.c` 文件
使用 `gcc` 编译 `hello.c` 文件
```bash
$ gcc -o hello hello.c
```
运行编译后的二进制文件(`hello`)
运行编译后的二进制文件可执行文件(`hello`)
```bash
$ ./hello
@ -37,8 +37,8 @@ $ ./hello
```c
int myNum = 15;
int myNum2; // 不赋值,然后再赋值
myNum2 = 15;
int myNum2; // 声明变量 myNum2
myNum2 = 15; // 变量声明后第一次赋值我们称为初始化,如果 初始化 和 赋值 在同一行,那么我们可以直接称为 定义变量 myNum2
int myNum3 = 15; // myNum3 值为 15
myNum3 = 10; // 现在 myNum3 值为 10
@ -55,6 +55,8 @@ int x = 5, y = 6, z = 50;
### 常量 Constants
常量在 C 语言中我们一般理解为不能被改变的值,活用常量与符号常量
```c
const int minutesPerHour = 60;
const float PI = 3.14;

View File

@ -1264,10 +1264,13 @@ CSS 函数
### calc()
```css
width: calc(100% - 80px);
div {
width: calc(100% - 30px);
height: calc(100% - 30px);
}
```
声明 CSS 属性值时执行一些计算
[`calc()`](https://developer.mozilla.org/zh-CN/docs/Web/CSS/calc) CSS 函数允许您在指定 CSS 属性值时执行计算
### clamp()
@ -1479,6 +1482,24 @@ input[type="text"]:autofill {
另见: [:autofill](https://developer.mozilla.org/en-US/docs/Web/CSS/:autofill)
### 修改 input type="color" 样式
<!--rehype:wrap-class=col-span-2 row-span-2-->
```css
input[type="color"] {
-webkit-appearance: none;
border: none;
width: 32px;
height: 32px;
}
input[type="color"]::-webkit-color-swatch-wrapper {
padding: 0;
}
input[type="color"]::-webkit-color-swatch {
border: none;
}
```
### 忽略用作间距的换行符 \<br />
```css
@ -1502,6 +1523,7 @@ br + br {
html {
box-sizing: border-box;
}
*, *::before, *::after {
box-sizing: border-box;
margin: 0;
@ -1530,6 +1552,24 @@ html {
上面示例设置了当前卡片灰色
### `<textarea>`自动增加其高度
```css
textarea {
form-sizing: normal
}
```
### 定义容器的长宽比
```css
div {
aspect-ratio: 1/1
}
```
属性 [aspect-ratio](https://developer.mozilla.org/zh-CN/docs/Web/CSS/aspect-ratio) 可以非常容易的定义一个容器的长宽比
### 使用 unset 而不是重置所有属性
使用 `all` 速记来指定元素的所有属性。将值设置为 `unset` 会将元素的属性更改为其初始值:
@ -1568,6 +1608,7 @@ body {
这样文本元素可以很容易地从 `body` 继承
### 使用图像作为光标
<!--rehype:wrap-class=col-span-2-->
```css
div {
@ -1604,17 +1645,6 @@ div {
多行文本截断到特定的行数,末尾显示省略号 _(...)_
### 计算函数
```css
div {
width: calc(100% - 30px);
height: calc(100% - 30px);
}
```
[`calc()`](https://developer.mozilla.org/zh-CN/docs/Web/CSS/calc) CSS 函数允许您在指定 CSS 属性值时执行计算
### 粘性定位元素
```css
@ -1688,16 +1718,6 @@ div {
通过样式来控制一个元素 `div` 是否可以编辑
### 定义容器的长宽比
```css
div {
aspect-ratio: 1/1
}
```
属性 [aspect-ratio](https://developer.mozilla.org/zh-CN/docs/Web/CSS/aspect-ratio) 可以非常容易的定义一个容器的长宽比
### 等宽表格单元格
尝试使用 `table-layout: fixed` 以保持单元格宽度相等:
@ -1911,16 +1931,6 @@ body {
}
```
### 逗号分隔列表
```css
ul > li:not(:last-child)::after {
content: ",";
}
```
使列表项看起来像一个真实的逗号分隔列表,使用 `:not()` 伪类,最后一项不会添加逗号
### 图片对齐不变形
```css
@ -1957,6 +1967,16 @@ img:hover {
</p>
```
### 逗号分隔列表
```css
ul > li:not(:last-child)::after {
content: ",";
}
```
使列表项看起来像一个真实的逗号分隔列表,使用 `:not()` 伪类,最后一项不会添加逗号
另见
---------

View File

@ -225,6 +225,20 @@ docker network create -d overlay \
MyOverlayNetwork
```
Docker 快捷键
----
<!--rehype:body-class=cols-2-->
### 退出
| Docker 快捷键 | 说明 |
|------------|------|
`ctrl+c` | 将关闭容器,并删除当前的容器实例
`ctrl+d` | 将保留容器并退出到Docker主机的命令行界面
`ctrl+p+q` | 将容器分离,保留容器,但是不退出
需要特别注意的是,上面的退出快捷键中的删除容器实例只对于使用`docker attach`进入的容器生效,使用`docker exec`进入容器后使用上面的快捷键后将隔离容器且不会删除容器实例。
各种各样的
----
<!--rehype:body-class=cols-2-->

490
docs/fastapi.md Normal file
View File

@ -0,0 +1,490 @@
FastAPI 备忘清单
===
FastAPI 是一个用于构建 API 的现代、快速(高性能)的 web 框架,使用 Python 3.6+ 并基于标准的 Python 类型提示。Python: `3.9.5` FastAPI: `0.103.1`
入门
---
<!--rehype:body-class=cols-1-->
### 最小程序
下面代码会直接启动http服务也可以使用 `uvicorn main:app --reload`
```python
from fastapi import FastAPI
import uvicorn
app = FastAPI()
# http://127.0.0.1:8000/
@app.get("/")
async def root():
return {"message": "Hello World"}
if __name__ == '__main__':
uvicorn.run(app='main:app', reload=True)
```
### 路径参数
#### 最基本的路径参数
```python
# http://127.0.0.1:8000/items/1
@app.get("/items/{item_id}")
async def read_item(item_id):
return {"item_id": item_id} # item_id自定义
```
#### 多个路径参数
```python
# http://127.0.0.1:8000/items/1/2
@app.get("/items/{item_id}/{user_id}")
async def read_item(item_id, user_id):
return {"item_id": item_id, "user_id": user_id}
```
#### 有类型的路径参数
```python
# http://127.0.0.1:8000/items/1
@app.get("/items/{item_id}")
async def read_item(item_id: int):
return {"item_id": item_id}
```
#### 文件路径参数
```python
# http://127.0.0.1:8000/file//home/my/my.txt
@app.get("/file/{file_path:path}")
async def read_item(file_path):
return {"file_path": file_path}
```
### 查询参数
#### 带默认值的查询参数
```python
# http://127.0.0.1:8000/items/?skip=0&limit=2
fake_items_db = [{"item_name": "Foo"}, {"item_name": "Bar"}, {"item_name": "Baz"}]
@app.get("/items/")
async def read_item(skip: int = 0, limit: int = 10):
return fake_items_db[skip: skip + limit]
```
#### 可选查询参数
```python
# http://127.0.0.1:8000/items/1?q=admin
from typing import Union
@app.get("/items/{item_id}")
async def read_item(item_id: str, q: Union[str, None] = None):
if q:
return {"item_id": item_id, "q": q}
return {"item_id": item_id}
```
#### 多路径多查询参数
```python
# http://127.0.0.1:8000/users/1/items/2
# or
# http://127.0.0.1:8000/users/1/items/2?q=query&short=true
@app.get("/users/{user_id}/items/{item_id}")
async def read_user_item(
user_id: int, item_id: str, q: Union[str, None] = None, short: bool = False
):
item = {"item_id": item_id, "owner_id": user_id}
if q:
item.update({"q": q})
if not short:
item.update(
{"description": "This is an amazing item that has a long description"}
)
return item
```
#### 必需查询参数
```python
# http://127.0.0.1:8000/items/123?needy=yes
@app.get("/items/{item_id}")
async def read_user_item(item_id: str, needy: str):
item = {"item_id": item_id, "needy": needy}
return item
```
### 请求体
```python
from pydantic import BaseModel
from typing import Union
class Item(BaseModel):
name: str = '小明'
description: Union[str, None] = None
price: float
tax: Union[float, None] = None
@app.post("/items/")
async def create_item(item: Item):
print(item.name)
return item
```
#### 调用
```bash
curl -X 'POST' \
'http://127.0.0.1:8000/items/' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"name": "小明",
"description": "string",
"price": 0,
"tax": 0
}'
```
### 查询参数和字符串校验
```python
from fastapi import Query
@app.get("/items/")
async def read_items(q: Union[str, None] = Query(default=None, max_length=50)):
results = {"items": [{"item_id": "Foo"}, {"item_id": "Bar"}]}
if q:
results.update({"q": q})
return results
```
#### 参数列表
| 参数 | 含义 | 类型 |
| ---------- | ------------ | ------------- |
| default | 默认值 | 任意类型或... |
| max_length | 最大长度 | int |
| min_length | 最小长度 | int |
| pattern | 正则匹配 | string |
| alias | 别名参数 | string |
| deprecated | 准备弃用参数 | bool |
#### 多个相同的查询参数
```python
# http://127.0.0.1:8000/items/?q=foo&q=bar
@app.get("/items/")
async def read_items(q: Union[List[str], None] = Query(default=None)):
query_items = {"q": q}
return query_items
```
### 路径参数和数值校验
Path用法基本和Query相同参考[FastAPI官方文档](https://fastapi.tiangolo.com/zh/tutorial/path-params-numeric-validations/)
#### 导入 Path
```python
from fastapi import FastAPI, Path, Query
from typing_extensions import Annotated
```
#### 声明元数据
```python
@app.get("/items/{item_id}")
async def read_items(
item_id: Annotated[int, Path(title="The ID of the item to get")],
q: Annotated[Union[str, None], Query(alias="item-query")] = None,
):
results = {"item_id": item_id}
if q:
results.update({"q": q})
return results
```
#### 参数列表
| 参数 | 含义 | 类型 |
| ----- | ------------------- | --------- |
| ... | 和Query具有相同参数 | ... |
| ge | 大于等于 | int float |
| gt | 大于 | int float |
| le | 小于等于 | int float |
| le | 小于等于 | int float |
| title | api文档的标题 | string |
### 其他参数
都具有Query的参数max_length、min_length等
#### Cookie参数
```python
from fastapi import Cookie
@app.get("/items/")
async def read_items(ads_id: Annotated[Union[str, None], Cookie()] = None):
return {"ads_id": ads_id}
```
#### Header 参数
```python
from fastapi import Header
@app.get("/items/")
async def read_items(user_agent: Annotated[Union[str, None], Header()] = None,items_id: Annotated[Union[int, None], Header(ge=1)] = None):
return {"User-Agent": user_agent, "items_id": items_id}
```
### 表单数据
接收的不是 JSON而是表单字段时要使用 Form。
#### 安装
`pip install python-multipart`
#### HTML
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
</head>
<body>
<form method="post" action="http://127.0.0.1:8000/login">
<span>账号:</span><input type="text" name="username">
<br>
<span>密码:</span><input type="password" name="password">
<br>
<input type="submit" value="登录">
</form>
</body>
</html>
```
#### FastAPI
```python
from fastapi import FastAPI, Form
import uvicorn
app = FastAPI()
@app.post("/login/")
async def login(username: str = Form(), password: str = Form()):
return {"username": username}
if __name__ == '__main__':
uvicorn.run(app='main:app', reload=True)
```
### 文件上传
```python
from fastapi import FastAPI, UploadFile
from fastapi.responses import HTMLResponse
@app.post("/uploadfile/")
async def create_upload_file(file: UploadFile):
print(file.file.read().decode())
return {"filenames": file.filename, "type": str(type(file.file))}
@app.get("/")
async def main():
content = """<body>
<form action="/uploadfile/" enctype="multipart/form-data" method="post">
<input name="file" type="file" multiple>
<input type="submit">
</form>
</body>"""
return HTMLResponse(content=content)
```
#### UploadFile属性
| 属性名 | 含义 | 返回 |
| ------------ | -------- | --------------------------------------- |
| filename | 文件名 | 上传的文件名 |
| content_type | 内容类型 | MIME 类型 |
| file | 文件 | SpooledTemporaryFile具有readwrite方法 |
#### UploadFile async方法
| 方法名 | 含义 |
| ------------ | ----------------------------------------- |
| write(data) | 把 `data` 写入文件 |
| read(size) | 按指定数量的字节读取文件内容 |
| seek(offset) | 移动至文件 `offset` `int`)字节处的位置 |
| close() | 关闭文件 |
依赖项
---
<!--rehype:body-class=cols-1-->
### 依赖项使用场景
- 共享业务逻辑(复用相同的代码逻辑)
- 共享数据库连接
- 实现安全、验证、角色权限
- 等……
### 创建依赖项
```python
from typing import Union
from fastapi import Depends, FastAPI
app = FastAPI()
# read_items和read_users方法依赖common_parameters
# 白话就是read_items和read_users都需要qskiplimit查询参数
async def common_parameters(
q: Union[str, None] = None, skip: int = 0, limit: int = 100
):
return {"q": q, "skip": skip, "limit": limit}
@app.get("/items/")
async def read_items(commons: dict = Depends(common_parameters)):
return commons
@app.get("/users/")
async def read_users(commons: dict = Depends(common_parameters)):
return commons
```
### 类作为依赖项
```python
from typing import Union
from fastapi import Depends, FastAPI
app = FastAPI()
fake_items_db = [{"item_name": "Foo"}, {"item_name": "Bar"}, {"item_name": "Baz"}]
class CommonQueryParams:
def __init__(self, q: Union[str, None] = None, skip: int = 0, limit: int = 100):
self.q = q
self.skip = skip
self.limit = limit
# read_itemsx接收一个commons参数类型是CommonQueryParams
# CommonQueryParams接收三个参数这三个参数是调用api的时候传
@app.get("/items/")
async def read_items(commons: CommonQueryParams = Depends(CommonQueryParams)):
response = {}
if commons.q:
response.update({"q": commons.q})
items = fake_items_db[commons.skip : commons.skip + commons.limit]
response.update({"items": items})
return response
```
#### 还可以简写
```python
@app.get("/items/")
async def read_items(commons: CommonQueryParams = Depends()): # 这里的Depends没有传参FastAPI会自动使用CommonQueryParams
response = {}
if commons.q:
response.update({"q": commons.q})
items = fake_items_db[commons.skip : commons.skip + commons.limit]
response.update({"items": items})
return response
```
### 子依赖项
```python
from typing import Union
from fastapi import Cookie, Depends, FastAPI
app = FastAPI()
def query_extractor(q: Union[str, None] = None):
return q
def query_or_cookie_extractor(
q: str = Depends(query_extractor),
last_query: Union[str, None] = Cookie(default=None),
):
if not q:
return last_query
return q
# read_query函数依赖query_or_cookie_extractor函数
# query_or_cookie_extractor函数又依赖query_extractor函数
# 就是说依赖项可以依赖其他依赖项,只要你不晕,可以无数次套娃
@app.get("/items/")
async def read_query(query_or_default: str = Depends(query_or_cookie_extractor)):
return {"q_or_cookie": query_or_default}
```
#### 不使用缓存
```python
# 使用use_cache = False参数不使用缓存数据
# 不使用use_cache = False,value和value1是一样的
def result_value():
value = randint(1, 99)
return value
def get_value(value: int = Depends(result_value, use_cache=False), value1: int = Depends(result_value, use_cache=False)):
return value, value1
@app.get('/value/')
async def needy_dependency(value: tuple = Depends(get_value)):
return {"value": value}
```
### 全局依赖项
```python
from fastapi import Depends, FastAPI, Header, HTTPException
async def verify_token(x_token: str = Header()):
if x_token != "fake-super-secret-token":
raise HTTPException(status_code=400, detail="X-Token header invalid")
async def verify_key(x_key: str = Header()):
if x_key != "fake-super-secret-key":
raise HTTPException(status_code=400, detail="X-Key header invalid")
return x_key
# 全局依赖项很有用,后面的安全性就可以使用全局依赖项
app = FastAPI(dependencies=[Depends(verify_token), Depends(verify_key)])
@app.get("/items/")
async def read_items():
return [{"item": "Portal Gun"}, {"item": "Plumbus"}]
@app.get("/users/")
async def read_users():
return [{"username": "Rick"}, {"username": "Morty"}]
```
安全性
---
待更新
参考
---
- [Python 备忘清单](./python.md) _(jaywcjlove.github.io)_
- [FastAPI 官方文档](https://fastapi.tiangolo.com/zh/tutorial/) _(fastapi.tiangolo.com)_

View File

@ -75,7 +75,7 @@ JavaScript 测试工具
CSS 工具
---
[30秒CSS](https://atomiks.github.io/30-seconds-of-css/)<!--rehype:target=_blank-->
[30秒CSS](https://www.30secondsofcode.org/css/)<!--rehype:target=_blank-->
[Autoprefixer](https://github.com/postcss/autoprefixer)<!--rehype:target=_blank-->
[ColorZilla](http://www.colorzilla.com/gradient-editor/)<!--rehype:target=_blank-->
[CSS Protips](https://github.com/AllThingsSmitty/css-protips)<!--rehype:target=_blank-->
@ -89,7 +89,6 @@ CSS 工具
[Emmet](https://www.emmet.io/)<!--rehype:target=_blank-->
[est](http://ecomfe.github.io/est/)<!--rehype:target=_blank-->
[Flex Layout Attribute](https://github.com/StefanKovac/flex-layout-attribute)<!--rehype:target=_blank-->
[Grid.Guide](http://grid.guide/)<!--rehype:target=_blank-->
[minireset.css](http://lesscss.org/)<!--rehype:target=_blank-->
[Normalize.css](http://necolas.github.io/normalize.css/)<!--rehype:target=_blank-->
[PostCSS](http://postcss.org/)<!--rehype:target=_blank-->
@ -104,7 +103,7 @@ CSS 工具
框架类库
---
[React](https://facebook.github.io/react/)<!--rehype:target=_blank&style=background: rgb(97 218 251/var(\-\-bg\-opacity));-->
[React](https://zh-hans.react.dev)<!--rehype:target=_blank&style=background: rgb(97 218 251/var(\-\-bg\-opacity));-->
[Vue 中文](https://cn.vuejs.org/)<!--rehype:target=_blank&style=background: rgb(66 184 131/var(\-\-bg\-opacity));-->
[Angular](https://angular.io/)<!--rehype:target=_blank&style=background: rgb(195 8 47/var(\-\-bg\-opacity));-->
[jQuery](http://www.jquery123.com/)<!--rehype:target=_blank-->

View File

@ -855,7 +855,7 @@ $ git checkout <branch> -- <file>
删除本地存在远程不存在的分支
```shell
git remote prune origin
$ git remote prune origin
```
### 获取最近一次提交的 Hash
@ -1100,6 +1100,27 @@ Host github.com
```
<!--rehype:className=wrap-text-->
### Fork仓库同步上游仓库
- 设置上游仓库
```shell
$ git remote add upstream https://github.com/jaywcjlove/reference.git
```
- 本地项目操作
```shell
$ git fetch upstream # 获取上游仓库更新
$ git stach # 暂存本地修改(如果有)
$ git branch -a # 列出所有远程仓库地址(非必须)
$ git rebase remotes/upstream/main # 使用远程仓库的提交记录来重写本地提交记录
$ git push -f # 强制推送到远程(github)仓库
$ git stach pop # 恢复暂存的本地修改(如果有)
```
<!--rehype:className=style-timeline-->
统计查询
---
@ -1157,11 +1178,29 @@ $ git whatchanged --since='2 weeks ago'
### 在 commit log 中查找相关内容
```bash
git log --all --grep='<given-text>'
$ git log --all --grep='<given-text>'
```
通过 grep 查找given-text: 所需要查找的字段
### Git 仓库的大小
```bash
$ git ls-files | xargs -r du -hs
```
### Git 仓库的总大小
```bash
$ git count-objects -vH
```
### 查询历史体积大的 10 个文件
```bash
$ git rev-list --objects --all | git cat-file --batch-check='%(objecttype) %(objectname) %(objectsize) %(rest)' | awk '/^blob/ {print substr($0,6)}' | sort --numeric-sort --key=2 --reverse | head -n 10 | cut -c 13-
```
Conventional Commmits
----

View File

@ -260,17 +260,17 @@ env:
#### 操作符
- `( )` _(逻辑分组)_
- `[ ]` _(指数)_
- `.` _(属性取消引用)_
- `!` _(不是)_
- `<` _(于)_
- `[ ]` _(索引)_
- `.` _(属性引用)_
- `!` _()_
- `<` _(于)_
- `<=` _(小于或等于)_
- `>` _(比...更棒)_
- `>` _(大于)_
- `>=` _(大于或等于)_
- `==` _(平等的)_
- `!=` _(不等)_
- `==` _(相等)_
- `!=` _(不等)_
- `&&` _(和)_
- `||` _(或)_
- `||` _(或)_
<!--rehype:className=cols-2 style-none-->
### Github 上下文

View File

@ -33,8 +33,10 @@ windows_job:
script:
- echo Hello, %USERNAME%!
linux_job: tags:
- linux script:
linux_job:
tags:
- linux
script:
- echo "Hello, $USER!"
```

View File

@ -75,6 +75,7 @@ Linux 命令速查表
:--- | :---
:--- | :---
**`ls -al`** | 列出文件-包括常规文件和隐藏文件以及它们的权限
**`tree`** | 以树形结构列出文件,常用参数有:`-d`查看目录,`-L num`查看num层文件`-a`查看隐藏文件
**`pwd`** | 显示当前目录文件路径
**`mkdir 'directory_name'`** | 创建一个新目录
**`rm file_name`** | 删除一个文件
@ -217,6 +218,43 @@ Linux 命令速查表
**`cd /test`** | 将目录更改为/test目录
<!--rehype:className=style-list-->
快捷键
---
### 命令行编辑
<!--rehype:wrap-class=row-span-2-->
:--- | :---
:--- | :---
**Tab** | 自动补全
**Ctrl+A** | 移动光标到命令行首
**Ctrl+E** | 移动光标到命令行尾
**Ctrl+Left** | 光标左移一个单词
**Ctrl+Right** | 光标右移一个单词
**Ctrl+K** | 删除光标之后所有字符
**Ctrl+U** | 清空当前键入的命令
**Ctrl+W** | 删除光标前的单词
**Ctrl+Y** | 粘贴`Ctrl+W``Ctrl+K`删除的内容
**Ctrl+D** | 删除当前光标所在字符 (在没有字符时会关闭终端)
Ctrl+B (Left) | 光标左移(后退)
Ctrl+F (Right) | 光标右移(前进)
Ctrl+H (Backspace) | 删除光标的前一个字符
### 其他
<!--rehype:wrap-class=row-span-2-->
:--- | :---
:--- | :---
**Ctrl+L** | 清屏
**Ctrl+C** | 中断正在执行的程序
**Ctrl+R** | 按字符串寻找历史命令
**Ctrl+Z** | 将当前进程放到后台(之后可以用`fg`命令重回到前台)
**Shift+Insert** | 粘贴
**Ctrl+PageUp** | 屏幕输出向上翻页
**Ctrl+PageDown** | 屏幕输出向下翻页
Ctrl+P (Up) | 上一条命令
Ctrl+N (Down) | 下一条命令
另见
---

View File

@ -97,7 +97,9 @@ local html = [[
<html>
<head></head>
<body>
<a href="https://www.twle.cn/">简单编程</a>
<a href="https://www.twle.cn/">
简单编程
</a>
</body>
</html>
]]
@ -211,6 +213,7 @@ print(x, y) -- 3, 1
```lua
local tab = {}
tab.one = 2
tab.two = 1
@ -243,13 +246,13 @@ print(tab.one, tab.two) -- 1 2
:- | :-
:- | :-
\+ | 加法
\- | 减法
\* | 乘法
\/ | 除法
\% | 取余,求出除法的余数
\^ | 乘幂,计算次方
\- | 负号,取负值
`+` | 加法
`-` | 减法
`*` | 乘法
`/` | 除法
`%` | 取余,求出除法的余数
`^` | 乘幂,计算次方
`-` | 负号,取负值
```lua
local a, b = 4, 3
@ -287,7 +290,27 @@ print(a ^ b) -- 64.0
print(type(tonumber("12"))) -- number
```
<!--rehype:className=style-round-->
<!--rehype:className=wrap-text -->
### goto 语法
<!--rehype:wrap-class=col-span-2-->
```lua
local function isValidNumber(num)
if type(num) ~= "number" then
goto invalidNumber -- 无条件地跳转到代码中的标签 `::invalidNumber::`
end
print("Valid number:", num)
return true
::invalidNumber::
print("Invalid number:", num)
return false
end
isValidNumber(123) -- 输出: Valid number: 123
isValidNumber("abc") -- 输出: Invalid number: abc
```
条件语句
---

View File

@ -275,10 +275,10 @@ server {
listen 80;
server_name example.com;
root /path/to/website;
# root /www/data/ 示例,如果里面没有'root',它将寻找 /www/data/index.html
# root /path/to/website/ 示例,如果里面没有'root',它将寻找 /path/to/website/index.html
location / {
}
location /images/ { # 如果里面没有“root”它将寻找 /www/data/images/index.html
location /images/ { # 如果里面没有“root”它将寻找 /path/to/website/images/index.html
}
location /videos/ { # 由于里面有“root”它会寻找 /www/media/videos/index.html
root /www/media;
@ -510,7 +510,7 @@ upstream example {
server 127.0.0.1:82 weight=3;
server 127.0.0.1:83 weight=3 down;
server 127.0.0.1:84 weight=3; max_fails=3 fail_timeout=20s;
server 127.0.0.1:85 weight=4;;
server 127.0.0.1:85 weight=4;
keepalive 32;
}
server {

View File

@ -623,6 +623,31 @@ $ sudo systemctl restart postgresql
另见:[复制](https://www.postgresql.org/docs/current/sql-copy.html)
### 跨版本升级
pg_upgrade 跨版本升级
```shell
$ /usr/lib/postgresql/16/bin/pg_upgrade \
-b /usr/lib/postgresql/15/bin \
-B /usr/lib/postgresql/16/bin \
-d /var/lib/postgresql/15/main \
-D /var/lib/postgresql/16/main \
-o " -c config_file=/etc/postgresql/15/main/postgresql.conf" \
-O " -c config_file=/etc/postgresql/16/main/postgresql.conf"
```
- &nbsp; `-b` &nbsp; 旧版本二进制文件目录
- &nbsp; `-B` &nbsp; 新版本二进制文件目录
- &nbsp; `-d` &nbsp; 旧版本数据目录
- &nbsp; `-D` &nbsp; 新版本数据目录
- &nbsp; `-o` &nbsp; 旧版本主配置文件
- &nbsp; `-O` &nbsp; 新版本主配置文件
- &nbsp; `-c` &nbsp;`check`,不执行升级,可先加`-c`检查是否有报错,没有报错再运行升级
<!--rehype:className=style-none-->
使用 `pg_upgrade -?` 获取完整的选项列表
另见
----

View File

@ -454,10 +454,10 @@ Enter your name: Tom
```python
>>> # 是否以 H 开头
>>> "Hello, world!".endswith("H")
>>> "Hello, world!".startswith("H")
True
>>> # 是否以 h 开头
>>> "Hello, world!".endswith("h")
>>> "Hello, world!".startswith("h")
False
>>> # 是否以 ! 结尾
>>> "Hello, world!".endswith("!")
@ -1814,6 +1814,59 @@ finally: # 在所有情况下执行
print("我们可以在这里清理资源")
```
### pyenv & pipenv
<!--rehype:wrap-class=col-span-3-->
pvenv 用于管理python版本pipenv 用于管理项目包版本
#### pyenv
```shell
# 安装 pyenv
curl https://pyenv.run | bash
```
[更多安装方式](https://github.com/pyenv/pyenv#installation)
```shell
# 安装 python 版本
pyenv install 3.10.12
# 设置 python 版本
pyenv global 3.10.12 # 全局设置
pyenv shell 3.10.12 # 针对当前 shell session
pyenv local 3.10.12 # 针对当前目录
```
#### pipenv
```shell
# 安装 pipenv
pip install pipenv --user # pip
brew install pipenv # homebrew
# 更新 pipenv
pip install --user --upgrade pipenv # pip
brew upgrade pipenv # homebrew
```
```shell
# 安装 package
pipenv install <package name> # 不指定版本
pipenv install <package name>==<version> # 精确指定版本
pipenv install <package name>~=<version> # 指定版本范围,例如 1.1则表示安装1.x的最新版本1.0.1则表示安装1.0.x的最新版本
pipenv install "<package name>=<version>" # 大于等于指定版本
pipenv install "<package name>=<version>" # 小于等于指定版本
```
```shell
# 指定 python 版本
pipenv --python 3.10.12
# 激活当前目录虚拟环境
pipenv shell
```
另见
----

View File

@ -83,6 +83,12 @@ gem 'rspec', :require => 'spec'
$ bundle install
```
解决开发用 mac生产用 linux 出现的 Gemfile.lock 不一致问题
```bash
bundle lock --add-platform x86_64-linux
```
### 安装特定 ruby gem 的特定版本
```bash

220
docs/subversion.md Normal file
View File

@ -0,0 +1,220 @@
Subversion 备忘清单
===
本备忘单总结了常用的 [SVN](https://git-scm.com/) 命令行指令,以供快速参考。
入门
---
### Subversion 组件
<!--rehype:wrap-class=row-span-2-->
名称 | 说明
:- | :-
`svn` | 命令行程序
`svnversion` | 工作副本的修订
`svnlook` | 检查存储库
`svnadmin` | 存储库管理
`svndumpfilter` | 过滤存储库流
`mod_dav_svn` | Apache 模块
`svnserve` | SVN服务器SVN协议
`svnsync` | 镜像仓库
<!--rehype:className=left-align-->
---
- [Subversion 官方文档](https://subversion.apache.org/)
### 添加文件或文件夹
```bash
$ svn add *
# 添加文件夹中的所有项目,然后递归(忽略版本目录)
$ svn add itemname
# 如果 itemname 是文件夹,
# 则所有子文件夹 并且文件也会被添加
$ svn add * --force
# 强制递归到版本化目录
```
### 将更改提交到存储库
```shell
$ svn commit "/path"
# 提交对文件或文件夹的更改
$ svn commit -m "Message" "/path"
# 提交消息“Message”
$ svn commit -N "/path"
# 提交对文件夹的更改而不递归
```
### Subversion 协议
协议 | 说明
:- | :-
`file://` | 本地
`http://` | HTTP (Apache)
`https://` | HTTPS (SSL)
`svn://` | SVN (svnserve)
`svn+ssh://` | SVN over SSH
<!--rehype:className=left-align-->
### 删除、复制和移动
```shell
$ svn delete "/path"
$ svn -m "Deleting" delete "/path"
# 删除并显示消息“正在删除”
$ svn copy "sourcepath" "targetpath"
# 将源复制到目标
$ svn move "sourcepath" "targetpath"
# 将源移动到目标
```
### 杂项命令 ($ svn ... )
<!--rehype:wrap-class=row-span-2-->
命令 | 说明
:- | :-
`$ svn resolve "/path"` | 解决冲突
`$ svn cleanup "/path"` | 递归删除,锁并完成,操作
`$ svn lock "/path"` | 锁定路径
`$ svn unlock "/path"` | 解锁路径
`$ svn cat "/path"` | 查看文件内容
`$ svn status "/path"` | 获取路径状态
<!--rehype:className=left-align-->
### Subversion 帮助
```shell
$ svn help
$ svn help import
# 显示“导入”命令的帮助
```
### 恢复本地(未提交)更改
```shell
$ svn revert "/path/filename"
# 恢复对文件的更改
$ svn revert -R "/path/folder"
# 递归恢复对文件夹的更改
```
### 日志与责任
```shell
$ svn log "/path"
# 显示存储库中的日志消息
$ svn blame "/path"
# 显示路径的带有消息的提交
```
### 将本地文件夹添加到存储库
```shell
$ svn import folder "/path/to/repository"
```
### 物品和财产状态
<!--rehype:wrap-class=row-span-2-->
命令 | 说明
:- | :-
' ' | 无修改
`A` | 添加
`D` | 删除
`M` | 修改的
`R` | 已更换物品
`C` | 冲突中
`X` | 外部定义
`I` | 被忽略
`?` | 不在存储库中
`!` | 物品缺失
`~` | 对象类型已更改
<!--rehype:className=left-align-->
### 存储库管理
```shell
$ svnadmin create "/path/to/repository"
# 创建存储库
$ svnadmin setlog "path" -r 7 message.txt
# 第7版的更改日志消息
# message.txt内容的“路径”
$ svnadmin dump "repository" > filename
# 将存储库的内容转储到文件
$ svnadmin load "repository" < filename
# 将文件的内容加载到存储库
```
### 文件之间的差异
```shell
$ svn diff "/path/file"
# 查看“/path/file”中的更改
$ svn diff "/path/file@2" "/path/file@7"
# 比较修订版2和7中的文件
$ svn diff -r 2:7 "/path/folder"
# 比较修订版2和7中的所有文件
```
### 签出工作副本
```shell
$ svn checkout "/path/to/repository/folder"
# 创建“文件夹”的工作副本
$ svn checkout "/path" foldername
# 签出到新文件夹“foldername”
```
### 合并更改
```shell
$ svn merge -r 2:7 "item" "/path/file"
# 在修订2之间应用差异
# 和“item”到“/path/file”的7
$ svn merge "url1" "url2" "/path/file"
# 应用“url1”和
# “url2”到“/path/file”
```
### 特性命令($ svn ... )
命令 | 说明
:- | :-
`$ svn proplist "/path"` | 列出属性
`$ svn propset PROP VAL` | 设置属性“PROP”
`$ svn "/path"` | 至值“VAL”
`$ svn propget PROP "/path"` | 获取“PROP”的值
`$ svn propedit PROP "/path"` | 编辑“PROP”
`$ svn propdel PROP "/path"` | 删除“PROP”
<!--rehype:className=left-align-->
### 参数快捷方式
参数 | 说明
:- | :-
`-m "Message"` | `--message`
`-q` | `--quiet`
`-v` | `--verbose`
`-r` | `--revision`
`-c` | `--change`
`-t` | `--transaction`
`-R` | `--recursive`
`-N` | `--non-recursive`
<!--rehype:className=left-align-->
### 从存储库更新工作副本
```shell
$ svn update "/path"
$ svn update -r9 "/path"
# 更新至修订版9
```
另见
---
- [Apache Subversion: Quick Start](https://subversion.apache.org/quick-start)
- [Subversion 与版本控制](https://svnbook.red-bean.com/)

View File

@ -162,7 +162,7 @@ $ ¢ € £ ¥ ₩ ₽ ₹ ¤ ₱ ₦ ƒ ₮ ৲ ৳ ₨ ௹ ฿ ៛ ₪ ₫ ₭
<!--rehype:wrap-class=row-span-4-->
```
ˍ ― ─ ━ │ ┃ ┄ ┅ ┆ ┇ ┈ ┉ ┊ ┋ ╌ ╍ ╎ ╴ ╵ ╶ ╷ ╸ ╹ ╺ ╻ ╼ ╽ ╾ ╿ ▏ ▕ ╏ — ⌜ ⌝ ⌞ ⌟ ┌ ┍ ┎ ┏ ┐ ┑ ┒ ┓ └ ┕ ┖ ┗ ┘ ┙ ┚ ┛ ├ ┝ ┞ ┟ ┠ ┡ ┢ ┣ ┤ ┥ ┦ ┧ ┨ ┩ ┪ ┫ ┬ ┭ ┮ ┯ ┰ ┱ ┲ ┳ ┴ ┵ ┶ ┷ ┸ ┹ ┺ ┻ ┼ ┽ ┾ ┿ ╀ ╁ ╂ ╃ ╄ ╅ ╆ ╇ ╈ ╉ ╊ ╋ ═ ║ ╒ ╓ ╔╔ ╔ ╕ ╕ ╖ ╖ ╗ ╗ ╘ ╙ ╚ ╚ ╛ ╛ ╜ ╜ ╝ ╝ ╞ ╟ ╟ ╠ ╡ ╡ ╢ ╢ ╣ ╣ ╤ ╤ ╥ ╥ ╦ ╦ ╧ ╧ ╨ ╨ ╩ ╩ ╪ ╪ ╫ ╬ ╭ ╮ ╯ ╰ ◜ ◝ ◞ ◟ ◠ ◡ ⌈ ⌊ ⌉ ⌋ ⎛ ⎝ ⎞ ⎠ ⎡ ⎣ ⎤ ⎦ ⎧ ⎩ ⎫ ⎭ ⎸ ⎹ ⎾ ⎿ ⏉ ⏊ ⏋ ⏌ ≡ ≣ ☰ ☱ ☲ ☳ ☴ ☵ ☶ ☷
ˍ ― ─ ━ │ ┃ ┄ ┅ ┆ ┇ ┈ ┉ ┊ ┋ ╌ ╍ ╎ ╴ ╵ ╶ ╷ ╸ ╹ ╺ ╻ ╼ ╽ ╾ ╿ ▏ ▕ ╏ — ⌜ ⌝ ⌞ ⌟ ┌ ┍ ┎ ┏ ┐ ┑ ┒ ┓ └ ┕ ┖ ┗ ┘ ┙ ┚ ┛ ├ ┝ ┞ ┟ ┠ ┡ ┢ ┣ ┤ ┥ ┦ ┧ ┨ ┩ ┪ ┫ ┬ ┭ ┮ ┯ ┰ ┱ ┲ ┳ ┴ ┵ ┶ ┷ ┸ ┹ ┺ ┻ ┼ ┽ ┾ ┿ ╀ ╁ ╂ ╃ ╄ ╅ ╆ ╇ ╈ ╉ ╊ ╋ ═ ║ ╒ ╓ ╔ ╕ ╖ ╗ ╘ ╙ ╚ ╛ ╜ ╝ ╞ ╟ ╠ ╡ ╢ ╣ ╤ ╥ ╦ ╧ ╨ ╩ ╪ ╫ ╬ ╭ ╮ ╯ ╰ ◜ ◝ ◞ ◟ ◠ ◡ ⌈ ⌊ ⌉ ⌋ ⎛ ⎝ ⎞ ⎠ ⎡ ⎣ ⎤ ⎦ ⎧ ⎩ ⎫ ⎭ ⎸ ⎹ ⎾ ⎿ ⏉ ⏊ ⏋ ⏌ ≡ ≣ ☰ ☱ ☲ ☳ ☴ ☵ ☶ ☷
```
<!--rehype:className=wrap-text&style=font-size: 28px;-->
@ -322,16 +322,37 @@ _ _ ˉ  ̄ ﹌ ˇ
<!--rehype:wrap-class=row-span-4 col-span-3-->
```
ⒷⒸⒹⒺⒻⒼⒽⒾⒿⓀⓁⓂⓃⓄⓅⓆⓇⓈⓉⓊⓋⓌⓍⓎⓏⓐⓑⓒⓓⓔⓕⓖⓗⓘⓙⓚⓛⓜⓝⓞⓟⓠⓡⓢⓣⓤⓥⓦⓧⓨⓩ
ᴀʙᴅᴇғɢʜɪᴊᴋʟᴍɴᴘǫʀsᴛxʏ
𝓐𝓑𝓒𝓓𝓔𝓕𝓖𝓗𝓘𝓙𝓚𝓛𝓜𝓝𝓞𝓟𝓠𝓡𝓢𝓣𝓤𝓥𝓦𝓧𝓨𝓩𝓪𝓫𝓬𝓭𝓮𝓯𝓰𝓱𝓲𝓳𝓴𝓵𝓶𝓷𝓸𝓹𝓺𝓻𝓼𝓽𝓾𝓿𝔀𝔁𝔂𝔃𝒜ℬ𝒞𝒟ℰℱ𝒢ℋℐ𝒥𝒦ℒℳ𝒩𝒪𝒫𝒬ℛ𝒮𝒯𝒰𝒱𝒲𝒳𝒴𝒵𝒶𝒷𝒸𝒹𝑒𝒻𝑔𝒽𝒾𝒿𝓀𝓁𝓂𝓃𝑜𝓅𝓆𝓇𝓈𝓉𝓊𝓋𝓌𝓍𝓎𝓏
🅐🅑🅒🅓🅔🅕🅖🅗🅘🅙🅚🅛🅜🅝🅞🅟🅠🅡🅢🅣🅤🅥🅦🅧🅨🅩
𝔸𝔹ℂ𝔻𝔼𝔽𝔾ℍ𝕀𝕁𝕂𝕃𝕄ℕ𝕆ℙℚℝ𝕊𝕋𝕌𝕍𝕎𝕏𝕐ℤ𝕒𝕓𝕔𝕕𝕖𝕗𝕘𝕙𝕚𝕛𝕜𝕝𝕞𝕟𝕠𝕡𝕢𝕣𝕤𝕥𝕦𝕧𝕨𝕩𝕪𝕫
🄰🄱🄲🄳🄴🄵🄶🄷🄸🄹🄺🄻🄼🄽🄾🄿🅀🅁🅂🅃🅄🅅🅆🅇🅈🅉
🅰🅱🅲🅳🅴🅵🅶🅷🅸🅹🅺🅻🅼🅽🅾🅿🆀🆁🆂🆃🆄🆅🆆🆇🆈🆉
𝕬𝕭𝕮𝕯𝕰𝕱𝕲𝕳𝕴𝕵𝕶𝕷𝕸𝕹𝕺𝕻𝕼𝕽𝕾𝕿𝖀𝖁𝖂𝖃𝖄𝖅𝖆𝖇𝖈𝖉𝖊𝖋𝖌𝖍𝖎𝖏𝖐𝖑𝖒𝖓𝖔𝖕𝖖𝖗𝖘𝖙𝖚𝖛𝖜𝖝𝖞𝖟𝔄𝔅ℭ𝔇𝔈𝔉𝔊ℌℑ𝔍𝔎𝔏𝔐𝔑𝔒𝔓𝔔ℜ𝔖𝔗𝔘𝔙𝔚𝔛𝔜ℨ𝔞𝔟𝔠𝔡𝔢𝔣𝔤𝔥𝔦𝔧𝔨𝔩𝔪𝔫𝔬𝔭𝔮𝔯𝔰𝔱𝔲𝔳𝔴𝔵𝔶𝔷
𝐀𝐁𝐂𝐃𝐄𝐅𝐆𝐇𝐈𝐉𝐊𝐋𝐌𝐍𝐎𝐏𝐐𝐑𝐒𝐓𝐔𝐕𝐖𝐗𝐘𝐙𝐚𝐛𝐜𝐝𝐞𝐟𝐠𝐡𝐢𝐣𝐤𝐥𝐦𝐧𝐨𝐩𝐪𝐫𝐬𝐭𝐮𝐯𝐰𝐱𝐲𝐳
𝘈𝘉𝘊𝘋𝘌𝘍𝘎𝘏𝘐𝘑𝘒𝘓𝘔𝘕𝘖𝘗𝘘𝘙𝘚𝘛𝘜𝘝𝘞𝘟𝘠𝘡𝘢𝘣𝘤𝘥𝘦𝘧𝘨𝘩𝘪𝘫𝘬𝘭𝘮𝘯𝘰𝘱𝘲𝘳𝘴𝘵𝘶𝘷𝘸𝘹𝘺𝘻𝘼𝘽𝘾𝘿𝙀𝙁𝙂𝙃𝙄𝙅𝙆𝙇𝙈𝙉𝙊𝙋𝙌𝙍𝙎𝙏𝙐𝙑𝙒𝙓𝙔𝙕𝙖𝙗𝙘𝙙𝙚𝙛𝙜𝙝𝙞𝙟𝙠𝙡𝙢𝙣𝙤𝙥𝙦𝙧𝙨𝙩𝙪𝙫𝙬𝙭𝙮𝙯
Ⓑ Ⓒ Ⓓ Ⓔ Ⓕ Ⓖ Ⓗ Ⓘ Ⓙ Ⓚ Ⓛ Ⓜ Ⓝ Ⓞ Ⓟ Ⓠ Ⓡ Ⓢ Ⓣ Ⓤ Ⓥ Ⓦ Ⓧ Ⓨ Ⓩ
ⓐ ⓑ ⓒ ⓓ ⓔ ⓕ ⓖ ⓗ ⓘ ⓙ ⓚ ⓛ ⓜ ⓝ ⓞ ⓟ ⓠ ⓡ ⓢ ⓣ ⓤ ⓥ ⓦ ⓧ ⓨ ⓩ
ᴀ ʙ ᴅ ᴇ ғ ɢ ʜ ɪ ᴊ ᴋ ʟ ᴍ ɴ ᴘ ǫ ʀ s ᴛ x ʏ
𝓐 𝓑 𝓒 𝓓 𝓔 𝓕 𝓖 𝓗 𝓘 𝓙 𝓚 𝓛 𝓜 𝓝 𝓞 𝓟 𝓠 𝓡 𝓢 𝓣 𝓤 𝓥 𝓦 𝓧 𝓨 𝓩
𝓪 𝓫 𝓬 𝓭 𝓮 𝓯 𝓰 𝓱 𝓲 𝓳 𝓴 𝓵 𝓶 𝓷 𝓸 𝓹 𝓺 𝓻 𝓼 𝓽 𝓾 𝓿 𝔀 𝔁 𝔂 𝔃
𝒜 𝒞 𝒟 𝒢 𝒥 𝒦 𝒩 𝒪 𝒫 𝒬 𝒮 𝒯 𝒰 𝒱 𝒲 𝒳 𝒴 𝒵
𝒶 𝒷 𝒸 𝒹 𝑒 𝒻 𝑔 𝒽 𝒾 𝒿 𝓀 𝓁 𝓂 𝓃 𝑜 𝓅 𝓆 𝓇 𝓈 𝓉 𝓊 𝓋 𝓌 𝓍 𝓎 𝓏
🅐 🅑 🅒 🅓 🅔 🅕 🅖 🅗 🅘 🅙 🅚 🅛 🅜 🅝 🅞 🅟 🅠 🅡 🅢 🅣 🅤 🅥 🅦 🅧 🅨 🅩
𝔸 𝔹 𝔻 𝔼 𝔽 𝔾 𝕀 𝕁 𝕂 𝕃 𝕄 𝕆 𝕊 𝕋 𝕌 𝕍 𝕎 𝕏 𝕐
𝕒 𝕓 𝕔 𝕕 𝕖 𝕗 𝕘 𝕙 𝕚 𝕛 𝕜 𝕝 𝕞 𝕟 𝕠 𝕡 𝕢 𝕣 𝕤 𝕥 𝕦 𝕧 𝕨 𝕩 𝕪 𝕫
🄰 🄱 🄲 🄳 🄴 🄵 🄶 🄷 🄸 🄹 🄺 🄻 🄼 🄽 🄾 🄿 🅀 🅁 🅂 🅃 🅄 🅅 🅆 🅇 🅈 🅉
🅰 🅱 🅲 🅳 🅴 🅵 🅶 🅷 🅸 🅹 🅺 🅻 🅼 🅽 🅾 🅿 🆀 🆁 🆂 🆃 🆄 🆅 🆆 🆇 🆈 🆉
𝕬 𝕭 𝕮 𝕯 𝕰 𝕱 𝕲 𝕳 𝕴 𝕵 𝕶 𝕷 𝕸 𝕹 𝕺 𝕻 𝕼 𝕽 𝕾 𝕿 𝖀 𝖁 𝖂 𝖃 𝖄 𝖅
𝖆 𝖇 𝖈 𝖉 𝖊 𝖋 𝖌 𝖍 𝖎 𝖏 𝖐 𝖑 𝖒 𝖓 𝖔 𝖕 𝖖 𝖗 𝖘 𝖙 𝖚 𝖛 𝖜 𝖝 𝖞 𝖟
𝔄 𝔅 𝔇 𝔈 𝔉 𝔊 𝔍 𝔎 𝔏 𝔐 𝔑 𝔒 𝔓 𝔔 𝔖 𝔗 𝔘 𝔙 𝔚 𝔛 𝔜
𝔞 𝔟 𝔠 𝔡 𝔢 𝔣 𝔤 𝔥 𝔦 𝔧 𝔨 𝔩 𝔪 𝔫 𝔬 𝔭 𝔮 𝔯 𝔰 𝔱 𝔲 𝔳 𝔴 𝔵 𝔶 𝔷
𝐀 𝐁 𝐂 𝐃 𝐄 𝐅 𝐆 𝐇 𝐈 𝐉 𝐊 𝐋 𝐌 𝐍 𝐎 𝐏 𝐐 𝐑 𝐒 𝐓 𝐔 𝐕 𝐖 𝐗 𝐘 𝐙
𝐚 𝐛 𝐜 𝐝 𝐞 𝐟 𝐠 𝐡 𝐢 𝐣 𝐤 𝐥 𝐦 𝐧 𝐨 𝐩 𝐪 𝐫 𝐬 𝐭 𝐮 𝐯 𝐰 𝐱 𝐲 𝐳
𝘈 𝘉 𝘊 𝘋 𝘌 𝘍 𝘎 𝘏 𝘐 𝘑 𝘒 𝘓 𝘔 𝘕 𝘖 𝘗 𝘘 𝘙 𝘚 𝘛 𝘜 𝘝 𝘞 𝘟 𝘠 𝘡
𝘢 𝘣 𝘤 𝘥 𝘦 𝘧 𝘨 𝘩 𝘪 𝘫 𝘬 𝘭 𝘮 𝘯 𝘰 𝘱 𝘲 𝘳 𝘴 𝘵 𝘶 𝘷 𝘸 𝘹 𝘺 𝘻
𝘼 𝘽 𝘾 𝘿 𝙀 𝙁 𝙂 𝙃 𝙄 𝙅 𝙆 𝙇 𝙈 𝙉 𝙊 𝙋 𝙌 𝙍 𝙎 𝙏 𝙐 𝙑 𝙒 𝙓 𝙔 𝙕
𝙖 𝙗 𝙘 𝙙 𝙚 𝙛 𝙜 𝙝 𝙞 𝙟 𝙠 𝙡 𝙢 𝙣 𝙤 𝙥 𝙦 𝙧 𝙨 𝙩 𝙪 𝙫 𝙬 𝙭 𝙮 𝙯
```
<!--rehype:className=wrap-text&style=font-size: 28px;-->

View File

@ -1314,19 +1314,42 @@ export const Progress: FC<PropsWithRef<ProgressProps>> = forwardRef<HTMLDivEleme
```
### 组件 'as' 属性
<!--rehype:wrap-class=col-span-3-->
<!--rehype:wrap-class=col-span-2-->
```tsx
import React, { ElementType, ComponentPropsWithoutRef } from "react";
export const Link = <T extends ElementType<any> = "a">(props: { as?: T; } & ComponentPropsWithoutRef<T>) => {
export const Link = <T extends ElementType<any> = "a">(
props: { as?: T; } & ComponentPropsWithoutRef<T>
) => {
const Comp = props.as || "a";
return <Comp {...props}></Comp>;
};
<Link as="div">文本</Link>;
```
允许传入自定义 `React` 组件,或 `div`, `a` 标签
### 组件作为 Props 传递
```tsx
type RowProps = {
element: React.ElementType<{
className?: string;
}>;
}
const Row = (props: RowProps) => {
return (
<props.element className="h-8 w-8" />
);
};
<Row element={"div"} />;
<Row element={UserIcon} />;
```
各种各样的技巧
---
@ -1337,7 +1360,7 @@ export const Link = <T extends ElementType<any> = "a">(props: { as?: T; } & Comp
type Capitalize<T extends string> = T extends `${infer U}${infer V}`
? `${Uppercase<U>}${V}`
: T
type capitalized = Capitalize<"hello world"> // Hello World
type capitalized = Capitalize<"hello world"> // Hello world
```
也可以在 infer 中使用条件约束(`extends`
@ -1528,18 +1551,33 @@ type Age2 = Person["age"];
```
### 范型推导出列表字面量
<!--rehype:wrap-class=col-span-2-->
```ts
const a = <T extends string>(t: T) => t;
const b = <T extends number>(t: T) => t;
const c = <T extends boolean>(t: T) => t;
const d = a("a"); // const d: 'a'
const e = a(1); // const d: 1
const f = a(true); // const d: true
const e = b(1); // const d: 1
const f = c(true); // const d: true
const g = <T extends string[]>(t: [...T]) => t; // 这里t的类型用了一个展开运算
const h = g(["111", "222"]); // 类型变成["111", "222"]了
// 这里t的类型用了一个展开运算
const g =
<T extends string[]>(t: [...T]) => t;
// 类型变成["111", "222"]了
const h = g(["111", "222"]);
```
### Object.keys 类型声明
<!--rehype:wrap-class=col-span-2-->
```ts
const keys = Object.keys(options) as (keyof typeof options)[];
keys.forEach(key => {
if (options[key] == null) {
throw new Error(`Missing option ${key}`);
}
});
```
.d.ts 模版
@ -1994,6 +2032,7 @@ $ tsc app.ts util.ts --target esnext --outfile index.js
<!--rehype:className=wrap-text-->
### 编译器选项
<!--rehype:wrap-class=col-span-2-->
:- | --
:- | --
@ -2006,7 +2045,7 @@ $ tsc app.ts util.ts --target esnext --outfile index.js
`--project` _string_ | 编译项目给定其配置文件的路径,或带有 'tsconfig.json' 的文件夹
`--showConfig` _boolean_ | 打印最终配置而不是构建
`--version` _boolean_ | 打印编译器的版本
<!--rehype:className=style-list-->
<!--rehype:className=left-align-->
### 构建选项
@ -2020,13 +2059,14 @@ $ tsc app.ts util.ts --target esnext --outfile index.js
<!--rehype:className=style-list-->
### 监听选项
<!--rehype:wrap-class=col-span-2-->
:- | --
:- | --
`--excludeDirectories` _list_ | 从监视进程中删除目录列表
`--excludeFiles` _list_ | 从监视模式的处理中删除文件列表
`--fallbackPolling` _fixedinterval_, _priorityinterval_, _dynamicpriority_, _fixedchunksize_ | 指定当系统用完本机文件观察器时观察器应使用的方法
`--synchronousWatchDirectory` boolean | 在本机不支持递归监视的平台上同步调用回调并更新目录监视程序的状态
`--synchronousWatchDirectory` _boolean_ | 在本机不支持递归监视的平台上同步调用回调并更新目录监视程序的状态
`--watch` _boolean_ | 观看输入文件
`--watchDirectory` _usefsevents_, _fixedpollinginterval_, _dynamicprioritypolling_, _fixedchunksizepolling | 指定在缺少递归文件监视功能的系统上如何监视目录
`--watchFile` _fixedpollinginterval_, _prioritypollinginterval_, _dynamicprioritypolling_, _fixedchunksizepolling_, _usefsevents_, _usefseventsonparentdirectory_ | 指定 TypeScript 监视模式的工作方式
@ -2035,6 +2075,42 @@ $ tsc app.ts util.ts --target esnext --outfile index.js
TSConfig Ref
---
### 可完成 90% 的任务
<!--rehype:wrap-class=row-span-2-->
```js
"compilerOptions": {
/* 基本选项: */
"esModuleInterop": true,
"skipLibCheck": true,
"target": "es2022",
"verbatimModuleSyntax": true,
"allowJs": true,
"resolveJsonModule": true,
"moduleDetection": "force",
/* 严格 */
"strict": true,
"noUncheckedIndexedAccess": true,
/* 如果使用 TypeScript 进行转译: */
"moduleResolution": "NodeNext",
"module": "NodeNext",
/* 如果不使用 TypeScript 进行转译: */
"moduleResolution": "Bundler",
"module": "ESNext",
"noEmit": true,
/* 如果你的代码在 DOM 中运行: */
"lib": ["es2022", "dom", "dom.iterable"],
/* 如果你的代码不在 DOM 中运行: */
"lib": ["es2022"],
/* 如果你正在构建一个库: */
"declaration": true,
/* 如果您正在 monorepo 中构建库: */
"composite": true,
"sourceMap": true,
"declarationMap": true
}
```
### 顶层配置
:- | --
@ -2058,7 +2134,7 @@ TSConfig Ref
```
### 类型检查(compilerOptions)
<!--rehype:wrap-class=row-span-4-->
<!--rehype:wrap-class=row-span-3-->
:- | --
:- | --
@ -2084,7 +2160,7 @@ TSConfig Ref
<!--rehype:className=style-list-arrow-->
### 模块(compilerOptions)
<!--rehype:wrap-class=row-span-2-->
<!--rehype:wrap-class=row-span-3-->
:- | --
:- | --
@ -2103,7 +2179,7 @@ TSConfig Ref
<!--rehype:className=style-list-arrow-->
### Emit(compilerOptions)
<!--rehype:wrap-class=row-span-6-->
<!--rehype:wrap-class=row-span-5-->
:- | --
:- | --
@ -2132,14 +2208,12 @@ TSConfig Ref
`stripInternal` [#](https://www.typescriptlang.org/zh/tsconfig#stripInternal) | 不要为在其 JSDoc 注释中具有 @internal 注释的代码发出声明
<!--rehype:className=style-list-arrow-->
### JavaScript 支持(compilerOptions)
### 完整性(compilerOptions)
:- | --
:- | --
`allowJs` [#](https://www.typescriptlang.org/zh/tsconfig#allowJs) | 允许 JavaScript 文件在你的工程中被引入,而不是仅仅允许 .ts 和 .tsx 文件
`checkJs` [#](https://www.typescriptlang.org/zh/tsconfig#checkJs) | 与 allowJs 配合使用,当 checkJs 被启用时JavaScript 文件中会报告错误
`maxNodeModuleJsDepth` [#](https://www.typescriptlang.org/zh/tsconfig#maxNodeModuleJsDepth) | 在 node_modules 下搜索和加载 JavaScript 文件的最大依赖深度
<!--rehype:className=style-list-arrow-->
`skipDefaultLibCheck` [#](https://www.typescriptlang.org/zh/tsconfig#skipDefaultLibCheck) | 请改用 `skipLibCheck`
`skipLibCheck` [#](https://www.typescriptlang.org/zh/tsconfig#skipLibCheck) | 跳过声明文件的类型检查
### 编辑器支持(compilerOptions)
@ -2149,6 +2223,24 @@ TSConfig Ref
`plugins` [#](https://www.typescriptlang.org/zh/tsconfig#plugins) | 可在编辑器内运行的语言服务插件列表
<!--rehype:className=style-list-arrow-->
### 输出格式(compilerOptions)
:- | --
:- | --
`noErrorTruncation` [#](https://www.typescriptlang.org/zh/tsconfig#noErrorTruncation) | 不要截断错误消息
`preserveWatchOutput` [#](https://www.typescriptlang.org/zh/tsconfig#preserveWatchOutput) | 保留监视输出
`pretty` [#](https://www.typescriptlang.org/zh/tsconfig#pretty) | 使用颜色和上下文对错误和消息进行样式化,默认情况下启用
<!--rehype:className=style-list-arrow-->
### JavaScript 支持(compilerOptions)
:- | --
:- | --
`allowJs` [#](https://www.typescriptlang.org/zh/tsconfig#allowJs) | 允许 JavaScript 文件在你的工程中被引入,而不是仅仅允许 .ts 和 .tsx 文件
`checkJs` [#](https://www.typescriptlang.org/zh/tsconfig#checkJs) | 与 allowJs 配合使用,当 checkJs 被启用时JavaScript 文件中会报告错误
`maxNodeModuleJsDepth` [#](https://www.typescriptlang.org/zh/tsconfig#maxNodeModuleJsDepth) | 在 node_modules 下搜索和加载 JavaScript 文件的最大依赖深度
<!--rehype:className=style-list-arrow-->
### 互操作约束(compilerOptions)
:- | --
@ -2160,8 +2252,20 @@ TSConfig Ref
`preserveSymlinks` [#](https://www.typescriptlang.org/zh/tsconfig#preserveSymlinks) | 保留符号链接
<!--rehype:className=style-list-arrow-->
### 编译器诊断(compilerOptions)
:- | --
:- | --
`diagnostics` [#](https://www.typescriptlang.org/zh/tsconfig#diagnostics) | 用于输出调试信息
`explainFiles` [#](https://www.typescriptlang.org/zh/tsconfig#explainFiles) | 打印 TypeScript 视为项目一部分的文件的名称以及它们是编译一部分的原因
`extendedDiagnostics` [#](https://www.typescriptlang.org/zh/tsconfig#extendedDiagnostics) | 您可以使用此标志来发现 TypeScript 在编译时将时间花在哪里
`generateCpuProfile` [#](https://www.typescriptlang.org/zh/tsconfig#generateCpuProfile) | 此选项使您有机会让 TypeScript 在编译器运行期间发出 v8 CPU 配置文件
`listEmittedFiles` [#](https://www.typescriptlang.org/zh/tsconfig#listEmittedFiles) | 将编译过程中生成的文件的名称打印到终端
`listFiles` [#](https://www.typescriptlang.org/zh/tsconfig#listFiles) | 打印编译部分文件的名称
`traceResolution` [#](https://www.typescriptlang.org/zh/tsconfig#traceResolution) | 当您尝试调试未包含模块的原因时
<!--rehype:className=style-list-arrow-->
### 向后兼容性(compilerOptions)
<!--rehype:wrap-class=row-span-2-->
:- | --
:- | --
@ -2174,13 +2278,6 @@ TSConfig Ref
`suppressImplicitAnyIndexErrors` [#](https://www.typescriptlang.org/zh/tsconfig#suppressImplicitAnyIndexErrors) | 抑制隐式任何索引错误
<!--rehype:className=style-list-arrow-->
### 完整性(compilerOptions)
:- | --
:- | --
`skipDefaultLibCheck` [#](https://www.typescriptlang.org/zh/tsconfig#skipDefaultLibCheck) | 请改用 `skipLibCheck`
`skipLibCheck` [#](https://www.typescriptlang.org/zh/tsconfig#skipLibCheck) | 跳过声明文件的类型检查
### 语言与环境(compilerOptions)
<!--rehype:wrap-class=row-span-2-->
@ -2200,15 +2297,6 @@ TSConfig Ref
`useDefineForClassFields` [#](https://www.typescriptlang.org/zh/tsconfig#useDefineForClassFields) | 为类字段使用定义
<!--rehype:className=style-list-arrow-->
### 输出格式(compilerOptions)
:- | --
:- | --
`noErrorTruncation` [#](https://www.typescriptlang.org/zh/tsconfig#noErrorTruncation) | 不要截断错误消息
`preserveWatchOutput` [#](https://www.typescriptlang.org/zh/tsconfig#preserveWatchOutput) | 保留监视输出
`pretty` [#](https://www.typescriptlang.org/zh/tsconfig#pretty) | 使用颜色和上下文对错误和消息进行样式化,默认情况下启用
<!--rehype:className=style-list-arrow-->
### 项目(compilerOptions)
:- | --
@ -2221,19 +2309,6 @@ TSConfig Ref
`tsBuildInfoFile` [#](https://www.typescriptlang.org/zh/tsconfig#tsBuildInfoFile) | 这个选项可以让您指定一个文件来存储增量编译信息,以作为复合工程的一部分,从而可以更快的构建更大的 TypeScript 代码库
<!--rehype:className=style-list-arrow-->
### 编译器诊断(compilerOptions)
:- | --
:- | --
`diagnostics` [#](https://www.typescriptlang.org/zh/tsconfig#diagnostics) | 用于输出调试信息
`explainFiles` [#](https://www.typescriptlang.org/zh/tsconfig#explainFiles) | 打印 TypeScript 视为项目一部分的文件的名称以及它们是编译一部分的原因
`extendedDiagnostics` [#](https://www.typescriptlang.org/zh/tsconfig#extendedDiagnostics) | 您可以使用此标志来发现 TypeScript 在编译时将时间花在哪里
`generateCpuProfile` [#](https://www.typescriptlang.org/zh/tsconfig#generateCpuProfile) | 此选项使您有机会让 TypeScript 在编译器运行期间发出 v8 CPU 配置文件
`listEmittedFiles` [#](https://www.typescriptlang.org/zh/tsconfig#listEmittedFiles) | 将编译过程中生成的文件的名称打印到终端
`listFiles` [#](https://www.typescriptlang.org/zh/tsconfig#listFiles) | 打印编译部分文件的名称
`traceResolution` [#](https://www.typescriptlang.org/zh/tsconfig#traceResolution) | 当您尝试调试未包含模块的原因时
<!--rehype:className=style-list-arrow-->
### 监听选项(watchOptions)
:- | --

View File

@ -1,10 +1,11 @@
{
"name": "@wcj/reference",
"version": "1.39.0",
"version": "1.41.0",
"description": "为开发人员分享快速参考备忘单(主要是方便自己)。",
"author": "jaywcjlove",
"license": "MIT",
"homepage": "https://jaywcjlove.github.io/reference",
"funding": "https://jaywcjlove.github.io/#/sponsor",
"private": false,
"scripts": {
"prepare": "husky install",
@ -30,7 +31,7 @@
"husky": "^8.0.1",
"lint-staged": "^13.0.3",
"prettier": "^2.7.1",
"refs-cli": "^1.4.1",
"refs-cli": "^1.5.1",
"markdownlint": "^0.27.0",
"markdownlint-cli": "^0.33.0"
},