Compare commits

..

90 Commits

Author SHA1 Message Date
229193a584 released v1.44.0 2024-06-25 23:49:41 +08:00
222f5bc604 feat: add stylex.md 2024-06-25 23:22:03 +08:00
4b22796c36 doc: update docs/dart.md 2024-06-25 23:22:03 +08:00
eb01adb655 doc: update docs/dart.md 2024-06-25 23:22:03 +08:00
ebc7ef957a doc: update docs/regex.md 2024-06-25 23:22:03 +08:00
91e0fb3af7 doc: add hook.md 2024-06-25 23:22:03 +08:00
3b817385a8 doc: update xjs.md #674 2024-06-25 23:22:03 +08:00
d19915eac8 doc: update README.md. 2024-06-25 15:04:42 +00:00
3478e345eb doc: update CONTRIBUTING.md. 2024-06-25 15:04:42 +00:00
70b561c710 docs(erlang): update docs/erlang.md (#676)
* feat(docs): add Erlang cheat sheet

Create an Erlang备忘清单 in markdown format to document common commands and
operations for Erlang programming, including入门, 代码结构, 常用内置函数 (BIFs),
并发编程, 错误处理, 分布式编程, OTP框架, 和测试.

This cheat sheet aims to provide a quick reference for Erlang developers and
learners, summarizing key points and examples for various aspects of the
language.

* docs(erlang): update links and clean up markdown formatting

- Update Erlang documentation links.
2024-06-25 23:03:33 +08:00
60fae2b928 doc: update README.md. 2024-06-25 05:54:13 +00:00
85d74eb81a doc: update CONTRIBUTING.md. 2024-06-25 05:54:12 +00:00
99c34277e1 doc: update xjs.md #674 2024-06-25 13:52:13 +08:00
1013713630 doc: add rxjs.md cheat sheet (#674)
Create a new cheat sheet for RxJS covering key concepts, operators, and methods. This includes installation, importing, creating Observables, and using various operators such as map, filter, switchMap, and more. The document also explains important concepts like Schedulers and provides examples for better understanding.
2024-06-25 13:05:27 +08:00
942f2c9563 doc: update erlang.md #673 2024-06-25 13:01:26 +08:00
0be71ca830 doc: update erlang.md #673 2024-06-25 12:53:41 +08:00
121db975c4 doc: update README.md. 2024-06-25 04:35:12 +00:00
8f54901b92 doc: update CONTRIBUTING.md. 2024-06-25 04:35:11 +00:00
09fd8603cb feat(docs): add Erlang cheat sheet (#673)
Create an Erlang备忘清单 in markdown format to document common commands and
operations for Erlang programming, including入门, 代码结构, 常用内置函数 (BIFs),
并发编程, 错误处理, 分布式编程, OTP框架, 和测试.

This cheat sheet aims to provide a quick reference for Erlang developers and
learners, summarizing key points and examples for various aspects of the
language.
2024-06-25 12:33:55 +08:00
1fb3dd7c34 doc: update pinia.md #672 2024-06-25 05:46:30 +08:00
819704c974 doc: update README.md. 2024-06-24 21:25:53 +00:00
41e7f5e2ce doc: update CONTRIBUTING.md. 2024-06-24 21:25:52 +00:00
3fa46ae173 doc: update README.md. 2024-06-24 21:25:13 +00:00
d4115b3044 doc: update CONTRIBUTING.md. 2024-06-24 21:25:12 +00:00
60c463b1cb feats (docs): add Pinia Memo List (#672)
* feats (docs): add Pinia Memo List

Create a Pinia Memo List to document common commands and actions of the Pinia State Management Library in markdown format. Content includes getting started, creating Pinia instances, defining the Store, using the Store, and more

* docs(pinia): update link to pinia-plugin-persist documentation

Correct the documentation link for pinia-plugin-persist in the Pinia documentation
to point to the official documentation hosted on seb-l.github.io. This ensures
that readers will access the most up-to-date and correct information regarding
the usage of the pinia-plugin-persist library.
2024-06-25 05:24:36 +08:00
aadb7e664b doc: Update bun.md #671 2024-06-25 05:22:56 +08:00
deeed5ec0b feat: add bun (#671)
Create a Bun备忘清单 in markdown format to document the common commands
for the Bun package manager, comparing it to npm and Yarn. This includes
installation, project creation, dependency management, script execution,
and cache handling.
2024-06-25 04:20:29 +08:00
c0903a400c doc: Update docs/pnpm.md #670 2024-06-25 03:30:46 +08:00
80761d5cf6 doc: update README.md. 2024-06-24 18:40:49 +00:00
2fbe314f16 doc: update CONTRIBUTING.md. 2024-06-24 18:40:48 +00:00
e657882897 docs: add pnpm memo and update README (#670)
Add a new pnpm.md memo in the docs directory and update the README to
include pnpm in the quick reference section. Also, introduce a new
pnpm.svg asset in the assets directory.
2024-06-25 02:39:46 +08:00
04b0b48d94 ci: Update FUNDING.yml 2024-06-22 23:53:32 +08:00
7e32739eb6 ci: Update FUNDING.yml 2024-06-22 23:52:11 +08:00
9659f0f074 ci: Update FUNDING.yml 2024-06-22 23:49:26 +08:00
e1b5344903 ci: Update FUNDING.yml 2024-06-22 23:46:01 +08:00
f5c4e78c11 doc: update README.md. 2024-06-21 10:12:30 +00:00
08edd2ad3d doc: update CONTRIBUTING.md. 2024-06-21 10:12:29 +00:00
9f7014bc52 doc: update docs/chatgpt.md #669 2024-06-21 18:10:54 +08:00
8197b8f641 feat: add chatgpt prompt (#669) 2024-06-21 17:41:46 +08:00
1c55ee64bf doc: update README.md 2024-06-20 18:21:35 +08:00
8cca95af19 doc: update springboot.md (#668) 2024-06-20 18:19:51 +08:00
4138d22968 doc: update springboot.md (#668) 2024-06-20 18:05:02 +08:00
9529667952 doc: update README.md. 2024-06-20 09:33:32 +00:00
6730b65788 doc: update CONTRIBUTING.md. 2024-06-20 09:33:31 +00:00
a527cb28a0 feat: add springboot (#668) 2024-06-20 17:32:08 +08:00
100297d821 doc: update README.md. 2024-06-17 14:10:46 +00:00
7ef107d114 doc: update CONTRIBUTING.md. 2024-06-17 14:10:46 +00:00
864da459ef doc: update README.md #102 (#666) 2024-06-17 22:09:39 +08:00
44e5c5a248 doc: update README.md. 2024-06-08 18:45:54 +00:00
a3dab064ce doc: update CONTRIBUTING.md. 2024-06-08 18:45:53 +00:00
4b9ff8a35e doc: update docs/github-actions.md 2024-06-09 02:44:46 +08:00
fa2c86a964 doc: Update README.md #102 2024-06-09 01:44:52 +08:00
d7008594f8 doc: update docs/adb.md (#662) 2024-06-09 01:43:12 +08:00
df9c2ac08b doc: update docs/lua.md (#661)
* Update lua.md

* Update lua.md

* Update lua.md
2024-06-09 01:42:21 +08:00
7494981f5f doc: Update README.md 2024-06-07 00:54:39 +08:00
ae490e878e doc: update docs/twitter.md 2024-06-06 22:20:07 +08:00
ae594eb45a doc: update docs/quickreference.md 2024-06-06 21:50:19 +08:00
8fad195069 doc: update docs/quickreference.md 2024-06-06 11:01:36 +08:00
8dbec19255 ci: update markdown lint 2024-06-06 11:01:36 +08:00
8880d82092 doc: update docs/vimium.md #660 2024-06-06 11:01:36 +08:00
ee03850619 doc: update README.md. 2024-06-06 00:32:00 +00:00
9acc906680 doc: update CONTRIBUTING.md. 2024-06-06 00:31:59 +00:00
05191c8c2c feat: add docs/vimium.md (#660) 2024-06-06 08:30:45 +08:00
3b0416a2c3 ci: update workflows config. 2024-06-05 13:59:33 +08:00
10dfe11942 doc: update docs/glances.md #659 #575 2024-06-05 13:44:44 +08:00
a0480a90dd doc: update docs/glances.md #659 #575 2024-06-05 12:04:59 +08:00
1bb046db08 doc: update README.md. 2024-06-05 01:45:52 +00:00
1cbc663abf doc: update CONTRIBUTING.md. 2024-06-05 01:45:51 +00:00
29a3787140 feat: add glances (#659) 2024-06-05 09:44:51 +08:00
e28914b3c7 doc: Update README.md #102 2024-06-03 17:19:27 +08:00
6d9782c019 doc: update README.md. 2024-05-30 13:51:02 +00:00
8727334a7c doc: update CONTRIBUTING.md. 2024-05-30 13:51:01 +00:00
861d35482a doc: update docs/docker-compose.md (#656) 2024-05-30 21:49:58 +08:00
5708867a5d doc: update README.md. 2024-05-23 01:58:48 +00:00
02240aaab0 doc: update CONTRIBUTING.md. 2024-05-23 01:58:47 +00:00
1189c92fd7 doc: Update README.md #102 2024-05-23 09:57:31 +08:00
a1a1bd60f8 doc: update docs/pytorch.md #649 2024-05-13 17:03:11 +08:00
739b18048d doc: update README.md. 2024-05-13 08:34:42 +00:00
bcd60d6020 doc: update CONTRIBUTING.md. 2024-05-13 08:34:41 +00:00
afbe61aebc doc(pytorch): update docs/pytorch.md (#649)
Co-authored-by: zhulin.zzz <zhul289@chinaunicom.cn>
2024-05-13 16:33:42 +08:00
f2183a90c3 doc: update docs/docker-compose.md 2024-05-12 14:35:56 +08:00
a10d0f850d doc: update docs/docker-compose.md 2024-05-12 14:25:32 +08:00
167fef356f doc: update docs/docker-compose.md 2024-05-12 14:19:16 +08:00
5e22e28a2d doc: update docs/docker-compose.md (#645) 2024-05-12 13:15:52 +08:00
3a1d780bbe doc: Update README.md #102 2024-05-11 19:01:53 +08:00
a2b8fc493b doc: Update README.md 2024-05-11 17:49:58 +08:00
7eaa5786d1 doc: update docs/docker-compose.md (#645) 2024-05-11 17:46:32 +08:00
2dbcac300f doc: update README.md. 2024-05-11 06:10:47 +00:00
127f2752dd doc: update CONTRIBUTING.md. 2024-05-11 06:10:46 +00:00
19ed3fa3b2 feat: add docs/docker-compose.md (#645)
* feat: add docker-compose reference

* fix: alter note
2024-05-11 14:09:45 +08:00
36 changed files with 7314 additions and 195 deletions

5
.github/FUNDING.yml vendored
View File

@ -3,7 +3,8 @@
# 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
ko_fi: jaywcjlove
buy_me_a_coffee: jaywcjlove
# tidelift: #npm/mocker-api
# community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
custom: https://jaywcjlove.github.io/#/sponsor
custom: ["https://www.paypal.me/kennyiseeyou", "https://jaywcjlove.github.io/#/sponsor"]

View File

@ -88,12 +88,14 @@ jobs:
filter: (^[\s]+?[R|r]elease)|(^[R|r]elease)
- name: Create Release
uses: ncipollo/release-action@v1
uses: jaywcjlove/create-tag-action@main
if: steps.create_tag.outputs.successful
with:
token: ${{ secrets.GITHUB_TOKEN }}
name: ${{ steps.create_tag.outputs.version }}
tag: ${{ steps.create_tag.outputs.version }}
package-path: ./package.json
version: ${{steps.create_tag.outputs.version}}
release: true
prerelease: false
draft: false
body: |
[![Buy me a coffee](https://img.shields.io/badge/Buy%20me%20a%20coffee-048754?logo=buymeacoffee)](https://jaywcjlove.github.io/#/sponsor)

View File

@ -4,6 +4,7 @@
"MD014": false,
"MD024": false,
"MD033": false,
"MD036": false,
"MD040": false,
"MD055": false,
"MD056": false,

View File

@ -332,23 +332,24 @@ jobs:
<a href="https://github.com/fwqaaq" title="fwqaaq"><img src="https://avatars.githubusercontent.com/u/82551626?v=4" width="42;" alt="fwqaaq"/></a>
<a href="https://github.com/mofelee" title="mofelee"><img src="https://avatars.githubusercontent.com/u/5069410?v=4" width="42;" alt="mofelee"/></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/JeffersonHuang" title="Jefferson Huang"><img src="https://avatars.githubusercontent.com/u/47512530?v=4" width="42;" alt="Jefferson Huang"/></a>
<a href="https://github.com/LesterChang0987" title="Steve Hartwell"><img src="https://avatars.githubusercontent.com/u/114913921?v=4" width="42;" alt="Steve Hartwell"/></a>
<a href="https://github.com/nangongchengfeng" title="南宫乘风"><img src="https://avatars.githubusercontent.com/u/46562911?v=4" width="42;" alt="南宫乘风"/></a>
<a href="https://github.com/zhangymPerson" title="zhangym"><img src="https://avatars.githubusercontent.com/u/40376181?v=4" width="42;" alt="zhangym"/></a>
<a href="https://github.com/aixcyi" title="砹小翼"><img src="https://avatars.githubusercontent.com/u/75880483?v=4" width="42;" alt="砹小翼"/></a>
<a href="https://github.com/nangongchengfeng" title="南宫乘风"><img src="https://avatars.githubusercontent.com/u/46562911?v=4" width="42;" alt="南宫乘风"/></a>
<a href="https://github.com/h7ml" title="h7ml"><img src="https://avatars.githubusercontent.com/u/55233292?v=4" width="42;" alt="h7ml"/></a>
<a href="https://github.com/LesterChang0987" title="Steve Hartwell"><img src="https://avatars.githubusercontent.com/u/114913921?v=4" width="42;" alt="Steve Hartwell"/></a>
<a href="https://github.com/JeffersonHuang" title="Jefferson Huang"><img src="https://avatars.githubusercontent.com/u/47512530?v=4" width="42;" alt="Jefferson Huang"/></a>
<a href="https://github.com/Alex20180512" title="Alex"><img src="https://avatars.githubusercontent.com/u/115539090?v=4" width="42;" alt="Alex"/></a>
<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/eryajf" title="二丫讲梵"><img src="https://avatars.githubusercontent.com/u/33259379?v=4" width="42;" alt="二丫讲梵"/></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/expoli" title="expoli"><img src="https://avatars.githubusercontent.com/u/31023767?v=4" width="42;" alt="expoli"/></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/LufsX" title="LufsX"><img src="https://avatars.githubusercontent.com/u/33221883?v=4" width="42;" alt="LufsX"/></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/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/undefined-hestudio" title="undefined"><img src="https://avatars.githubusercontent.com/u/119711513?v=4" width="42;" alt="undefined"/></a>
<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/genius-kim" title="Kim同学"><img src="https://avatars.githubusercontent.com/u/119488561?v=4" width="42;" alt="Kim同学"/></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/MackDing" title="Blossom"><img src="https://avatars.githubusercontent.com/u/19878893?v=4" width="42;" alt="Blossom"/></a>
<a href="https://github.com/1250422131" title="萌新杰少"><img src="https://avatars.githubusercontent.com/u/52126790?v=4" width="42;" alt="萌新杰少"/></a>
<a href="https://github.com/zhangymPerson" title="zhangym"><img src="https://avatars.githubusercontent.com/u/40376181?v=4" width="42;" alt="zhangym"/></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/xia0ne" title="YuRuiH"><img src="https://avatars.githubusercontent.com/u/32591223?v=4" width="42;" alt="YuRuiH"/></a>
<a href="https://github.com/Willxup" title="Willxup"><img src="https://avatars.githubusercontent.com/u/51990395?v=4" width="42;" alt="Willxup"/></a>
@ -366,14 +367,12 @@ jobs:
<a href="https://github.com/ljq" title="Jack Liu"><img src="https://avatars.githubusercontent.com/u/7278286?v=4" width="42;" alt="Jack Liu"/></a>
<a href="https://github.com/jasnzhuang" title="Jason Zhuang"><img src="https://avatars.githubusercontent.com/u/16612921?v=4" width="42;" alt="Jason Zhuang"/></a>
<a href="https://github.com/Jovins" title="Jovins"><img src="https://avatars.githubusercontent.com/u/17738992?v=4" width="42;" alt="Jovins"/></a>
<a href="https://github.com/long-910" title="Small Long"><img src="https://avatars.githubusercontent.com/u/7323488?v=4" width="42;" alt="Small Long"/></a>
<a href="https://github.com/SuperDiscovery" title="SuperDiscovery"><img src="https://avatars.githubusercontent.com/u/49646863?v=4" width="42;" alt="SuperDiscovery"/></a>
<a href="https://github.com/XYZscratcher" title="XYZ"><img src="https://avatars.githubusercontent.com/u/108533817?v=4" width="42;" alt="XYZ"/></a>
<a href="https://github.com/findnr" title="findnr"><img src="https://avatars.githubusercontent.com/u/3909023?v=4" width="42;" alt="findnr"/></a>
<a href="https://github.com/greyhao" title="greyhao"><img src="https://avatars.githubusercontent.com/u/107107440?v=4" width="42;" alt="greyhao"/></a>
<a href="https://github.com/1834423612" title="kjch"><img src="https://avatars.githubusercontent.com/u/49981661?v=4" width="42;" alt="kjch"/></a>
<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>
<a href="https://github.com/yanxuplay" title="hupilan"><img src="https://avatars.githubusercontent.com/u/69749541?v=4" width="42;" alt="hupilan"/></a>
<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>
@ -383,7 +382,13 @@ jobs:
<a href="https://github.com/jqzhao7" title="jqzhao"><img src="https://avatars.githubusercontent.com/u/54694535?v=4" width="42;" alt="jqzhao"/></a>
<a href="https://github.com/jussker" title="jussker"><img src="https://avatars.githubusercontent.com/u/33953356?v=4" width="42;" alt="jussker"/></a>
<a href="https://github.com/k983551019" title="k983551019"><img src="https://avatars.githubusercontent.com/u/48147837?v=4" width="42;" alt="k983551019"/></a>
<a href="https://github.com/kdxcxs" title="kdxcxs"><img src="https://avatars.githubusercontent.com/u/18746192?v=4" width="42;" alt="kdxcxs"/></a>
<a href="https://github.com/kubeme" title="kubernetes for me"><img src="https://avatars.githubusercontent.com/u/16346220?v=4" width="42;" alt="kubernetes for me"/></a>
<a href="https://github.com/larry-xue" title="larry"><img src="https://avatars.githubusercontent.com/u/48818060?v=4" width="42;" alt="larry"/></a>
<a href="https://github.com/Zeng-qh" title="都一样"><img src="https://avatars.githubusercontent.com/u/40046415?v=4" width="42;" alt="都一样"/></a>
<a href="https://github.com/hua03" title="hua03"><img src="https://avatars.githubusercontent.com/u/19561959?v=4" width="42;" alt="hua03"/></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/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/nodjoy" title="gowshwah"><img src="https://avatars.githubusercontent.com/u/145280043?v=4" width="42;" alt="gowshwah"/></a>
<a href="https://github.com/godotc" title="godot42"><img src="https://avatars.githubusercontent.com/u/79260851?v=4" width="42;" alt="godot42"/></a>
<a href="https://github.com/gi-b716" title="Gavin"><img src="https://avatars.githubusercontent.com/u/78394473?v=4" width="42;" alt="Gavin"/></a>
@ -395,13 +400,14 @@ jobs:
<a href="https://github.com/chyok" title="chyok"><img src="https://avatars.githubusercontent.com/u/32629225?v=4" width="42;" alt="chyok"/></a>
<a href="https://github.com/zlfyuan" title="bgbgPang"><img src="https://avatars.githubusercontent.com/u/19658018?v=4" width="42;" alt="bgbgPang"/></a>
<a href="https://github.com/Lmmmmmm-bb" title="_lmmmmmm"><img src="https://avatars.githubusercontent.com/u/54026110?v=4" width="42;" alt="_lmmmmmm"/></a>
<a href="https://github.com/y52y" title="Zyj"><img src="https://avatars.githubusercontent.com/u/51304324?v=4" width="42;" alt="Zyj"/></a>
<a href="https://github.com/Leaderzhangyi" title="ZinkCas"><img src="https://avatars.githubusercontent.com/u/46915666?v=4" width="42;" alt="ZinkCas"/></a>
<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/qwxingzhe" title="行者"><img src="https://avatars.githubusercontent.com/u/7071651?v=4" width="42;" alt="行者"/></a>
<a href="https://github.com/HanaChan233" title="花开花落"><img src="https://avatars.githubusercontent.com/u/75212820?v=4" width="42;" alt="花开花落"/></a>
<a href="https://github.com/lisheng741" title="芦荟柚子茶"><img src="https://avatars.githubusercontent.com/u/53617305?v=4" width="42;" alt="芦荟柚子茶"/></a>
<a href="https://github.com/ZIDOUZI" title="ZIDOUZI"><img src="https://avatars.githubusercontent.com/u/53157536?v=4" width="42;" alt="ZIDOUZI"/></a>
<a href="https://github.com/wangdaodao" title="王叨叨"><img src="https://avatars.githubusercontent.com/u/2317442?v=4" width="42;" alt="王叨叨"/></a>
<a href="https://github.com/HChenX" title="焕晨HChen"><img src="https://avatars.githubusercontent.com/u/123531821?v=4" width="42;" alt="焕晨HChen"/></a>
<a href="https://github.com/LebranceBW" title="落叶乌龟"><img src="https://avatars.githubusercontent.com/u/19501514?v=4" width="42;" alt="落叶乌龟"/></a>
<a href="https://github.com/ZIDOUZI" title="子斗子"><img src="https://avatars.githubusercontent.com/u/53157536?v=4" width="42;" alt="子斗子"/></a>
<a href="https://github.com/LuckyJie12" title="夜未央"><img src="https://avatars.githubusercontent.com/u/102901105?v=4" width="42;" alt="夜未央"/></a>
<a href="https://github.com/lvzhenbo" title="吕振波"><img src="https://avatars.githubusercontent.com/u/32427677?v=4" width="42;" alt="吕振波"/></a>
<a href="https://github.com/zxx457" title="zxx457"><img src="https://avatars.githubusercontent.com/u/114141362?v=4" width="42;" alt="zxx457"/></a>
@ -419,10 +425,9 @@ jobs:
<a href="https://github.com/lykjjj" title="lykjjj"><img src="https://avatars.githubusercontent.com/u/58510058?v=4" width="42;" alt="lykjjj"/></a>
<a href="https://github.com/lozhu20" title="lozhu"><img src="https://avatars.githubusercontent.com/u/44923922?v=4" width="42;" alt="lozhu"/></a>
<a href="https://github.com/liliangrong777" title="liliangrong777"><img src="https://avatars.githubusercontent.com/u/58727146?v=4" width="42;" alt="liliangrong777"/></a>
<a href="https://github.com/larry-xue" title="larry"><img src="https://avatars.githubusercontent.com/u/48818060?v=4" width="42;" alt="larry"/></a>
<a href="https://github.com/kubeme" title="kubernetes for me"><img src="https://avatars.githubusercontent.com/u/16346220?v=4" width="42;" alt="kubernetes for me"/></a>
<a href="https://github.com/kdxcxs" title="kdxcxs"><img src="https://avatars.githubusercontent.com/u/18746192?v=4" width="42;" alt="kdxcxs"/></a>
<a href="https://github.com/zhu0629" title="zhucong"><img src="https://avatars.githubusercontent.com/u/13188450?v=4" width="42;" alt="zhucong"/></a>
<a href="https://github.com/leauny" title="leauny"><img src="https://avatars.githubusercontent.com/u/42369176?v=4" width="42;" alt="leauny"/></a>
<a href="https://github.com/y52y" title="Zyj"><img src="https://avatars.githubusercontent.com/u/51304324?v=4" width="42;" alt="Zyj"/></a>
<a href="https://github.com/isecret" title="Mao Wang"><img src="https://avatars.githubusercontent.com/u/15724152?v=4" width="42;" alt="Mao Wang"/></a>
<a href="https://github.com/likeshop-github" title="likeshop技术社区"><img src="https://avatars.githubusercontent.com/u/77180968?v=4" width="42;" alt="likeshop技术社区"/></a>
<a href="https://github.com/Lihuagreek" title="Lihuagreek"><img src="https://avatars.githubusercontent.com/u/51040740?v=4" width="42;" alt="Lihuagreek"/></a>
<a href="https://github.com/LightQuanta" title="Light_Quanta"><img src="https://avatars.githubusercontent.com/u/18213217?v=4" width="42;" alt="Light_Quanta"/></a>
@ -431,7 +436,7 @@ jobs:
<a href="https://github.com/JavaZeroo" title="JavaZero"><img src="https://avatars.githubusercontent.com/u/71128095?v=4" width="42;" alt="JavaZero"/></a>
<a href="https://github.com/Ding-Kyoma" title="HooinKyoma"><img src="https://avatars.githubusercontent.com/u/44542198?v=4" width="42;" alt="HooinKyoma"/></a>
<a href="https://github.com/gongyeheyu" title="GONGYE Heyu"><img src="https://avatars.githubusercontent.com/u/85177605?v=4" width="42;" alt="GONGYE Heyu"/></a>
<a href="https://github.com/Fuku-L" title="Fuku-L"><img src="https://avatars.githubusercontent.com/u/38535911?v=4" width="42;" alt="Fuku-L"/></a>
<a href="https://github.com/Fuku-L" title="Foozi"><img src="https://avatars.githubusercontent.com/u/38535911?v=4" width="42;" alt="Foozi"/></a>
<a href="https://github.com/sirius-fan" title="Fan"><img src="https://avatars.githubusercontent.com/u/25720015?v=4" width="42;" alt="Fan"/></a>
<a href="https://github.com/eeeeeio" title="EEEEE"><img src="https://avatars.githubusercontent.com/u/20723545?v=4" width="42;" alt="EEEEE"/></a>
<a href="https://github.com/demigodliu" title="DemigodLiu"><img src="https://avatars.githubusercontent.com/u/30372735?v=4" width="42;" alt="DemigodLiu"/></a>
@ -448,6 +453,8 @@ jobs:
<a href="https://github.com/gitchenze" title="Aze"><img src="https://avatars.githubusercontent.com/u/13357869?v=4" width="42;" alt="Aze"/></a>
<a href="https://github.com/dousha0w0" title="dousha0w0"><img src="https://avatars.githubusercontent.com/u/52566311?v=4" width="42;" alt="dousha0w0"/></a>
<a href="https://github.com/13812700839" title="花殇"><img src="https://avatars.githubusercontent.com/u/58072506?v=4" width="42;" alt="花殇"/></a>
<a href="https://github.com/Leaderzhangyi" title="ZinkCas"><img src="https://avatars.githubusercontent.com/u/46915666?v=4" width="42;" alt="ZinkCas"/></a>
<a href="https://github.com/zhu0629" title="zhucong"><img src="https://avatars.githubusercontent.com/u/13188450?v=4" width="42;" alt="zhucong"/></a>
<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/dfshizhiqiang" title="Zech"><img src="https://avatars.githubusercontent.com/u/7030019?v=4" width="42;" alt="Zech"/></a>
<a href="https://github.com/Yo-gurts" title="Yogurt"><img src="https://avatars.githubusercontent.com/u/44612841?v=4" width="42;" alt="Yogurt"/></a>
@ -471,8 +478,7 @@ jobs:
<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/Moeyuuko" title="Moeyuuko"><img src="https://avatars.githubusercontent.com/u/14266681?v=4" width="42;" alt="Moeyuuko"/></a>
<a href="https://github.com/malcolmyu" title="Minghao Yu"><img src="https://avatars.githubusercontent.com/u/3203962?v=4" width="42;" alt="Minghao Yu"/></a>
<a href="https://github.com/mariuszmichalowski" title="Mariusz Michalowski"><img src="https://avatars.githubusercontent.com/u/92091891?v=4" width="42;" alt="Mariusz Michalowski"/></a>
<a href="https://github.com/isecret" title="Mao Wang"><img src="https://avatars.githubusercontent.com/u/15724152?v=4" width="42;" alt="Mao Wang"/></a><!--GAMFC-END-->
<a href="https://github.com/mariuszmichalowski" title="Mariusz Michalowski"><img src="https://avatars.githubusercontent.com/u/92091891?v=4" width="42;" alt="Mariusz Michalowski"/></a><!--GAMFC-END-->
上图贡献者列表,由 [contributors](https://github.com/jaywcjlove/github-action-contributors) 自动生成贡献者图片。

View File

@ -41,6 +41,7 @@ Quick Reference
[R 语言](./docs/r.md)<!--rehype:style=background: rgb(39 108 192);&class=contributing-->
[Elixir](./docs/elixir.md)<!--rehype:style=background: rgb(124 26 156);&class=contributing tag&data-lang=Elixir-->
[Tauri](./docs/tauri.md)<!--rehype:style=background: rgb(103 214 237);&class=contributing-->
[Docker Compose](./docs/docker-compose.md)<!--rehype:style=background: rgb(72 143 223);&class=contributing tag&data-lang=Docker-->
<!--rehype:class=home-card-->
## 编程
@ -51,14 +52,17 @@ Quick Reference
[C++](./docs/cpp.md)<!--rehype:style=background: rgb(6 147 13);&class=contributing-->
[Dart](./docs/dart.md)<!--rehype:style=background: rgb(64 196 255);-->
[Docker](./docs/docker.md)<!--rehype:style=background: rgb(72 143 223);-->
[Docker-Compose](./docs/docker-compose.md)<!--rehype:style=background: rgb(72 143 223);&class=contributing tag&data-lang=Docker-->
[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-->
[Elixir](./docs/elixir.md)<!--rehype:style=background: rgb(124 26 156);&class=contributing tag&data-lang=Elixir-->
[Erlang](./docs/erlang.md)<!--rehype:style=background: rgb(206 55 97);&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-->
[Golang](./docs/golang.md)<!--rehype:style=background: rgb(39 160 193);-->
[GraphQL](./docs/graphql.md)<!--rehype:style=background: rgb(214 66 146);-->
[Hook](./docs/hook.md)<!--rehype:style=background: rgb(211 55 49);-->
[Java](./docs/java.md)<!--rehype:style=background: rgb(211 55 49);&class=contributing&data-info=👆看看还缺点儿什么?-->
[Julia](./docs/julia.md)<!--rehype:style=background: rgb(26 188 156);&class=contributing&data-info=👆看看还缺点儿什么?-->
[Kotlin](./docs/kotlin.md)<!--rehype:style=background: rgb(211 55 49);&class=contributing&data-info=👆看看还缺点儿什么?-->
@ -75,6 +79,7 @@ Quick Reference
[Scala](./docs/scala.md)<!--rehype:style=background: rgb(34 82 94);-->
[Swift](./docs/swift.md)<!--rehype:style=background: rgb(240 81 57);-->
[SwiftUI](./docs/swiftui.md)<!--rehype:style=background: rgb(10 127 247);&class=tag&data-lang=swift-->
[Spring Boot](./docs/springboot.md)<!--rehype:style=background: rgb(0 149 0);&class=tag&data-lang=Java-->
[Lua](./docs/lua.md)<!--rehype:style=background: rgb(3 3 128);-->
[Pytorch](./docs/pytorch.md)<!--rehype:style=background: rgb(238 76 44);&class=contributing tag&data-lang=Python&data-info=👆看看还缺点儿什么?-->
<!--rehype:class=home-card-->
@ -97,15 +102,17 @@ Quick Reference
[JavaScript](./docs/javascript.md)<!--rehype:style=background: rgb(203 183 31);-->
[jQuery](./docs/jquery.md)<!--rehype:style=background: rgb(203 183 31);-->
[Next.js](./docs/nextjs.md)<!--rehype:style=background: rgb(0 0 0);&class=tag&data-lang=React-->
[RxJS](./docs/rxjs.md)<!--rehype:style=background: rgb(151 0 81);-->
[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);-->
[Tauri](./docs/tauri.md)<!--rehype:style=background: rgb(103 214 237);&class=contributing-->
[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-->
[Vue 2](./docs/vue2.md)<!--rehype:style=background: rgb(64 184 131);&class=tag&data-lang=Vue-->
[Vue 3](./docs/vue.md)<!--rehype:style=background: rgb(64 184 131);&class=tag&class=contributing tag&data-lang=Vue-->
[</> htmx](./docs/htmx.md)<!--rehype:style=background: rgb(52 101 164);&class=contributing-->
[Pinia](./docs/pinia.md)<!--rehype:style=background: rgb(44 136 50);&class=tag&data-lang=Vue-->
<!--rehype:class=home-card-->
## CSS
@ -115,7 +122,8 @@ Quick Reference
[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);-->
[Tailwind CSS](./docs/tailwindcss.md)<!--rehype:style=background: rgb(49 120 198);&class=tag&data-lang=CSS-->
[StyleX](./docs/stylex.md)<!--rehype:style=background: rgb(91 79 163);&class=tag&data-lang=CSS-->
<!--rehype:class=home-card-->
## Nodejs
@ -131,6 +139,8 @@ Quick Reference
[package.json](./docs/package.json.md)<!--rehype:style=background: rgb(132 132 132);-->
[Yarn](./docs/yarn.md)<!--rehype:style=background: rgb(33 136 182);-->
[nvm](./docs/nvm.md)<!--rehype:style=background: rgb(132 132 132);-->
[pnpm](./docs/pnpm.md)<!--rehype:style=background: rgb(191 133 0);-->
[Bun](./docs/bun.md)<!--rehype:style=background: rgb(157 49 81);-->
<!--rehype:class=home-card-->
## 工具
@ -158,6 +168,7 @@ Quick Reference
[FFmpeg](./docs/ffmpeg.md)<!--rehype:style=background: rgb(0 193 9);&class=contributing-->
[Gdb](./docs/gdb.md)<!--rehype:style=background: rgb(215 89 62);-->
[Git](./docs/git.md)<!--rehype:style=background: rgb(215 89 62);&class=tag&data-lang=版本控制-->
[Glances](./docs/glances.md)<!--rehype:style=background: rgb(16 185 129);-->
[Grep](./docs/grep.md)<!--rehype:style=background: rgb(16 185 129);-->
[Htop](./docs/htop.md)<!--rehype:style=background: rgb(16 185 129);-->
[iptables](./docs/iptables.md)<!--rehype:style=background: rgb(32 74 135);-->
@ -227,8 +238,9 @@ Quick Reference
[PhpStorm](./docs/phpstorm.md)<!--rehype:style=\-\-bg\-opacity: 0.75;background-image: linear-gradient(to left, rgba(255 106 172 / var(\-\-bg\-opacity)), rgba(183 173 255 / var(\-\-bg\-opacity)));-->
[Sketch](./docs/sketch.md)<!--rehype:style=background: rgb(223 148 0);&class=tag&data-lang=macOS-->
[Sublime Text](./docs/sublime-text.md)<!--rehype:style=background: rgb(223 148 0);-->
[Vimium](./docs/vimium.md)<!--rehype:style=background: rgb(49 168 255);&class=contributing&class=tag&data-lang=浏览器插件-->
[VSCode](./docs/vscode.md)<!--rehype:style=background: rgb(91 163 230);-->
[Twitter](./docs/twitter.md)<!--rehype:style=background: rgb(91 163 230);-->
[Twitter(X)](./docs/twitter.md)<!--rehype:style=background: rgb(91 163 230);-->
[WebStorm](./docs/webstorm.md)<!--rehype:style=background: rgb(32 148 220);-->
[Xcode](./docs/xcode.md)<!--rehype:style=background: rgb(24 151 233);&class=tag&data-lang=macOS-->
<!--rehype:class=home-card-->
@ -249,6 +261,7 @@ Quick Reference
[Emoji](./docs/emoji.md)<!--rehype:style=\-\-bg\-opacity: 0.75;background-image: linear-gradient(to left, rgba(74 222 128 / var(\-\-bg\-opacity)), rgba(59 130 246 / var(\-\-bg\-opacity)));-->
[MIME types](./docs/mime.md)<!--rehype:style=background: rgb(16 185 129);-->
[Resolutions](./docs/resolutions.md)<!--rehype:style=background: rgb(16 185 129);-->
[ChatGPT](./docs/chatgpt.md)<!--rehype:style=background: rgb(74, 161, 129);&class=tag&data-lang=ai-->
<!--rehype:class=home-card-->
## 看到缺少什么了吗?
@ -270,23 +283,24 @@ Quick Reference
<a href="https://github.com/fwqaaq" title="fwqaaq"><img src="https://avatars.githubusercontent.com/u/82551626?v=4" width="42;" alt="fwqaaq"/></a>
<a href="https://github.com/mofelee" title="mofelee"><img src="https://avatars.githubusercontent.com/u/5069410?v=4" width="42;" alt="mofelee"/></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/JeffersonHuang" title="Jefferson Huang"><img src="https://avatars.githubusercontent.com/u/47512530?v=4" width="42;" alt="Jefferson Huang"/></a>
<a href="https://github.com/LesterChang0987" title="Steve Hartwell"><img src="https://avatars.githubusercontent.com/u/114913921?v=4" width="42;" alt="Steve Hartwell"/></a>
<a href="https://github.com/nangongchengfeng" title="南宫乘风"><img src="https://avatars.githubusercontent.com/u/46562911?v=4" width="42;" alt="南宫乘风"/></a>
<a href="https://github.com/zhangymPerson" title="zhangym"><img src="https://avatars.githubusercontent.com/u/40376181?v=4" width="42;" alt="zhangym"/></a>
<a href="https://github.com/aixcyi" title="砹小翼"><img src="https://avatars.githubusercontent.com/u/75880483?v=4" width="42;" alt="砹小翼"/></a>
<a href="https://github.com/nangongchengfeng" title="南宫乘风"><img src="https://avatars.githubusercontent.com/u/46562911?v=4" width="42;" alt="南宫乘风"/></a>
<a href="https://github.com/h7ml" title="h7ml"><img src="https://avatars.githubusercontent.com/u/55233292?v=4" width="42;" alt="h7ml"/></a>
<a href="https://github.com/LesterChang0987" title="Steve Hartwell"><img src="https://avatars.githubusercontent.com/u/114913921?v=4" width="42;" alt="Steve Hartwell"/></a>
<a href="https://github.com/JeffersonHuang" title="Jefferson Huang"><img src="https://avatars.githubusercontent.com/u/47512530?v=4" width="42;" alt="Jefferson Huang"/></a>
<a href="https://github.com/Alex20180512" title="Alex"><img src="https://avatars.githubusercontent.com/u/115539090?v=4" width="42;" alt="Alex"/></a>
<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/eryajf" title="二丫讲梵"><img src="https://avatars.githubusercontent.com/u/33259379?v=4" width="42;" alt="二丫讲梵"/></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/expoli" title="expoli"><img src="https://avatars.githubusercontent.com/u/31023767?v=4" width="42;" alt="expoli"/></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/LufsX" title="LufsX"><img src="https://avatars.githubusercontent.com/u/33221883?v=4" width="42;" alt="LufsX"/></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/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/undefined-hestudio" title="undefined"><img src="https://avatars.githubusercontent.com/u/119711513?v=4" width="42;" alt="undefined"/></a>
<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/genius-kim" title="Kim同学"><img src="https://avatars.githubusercontent.com/u/119488561?v=4" width="42;" alt="Kim同学"/></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/MackDing" title="Blossom"><img src="https://avatars.githubusercontent.com/u/19878893?v=4" width="42;" alt="Blossom"/></a>
<a href="https://github.com/1250422131" title="萌新杰少"><img src="https://avatars.githubusercontent.com/u/52126790?v=4" width="42;" alt="萌新杰少"/></a>
<a href="https://github.com/zhangymPerson" title="zhangym"><img src="https://avatars.githubusercontent.com/u/40376181?v=4" width="42;" alt="zhangym"/></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/xia0ne" title="YuRuiH"><img src="https://avatars.githubusercontent.com/u/32591223?v=4" width="42;" alt="YuRuiH"/></a>
<a href="https://github.com/Willxup" title="Willxup"><img src="https://avatars.githubusercontent.com/u/51990395?v=4" width="42;" alt="Willxup"/></a>
@ -304,14 +318,12 @@ Quick Reference
<a href="https://github.com/ljq" title="Jack Liu"><img src="https://avatars.githubusercontent.com/u/7278286?v=4" width="42;" alt="Jack Liu"/></a>
<a href="https://github.com/jasnzhuang" title="Jason Zhuang"><img src="https://avatars.githubusercontent.com/u/16612921?v=4" width="42;" alt="Jason Zhuang"/></a>
<a href="https://github.com/Jovins" title="Jovins"><img src="https://avatars.githubusercontent.com/u/17738992?v=4" width="42;" alt="Jovins"/></a>
<a href="https://github.com/long-910" title="Small Long"><img src="https://avatars.githubusercontent.com/u/7323488?v=4" width="42;" alt="Small Long"/></a>
<a href="https://github.com/SuperDiscovery" title="SuperDiscovery"><img src="https://avatars.githubusercontent.com/u/49646863?v=4" width="42;" alt="SuperDiscovery"/></a>
<a href="https://github.com/XYZscratcher" title="XYZ"><img src="https://avatars.githubusercontent.com/u/108533817?v=4" width="42;" alt="XYZ"/></a>
<a href="https://github.com/findnr" title="findnr"><img src="https://avatars.githubusercontent.com/u/3909023?v=4" width="42;" alt="findnr"/></a>
<a href="https://github.com/greyhao" title="greyhao"><img src="https://avatars.githubusercontent.com/u/107107440?v=4" width="42;" alt="greyhao"/></a>
<a href="https://github.com/1834423612" title="kjch"><img src="https://avatars.githubusercontent.com/u/49981661?v=4" width="42;" alt="kjch"/></a>
<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>
<a href="https://github.com/yanxuplay" title="hupilan"><img src="https://avatars.githubusercontent.com/u/69749541?v=4" width="42;" alt="hupilan"/></a>
<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>
@ -321,7 +333,13 @@ Quick Reference
<a href="https://github.com/jqzhao7" title="jqzhao"><img src="https://avatars.githubusercontent.com/u/54694535?v=4" width="42;" alt="jqzhao"/></a>
<a href="https://github.com/jussker" title="jussker"><img src="https://avatars.githubusercontent.com/u/33953356?v=4" width="42;" alt="jussker"/></a>
<a href="https://github.com/k983551019" title="k983551019"><img src="https://avatars.githubusercontent.com/u/48147837?v=4" width="42;" alt="k983551019"/></a>
<a href="https://github.com/kdxcxs" title="kdxcxs"><img src="https://avatars.githubusercontent.com/u/18746192?v=4" width="42;" alt="kdxcxs"/></a>
<a href="https://github.com/kubeme" title="kubernetes for me"><img src="https://avatars.githubusercontent.com/u/16346220?v=4" width="42;" alt="kubernetes for me"/></a>
<a href="https://github.com/larry-xue" title="larry"><img src="https://avatars.githubusercontent.com/u/48818060?v=4" width="42;" alt="larry"/></a>
<a href="https://github.com/Zeng-qh" title="都一样"><img src="https://avatars.githubusercontent.com/u/40046415?v=4" width="42;" alt="都一样"/></a>
<a href="https://github.com/hua03" title="hua03"><img src="https://avatars.githubusercontent.com/u/19561959?v=4" width="42;" alt="hua03"/></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/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/nodjoy" title="gowshwah"><img src="https://avatars.githubusercontent.com/u/145280043?v=4" width="42;" alt="gowshwah"/></a>
<a href="https://github.com/godotc" title="godot42"><img src="https://avatars.githubusercontent.com/u/79260851?v=4" width="42;" alt="godot42"/></a>
<a href="https://github.com/gi-b716" title="Gavin"><img src="https://avatars.githubusercontent.com/u/78394473?v=4" width="42;" alt="Gavin"/></a>
@ -333,13 +351,14 @@ Quick Reference
<a href="https://github.com/chyok" title="chyok"><img src="https://avatars.githubusercontent.com/u/32629225?v=4" width="42;" alt="chyok"/></a>
<a href="https://github.com/zlfyuan" title="bgbgPang"><img src="https://avatars.githubusercontent.com/u/19658018?v=4" width="42;" alt="bgbgPang"/></a>
<a href="https://github.com/Lmmmmmm-bb" title="_lmmmmmm"><img src="https://avatars.githubusercontent.com/u/54026110?v=4" width="42;" alt="_lmmmmmm"/></a>
<a href="https://github.com/y52y" title="Zyj"><img src="https://avatars.githubusercontent.com/u/51304324?v=4" width="42;" alt="Zyj"/></a>
<a href="https://github.com/Leaderzhangyi" title="ZinkCas"><img src="https://avatars.githubusercontent.com/u/46915666?v=4" width="42;" alt="ZinkCas"/></a>
<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/qwxingzhe" title="行者"><img src="https://avatars.githubusercontent.com/u/7071651?v=4" width="42;" alt="行者"/></a>
<a href="https://github.com/HanaChan233" title="花开花落"><img src="https://avatars.githubusercontent.com/u/75212820?v=4" width="42;" alt="花开花落"/></a>
<a href="https://github.com/lisheng741" title="芦荟柚子茶"><img src="https://avatars.githubusercontent.com/u/53617305?v=4" width="42;" alt="芦荟柚子茶"/></a>
<a href="https://github.com/ZIDOUZI" title="ZIDOUZI"><img src="https://avatars.githubusercontent.com/u/53157536?v=4" width="42;" alt="ZIDOUZI"/></a>
<a href="https://github.com/wangdaodao" title="王叨叨"><img src="https://avatars.githubusercontent.com/u/2317442?v=4" width="42;" alt="王叨叨"/></a>
<a href="https://github.com/HChenX" title="焕晨HChen"><img src="https://avatars.githubusercontent.com/u/123531821?v=4" width="42;" alt="焕晨HChen"/></a>
<a href="https://github.com/LebranceBW" title="落叶乌龟"><img src="https://avatars.githubusercontent.com/u/19501514?v=4" width="42;" alt="落叶乌龟"/></a>
<a href="https://github.com/ZIDOUZI" title="子斗子"><img src="https://avatars.githubusercontent.com/u/53157536?v=4" width="42;" alt="子斗子"/></a>
<a href="https://github.com/LuckyJie12" title="夜未央"><img src="https://avatars.githubusercontent.com/u/102901105?v=4" width="42;" alt="夜未央"/></a>
<a href="https://github.com/lvzhenbo" title="吕振波"><img src="https://avatars.githubusercontent.com/u/32427677?v=4" width="42;" alt="吕振波"/></a>
<a href="https://github.com/zxx457" title="zxx457"><img src="https://avatars.githubusercontent.com/u/114141362?v=4" width="42;" alt="zxx457"/></a>
@ -357,10 +376,9 @@ Quick Reference
<a href="https://github.com/lykjjj" title="lykjjj"><img src="https://avatars.githubusercontent.com/u/58510058?v=4" width="42;" alt="lykjjj"/></a>
<a href="https://github.com/lozhu20" title="lozhu"><img src="https://avatars.githubusercontent.com/u/44923922?v=4" width="42;" alt="lozhu"/></a>
<a href="https://github.com/liliangrong777" title="liliangrong777"><img src="https://avatars.githubusercontent.com/u/58727146?v=4" width="42;" alt="liliangrong777"/></a>
<a href="https://github.com/larry-xue" title="larry"><img src="https://avatars.githubusercontent.com/u/48818060?v=4" width="42;" alt="larry"/></a>
<a href="https://github.com/kubeme" title="kubernetes for me"><img src="https://avatars.githubusercontent.com/u/16346220?v=4" width="42;" alt="kubernetes for me"/></a>
<a href="https://github.com/kdxcxs" title="kdxcxs"><img src="https://avatars.githubusercontent.com/u/18746192?v=4" width="42;" alt="kdxcxs"/></a>
<a href="https://github.com/zhu0629" title="zhucong"><img src="https://avatars.githubusercontent.com/u/13188450?v=4" width="42;" alt="zhucong"/></a>
<a href="https://github.com/leauny" title="leauny"><img src="https://avatars.githubusercontent.com/u/42369176?v=4" width="42;" alt="leauny"/></a>
<a href="https://github.com/y52y" title="Zyj"><img src="https://avatars.githubusercontent.com/u/51304324?v=4" width="42;" alt="Zyj"/></a>
<a href="https://github.com/isecret" title="Mao Wang"><img src="https://avatars.githubusercontent.com/u/15724152?v=4" width="42;" alt="Mao Wang"/></a>
<a href="https://github.com/likeshop-github" title="likeshop技术社区"><img src="https://avatars.githubusercontent.com/u/77180968?v=4" width="42;" alt="likeshop技术社区"/></a>
<a href="https://github.com/Lihuagreek" title="Lihuagreek"><img src="https://avatars.githubusercontent.com/u/51040740?v=4" width="42;" alt="Lihuagreek"/></a>
<a href="https://github.com/LightQuanta" title="Light_Quanta"><img src="https://avatars.githubusercontent.com/u/18213217?v=4" width="42;" alt="Light_Quanta"/></a>
@ -369,7 +387,7 @@ Quick Reference
<a href="https://github.com/JavaZeroo" title="JavaZero"><img src="https://avatars.githubusercontent.com/u/71128095?v=4" width="42;" alt="JavaZero"/></a>
<a href="https://github.com/Ding-Kyoma" title="HooinKyoma"><img src="https://avatars.githubusercontent.com/u/44542198?v=4" width="42;" alt="HooinKyoma"/></a>
<a href="https://github.com/gongyeheyu" title="GONGYE Heyu"><img src="https://avatars.githubusercontent.com/u/85177605?v=4" width="42;" alt="GONGYE Heyu"/></a>
<a href="https://github.com/Fuku-L" title="Fuku-L"><img src="https://avatars.githubusercontent.com/u/38535911?v=4" width="42;" alt="Fuku-L"/></a>
<a href="https://github.com/Fuku-L" title="Foozi"><img src="https://avatars.githubusercontent.com/u/38535911?v=4" width="42;" alt="Foozi"/></a>
<a href="https://github.com/sirius-fan" title="Fan"><img src="https://avatars.githubusercontent.com/u/25720015?v=4" width="42;" alt="Fan"/></a>
<a href="https://github.com/eeeeeio" title="EEEEE"><img src="https://avatars.githubusercontent.com/u/20723545?v=4" width="42;" alt="EEEEE"/></a>
<a href="https://github.com/demigodliu" title="DemigodLiu"><img src="https://avatars.githubusercontent.com/u/30372735?v=4" width="42;" alt="DemigodLiu"/></a>
@ -386,6 +404,8 @@ Quick Reference
<a href="https://github.com/gitchenze" title="Aze"><img src="https://avatars.githubusercontent.com/u/13357869?v=4" width="42;" alt="Aze"/></a>
<a href="https://github.com/dousha0w0" title="dousha0w0"><img src="https://avatars.githubusercontent.com/u/52566311?v=4" width="42;" alt="dousha0w0"/></a>
<a href="https://github.com/13812700839" title="花殇"><img src="https://avatars.githubusercontent.com/u/58072506?v=4" width="42;" alt="花殇"/></a>
<a href="https://github.com/Leaderzhangyi" title="ZinkCas"><img src="https://avatars.githubusercontent.com/u/46915666?v=4" width="42;" alt="ZinkCas"/></a>
<a href="https://github.com/zhu0629" title="zhucong"><img src="https://avatars.githubusercontent.com/u/13188450?v=4" width="42;" alt="zhucong"/></a>
<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/dfshizhiqiang" title="Zech"><img src="https://avatars.githubusercontent.com/u/7030019?v=4" width="42;" alt="Zech"/></a>
<a href="https://github.com/Yo-gurts" title="Yogurt"><img src="https://avatars.githubusercontent.com/u/44612841?v=4" width="42;" alt="Yogurt"/></a>
@ -409,8 +429,7 @@ Quick Reference
<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/Moeyuuko" title="Moeyuuko"><img src="https://avatars.githubusercontent.com/u/14266681?v=4" width="42;" alt="Moeyuuko"/></a>
<a href="https://github.com/malcolmyu" title="Minghao Yu"><img src="https://avatars.githubusercontent.com/u/3203962?v=4" width="42;" alt="Minghao Yu"/></a>
<a href="https://github.com/mariuszmichalowski" title="Mariusz Michalowski"><img src="https://avatars.githubusercontent.com/u/92091891?v=4" width="42;" alt="Mariusz Michalowski"/></a>
<a href="https://github.com/isecret" title="Mao Wang"><img src="https://avatars.githubusercontent.com/u/15724152?v=4" width="42;" alt="Mao Wang"/></a><!--GAMFC-END-->
<a href="https://github.com/mariuszmichalowski" title="Mariusz Michalowski"><img src="https://avatars.githubusercontent.com/u/92091891?v=4" width="42;" alt="Mariusz Michalowski"/></a><!--GAMFC-END-->
[贡献者](https://github.com/jaywcjlove/reference/graphs/contributors)列表,由 [contributors](https://github.com/jaywcjlove/github-action-contributors) 根据提交次数的先后顺序自动生成
<!--rehype:style=padding-top:1rem;-->
@ -483,7 +502,7 @@ Quick Reference
[jeffjade.com](https://codehelp.jeffjade.com)<!--rehype:target=_blank-->
[okhk.net](https://ref.okhk.net)<!--rehype:target=_blank-->
[wdft.com](https://ref.wdft.com)<!--rehype:target=_blank&class=contributing&data-info=👆每天自动同步-->
[xuyiyang.vip](https://reference.xuyiyang.vip/)<!--rehype:target=_blank-->
[xiaopa.cc](https://reference.xiaopa.cc)<!--rehype:target=_blank&class=contributing&data-info=👆每天自动同步-->
[zsccodelnc.cn](https://zsccodelnc.cn/coderef/)<!--rehype:target=_blank-->
[chanlun.pro](https://ref.chanlun.pro)<!--rehype:target=_blank-->
[likui.info](https://r.likui.info)<!--rehype:target=_blank-->
@ -511,6 +530,11 @@ Quick Reference
[object.cool](https://r.object.cool)<!--rehype:target=_blank&class=contributing&data-info=👆每天自动同步-->
[luckyits.com](https://ref.luckyits.com/)<!--rehype:target=_blank&class=contributing&data-info=👆每天自动同步-->
[jeremyjone.com](https://ref.jeremyjone.com/)<!--rehype:target=_blank&class=contributing&data-info=👆每天自动同步-->
[gistudy.net](https://reference.gistudy.net/)<!--rehype:target=_blank-->
[maoo.me](https://note.maoo.me)<!--rehype:target=_blank&class=contributing&data-info=👆每天自动同步-->
[deyout.com](https://ref.deyout.com)<!--rehype:target=_blank-->
[xod.cc](https://ref.xod.cc)<!--rehype:target=_blank&class=contributing&data-info=👆每天自动同步-->
[reference.const.team](https://reference.const.team)<!--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 版。

13
assets/bun.svg Normal file
View File

@ -0,0 +1,13 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 70" height="1em" width="1em">
<path d="M71.09 20.74c-.16-.17-.33-.34-.5-.5s-.33-.34-.5-.5-.33-.34-.5-.5-.33-.34-.5-.5-.33-.34-.5-.5-.33-.34-.5-.5-.33-.34-.5-.5A26.46 26.46 0 0 1 75.5 35.7c0 16.57-16.82 30.05-37.5 30.05-11.58 0-21.94-4.23-28.83-10.86l.5.5.5.5.5.5.5.5.5.5.5.5.5.5C19.55 65.3 30.14 69.75 42 69.75c20.68 0 37.5-13.48 37.5-30 0-7.06-3.04-13.75-8.41-19.01Z"/>
<path d="M73 35.7c0 15.21-15.67 27.54-35 27.54S3 50.91 3 35.7C3 26.27 9 17.94 18.22 13S33.18 3 38 3s8.94 4.13 19.78 10C67 17.94 73 26.27 73 35.7Z" style="fill:#fbf0df"/>
<path data-name="Bottom Shadow" d="M73 35.7a21.67 21.67 0 0 0-.8-5.78c-2.73 33.3-43.35 34.9-59.32 24.94A40 40 0 0 0 38 63.24c19.3 0 35-12.35 35-27.54Z" style="fill:#f6dece"/>
<path data-name="Light Shine" d="M24.53 11.17C29 8.49 34.94 3.46 40.78 3.45A9.29 9.29 0 0 0 38 3c-2.42 0-5 1.25-8.25 3.13-1.13.66-2.3 1.39-3.54 2.15-2.33 1.44-5 3.07-8 4.7C8.69 18.13 3 26.62 3 35.7v1.19c6.06-21.41 17.07-23.04 21.53-25.72Z" style="fill:#fffefc"/>
<path d="M35.12 5.53A16.41 16.41 0 0 1 29.49 18c-.28.25-.06.73.3.59 3.37-1.31 7.92-5.23 6-13.14-.08-.45-.67-.33-.67.08Zm2.27 0A16.24 16.24 0 0 1 39 19c-.12.35.31.65.55.36 2.19-2.8 4.1-8.36-1.62-14.36-.29-.26-.74.14-.54.49Zm2.76-.17A16.42 16.42 0 0 1 47 17.12a.33.33 0 0 0 .65.11c.92-3.49.4-9.44-7.17-12.53-.4-.16-.66.38-.33.62Zm-18.46 10.4a16.94 16.94 0 0 0 10.47-9c.18-.36.75-.22.66.18-1.73 8-7.52 9.67-11.12 9.45-.38.01-.37-.52-.01-.63Z" style="fill:#ccbea7;fill-rule:evenodd"/>
<path d="M38 65.75C17.32 65.75.5 52.27.5 35.7c0-10 6.18-19.33 16.53-24.92 3-1.6 5.57-3.21 7.86-4.62 1.26-.78 2.45-1.51 3.6-2.19C32 1.89 35 .5 38 .5s5.62 1.2 8.9 3.14c1 .57 2 1.19 3.07 1.87 2.49 1.54 5.3 3.28 9 5.27C69.32 16.37 75.5 25.69 75.5 35.7c0 16.57-16.82 30.05-37.5 30.05ZM38 3c-2.42 0-5 1.25-8.25 3.13-1.13.66-2.3 1.39-3.54 2.15-2.33 1.44-5 3.07-8 4.7C8.69 18.13 3 26.62 3 35.7c0 15.19 15.7 27.55 35 27.55S73 50.89 73 35.7c0-9.08-5.69-17.57-15.22-22.7-3.78-2-6.73-3.88-9.12-5.36-1.09-.67-2.09-1.29-3-1.84C42.63 4 40.42 3 38 3Z"/><g>
<path d="M45.05 43a8.93 8.93 0 0 1-2.92 4.71 6.81 6.81 0 0 1-4 1.88A6.84 6.84 0 0 1 34 47.71 8.93 8.93 0 0 1 31.12 43a.72.72 0 0 1 .8-.81h12.34a.72.72 0 0 1 .79.81Z" style="fill:#b71422" data-name="Background"/>
<path data-name="Background" d="M34 47.79a6.91 6.91 0 0 0 4.12 1.9 6.91 6.91 0 0 0 4.11-1.9 10.63 10.63 0 0 0 1-1.07 6.83 6.83 0 0 0-4.9-2.31 6.15 6.15 0 0 0-5 2.78c.23.21.43.41.67.6Z" style="fill:#ff6164"/>
<path data-name="Outline" d="M34.16 47a5.36 5.36 0 0 1 4.19-2.08 6 6 0 0 1 4 1.69c.23-.25.45-.51.66-.77a7 7 0 0 0-4.71-1.93 6.36 6.36 0 0 0-4.89 2.36 9.53 9.53 0 0 0 .75.73Z"/>
<path data-name="Outline" d="M38.09 50.19a7.42 7.42 0 0 1-4.45-2 9.52 9.52 0 0 1-3.11-5.05 1.2 1.2 0 0 1 .26-1 1.41 1.41 0 0 1 1.13-.51h12.34a1.44 1.44 0 0 1 1.13.51 1.19 1.19 0 0 1 .25 1 9.52 9.52 0 0 1-3.11 5.05 7.42 7.42 0 0 1-4.44 2Zm-6.17-7.4c-.16 0-.2.07-.21.09a8.29 8.29 0 0 0 2.73 4.37A6.23 6.23 0 0 0 38.09 49a6.28 6.28 0 0 0 3.65-1.73 8.3 8.3 0 0 0 2.72-4.37.21.21 0 0 0-.2-.09Z"/></g><g><ellipse data-name="Right Blush" cx="53.22" cy="40.18" rx="5.85" ry="3.44" style="fill:#febbd0"/><ellipse data-name="Left Bluch" cx="22.95" cy="40.18" rx="5.85" ry="3.44" style="fill:#febbd0"/>
<path d="M25.7 38.8a5.51 5.51 0 1 0-5.5-5.51 5.51 5.51 0 0 0 5.5 5.51Zm24.77 0A5.51 5.51 0 1 0 45 33.29a5.5 5.5 0 0 0 5.47 5.51Z" style="fill-rule:evenodd"/>
<path d="M24 33.64a2.07 2.07 0 1 0-2.06-2.07A2.07 2.07 0 0 0 24 33.64Zm24.77 0a2.07 2.07 0 1 0-2.06-2.07 2.07 2.07 0 0 0 2.04 2.07Z" style="fill:#fff;fill-rule:evenodd"/></g></svg>

After

Width:  |  Height:  |  Size: 3.5 KiB

5
assets/chatgpt.svg Normal file
View File

@ -0,0 +1,5 @@
<svg width="1em" height="1em" viewBox="0 0 41 41" fill="none" xmlns="http://www.w3.org/2000/svg" stroke-width="1.5"
class="h-6 w-6">
<path d="M37.5324 16.8707C37.9808 15.5241 38.1363 14.0974 37.9886 12.6859C37.8409 11.2744 37.3934 9.91076 36.676 8.68622C35.6126 6.83404 33.9882 5.3676 32.0373 4.4985C30.0864 3.62941 27.9098 3.40259 25.8215 3.85078C24.8796 2.7893 23.7219 1.94125 22.4257 1.36341C21.1295 0.785575 19.7249 0.491269 18.3058 0.500197C16.1708 0.495044 14.0893 1.16803 12.3614 2.42214C10.6335 3.67624 9.34853 5.44666 8.6917 7.47815C7.30085 7.76286 5.98686 8.3414 4.8377 9.17505C3.68854 10.0087 2.73073 11.0782 2.02839 12.312C0.956464 14.1591 0.498905 16.2988 0.721698 18.4228C0.944492 20.5467 1.83612 22.5449 3.268 24.1293C2.81966 25.4759 2.66413 26.9026 2.81182 28.3141C2.95951 29.7256 3.40701 31.0892 4.12437 32.3138C5.18791 34.1659 6.8123 35.6322 8.76321 36.5013C10.7141 37.3704 12.8907 37.5973 14.9789 37.1492C15.9208 38.2107 17.0786 39.0587 18.3747 39.6366C19.6709 40.2144 21.0755 40.5087 22.4946 40.4998C24.6307 40.5054 26.7133 39.8321 28.4418 38.5772C30.1704 37.3223 31.4556 35.5506 32.1119 33.5179C33.5027 33.2332 34.8167 32.6547 35.9659 31.821C37.115 30.9874 38.0728 29.9178 38.7752 28.684C39.8458 26.8371 40.3023 24.6979 40.0789 22.5748C39.8556 20.4517 38.9639 18.4544 37.5324 16.8707ZM22.4978 37.8849C20.7443 37.8874 19.0459 37.2733 17.6994 36.1501C17.7601 36.117 17.8666 36.0586 17.936 36.0161L25.9004 31.4156C26.1003 31.3019 26.2663 31.137 26.3813 30.9378C26.4964 30.7386 26.5563 30.5124 26.5549 30.2825V19.0542L29.9213 20.998C29.9389 21.0068 29.9541 21.0198 29.9656 21.0359C29.977 21.052 29.9842 21.0707 29.9867 21.0902V30.3889C29.9842 32.375 29.1946 34.2791 27.7909 35.6841C26.3872 37.0892 24.4838 37.8806 22.4978 37.8849ZM6.39227 31.0064C5.51397 29.4888 5.19742 27.7107 5.49804 25.9832C5.55718 26.0187 5.66048 26.0818 5.73461 26.1244L13.699 30.7248C13.8975 30.8408 14.1233 30.902 14.3532 30.902C14.583 30.902 14.8088 30.8408 15.0073 30.7248L24.731 25.1103V28.9979C24.7321 29.0177 24.7283 29.0376 24.7199 29.0556C24.7115 29.0736 24.6988 29.0893 24.6829 29.1012L16.6317 33.7497C14.9096 34.7416 12.8643 35.0097 10.9447 34.4954C9.02506 33.9811 7.38785 32.7263 6.39227 31.0064ZM4.29707 13.6194C5.17156 12.0998 6.55279 10.9364 8.19885 10.3327C8.19885 10.4013 8.19491 10.5228 8.19491 10.6071V19.808C8.19351 20.0378 8.25334 20.2638 8.36823 20.4629C8.48312 20.6619 8.64893 20.8267 8.84863 20.9404L18.5723 26.5542L15.206 28.4979C15.1894 28.5089 15.1703 28.5155 15.1505 28.5173C15.1307 28.5191 15.1107 28.516 15.0924 28.5082L7.04046 23.8557C5.32135 22.8601 4.06716 21.2235 3.55289 19.3046C3.03862 17.3858 3.30624 15.3413 4.29707 13.6194ZM31.955 20.0556L22.2312 14.4411L25.5976 12.4981C25.6142 12.4872 25.6333 12.4805 25.6531 12.4787C25.6729 12.4769 25.6928 12.4801 25.7111 12.4879L33.7631 17.1364C34.9967 17.849 36.0017 18.8982 36.6606 20.1613C37.3194 21.4244 37.6047 22.849 37.4832 24.2684C37.3617 25.6878 36.8382 27.0432 35.9743 28.1759C35.1103 29.3086 33.9415 30.1717 32.6047 30.6641C32.6047 30.5947 32.6047 30.4733 32.6047 30.3889V21.188C32.6066 20.9586 32.5474 20.7328 32.4332 20.5338C32.319 20.3348 32.154 20.1698 31.955 20.0556ZM35.3055 15.0128C35.2464 14.9765 35.1431 14.9142 35.069 14.8717L27.1045 10.2712C26.906 10.1554 26.6803 10.0943 26.4504 10.0943C26.2206 10.0943 25.9948 10.1554 25.7963 10.2712L16.0726 15.8858V11.9982C16.0715 11.9783 16.0753 11.9585 16.0837 11.9405C16.0921 11.9225 16.1048 11.9068 16.1207 11.8949L24.1719 7.25025C25.4053 6.53903 26.8158 6.19376 28.2383 6.25482C29.6608 6.31589 31.0364 6.78077 32.2044 7.59508C33.3723 8.40939 34.2842 9.53945 34.8334 10.8531C35.3826 12.1667 35.5464 13.6095 35.3055 15.0128ZM14.2424 21.9419L10.8752 19.9981C10.8576 19.9893 10.8423 19.9763 10.8309 19.9602C10.8195 19.9441 10.8122 19.9254 10.8098 19.9058V10.6071C10.8107 9.18295 11.2173 7.78848 11.9819 6.58696C12.7466 5.38544 13.8377 4.42659 15.1275 3.82264C16.4173 3.21869 17.8524 2.99464 19.2649 3.1767C20.6775 3.35876 22.0089 3.93941 23.1034 4.85067C23.0427 4.88379 22.937 4.94215 22.8668 4.98473L14.9024 9.58517C14.7025 9.69878 14.5366 9.86356 14.4215 10.0626C14.3065 10.2616 14.2466 10.4877 14.2479 10.7175L14.2424 21.9419ZM16.071 17.9991L20.4018 15.4978L24.7325 17.9975V22.9985L20.4018 25.4983L16.071 22.9985V17.9991Z"
fill="currentColor"></path>
</svg>

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 640 512" height="1em" width="1em">
<path d="M349.9 236.3h-66.1v-59.4h66.1v59.4zm0-204.3h-66.1v60.7h66.1V32zm78.2 144.8H362v59.4h66.1v-59.4zm-156.3-72.1h-66.1v60.1h66.1v-60.1zm78.1 0h-66.1v60.1h66.1v-60.1zm276.8 100c-14.4-9.7-47.6-13.2-73.1-8.4-3.3-24-16.7-44.9-41.1-63.7l-14-9.3-9.3 14c-18.4 27.8-23.4 73.6-3.7 103.8-8.7 4.7-25.8 11.1-48.4 10.7H2.4c-8.7 50.8 5.8 116.8 44 162.1 37.1 43.9 92.7 66.2 165.4 66.2 157.4 0 273.9-72.5 328.4-204.2 21.4.4 67.6.1 91.3-45.2 1.5-2.5 6.6-13.2 8.5-17.1l-13.3-8.9zm-511.1-27.9h-66v59.4h66.1v-59.4zm78.1 0h-66.1v59.4h66.1v-59.4zm78.1 0h-66.1v59.4h66.1v-59.4zm-78.1-72.1h-66.1v60.1h66.1v-60.1z"/>
</svg>

After

Width:  |  Height:  |  Size: 713 B

12
assets/erlang.svg Normal file
View File

@ -0,0 +1,12 @@
<svg xmlns="http://www.w3.org/2000/svg" height="1em" width="1em" viewBox="0 0 256 225">
<g fill="none" fill-rule="evenodd">
<path fill="#A90533" fill-rule="nonzero" d="M44.3399607 159.659089C25.536634 139.734178 14.5349706 112.207841 14.5628518 79.365069 14.5368716 50.3198413 23.6628914 25.3541383 39.3517627 6.35691059L39.3264162 6.36641554 6.35057459 6.36641554 6.35057459 159.662257 44.3165152 159.662257 44.3399607 159.659089 44.3399607 159.659089ZM218.009347 159.671762C226.109466 150.996277 233.367446 140.779089 239.944238 129.094336L203.445228 110.844831C190.626852 131.684119 171.881188 150.865742 145.959287 150.993742 108.232872 150.865742 93.4102182 118.60594 93.4916246 77.0832472L234.469386 77.0832472C234.657584 72.3954056 234.657584 70.2156037 234.469386 67.9591284 235.389466 43.2557621 228.842456 22.4912472 216.932753 6.32079178L216.871287 6.36704921 248.612753 6.36704921 248.612753 159.662891 217.940278 159.662891 218.009347 159.671762 218.009347 159.671762Z"/>
<path fill="#A90533" fill-rule="nonzero" d="M95.7737825,41.4967126 C97.3344954,22.6971878 112.156515,10.0543363 129.535367,10.0163165 C147.032713,10.0543363 159.674931,22.6971878 160.103287,41.4967126 L95.7737825,41.4967126 L95.7737825,41.4967126 Z"/>
<polygon fill="currentColor" fill-rule="nonzero" points="26.426 185.668 26.426 179.281 6.807 179.281 6.807 217.149 26.426 217.149 26.426 210.761 14.107 210.761 14.107 200.724 25.969 200.724 25.969 194.337 14.107 194.337 14.107 185.668"/>
<path fill="currentColor" fill-rule="nonzero" d="M59.7310102,201.179881 C64.6216241,200.453703 67.3070894,195.607446 67.4870498,190.686416 C67.3070894,182.635723 62.088238,179.304555 54.7123964,179.280475 L44.6751687,179.280475 L44.6751687,217.148198 L51.9749706,217.148198 L51.9749706,202.092356 L61.0997231,217.148198 L70.2244756,217.148198 L59.7310102,201.179881 L59.7310102,201.179881 Z M51.974337,185.212198 L52.8868122,185.212198 C56.8693865,185.361743 59.8583766,186.270416 59.7303766,191.143287 C59.8583766,195.608079 56.9707726,196.819644 52.8868122,196.618139 L51.974337,196.618139 L51.974337,185.212198 L51.974337,185.212198 Z"/>
<polygon fill="currentColor" fill-rule="nonzero" points="93.036 179.281 85.737 179.281 85.737 217.149 103.529 217.149 103.529 210.761 93.036 210.761"/>
<path fill="currentColor" fill-rule="nonzero" d="M140.940674,209.392158 L144.134337,217.148198 L151.890377,217.148198 L137.74701,178.368 L131.815921,178.368 L116.76008,217.148198 L124.515485,217.148198 L127.709783,209.392158 L140.940674,209.392158 L140.940674,209.392158 Z M139.115723,203.461703 L129.990971,203.461703 L134.097109,189.318337 L139.115723,203.461703 L139.115723,203.461703 Z"/>
<polygon fill="currentColor" fill-rule="nonzero" points="165.578 217.149 173.334 217.149 173.334 191.6 193.409 218.061 198.883 218.061 198.883 179.281 191.127 179.281 191.127 204.83 171.052 178.368 165.578 178.368"/>
<path fill="currentColor" fill-rule="nonzero" d="M230.820119,197.073743 L230.820119,203.004832 L239.032396,203.004832 C238.861307,207.771248 234.960476,211.809584 230.363882,211.673347 C223.104634,211.809584 219.507327,204.794297 219.414179,198.442455 C219.507327,192.175525 223.053941,184.856713 230.363882,184.755327 C234.20008,184.856079 237.443169,187.480713 239.032396,190.686416 L245.419723,187.492753 C242.610693,181.575604 236.936238,178.294495 230.363882,178.368 C219.051089,178.295129 211.806416,187.632792 211.658139,198.442455 C211.806416,208.982812 218.848951,218.371168 229.907644,218.516911 C241.850931,218.371168 247.373307,208.831366 247.244674,197.986218 L247.244674,197.073743 L230.820119,197.073743 L230.820119,197.073743 L230.820119,197.073743 Z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.6 KiB

1
assets/pinia.svg Normal file
View File

@ -0,0 +1 @@
<svg viewBox="0 0 256 331" xmlns="http://www.w3.org/2000/svg" height="1em" width="1em"><defs><linearGradient id="a" x1="55.342%" x2="42.817%" y1="0%" y2="42.863%"><stop offset="0%" stop-color="#52CE63"/><stop offset="100%" stop-color="#51A256"/></linearGradient><linearGradient id="b" x1="55.349%" x2="42.808%" y1="0%" y2="42.863%"><stop offset="0%" stop-color="#52CE63"/><stop offset="100%" stop-color="#51A256"/></linearGradient><linearGradient id="c" x1="50%" x2="50%" y1="0%" y2="58.811%"><stop offset="0%" stop-color="#8AE99C"/><stop offset="100%" stop-color="#52CE63"/></linearGradient><linearGradient id="d" x1="51.378%" x2="44.585%" y1="17.473%" y2="100%"><stop offset="0%" stop-color="#FFE56C"/><stop offset="100%" stop-color="#FFC63A"/></linearGradient></defs><path fill="url(#a)" d="M67.56 173.328c30.366-2.985 41.08-27.648 44.735-64.823 3.654-37.175-21.174-70.814-31.502-69.799-10.328 1.015-43.15 40.322-46.805 77.497-3.654 37.175 3.205 60.11 33.572 57.125Z" transform="rotate(-38 72.877 106.136)"/><path fill="url(#b)" d="M184.454 186.277c30.367 2.986 36.394-20.032 32.74-57.207-3.655-37.175-35.645-76.4-45.973-77.415-10.328-1.015-35.989 32.542-32.334 69.717 3.654 37.175 15.201 61.92 45.567 64.905Z" transform="rotate(52 178.34 119.085)"/><path fill="url(#c)" d="M129.232 151.601c27.341 0 34.878-26.184 34.878-67.013 0-40.83-25.579-80.843-34.878-80.843S93.605 43.758 93.605 84.588c0 40.829 8.286 67.013 35.627 67.013Z" transform="rotate(7 128.858 77.673)"/><path fill="url(#d)" d="M113.386 330.307c56.896 0 103.038-16.528 103.038-91.482 0-74.955-46.142-136.462-103.038-136.462-56.897 0-103.002 61.507-103.002 136.462 0 74.954 46.105 91.482 103.002 91.482Z"/><ellipse cx="165.427" cy="216.677" fill="#EAADCC" rx="14.717" ry="6.845"/><ellipse cx="57.273" cy="212.57" fill="#EAADCC" rx="14.717" ry="6.845" transform="rotate(7 57.273 212.57)"/><path d="M96.266 210.285a2.054 2.054 0 1 0-3.406 2.295c3.151 4.676 7.997 7.39 14.373 8.119 6.348.725 12.016-.902 16.877-4.852a2.054 2.054 0 1 0-2.59-3.187c-3.999 3.249-8.563 4.559-13.82 3.958-5.23-.598-8.986-2.7-11.434-6.333ZM65.818 178.63a14.672 14.672 0 0 1 10.551 3.945 14.67 14.67 0 0 1 4.672 10.25 14.671 14.671 0 0 1-3.945 10.55 14.672 14.672 0 0 1-10.25 4.672 14.67 14.67 0 0 1-10.551-3.945 14.672 14.672 0 0 1-4.67-10.25 14.67 14.67 0 0 1 3.944-10.55 14.67 14.67 0 0 1 10.249-4.672Z"/><path fill="#FFF" d="M66.59 190.932a4.792 4.792 0 1 0-9.578.336 4.792 4.792 0 0 0 9.579-.336Z"/><path d="M154.99 182.366a14.671 14.671 0 0 1 10.552 3.944 14.67 14.67 0 0 1 4.67 10.25 14.672 14.672 0 0 1-3.944 10.551 14.67 14.67 0 0 1-10.25 4.671 14.671 14.671 0 0 1-10.55-3.945 14.671 14.671 0 0 1-4.672-10.25 14.67 14.67 0 0 1 3.945-10.55 14.671 14.671 0 0 1 10.25-4.671Z"/><path fill="#FFF" d="M65.71 175.552c9.824-.343 18.066 7.342 18.409 17.165.343 9.824-7.342 18.065-17.166 18.408-9.824.343-18.064-7.342-18.407-17.166-.343-9.823 7.341-18.064 17.164-18.407Zm12.252 17.38c-.224-6.423-5.613-11.448-12.037-11.223-6.422.224-11.447 5.612-11.222 12.035.224 6.424 5.612 11.448 12.035 11.224 6.423-.224 11.448-5.612 11.224-12.036ZM154.883 179.287c9.824-.343 18.065 7.342 18.408 17.165.343 9.824-7.342 18.065-17.165 18.408-9.824.343-18.065-7.342-18.408-17.165-.343-9.824 7.342-18.065 17.165-18.408Zm12.251 17.38c-.224-6.423-5.612-11.447-12.036-11.223-6.423.224-11.448 5.613-11.223 12.036.224 6.423 5.612 11.448 12.035 11.224 6.424-.225 11.448-5.613 11.224-12.037Z"/><path fill="#FFF" d="M155.763 194.668a4.792 4.792 0 1 0-9.578.335 4.792 4.792 0 0 0 9.578-.335Z"/><path fill="#ECB732" d="m38.083 243.16 22.33 23.235 16.022-17.044a3.765 3.765 0 0 1 5.486 5.157l-16.283 17.324 23.1 24.036a3.765 3.765 0 1 1-5.43 5.218l-22.834-23.761-10.725 11.41a3.765 3.765 0 1 1-5.486-5.158l10.986-11.688-22.595-23.511a3.765 3.765 0 1 1 5.43-5.218ZM188.04 243.16a3.765 3.765 0 1 1 5.429 5.218l-22.596 23.511 10.988 11.688a3.765 3.765 0 0 1-.042 5.201l-.123.121a3.765 3.765 0 0 1-5.322-.165l-10.725-11.41-22.834 23.762a3.765 3.765 0 0 1-5.197.222l-.127-.116a3.765 3.765 0 0 1-.105-5.324l23.1-24.036-16.284-17.324a3.765 3.765 0 0 1 .042-5.2l.123-.121a3.765 3.765 0 0 1 5.321.164l16.021 17.044 22.331-23.235Z"/><path fill="#FFC73B" d="M136.602 126.74a3.765 3.765 0 0 1 0 5.323l-17.53 17.531 10.684 10.686a3.765 3.765 0 0 1 .12 5.2l-.12.125a3.765 3.765 0 0 1-5.324 0l-10.686-10.686-10.686 10.686a3.765 3.765 0 1 1-5.324-5.325l10.685-10.686-17.53-17.53a3.765 3.765 0 0 1-.12-5.2l.12-.125a3.765 3.765 0 0 1 5.324 0l17.531 17.53 17.531-17.53a3.765 3.765 0 0 1 5.325 0Z"/></svg>

After

Width:  |  Height:  |  Size: 4.4 KiB

12
assets/pnpm.svg Normal file
View File

@ -0,0 +1,12 @@
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 156 156">
<g fill="none" fill-rule="evenodd">
<polygon fill="#F9AD00" fill-rule="nonzero" points="155.808 48.684 107.027 48.684 107.027 -.097 155.808 -.097"/>
<polygon fill="#F9AD00" fill-rule="nonzero" points="102.139 48.684 53.358 48.684 53.358 -.097 102.139 -.097"/>
<polygon fill="#F9AD00" fill-rule="nonzero" points="48 48.684 0 48.684 0 -.097 48 -.097"/>
<polygon fill="#F9AD00" fill-rule="nonzero" points="155.808 102.344 107.027 102.344 107.027 53.562 155.808 53.562"/>
<polygon fill="#4E4E4E" fill-rule="nonzero" points="102.139 102.344 53.358 102.344 53.358 53.562 102.139 53.562"/>
<polygon fill="#4E4E4E" fill-rule="nonzero" points="102.139 156.003 53.358 156.003 53.358 107.222 102.139 107.222"/>
<polygon fill="#4E4E4E" fill-rule="nonzero" points="155.808 156.003 107.027 156.003 107.027 107.222 155.808 107.222"/>
<polygon fill="#4E4E4E" fill-rule="nonzero" points="48 156.003 0 156.003 0 107.222 48 107.222"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1015 B

27
assets/rxjs.svg Normal file
View File

@ -0,0 +1,27 @@
<svg xmlns="http://www.w3.org/2000/svg" height="1em" width="1em" viewBox="0 0 255 255">
<defs>
<linearGradient id="a" x1="11.935%" x2="62.881%" y1="90.18%" y2="37.177%">
<stop offset="0%" stop-color="#E01D84"/>
<stop offset="40.1%" stop-color="#DF1D85"/>
<stop offset="77%" stop-color="#932C87"/>
<stop offset="100%" stop-color="#5D2F88"/></linearGradient>
<linearGradient id="c" x1="-.146%" x2="99.946%" y1="49.99%" y2="49.99%">
<stop offset="0%" stop-color="#E01D84"/>
<stop offset="23.8%" stop-color="#DA1E85"/>
<stop offset="65.8%" stop-color="#C72085"/>
<stop offset="99.9%" stop-color="#B52284"/></linearGradient>
<radialGradient id="b" cx="77.558%" cy="33.251%" r="77.293%" fx="77.558%" fy="33.251%" gradientTransform="matrix(.7343 .0024 -.00176 1 .207 -.002)">
<stop offset="0%" stop-color="#E01D84"/>
<stop offset="13.9%" stop-color="#DE1E85"/>
<stop offset="28.5%" stop-color="#D62085"/>
<stop offset="43.4%" stop-color="#C92386"/>
<stop offset="58.6%" stop-color="#B72786"/>
<stop offset="73.9%" stop-color="#9D2B87"/>
<stop offset="89.1%" stop-color="#7C2E88"/>
<stop offset="100%" stop-color="#5D2F88"/></radialGradient></defs>
<g fill="none" transform="translate(1 2)">
<path fill="#E32286" d="M14.6140689,158.580855 C9.41406892,142.380855 7.91406892,125.280855 10.9140689,107.680855 C12.2140689,100.380855 14.2140689,93.3808546 16.4140689,86.2808546 C16.4140689,86.2808546 30.2140689,40.9808546 76.9140689,20.2808546 C76.9140689,20.2808546 93.0140689,11.7808546 117.214069,11.1808546 C117.214069,11.1808546 113.914069,7.98085459 111.814069,6.58085459 C100.414069,-1.01914541 83.4140689,-3.51914541 73.1140689,7.18085459 C70.0140689,10.3808546 67.4140689,13.8808546 64.5140689,17.0808546 C61.2140689,20.6808546 57.2140689,23.6808546 52.6140689,25.3808546 C48.6140689,26.8808546 44.6140689,26.5808546 40.5140689,27.2808546 C36.3140689,27.9808546 32.0140689,29.4808546 28.6140689,32.1808546 C24.9140689,35.1808546 23.4140689,39.1808546 23.0140689,43.7808546 C22.6140689,47.3808546 22.7140689,51.0808546 22.5140689,54.6808546 C22.0140689,65.2808546 18.6140689,68.2808546 11.0140689,74.1808546 C7.81406892,76.5808546 5.11406892,79.7808546 3.11406892,83.1808546 C-2.88593108,93.7808546 6.71406892,104.780855 7.21406892,115.480855 C7.31406892,117.680855 7.11406892,119.880855 6.31406892,121.980855 C5.51406892,124.280855 3.91406892,125.780855 2.61406892,127.680855 C0.814068923,130.180855 -0.385931077,133.180855 0.114068923,136.280855 C0.614068923,139.380855 2.21406892,142.280855 3.71406892,144.980855 C6.61406892,149.780855 10.2140689,154.080855 14.0140689,158.180855 C14.2140689,158.180855 14.4140689,158.380855 14.6140689,158.580855"/>
<path fill="url(#a)" d="M205.414069,196.980855 C228.414069,186.980855 238.214069,169.680855 238.214069,169.680855 C259.714069,140.380855 252.414069,109.480855 252.414069,109.480855 C238.714069,139.280855 226.214069,147.480855 226.214069,147.480855 C259.914069,96.1808546 226.414069,65.1808546 226.414069,65.1808546 C240.114069,94.3808546 221.914069,129.980855 221.914069,129.980855 C206.614069,162.180855 184.914069,173.680855 184.914069,173.680855 C209.114069,178.180855 226.914069,161.880855 226.914069,161.880855 C192.214069,199.380855 154.614069,197.580855 154.614069,197.580855 C170.414069,215.280855 194.114069,213.780855 194.114069,213.780855 C163.114069,221.080855 134.014069,210.780855 110.114069,190.880855 C105.614069,187.180855 101.314069,183.180855 97.3140689,178.880855 C97.3140689,178.880855 93.7140689,175.080855 93.0140689,174.080855 L92.9140689,173.980855 C92.4140689,192.480855 111.714069,209.680855 111.714069,209.680855 C87.5140689,199.680855 76.4140689,177.980855 76.4140689,177.980855 C76.4140689,177.980855 60.1140689,150.180855 71.9140689,118.480855 C83.7140689,86.7808546 119.414069,79.9808546 119.414069,79.9808546 C148.914069,94.2808546 173.914069,98.7808546 173.914069,98.7808546 C226.614069,107.580855 223.614069,81.7808546 223.614069,81.7808546 C224.114069,59.5808546 190.614069,35.9808546 190.614069,35.9808546 C130.914069,-8.31914541 76.9140689,20.2808546 76.9140689,20.2808546 C30.2140689,40.9808546 16.4140689,86.2808546 16.4140689,86.2808546 C14.2140689,93.3808546 12.2140689,100.380855 10.9140689,107.680855 C5.81406892,137.380855 13.5140689,165.480855 30.2140689,190.480855 C56.2140689,229.280855 98.4140689,242.680855 98.4140689,242.680855 C160.914069,263.880855 203.614069,232.680855 203.614069,232.680855 C242.914069,205.680855 250.814069,174.480855 250.814069,174.480855 C219.114069,199.280855 205.414069,196.980855 205.414069,196.980855 Z M156.614069,51.0808546 C159.614069,51.0808546 162.014069,53.4808546 162.014069,56.4808546 C162.014069,59.4808546 159.614069,61.8808546 156.614069,61.8808546 C153.614069,61.8808546 151.214069,59.4808546 151.214069,56.4808546 C151.214069,53.4808546 153.614069,51.0808546 156.614069,51.0808546 Z"/>
<path fill="url(#b)" d="M223.514069,81.6808546 C224.014069,59.4808546 190.514069,35.8808546 190.514069,35.8808546 C130.814069,-8.31914541 76.8140689,20.2808546 76.8140689,20.2808546 C30.1140689,40.9808546 16.3140689,86.2808546 16.3140689,86.2808546 C13.6140689,93.9808546 11.2140689,105.780855 11.2140689,105.780855 C8.31406892,120.580855 9.61406892,134.280855 9.61406892,134.280855 C10.8140689,147.380855 13.7140689,156.180855 13.7140689,156.180855 C16.7140689,165.580855 18.1140689,168.480855 18.1140689,168.480855 C18.0140689,168.180855 17.5140689,165.980855 17.5140689,165.980855 C17.5140689,165.980855 13.3140689,145.780855 17.2140689,126.380855 C17.2140689,126.380855 20.6140689,106.180855 34.4140689,90.5808546 C34.4140689,90.5808546 56.8140689,58.6808546 98.5140689,71.1808546 C98.5140689,71.1808546 107.514069,74.3808546 110.614069,75.9808546 C113.714069,77.4808546 119.114069,79.7808546 119.114069,79.7808546 C148.614069,94.0808546 173.614069,98.5808546 173.614069,98.5808546 C226.514069,107.480855 223.514069,81.6808546 223.514069,81.6808546 L223.514069,81.6808546 Z M156.614069,61.9808546 C153.614069,61.9808546 151.214069,59.5808546 151.214069,56.5808546 C151.214069,53.5808546 153.614069,51.1808546 156.614069,51.1808546 C159.614069,51.1808546 162.014069,53.5808546 162.014069,56.5808546 C162.014069,59.5808546 159.614069,61.9808546 156.614069,61.9808546 Z"/>
<path fill="url(#c)" d="M122.414069,41.4808546 L88.3140689,30.8808546 C88.1140689,30.8808546 87.1140689,30.3808546 85.3140689,30.8808546 C85.3140689,30.8808546 65.2140689,35.9808546 68.7140689,46.9808546 C68.7140689,46.9808546 70.8140689,53.8808546 76.5140689,60.5808546 L114.014069,58.7808546 L122.414069,41.4808546 Z"/></g>
</svg>

After

Width:  |  Height:  |  Size: 6.4 KiB

3
assets/springboot.svg Normal file
View File

@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24" height="1em" width="1em">
<path d="M20.205 16.392c-2.469 3.289-7.741 2.179-11.122 2.338 0 0-.599.034-1.201.133 0 0 .228-.097.519-.198 2.374-.821 3.496-.986 4.939-1.727 2.71-1.388 5.408-4.413 5.957-7.555-1.032 3.022-4.17 5.623-7.027 6.679-1.955.722-5.492 1.424-5.493 1.424a5.28 5.28 0 0 1-.143-.076c-2.405-1.17-2.475-6.38 1.894-8.059 1.916-.736 3.747-.332 5.818-.825 2.208-.525 4.766-2.18 5.805-4.344 1.165 3.458 2.565 8.866.054 12.21zm.042-13.28a9.212 9.212 0 0 1-1.065 1.89 9.982 9.982 0 0 0-7.167-3.031C6.492 1.971 2 6.463 2 11.985a9.983 9.983 0 0 0 3.205 7.334l.22.194a.856.856 0 1 1 .001.001l.149.132A9.96 9.96 0 0 0 12.015 22c5.278 0 9.613-4.108 9.984-9.292.274-2.539-.476-5.763-1.752-9.596" />
</svg>

After

Width:  |  Height:  |  Size: 790 B

1
assets/stylex.svg Normal file
View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="1em" width="1em" viewBox="0 0 151 180"><g fill="none"><path fill="#5BD3F3" d="M123.054863 93.4254443C124.041858 95.7626109 128.450105 105.044084 129.355779 107.321152 123.84289 116.561307 122.549601 118.95899 111.024753 133.60593 64.1232983 182.705627 27.9371992 190.639891 5.76263041 167.701852 3.59627766 165.361764 1.67512566 162.319274 0 158.574382.471825684 159.433291 1.09514745 160.379843 1.86996531 161.414039L2.15025371 161.78256C2.19772524 161.844746 2.24602235 161.906931 2.29473227 161.969534L2.59359648 162.349323 2.90484457 162.735791 3.22888933 163.12977 3.56531797 163.530845 3.91454328 163.939431 4.27615246 164.355113 4.65014553 164.77789 5.03734806 165.208179 5.23549007 165.426036 5.64126842 165.867176 5.84890474 166.090459 6.2732589 166.542451 6.49038953 166.771159C33.8818726 191.84228 61.2048315 170.332834 98.3027967 128.773838 103.902786 122.190123 112.153337 110.407464 123.054863 93.4254443ZM137.380118 14.1032604C154.739423 29.1884191 154.739423 52.5968124 141.717364 86.0295639 140.719637 83.5713654 136.323774 73.7444144 135.221609 71.226952 145.472981 42.8320467 145.710752 29.3332399 130.967334 15.8715774 122.485617 8.12762615 116.462513 7.80876984 104.995043 9.69477985L104.244168 9.82123726C104.118678 9.84252217 103.992775 9.86464178 103.866872 9.8867614L103.107328 10.0236526 102.342004 10.1663867 101.956866 10.2402579 92.9145722 12.0507273 92.9145722 12.0340333 93.1139526 11.9605794C111.260459 5.27670019 126.843916 4.74249067 137.380118 14.1032604L137.380118 14.1032604Z"/><path fill="#D573DE" d="M125.890167,63.5141248 C153.449324,115.583313 155.188797,143.75817 146.009025,163.468062 C142.702042,170.570383 134.455253,175.478804 130.907687,177.387749 C122.003636,182.178957 103.568032,179.793293 87.0876824,174.955283 L84.6173661,173.901615 C92.8984649,176.570162 110.89548,180.056296 120.598168,177.387749 C152.463016,168.623747 148.671973,130.669324 116.64467,71.0621007 C84.6173661,11.4548774 49.5757474,-4.8960329 21.9537585,6.3426811 C19.3015581,7.42161421 16.9891503,8.8960871 15,10.7226111 L15.212887,10.4952275 L15.6399012,10.0462588 L15.853615,9.82508786 L16.282696,9.38854448 C19.3635641,6.29215141 22.5576963,3.87542408 25.8493845,2.76294257 C50.8282672,-5.6788289 93.7099159,2.71324123 125.890167,63.5141248 Z"/></g></svg>

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

@ -105,17 +105,17 @@ $ adb pull /sdcard/test.txt pulledTest.txt
`adb shell wm size WxH` | 将分辨率设置为 WxH
`adb shell pm list packages` | 列出所有已安装的应用包
`adb shell pm list packages -3` | 列出所有已安装的第三方的应用包
`adb shell monkey -p app.package.name` | 启动指定包名的应用程序
`adb shell monkey -p app.package.name <count>` | 启动指定包名的应用程序, 并执行测试
<!--rehype:className=style-list-arrow-->
### 包安装
:-- | --
:-- | --
`adb shell install <apk>` | 安装应用程序
`adb shell install <path>` | 从手机路径安装应用
`adb shell install -r <path>` | 从手机路径安装应用(允许覆盖安装)
`adb shell uninstall <name>` | 卸载应用程序
`adb install <apk>` | 安装应用程序
`adb install <path>` | 从手机路径安装应用
`adb install -r <path>` | 从手机路径安装应用(允许覆盖安装)
`adb uninstall <name>` | 卸载应用程序
<!--rehype:className=left-align code-nowrap-->
### Paths
@ -165,14 +165,17 @@ $ adb pull /sdcard/test.txt pulledTest.txt
:-- | --
:-- | --
`adb shell list packages` | 列出包名称
`adb shell list packages -r` | 列出包名 + apks 的路径
`adb shell list packages -3` | 列出第三方包名称
`adb shell list packages -s` | 仅列出系统包
`adb shell list packages -u` | 列出包名称 + 已卸载
`adb shell pm list packages` | 列出包名称
`adb shell pm list packages -f` | 列出包名 + apks 的路径
`adb shell pm list packages -3` | 列出第三方包名称
`adb shell pm list packages -s` | 仅列出系统包
`adb shell pm list packages -u` | 列出出包和未安装包
`adb shell pm list packages -i` | 列出包名称 + 安装来源
`adb shell pm list packages -e` | 列出启用的包
`adb shell pm list packages -d` | 列出禁用的包
`adb shell dumpsys package packages` | 列出所有应用程序的信息
`adb shell dump <name>` | 列出一个包的信息
`adb shell path <package>` | 列出 APK 文件的路径
`adb shell dumpsys package <name>` | 列出一个包的信息
`adb shell pm path <package>` | 列出 APK 文件的路径
<!--rehype:className=style-list-arrow-->
### 设备相关命令
@ -232,13 +235,13 @@ $ adb pull /sdcard/Download/example.apk
### 从主机安装 APK 到 Android 设备
```bash
$ adb shell install example.apk
$ adb install example.apk
```
### 从 Android 设备存储安装 APK
```bash
$ adb shell install /sdcard/Download/example.apk
$ adb install /sdcard/Download/example.apk
```
### 设置网络代理
@ -330,7 +333,7 @@ $ adb shell pm path com.example.myapp
### 通过名称查找应用的包名
```bash
$ adb shell pm list package | grep app_name
$ adb shell pm list packages | grep app_name
```
### 从设备提取 APK 到您的计算机

262
docs/bun.md Normal file
View File

@ -0,0 +1,262 @@
Bun 备忘清单
===
这是一份 [`Bun`](https://bun.sh/) 软件包管理器备忘单,其中列出了 `Bun` 常用命令使用清单
入门
---
### 安装 Bun
```bash
curl -fsSL https://bun.sh/install | bash
```
### Bun 与 npm/Yarn 命令比较
<!--rehype:wrap-class=col-span-2 row-span-3-->
npm | Yarn | Bun | 说明
:- | :- | :- | :-
`npm install` | `yarn add` | `bun add` | 安装依赖
`npm init` | `yarn init` | `bun init` | 创建 `package.json` 文件
`npm install -g` | `yarn global add` | `bun global add` | 全局安装包
`npm run` | `yarn run` | `bun run` | 运行脚本
`npm uninstall` | `yarn remove` | `bun remove` | 移除包
`npm update` | `yarn upgrade` | `bun upgrade` | 更新包
`npm cache clean` | `yarn cache clean` | `bun cache clean` | 清理缓存目录
<!--rehype:className=left-align-->
参考备忘清单: [npm](./npm.md)、[yarn](./yaml.md)、[pnpm](./pnpm.md)
### 创建项目
```bash
bun create <template> <project-name>
```
示例:
```bash
bun create react my-react-app
```
### 查看已安装包
```bash
bun ls
```
### 安装依赖
<!--rehype:wrap-class=row-span-2-->
```bash
bun add <package>
```
选项:
```bash
--dev, -D # 安装到 devDependencies
--global, -g # 全局安装包
--exact, -E # 将包安装为精确版本
--tilde, -T # 安装有相同次要版本的包的最新版本
```
### 运行脚本
<!--rehype:wrap-class=row-span-3-->
`package.json` 中定义脚本:
```json
"scripts": {
"start": "node index.js",
"test": "jest"
}
```
运行脚本:
```bash
bun run <script>
```
例如:
```bash
bun run start
```
### 移除依赖
```bash
bun remove <package>
```
### 更新依赖
```bash
bun upgrade
```
选项:
```bash
--latest # 更新到最新版本
```
### 清理缓存
```bash
bun cache clean
```
### 安装全局包
```bash
bun global add <package>
```
### 移除全局包
```bash
bun global remove <package>
```
### Bun 提供的其他命令
```bash
bun bunfile # 管理 Bunfile
bun dev # 运行开发服务器
bun test # 运行测试
bun completions # 生成 shell 补全脚本
```
包管理器
---
### bin 目录的路径
要打印本地项目的 `bin` 目录的路径
```bash
bun pm bin
# /path/to/current/pro/node_modules/.bin
```
全局 bin 目录
```bash
bun pm bin -g
# <$HOME>/.bun/bin
```
### 打印依赖项
```bash
bun pm ls --all
# /path/to/project node_modules (135)
# ├── @eslint-community/eslint-utils@4.4.0
# ├── @eslint-community/regexpp@4.5.0
# ├── @eslint/eslintrc@2.0.2
# ├── @eslint/js@8.38.0
# ├── ...
```
打印所有已安装的依赖项,包括 `n` 阶依赖项。
### 打印已安装及已解决依赖项
```bash
bun pm ls
# /path/to/project node_modules (135)
# ├── eslint@8.38.0
# ├── react@18.2.0
# ├── react-dom@18.2.0
# ├── typescript@5.0.4
# └── zod@3.21.4
```
打印当前项目中已安装依赖项及其已解决版本的列表,不包括其依赖项
### 全局模块缓存的路径
```bash
bun pm cache
```
要打印 Bun 的全局模块缓存的路径
### 清除全局模块缓存
```bash
bun pm cache rm
```
### 列出全局安装
列出所有全局安装的软件包:
```bash
bun pm ls -g
```
列出所有全局安装的软件包,包括 n 阶依赖项:
```bash
bun pm ls -g --all
```
示例
---
### 安装包
<!--rehype:wrap-class=row-span-2-->
```bash
# 将包添加到 dependencies
$ bun add <package>
# 将包添加到 devDependencies
$ bun add -D <package>
# 将包安装为精确版本
$ bun add -E <package>
# 全局安装包
$ bun global add <package>
```
### 移除包
```bash
$ bun remove <package>
```
从所有类型的依赖项中删除包
### 查看包
```bash
# 列出已安装的软件包
$ bun ls
```
### 清除缓存
```bash
$ bun cache clean
```
清理缓存目录
### 运行脚本
```bash
$ bun run <script>
```
`package.json` 中定义的脚本将被执行
另见
---
- [Bun 官方文档](https://bun.sh/docs)
- [Bun GitHub 仓库](https://github.com/oven-sh/bun)
- [Bun 快速上手](https://bun.sh/docs/quickstart)

596
docs/chatgpt.md Normal file
View File

@ -0,0 +1,596 @@
ChatGPT
===
ChatGPT是OpenAI开发的人工智能聊天机器人程序利用强化学习训练能够进行复杂的语言任务如文本生成、问答和编程支持。
入门指南
---
### ChatGPT 介绍
ChatGPT全称聊天生成预训练转换器英语Chat Generative Pre-trained Transformer是 OpenAI 开发的人工智能聊天机器人程序于2022年11月推出。
- 网址: <https://chatgpt.com/>
该程序使用基于GPT-3.5、GPT-4、GPT-4o架构的大型语言模型并以强化学习训练。ChatGPT目前仍以文字方式交互而除了可以用人类自然对话方式来交互还可以用于甚为复杂的语言工作包括自动生成文本、自动问答、自动摘要等多种任务。如在自动文本生成方面ChatGPT可以根据输入的文本自动生成类似的文本剧本、歌曲、企划等在自动问答方面ChatGPT可以根据输入的问题自动生成答案。还有编写和调试计算机程序的能力。
### 国内类似的平台
- [文心一言(百度)](https://yiyan.baidu.com/) _baidu.com_
- [通义千问(阿里)](https://tongyi.aliyun.com/) _aliyun.com_
- [混元(腾讯)](https://hunyuan.tencent.com/) _tencent.com_
- [豆包(字节跳动)](https://www.doubao.com/) _doubao.com_
- [天工Ai](https://www.tiangong.cn/) _tiangong.cn_
- [讯飞星火](https://xinghuo.xfyun.cn/) _xfyun.cn_
### 通用
<!--rehype:wrap-class=row-span-2-->
为你的公司或创意命名
```
你能为我的科技初创公司建议一个创意的名字吗?
帮我想一个有吸引力的名字,适合我的面包店生意。
```
为课程或培训项目创建大纲
```
请为初学者网页开发课程创建一个大纲。
能为客户服务研讨会制定一个培训计划大纲吗?
```
为特定职位提供面试问题
```
我在面试软件工程师职位,你能给我一些面试问题吗?
请为市场经理角色提供一些常见的面试问题。
```
为商业伙伴、客户或客户提供礼物想法
```
我需要给我的客户准备礼物,你能帮忙吗?
给我的商业伙伴们一些独特的礼物建议?
```
从名单或电子邮件中随机选择竞赛获奖者
```
我想从100个名字中选择一个获奖者你可以帮忙吗
从1000封电子邮件列表中随机选择5个作为赠品竞赛的获奖者可以吗
```
### 编程
<!--rehype:wrap-class=row-span-3-->
解释代码为什么不工作
```
为什么这段代码不起作用?
var x = 5;
var y = 0;
console.log(x/y);
```
解释代码的含义
```
这段代码是做什么的?
function addNumbers(a, b) {
return a + b;
}
```
用指定的语言重写代码
```
把这段代码翻译成Python
function addNumbers(a, b) {
return a + b;
}
```
编写整个软件程序
```
编写一个计算给定数字阶乘的程序?
如何在JavaScript中发出HTTP请求
```
生成正则表达式regex
```
创建一个匹配所有电子邮件地址的正则表达式?
生成一个匹配8位密码的正则表达式。
```
为代码库添加注释
```
为这段代码添加注释:
function addNumbers(a, b) {
return a + b;
}
```
更改一行代码的CSS
```
更新这行代码的CSS将字体颜色更改为蓝色
<p class="example">Hello, Reference!</p>
```
更改一行代码的HTML
```
给这个标题标签添加一个"class"为"header"的类?
<h1>Hello, Reference!</h1>
```
### 电子邮件
<!--rehype:wrap-class=row-span-2-->
创建电子邮件活动
```
发送邀请小弟调调参加周末晚宴的电子邮件
为我们的新客户入职流程创建电子邮件序列
```
格式化和校对电子邮件
```
校对并格式化我刚写的这封电子邮件:
Hello, do you have any actual tips or tricks for ChatGPT please?
```
<!--rehype:className=wrap-text-->
提供有效电子营销的提示
```
给我一些关于如何提高电子邮件营销开启率和点击率的建议。
请提供一些使我的电子邮件内容对订阅者更具吸引力和相关性的建议。
```
<!--rehype:className=wrap-text-->
自动化电子邮件回复
```
通过电子邮件告知他,"这是一个好建议,很快就会实现"
Hello, do you have any actual tips or tricks for ChatGPT please?
```
<!--rehype:className=wrap-text-->
从文本中提取电子邮件地址
```
为我从下面的文本中提取所有的电子邮件地址:
Sed sit amet sodales tom@gmail.com, at jack@cheatsheets.zip enim. 18261@outlook.com ut eros
```
<!--rehype:className=wrap-text-->
### 电子表格
帮助创建电子表格公式
```
你能帮我创建一个计算A1到A10单元格求和的公式吗
```
解释公式的含义
```
你能简单解释一下 =SUM(A1:A10) 这个公式的含义吗?
```
为占位符创建虚拟数据
```
你能为我生成一些用作电子表格占位符的虚拟数据吗?
```
帮助创建复杂的宏
```
我需要创建一个宏计算B1到B10单元格的平均值并将结果插入到C1单元格中。你能帮我吗
```
<!--rehype:className=wrap-text-->
提供提高电子表格效率的提示
```
你能给我一些提高电子表格效率的建议吗?
```
### 社交媒体
为任何主题提供模板创意
```
你能给我提供一些关于[主题]的模板创意吗?
```
为任何主题的帖子提供互动关联的想法
```
我想创建一个关于[主题]的帖子,能帮我想些创意吗,能吸引我的粉丝参与。
```
<!--rehype:className=wrap-text-->
生成标签和标题
```
我需要一些标签和一段风景日落图片的标题。你能为我生成一些吗?
```
<!--rehype:className=wrap-text-->
提供答复建议
```
我刚收到一条询问[主题]项目状态的消息。你能为我建议一条回复吗?
```
<!--rehype:className=wrap-text-->
### 阅读
总结长文选
```
你能为我总结一下这篇文章吗?[你的文本]
```
翻译外语
```
你能把这句话翻译成中文吗?[你的文本]
```
类似于另一本书的书籍推荐
```
你能推荐一些类似于《饥饿游戏》的书吗?
```
### 设计
为您创建一个AI设计提示
```
能帮我生成一个关于新体育品牌logo设计的设计提示吗
```
缩略图建议用于博客或视频
```
能推荐一些吸引人的缩略图设计吗,用于我最新的视频,内容是健康饮食?
```
<!--rehype:className=wrap-text-->
字体搭配
```
能为旅行博客标题设计建议字体搭配吗?
```
颜色搭配
```
能为婚纱摄影网站推荐一个色彩搭配方案吗?
```
### 数据分析
从大段文本中提取数字
```
请从这段文本中提取所有的数字:[你的文本]
```
根据提供的文本或数据创建表格
```
能根据这些数据创建一个表格吗?:[你的数据]
```
从大列表中筛选数据
```
请根据特定标准筛选这个列表:[你的列表]
```
### 付费广告
提供广告创意建议
```
为新产品发布提供广告创意建议。
```
审核跟踪代码是否有错误(标签管理器等)
```
审查我的标签管理器代码,看看是否有错误。
```
提供广告文案建议
```
请提供一家[主题]公司的广告文案。
```
微博受众建议
```
为服装品牌广告活动推荐一个微博受众。
```
为您的广告创建正文、标题和/或行动号召
```
为新的[主题]计划广告创建标题、正文和行动号召。
```
### SEO
<!--rehype:wrap-class=col-span-2 row-span-2-->
生成或查找关键词
```
为 [主题] 生成一组相关连的关键词
识别 [主题] 内容优化的长尾关键词
查找 [主题] 的热门关键词
为 [主题] 生成一组LSI关键词
查找 [主题] 相关度低的关键词
创建 [主题] 关键词的同义词列表
查找 [主题] PPC广告活动的最佳关键词
查找 [主题] 语音搜索优化的最佳关键词
列出 [主题] 特色片段的最佳关键词
为 [主题] 视频优化找到最佳关键词
查找 [主题] 的最佳关键词
查找 [主题] AMP优化的最佳关键词
查找 [主题] 社交媒体优化的最佳关键词
```
更多关于 SEO 的 ChatGPT 提示
```
为 [主题] 创建元描述和标题标签
查找与 [主题] 相关的内部链接
为 [主题] 的博客文章和文章主题生成创意
研究行业特定术语以用于 [主题] 内容
查找权威网站以获取 [主题] 内容的反向链接
创建与 [主题] 相关的XML站点地图示例
研究 [主题] 的最佳元标签
研究 [主题] 内容的最佳内部链接结构
生成关于 [主题] 的常见问题列表
为与 [主题] 相关的图像创建最佳Alt标签列表
创建与 [主题] 相关的子主题列表
查找发布与 [主题] 相关内容的最佳时间
研究与 [主题] 相关的最佳外部链接策略
查找用于 [主题] SEO 的最受欢迎工具
创建与 [主题] 相关的潜在影响者列表
研究与 [主题] 相关的最佳Schema标记
查找 [主题] 内容的最佳标题标签
创建与 [主题] 相关的潜在链接建设机会列表
研究与 [主题] 反向链接相关的最佳锚文本
创建与 [主题] 相关的潜在客座博客机会列表
研究与 [主题] 相关的最佳本地SEO策略
研究用于 [主题] 网站性能的最佳分析工具
创建与 [主题] 相关的潜在合作伙伴列表
研究用于 [主题] 移动优化的最佳策略
研究用于 [主题] 电子商务优化的最佳策略。提供关键词群集。
创建与 [主题] 相关的潜在联盟营销机会列表
什么是与 [主题] 相关的最佳联盟营销网站?
什么是 [主题] 国际SEO的最佳策略
创建与 [主题] 相关的潜在播客或播客客座机会列表
查找与 [主题] 相关的热门内容主题
研究用于 [主题] SEO 的最佳策略,并提供可操作步骤
创建与 [主题] 相关的潜在视频系列或网络研讨会想法列表
研究与 [主题] 相关的竞争者策略
查找与 [主题] 相关的规范标签示例
为 [主题] 制定一个示例关键词列表,以定位多个地理位置
生成针对 [主题] 客户购买漏斗不同阶段的关键词想法
识别与 [主题] 相关的行业标签
```
### 写作/博客
<!--rehype:wrap-class=row-span-2-->
为您的创意写作项目创建标题
```
我的短篇小说集的标题:[你的文章]
```
创建大纲
```
一篇关于运动的论文大纲。
```
生成内容创意
```
关于[主题]博客的创意?
```
总结您提供的任何文本
```
总结这篇关于可再生能源的文章?[你的文章]
```
撰写完整的博客文章
```
关于【财务规划】的博客文章?
```
扩展句子、段落或长文本选择
```
扩展这句关于爵士音乐的话?[你的句子]
```
改变写作的语气
```
将这份报告的语气改为对话式?[你的文章]
```
校对或编辑您的写作
```
校对这篇文章?[你的文章]
```
使用标题格式化文本(非常适合博客文章)
```
为我的博客文章格式化标题?[你的文章]
```
检查任何文本的偏见
```
检查这篇文章是否有偏见?[你的文章]
```
检测任何文本的抄袭
```
检测这篇论文是否有抄袭?[你的论文]
```
为您提供域名主意
```
为我的【园艺博客】提供一个域名?
```
### 撰写商业内容
撰写或重新撰写您的产品描述
```
请帮我为最新的商品撰写一个新的引人注目的产品描述。
```
撰写或重新撰写申诉信
```
请帮助重新撰写我的申诉信,使其更具说服力。
```
撰写或重新撰写供应商联络邮件
```
能帮我写一封有效的电子邮件,以联系潜在供应商吗?
```
帮助您找到可以打包销售的商品
```
请推荐一些适合我们客户的商品组合。
```
组织产品和定价数据
```
能帮我将产品和定价信息整理成一个整洁易管理的电子表格吗?
```
<!--rehype:className=wrap-text-->
### 教师/课程创建者
将事实或统计数据列表转换为多选测验
```
能将这份关于世界历史事实的列表转换成多选测验吗?[你的列表]
```
<!--rehype:className=wrap-text-->
特定主题的作业创意
```
我需要一些有关[主题]的历史作业的创意。你能建议一些吗?
```
<!--rehype:className=wrap-text-->
根据学生名单创建分组
```
我班上有30名学生名单。你能帮忙将他们分成6人一组做小组项目吗
```
<!--rehype:className=wrap-text-->
基于考试成绩创建曲线
```
我需要根据他们的考试成绩为我的班级创建一个分数曲线。能帮忙吗?
```
<!--rehype:className=wrap-text-->
评分作业
```
能为这篇历史论文打分并提供改进意见吗?
```
### 视频
从剧本中创建时间戳
```
能为这篇播客剧本创建时间戳吗?[视频地址]
```
将视频转换为带格式的博客文章
```
能将这个关于烹饪的视频转换为带有标题和项目符号的博客文章吗?[视频链接]
```
<!--rehype:className=wrap-text-->
提出视频大纲或剧本
```
我需要一个关于冥想益处的视频大纲。你能帮忙吗?
```
回复评论
```
能为我的视频上的这条负面评论写一个有思想的礼貌回复吗?
```
<!--rehype:className=wrap-text-->
为您的缩略图提供创意
```
我需要一些关于"DIY家居装"的创意?
```
### 研究
帮助研究2021年之前发生的任何事情
```
以简单的术语解释量子计算
有没有关于10岁生日的创意想法
如何在JavaScript中发起HTTP请求
可以告诉我导致火山喷发的事件吗?
可以告诉我关于印刷机发明的信息吗?
可以总结一下奥林匹克运动会的历史吗?
可以给我关于文艺复兴的相关信息吗?
我对拜占庭帝国的历史很感兴趣。你能帮我了解更多吗?
等等...
```
## 参考资料
- [Awesome ChatGPT Prompts](https://github.com/f/awesome-chatgpt-prompts)
- [原始资料](https://github.com/Fechin/reference/blob/main/source/_posts/chatgpt.md)
- [ChatGPT](https://chatgpt.com/)

View File

@ -184,10 +184,84 @@ print(3 >= 3); // 打印: true - 大于或等于
print(2 <= 3); // 打印: true - 小于或等于
```
### 运算符优先级示例
```dart
// 括号可以提高可读性。
if ((n % i == 0) && (d % i == 0)) ...
// 虽然难以阅读,但等效。
if (n % i == 0 && d % i == 0) ...
```
### 位运算符和移位运算符
操作符 | 含义
:-|-
`&` | 与AND
`\|` | 或OR
`^` | 异或XOR
`~expr` | 一元位补码<br>_(0 变为 11 变为 0)_
`<<` | 左移
`>>` | 右移
`>>>` | 无符号右移
<!--rehype:className=left-align-->
----
```dart
final value = 0x22;
final bitmask = 0x0f;
// 与AND
assert((value & bitmask) == 0x02);
// 非与AND NOT
assert((value & ~bitmask) == 0x20);
// 或OR
assert((value | bitmask) == 0x2f);
// 异或XOR
assert((value ^ bitmask) == 0x2d);
assert((value << 4) == 0x220); // 左移
assert((value >> 4) == 0x02); // 右移
```
### 级联表示法
级联 (.., ?..) 允许您对同一对象进行一系列操作。除了访问实例成员之外,您还可以调用同一对象的实例方法。这通常可以节省您创建临时变量的步骤,并允许您编写更流畅的代码。考虑以下代码:
```dart
var paint = Paint()
..color = Colors.black
..strokeCap = StrokeCap.round
..strokeWidth = 5.0;
```
示例相当于以下代码:
```dart
var paint = Paint();
paint.color = Colors.black;
paint.strokeCap = StrokeCap.round;
paint.strokeWidth = 5.0;
```
`?...`开头可确保不会对该空对象进行任何级联操作。
```dart
querySelector('#confirm') // 获取一个对象
?..text = 'Confirm' // 使用它的成员
..classes.add('important')
..onClick.listen((e) => {
window.alert('Confirmed!')
})
..scrollIntoView();
```
控制流:条件
------
### if 和 else if
<!--rehype:wrap-class=row-span-2-->
```dart
if(age < 18){
@ -200,11 +274,12 @@ if(age < 18){
```
### switch case
<!--rehype:wrap-class=row-span-2-->
```dart
enum Pet {dog, cat}
Pet myPet = Pet.dog;
switch(myPet){
switch(myPet) {
case Pet.dog:
print('My Pet is Dog.');
break;
@ -217,6 +292,25 @@ switch(myPet){
// 打印: My Pet is Dog.
```
### 三元操作符
```dart
int age = 20;
String message = age >= 18 ? "成人" : "儿童";
print("年龄类别: $message");
// 输出: 年龄类别: 成人
```
### 三元操作符嵌套使用
```dart
int x = 10;
int y = 5;
int result = x > y ? x : y > 0 ? y : 0;
print("Result: $result");
// 输出: Result: 10
```
控制流:循环
-----
@ -778,8 +872,50 @@ userObject?.userName?.toString()
// 如果 userObject 或 userObject.userName 为 null则前面的代码返回 null 并且从不调用 toString()
```
### 扩展运算符 (...)
```dart
// 将多个值插入到集合中
var list = [1, 2, 3];
var list2 = [0, ...list];
print(list2.length); // 打印: 4
```
### enum
<!--rehype:wrap-class=col-span-2 row-span-2-->
定义enum"enumeration"的缩写)是一种特殊的数据类型,可使变量成为一组预定义的常量。枚举用于定义只能从一小组可能值中选择一个的变量。通过为这些值集提供有意义的名称,枚举有助于提高代码的可读性,减少出错率。
```dart
// 定义枚举类型
enum TrafficLight {
red,
yellow,
green
}
// 根据交通灯状态打印消息的函数
void printTrafficLightMessage(TrafficLight light) {
switch (light) {
case TrafficLight.red:
print('Stop!');
break;
case TrafficLight.yellow:
print('Get ready...');
break;
case TrafficLight.green:
print('Go!');
break;
}
}
void main() {
// 枚举类型的示例用法
TrafficLight currentLight = TrafficLight.green;
// 打印当前交通灯状态的消息
printTrafficLightMessage(currentLight);
}
```
### 级联符号 (..)
<!--rehype:wrap-class=row-span-2-->
```dart
// 允许您对同一对象进行一系列操作
@ -795,15 +931,6 @@ var user = User()
..age = 24;
```
### 扩展运算符 (...)
```dart
// 将多个值插入到集合中
var list = [1, 2, 3];
var list2 = [0, ...list];
print(list2.length); // 打印: 4
```
### 延迟初始化
```dart
@ -812,7 +939,7 @@ late String token;
void main(List<String> args) {
/// print(token);
/// Field 'token' has not been initialized
/// 字段 "token "尚未初始化
/// 在初始化前调用就会报错
token = "tokenContent";
print(token);

660
docs/docker-compose.md Normal file
View File

@ -0,0 +1,660 @@
Docker Compose 备忘清单
===
这是 [docker-compose](https://docs.docker.com/compose/) 的快速参考备忘单。你可以在这里找到最常见的 Docker Compose 使用方式。
入门
---
### Docker Compose 是什么?
- `Docker-compsoe` 是一个开源项目,用于定义和运行多容器 `Docker` 应用程序的工具。由 `Docker` 社区维护。
- 通过一个 `YAML` 文件来配置应用程序的服务,以便可以使用一个命令启动、停止和重启整个应用程序。
- [Docker Compose 开源地址](https://github.com/docker/compose)
- [Docker Compose 发行地址](https://github.com/docker/compose/releases) _github.com_
### 基本概念
- **服务 (services):** 一个服务指的是一个容器,即一个应用程序的一个实例。
- **容器 (container):** `Docker` 容器,其中运行着应用程序的一个实例。
- **镜像 (image):** `Docker` 镜像,用于创建容器的模板。
- **Docker-Compose 文件:** 一个 `YAML` 文件,描述了应用程序的各个服务以及它们之间的关系、配置等信息。
### Docker-Compose 文件结构
- `version`: _Docker-Compose_ 文件的版本。
- `services`: 定义了各个服务,每个服务都有自己的配置项,如镜像、端口映射、依赖等。
- `networks`: 定义了应用程序使用的网络,可以自定义网络以控制服务之间的通信。
- `volumes`: 定义了应用程序使用的卷,用于持久化数据或与主机共享文件。
### 安装
<!--rehype:wrap-class=row-span-2-->
对于 Ubuntu 和 Debian运行
```bash
sudo apt-get update
sudo apt-get install docker-compose-plugin
```
对于基于 RPM 的发行版,运行:
```bash
sudo yum update
sudo yum install docker-compose-plugin
```
通过检查版本来验证 Docker Compose 是否正确安装
```sh
docker compose version
# Docker Compose version v2.17.3
docker --version
# Docker version 23.0.5, build bc4487a
docker version
# Client: Docker Engine - Community
# Cloud integration: v1.0.31
# Version: 23.0.5
# API version: 1.42
# <...>
```
### 独立安装 Compose
```sh
curl -SL https://github.com/docker/compose/releases/download/v2.27.0/docker-compose-linux-x86_64 -o /usr/local/bin/docker-compose
```
<!--rehype:className=wrap-text-->
如果命令 `docker-compose` 安装失败,请检查你的路径。你也可以创建一个符号链接,指向 `/usr/bin` 或路径中的任何其他目录。例如
```sh
$ sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
```
<!--rehype:className=wrap-text-->
### 更新 Compose
对于 Ubuntu 和 Debian运行
```sh
sudo apt-get update
sudo apt-get install docker-compose-plugin
```
对于基于 RPM 的发行版,运行:
```sh
sudo yum update
sudo yum install docker-compose-plugin
```
### 卸载 Docker Compose
<!--rehype:wrap-class=col-span-2-->
Ubuntu, Debian:
```sh
sudo apt-get remove docker-compose-plugin
```
基于 RPM 的发行版
```sh
sudo yum remove docker-compose-plugin
```
如果您使用curl安装Compose CLI插件要卸载它请运行
```sh
rm $DOCKER_CONFIG/cli-plugins/docker-compose
```
为所有用户删除,或者,如果您已为所有用户安装 Compose请运行
```sh
rm /usr/local/lib/docker/cli-plugins/docker-compose
```
### 检查 Compose 的安装位置
<!--rehype:wrap-class=col-span-3-->
```sh
docker info --format '{{range .ClientInfo.Plugins}}{{if eq .Name "compose"}}{{.Path}}{{end}}{{end}}'
```
### 常用命令
<!--rehype:wrap-class=col-span-2-->
| docker compose命令 | 说明 | 常见参数说明 |
| ------------------------ | ---------------- | -------------------- |
| `docker compose up` | 启动容器 | `-d` 后台运行容器 |
| `docker compose down` | 停止容器 | `-v` 删除容器和卷 |
| `docker compose logs` | 查看容器日志 | `-f` 跟随日志输出 |
| `docker compose exec` | 进入容器 | `-it` 启动交互式终端 |
| `docker compose pull` | 拉取镜像 | |
| `docker compose build` | 构建镜像 | |
| `docker compose images` | 列出镜像 | |
| `docker compose push` | 推送镜像 | |
| `docker compose config` | 显示配置信息 | |
| `docker compose version` | 查看版本信息 | |
<!--rehype:className=left-align-->
### 常用运维命令
| docker compose命令 | 说明 |
| ------------------------ | ---------------- |
| `docker compose stop` | 停止容器 |
| `docker compose start` | 启动容器 |
| `docker compose rm` | 删除容器 |
| `docker compose restart` | 重启容器 |
| `docker compose run` | 运行一个临时容器 |
| `docker compose ps` | 查看容器状态 |
<!--rehype:className=left-align-->
Docker Compose 配置
---
### 示例配置文件
<!--rehype:wrap-class=col-span-2-->
`docker-compose` 的配置文件是一个 `YAML` 文件,用于定义和运行多容器 Docker 应用程序。通常命名为 `docker-compose.yml`,它使用单一的 YAML 文件来定义多个容器的集合,以及它们之间的依赖关系和服务。以下是一份 `docker-compose.yml` 文件的配置模板,包含了常用配置项和解释:
```yml
name: myapp
version: '3' # 已过时
services: # 定义一个或多个服务
service1: # 服务名称
image: nginx:latest # 使用的 Docker 镜像,这里是 Nginx 的最新版本
# 或者使用构建指令来从 Dockerfile 构建镜像
build:
context: ./path/to/Dockerfile # Dockerfile 所在的目录
dockerfile: Dockerfile-alternative # 可选的 Dockerfile 名称,默认是 Dockerfile
# 容器启动时执行的命令,覆盖默认的命令
command:
- "nginx"
- "-g"
- "daemon off;" # 以数组形式指定,防止 shell 解析
ports: # 容器端口与主机端口映射
- "80:80" # 主机 80 端口映射到容器的 80 端口
volumes: # 数据卷挂载
- ./nginx.conf:/etc/nginx/nginx.conf:ro # 将主机上的 nginx.conf
# 挂载到容器的 /etc/nginx/nginx.conf只读
- ./logs:/var/log/nginx # 将 logs 目录挂载到容器的 /var/log/nginx
environment: # 设置环境变量
- MYSQL_HOST=database # 可以引用其他服务,这里假设有一个名为 database 的服务
- MYSQL_PORT=3306
depends_on: # 服务启动顺序,这里表明 service1 依赖于 database 服务
- database
networks: # 定义网络
- my_network # 参与名为 my_network 的网络
service2: # 另一个服务示例
# ... 类似地定义其他服务
networks: # 定义网络
my_network: # 网络名称
driver: bridge # 网络驱动,通常是 bridge 模式
volumes: # 定义数据卷
nginx_logs: # 卷名称
```
备忘录事项
- 使用 Docker-Compose 可以简化多容器应用程序的部署和管理,但需要注意容器之间的依赖关系和通信。
- 配置文件中的缩进必须使用空格,不能使用制表符。
- 可以使用环境变量来动态设置配置项,如数据库密码。
- 当你修改了 `docker-compose.yml` 文件后,需要重新运行 `docker-compose up` 来使改动生效。
- 使用 `docker-compose build` 仅重建镜像,而不启动容器。
- 使用 `docker-compose restart` 重启容器。
- 记得清理不再需要的容器和镜像,以避免磁盘空间不足。
### 使用环境变量
`docker run -e VARIABLE=VALUE ...` 相同
```yml
web:
environment:
- DEBUG=1
```
您可以选择不设置值并将环境变量从 shell 直接传递到容器。它的工作方式与 `docker run -e VARIABLE ...` 相同:
```yml
web:
environment:
- DEBUG
web:
environment:
- DEBUG=${DEBUG}
```
`env_file` 属性允许您在 Compose 应用程序中使用多个 `.env` 文件。
它的工作方式与 `docker run --env-file=FILE ...` 相同。
```yml
web:
env_file:
- web-variables.env
```
#### 额外的信息
```yml
env_file:
- path: ./default.env
required: true # default
- path: ./override.env
required: false
```
- 如果指定了多个文件,则它们将按顺序进行评估,可以覆盖先前文件中设置的值。
-`.env` 文件中声明的环境变量不能在 Compose 文件中单独再次引用。
- 如果同时使用 `env_file``environment` 属性,则由 `environment` 设置的环境变量优先级更高。
-`env_file` 属性中指定的 `.env` 文件的路径是相对于 compose.yml 文件的位置的。
- `.env` 文件中的值可以通过使用 `docker compose run -e` 命令行来从命令行覆盖。
- 如果使用 `--env-file` 替换了另一个 `.env`,则您的 `.env` 文件可以被另一个 `.env` 文件覆盖。
- 从 Docker Compose 版本 2.24.0 开始,您可以通过使用 `required` 字段将 `.env` 文件设置为可选项。当 `required` 设置为 `false``.env` 文件丢失时Compose 将静默忽略该条目
### image
```yml
image: redis
image: redis:5
image: redis@sha256:0ed5d5928d473745...
image: library/redis
image: docker.io/library/redis
image: my_private.registry:5000/redis
```
### ports 端口
<!--rehype:wrap-class=col-span-2 row-span-2-->
```yml
ports:
# 将容器的端口 3000 映射到主机的随机端口
- "3000"
# 将容器的端口范围从 3000 到 3005 映射到主机的相同端口范围
- "3000-3005"
# 将容器的端口 8000 映射到主机的端口 8000
- "8000:8000"
# 将容器的端口范围从 8080 到 8081 映射到主机的端口范围从 9090 到 9091
- "9090-9091:8080-8081"
# 将容器的端口 22SSH端口映射到主机的端口 49100
- "49100:22"
# 将容器的端口范围从 8000 到 9000 映射到主机的端口 80
- "8000-9000:80"
# 将容器的端口 8001 映射到主机的 127.0.0.1 地址的端口 8001
- "127.0.0.1:8001:8001"
# 将容器的端口范围从 5000 到 5010 映射到主机的 127.0.0.1 地址的相同端口范围
- "127.0.0.1:5000-5010:5000-5010"
# 将容器的 UDP 端口 6060 映射到主机的端口 6060
- "6060:6060/udp"
```
暴露容器端口
### platform 平台
```yml
platform: darwin
platform: windows/amd64
platform: linux/arm64/v8
```
定义了服务容器运行的目标平台。值必须符合 [OCI Image Spec](https://github.com/opencontainers/image-spec/blob/v1.0.2/image-index.md) 使用的约定
### command
<!--rehype:wrap-class=col-span-2-->
会覆盖容器镜像声明的默认命令,例如 Dockerfile 的 CMD。
```yml
command: bundle exec thin -p 3000
```
该值也可以是一个列表,其方式类似于 Dockerfile
```yml
command: [ "bundle", "exec", "thin", "-p", "3000" ]
```
如果该值为 null则使用映像中的默认命令。如果值为 [](空列表)或 ''(空字符串),则忽略图像声明的默认命令,即覆盖为空。
### depends_on
```yml
services:
web:
build: .
depends_on:
- db
- redis
redis:
image: redis
db:
image: postgres
```
服务之间的启动和关闭依赖关系。
### volumes
<!--rehype:wrap-class=col-span-2-->
下面的示例显示了双服务设置,其中数据库的数据目录作为名为 db-data 的卷与另一个服务共享,以便定期备份。
```yml
services:
backend:
image: example/database
volumes:
- db-data:/etc/data
backup:
image: backup-service
volumes:
- db-data:/var/lib/backup/data
volumes:
db-data:
```
db-data 卷安装在 `/var/lib/backup/data``/etc/data` 容器路径中,分别用于备份和后端。如果卷尚不存在,则运行 `docker compose up` 会创建该卷。否则,如果在 Compose 外部手动删除现有卷,则会使用并重新创建现有卷。
#### driver
指定应使用哪个卷驱动程序。如果驱动程序不可用Compose 将返回错误并且不会部署应用程序。
```yml
volumes:
db-data:
driver: foobar
```
#### driver_opts
指定一个选项列表,作为键值对传递给此卷的驱动程序。这些选项取决于驾驶员。
```yml
volumes:
example:
driver_opts:
type: "nfs"
o: "addr=10.40.0.199,nolock,soft,rw"
device: ":/docker/example"
```
#### external
```yml
services:
backend:
image: example/database
volumes:
- db-data:/etc/data
volumes:
db-data:
external: true
```
在示例中Compose 不会尝试创建名为 `{project_name}_db-data` 的卷,而是查找名为 `db-data` 的现有卷,并将其挂载到后端服务的容器中。
#### labels
标签用于将元数据添加到卷中。您可以使用数组或字典。
```yml
volumes:
db-data:
labels:
com.example.description: "Database volume"
com.example.department: "IT/Ops"
com.example.label-with-empty-value: ""
```
```yml
volumes:
db-data:
labels:
- "com.demo.description=Database volume"
- "com.demo.department=IT/Ops"
- "com.demo.label-with-empty-value"
```
#### name
设置卷的自定义名称。名称字段可用于引用包含特殊字符的卷。该名称按原样使用,并且不受堆栈名称的限制。
```yml
volumes:
db-data:
name: "my-app-data"
```
这使得可以将此查找名称作为 Compose 文件的参数,以便卷的模型 ID 被硬编码,但平台上的实际卷 ID 是在部署期间在运行时设置的。例如,如果 `.env` 文件中的 `DATABASE_VOLUME=my_volume_001`
```yml
volumes:
db-data:
name: ${DATABASE_VOLUME}
```
它还可以与外部属性结合使用。这意味着用于在平台上查找实际卷的卷名称与用于在 Compose 文件中引用它的名称分开设置:
```yml
volumes:
db-data:
external:
name: actual-name-of-volume
```
### networks
<!--rehype:wrap-class=row-span-3-->
```yml
services:
some-service:
networks:
- some-network
- other-network
```
#### aliases
声明网络上服务的替代主机名。同一网络上的其他容器可以使用服务名称或别名来连接到服务的容器之一
```yml
services:
some-service:
networks:
some-network:
aliases:
- alias1
- alias3
other-network:
aliases:
- alias2
```
在以下示例中,服务前端能够通过主机名 `backend` 或者 `back-tier` 网络上的数据库来访问 `backend` 服务。服务 `monitoring` 能够在 admin 网络上通过主机名 `backend` 或者 `mysql` 来访问相同的 `backend` 服务。
```yml
services:
frontend:
image: example/webapp
networks:
- front-tier
- back-tier
monitoring:
image: example/monitoring
networks:
- admin
backend:
image: example/backend
networks:
back-tier:
aliases:
- database
admin:
aliases:
- mysql
networks:
front-tier:
back-tier:
admin:
```
#### ipv4_address, ipv6_address
加入网络时为服务容器指定静态IP地址。
```yml
services:
frontend:
image: example/webapp
networks:
front-tier:
ipv4_address: 172.16.238.10
ipv6_address: 2001:3984:3989::10
networks:
front-tier:
ipam:
driver: default
config:
- subnet: "172.16.238.0/24"
- subnet: "2001:3984:3989::/64"
```
#### link_local_ips
指定了链接本地IP的列表。链路本地IP是属于知名子网的特殊IP纯粹由运营商管理通常取决于部署它们的架构。
```yml
services:
app:
image: busybox
command: top
networks:
app_net:
link_local_ips:
- 57.123.22.11
- 57.123.22.13
networks:
app_net:
driver: bridge
```
#### mac_address
设置服务容器连接特定网络时使用的 MAC 地址。
#### priority 优先级
将服务的容器连接到其网络的顺序。如果未指定,默认值为 0。在以下示例中应用服务首先连接到 `app_net_1`,因为它具有最高优先级。然后它连接到 `app_net_3`,然后是 `app_net_2`,后者使用默认优先级值 0。
```yml
services:
app:
image: busybox
command: top
networks:
app_net_1:
priority: 1000
app_net_2:
app_net_3:
priority: 100
networks:
app_net_1:
app_net_2:
app_net_3:
```
### expose
```yml
expose:
- "3000"
- "8000"
- "8080-8085/tcp"
```
定义 Compose 从容器公开的(传入)端口或端口范围。这些端口必须可供链接服务访问,并且不应发布到主机。只能指定内部容器端口。
### links
```yml
web:
links:
- db
- db:database
- redis
```
定义到另一个服务中的容器的网络链接。同时指定服务名称和链接别名 (SERVICE:ALIAS),或者仅指定服务名称。
### pids_limit
```yml
pids_limit: 10
```
调整容器的 PID 限制。设置为 -1 以获取无限 PID。
### devices
```yml
devices:
- "/dev/ttyUSB0:/dev/ttyUSB0"
- "/dev/sda:/dev/xvda:rwm"
```
定义已创建容器的设备映射列表
```sh
HOST_PATH:CONTAINER_PATH[:CGROUP_PERMISSIONS]
```
### dns
```yml
dns: 8.8.8.8
dns:
- 8.8.8.8
- 9.9.9.9
```
定义在容器网络接口配置上设置的自定义 DNS 服务器。它可以是单个值或列表。
### dns_opt
```yml
dns_opt:
- use-vc
- no-tld-query
```
列出要传递给容器的 DNS 解析器Linux 上的 /etc/resolv.conf 文件)的自定义 DNS 选项。
### dns_search
```yml
dns_search: example.com
dns_search:
- dc1.example.com
- dc2.example.com
```
定义在容器网络接口配置上设置的自定义 DNS 搜索域。它可以是单个值或列表。

450
docs/erlang.md Normal file
View File

@ -0,0 +1,450 @@
Erlang 备忘清单
===
[Erlang](https://www.erlang.org/) 是一种用于构建并发、分布式和容错系统的编程语言。以下是一些常用的命令和操作。
入门
---
### 启动 Erlang Shell
```shell
erl
```
### 编译代码
<!--rehype:wrap-class=row-span-2-->
```shell
# 在 Erlang Shell 中编译
c(module).
# 在命令行中编译
erlc module.erl
```
### 运行代码
<!--rehype:wrap-class=row-span-2-->
```shell
# 在 Erlang Shell 中运行
module:function().
# 从命令行运行
erl -noshell -s module function -s init stop
```
### 退出 Erlang Shell
```shell
q().
```
代码结构
---
### 模块定义
```erlang
-module(module_name).
-export([function_name/arity, ...]).
function_name(Args) ->
% Function body.
Result.
```
### 导出函数
```erlang
-export([function1/0, function2/1]).
```
### 注释
```erlang
% 单行注释
% 这是一个注释
```
### 变量
```erlang
VarName = Value. % 变量名必须以大写字母开头
Age = 25.
Name = "Alice".
```
数据类型
---
### 原子
```erlang
atom. % 例子atom, 'Atom with spaces'
```
### 数字
```erlang
123. % 整数
3.14. % 浮点数
```
### 布尔值
```erlang
true.
false.
```
### 字符串
```erlang
"Hello, World!".
```
### 元组
```erlang
{ok, "Success"}.
```
### 列表
```erlang
[1, 2, 3].
[H|T] = [1, 2, 3]. % H = 1, T = [2, 3]
```
### 字典 (Map)
```erlang
#{key1 => value1, key2 => value2}.
```
控制结构
---
### 条件语句
```erlang
if
Condition1 -> Expression1;
Condition2 -> Expression2;
true -> DefaultExpression
end.
```
### case 表达式
```erlang
case Expression of
Pattern1 -> Expression1;
Pattern2 -> Expression2;
_ -> DefaultExpression
end.
```
### 函数定义
```erlang
% 无参函数
my_function() ->
ok.
% 有参函数
add(A, B) ->
A + B.
```
列表操作
---
### 列表生成
```erlang
% 生成 1 到 10 的列表
[ X || X <- lists:seq(1, 10)].
% 生成 1 到 10 中的偶数
[ X || X <- lists:seq(1, 10), X rem 2 == 0].
```
并发
---
### 启动进程
```erlang
spawn(Module, Function, Args).
% 示例
Pid = spawn(fun() -> io:format("Hello from process~n") end).
```
### 发送消息
```erlang
Pid ! Message.
% 示例
Pid ! {hello, self()}.
```
### 接收消息
```erlang
receive
Pattern1 -> Expression1;
Pattern2 -> Expression2;
after Timeout -> TimeoutExpression
end.
```
### 模式匹配
```erlang
{ok, Value} = {ok, 42}.
```
常用内置函数 (BIFs)
---
### 列表操作
```erlang
lists:append(List1, List2).
lists:map(Function, List).
lists:filter(Function, List).
lists:foldl(Function, Acc, List).
```
### 元组操作
```erlang
element(N, Tuple).
setelement(N, Tuple, Value).
tuple_size(Tuple).
```
### 字符串操作
```erlang
string:len(String).
string:concat(String1, String2).
string:tokens(String, Delimiters).
```
### 文件操作
```erlang
file:read_file(Filename).
file:write_file(Filename, Data).
file:delete(Filename).
```
### 列表操作
```erlang
lists:map(fun(X) -> X * 2 end, [1, 2, 3]).
lists:filter(fun(X) -> X rem 2 == 0 end, [1, 2, 3, 4]).
```
### 字符串操作
```erlang
string:len("Hello").
string:upper("hello").
```
### 文件操作
```erlang
{ok, File} = file:open("test.txt", [write]).
file:write(File, "Hello, file!").
file:close(File).
```
### 示例:简单的服务器
```erlang
-module(server).
-export([start/0, loop/0]).
start() ->
spawn(fun loop/0).
loop() ->
receive
{echo, Msg} ->
io:format("Echo: ~p~n", [Msg]),
loop();
stop ->
io:format("Server stopping~n"),
ok;
_ ->
io:format("Unknown message~n"),
loop()
end.
```
并发编程
---
### 创建进程
```erlang
Pid = spawn(Module, Function, Args).
```
### 发送消息
```erlang
Pid ! Message.
```
### 接收消息
```erlang
receive
Pattern1 -> Actions1;
Pattern2 -> Actions2;
...
end.
```
### 链接进程
```erlang
link(Pid).
unlink(Pid).
```
### 监控进程
```erlang
MonitorRef = erlang:monitor(process, Pid).
erlang:demonitor(MonitorRef).
```
错误处理
---
### 捕获异常
```erlang
try Expression of
Pattern -> Result
catch
Class:Reason -> Handler
end.
```
### 常见异常类型
- `throw`
- `error`
- `exit`
### 错误处理
```erlang
try Expression of
Pattern -> Result
catch
Type:Reason -> ErrorHandlingExpression
end.
```
分布式编程
---
### 启动分布式节点
```shell
erl -name nodename@hostname -setcookie Cookie
```
### 连接节点
```erlang
net_adm:ping(Node).
```
### 发送消息到远程节点
```erlang
{remote_process, 'remote_node@host'} ! Message.
```
OTP 框架
---
### 定义 GenServer
```erlang
-module(my_gen_server).
-behaviour(gen_server).
-export([start_link/0, init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]).
start_link() ->
gen_server:start_link({local, ?MODULE}, ?MODULE, [], []).
init([]) ->
{ok, #state{}}.
handle_call(Request, From, State) ->
{reply, Reply, State}.
handle_cast(Msg, State) ->
{noreply, State}.
handle_info(Info, State) ->
{noreply, State}.
terminate(Reason, State) ->
ok.
code_change(OldVsn, State, Extra) ->
{ok, State}.
```
### 使用 GenServer
```erlang
gen_server:start_link({local, Name}, Module, Args, Options).
gen_server:call(ServerRef, Request).
gen_server:cast(ServerRef, Msg).
```
测试
---
### 编写 EUnit 测试
```erlang
-module(module_name_tests).
-include_lib("eunit/include/eunit.hrl").
simple_test() ->
?assertEqual(Expected, Actual).
complex_test_() ->
[
{"Test case 1", ?_assertEqual(Expected1, Actual1)},
{"Test case 2", ?_assertEqual(Expected2, Actual2)}
].
```
### 运行 EUnit 测试
```shell
# 在命令行中运行
erl -eval "eunit:test(module_name)" -s init stop
```
另见
---
- [Erlang 官方文档](https://www.erlang.org/docs)
- [Erlang 编程书籍](https://learnyousomeerlang.com/content)

View File

@ -857,7 +857,7 @@ steps:
<!--rehype:className=style-list-->
### 在 Github 中创建 Docker 镜像
<!--rehype:wrap-class=row-span-3-->
<!--rehype:wrap-class=row-span-2 col-span-2-->
```yml
- name: Set up Docker Buildx
@ -887,8 +887,19 @@ steps:
tags: ghcr.io/jaywcjlove/reference:${{steps.changelog.outputs.version}}
```
### 生成贡献者头像列表
```yml
- name: Generate Contributors Images
uses: jaywcjlove/github-action-contributors@main
id: contributors
with:
output: dist/CONTRIBUTORS.svg
avatarSize: 42
```
### 在 Docker Hub 中创建 Docker 镜像
<!--rehype:wrap-class=row-span-3-->
<!--rehype:wrap-class=row-span-3 col-span-2-->
```yml
- name: Set up Docker Buildx
@ -926,28 +937,27 @@ steps:
node-version: 16
```
### 生成贡献者头像列表
```yml
- name: Generate Contributors Images
uses: jaywcjlove/github-action-contributors@main
id: contributors
with:
output: dist/CONTRIBUTORS.svg
avatarSize: 42
```
### 忽略失败
```yml
- run: npm publish
continue-on-error: true
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
```
当 `npm` 推送包失败不影响整个流程,可用于自动发包
### 安装 yarn
```yml
- name: Setup Yarn
uses: threeal/setup-yarn-action@v2.0.0
with:
cache: false
version: 1.22.21
```
GitLab CI/CD 迁移到 GitHub Actions
---

814
docs/glances.md Normal file
View File

@ -0,0 +1,814 @@
Glances 备忘清单
===
这是开始使用 [Glances](https://glances.readthedocs.io/en/latest/) 系统监控工具的快速参考备忘单,可以帮助用户监视系统的各种性能指标
入门
----
### 功能特点
<!--rehype:wrap-class=row-span-2-->
#### 跨平台支持
- `Glances` 支持多种操作系统,包括 Linux、Windows、macOS 和 FreeBSD。
#### 多种输出方式
- `命令行界面CLI`:通过终端查看系统监控数据。
- `Web 界面`:通过浏览器访问并查看系统性能指标。
- `API 输出`:可以将数据通过 REST API 或者 MQTT 传输到其他系统或服务。
#### 详细的系统监控
- `CPU`:实时显示 CPU 的使用率、每个核心的负载情况。
- `内存`:显示总内存、已用内存、缓存和交换分区的使用情况。
- `磁盘 I/O`:显示磁盘的读写速度和 I/O 操作数。
- `网络带宽`:显示网络接口的上传和下载速度。
- `文件系统`:显示各个挂载点的使用情况。
- `传感器`:显示系统温度、风扇速度等传感器数据(需要支持的硬件和驱动)。
#### 扩展功能
- `插件系统`:支持通过插件扩展功能,可以自定义监控指标。
- `导出数据`:支持将监控数据导出为 CSV、JSON 等格式。
- `报警系统`:可以设置报警,当某些指标超过设定阈值时触发通知。
### 安装
#### **通过 pip 安装**
```sh
pip install glances
```
#### **通过包管理器安装**
**Debian/Ubuntu**:
```sh
sudo apt-get install glances
```
**Fedora**:
```sh
sudo dnf install glances
```
**macOS (使用 Homebrew)**:
```sh
brew install glances
```
### 配置文件
Glances 的配置文件位于 `~/.config/glances/glances.conf`。通过编辑这个文件,可以自定义 Glances 的显示和行为。
#### 例子配置文件
```ini
[global]
refresh=2 # 设置刷新间隔(以秒为单位)
[cpu]
enable=true # 显示 CPU 负载平均值
[mem]
enable=true # 显示内存使用情况
[disk]
enable=true # 显示磁盘 I/O 信息
[network]
enable=true # 显示网络带宽使用情况
```
### Web 访问
```sh
# 使用 Glances 的 API
glances -w
# 访问 API
curl http://<your_ip>:61208/api/3/all
```
**使用 Docker 部署 Glances**
```sh
docker run --rm \
-v /var/run/docker.sock:/var/run/docker.sock:ro \
-v /glances/conf:/glances/conf:ro \
-v /glances/data:/glances/data:rw \
-p 61208-61209:61208-61209 \
--name glances nicolargo/glances
```
### 使用方法
#### **启动命令行界面**
```sh
glances
```
#### **启动 Web 界面**
```sh
glances -w
```
启动后,通过浏览器访问 `http://<your_ip>:61208` 查看系统监控数据。
#### **启动以特定模式输出**
```sh
glances --export json # JSON 输出
glances --export csv # CSV 输出
```
命令行选项
---
### 命令行选项
:- | :-
:- | :-
`-h`, `--help` | 显示此帮助信息并退出
`-V`, `--version` | 显示程序版本号并退出
`-d`, `--debug` | 启用调试模式
`-C CONF_FILE`, `--config CONF_FILE` | 配置文件的路径
`--modules-list` | 显示模块(插件和导出)列表并退出
`--stdout PLUGINS_STATS` | 显示插件统计信息到标准输出(用逗号分隔的插件/插件属性列表)
<!--rehype:className=style-list-->
### 禁用启用选项
<!--rehype:wrap-class=row-span-2-->
:- | :-
:- | :-
`--disable-plugin PLUGIN` | 禁用插件(用逗号分隔的列表)
`--enable-plugin PLUGIN` | 启用插件(用逗号分隔的列表)
`--disable-process` | 禁用进程模块减少Glances的CPU消耗
`--disable-webui` | 禁用Web界面仅响应RESTful API
`--enable-history` | 启用历史模式
`--disable-bold` | 禁用终端中的粗体模式
`--disable-bg` | 禁用终端中的背景颜色
`--enable-process-extended` | 启用顶级进程的扩展统计
`--disable-check-update` | 禁用在线Glances版本检查
`--disable-autodiscover` | 禁用自动发现功能
`--light`, `--enable-light` | Curses UI的轻量模式仅启用顶部菜单
`-q`, `--quiet` | 不显示 curses 界面
<!--rehype:className=style-list-->
### SNMP
:- | :-
:- | :-
`--snmp-community SNMP_COMMUNITY` | SNMP社区
`--snmp-port SNMP_PORT` | SNMP端口
`--snmp-version SNMP_VERSION` | SNMP版本1, 2c 或 3
`--snmp-user SNMP_USER` | SNMP用户名仅适用于SNMPv3
`--snmp-auth SNMP_AUTH` | SNMP认证密钥仅适用于SNMPv3
`--snmp-force` | 强制SNMP模式
<!--rehype:className=style-list-->
### 命令行选项
:- | :-
:- | :-
`--export EXPORT`| 启用导出模块(用逗号分隔的列表)
`--export-csv-file EXPORT_CSV_FILE` | CSV导出文件路径
`--export-json-file EXPORT_JSON_FILE`| JSON导出文件路径
<!--rehype:className=style-list-->
### 命令行选项
:- | :-
:- | :-
`-0`, `--disable-irix` | 任务的CPU使用率将按CPU总数进行划分
`-1`, `--percpu` | 以每个CPU模式启动Glances
`-2`, `--disable-left-sidebar` | 禁用网络、磁盘I/O、文件系统和传感器模块
`-3`, `--disable-quicklook` | 禁用快速查看模块
`-4`, `--full-quicklook` | 仅启用快速查看和负载模块
`-5`, `--disable-top` | 禁用顶部菜单快速查看、CPU、内存、交换区和负载
`-6`, `--meangpu` | 以平均GPU模式启动Glances
<!--rehype:className=style-list-->
### 命令行选项
:- | :-
:- | :-
`-c CLIENT`, `--client CLIENT` | 通过IPv4/IPv6地址、主机名或主机名:端口连接到Glances服务器
`-s`, `--server` | 以服务器模式运行Glances
`--browser` | 启动客户端浏览器(服务器列表)
`-p PORT`, `--port PORT` | 定义客户端/服务器TCP端口 \[默认61209]
`-B BIND_ADDRESS`, `--bind BIND_ADDRESS` | 将服务器绑定到给定的IPv4/IPv6地址或主机名
`--username` | 定义客户端/服务器用户名
`--password` | 定义客户端/服务器密码
<!--rehype:className=style-list-->
### 命令行选项
:- | :-
:- | :-
`-t TIME`, `--time TIME` | 设置刷新时间(秒)\[默认3秒]
`-w`, `--webserver` | 以Web服务器模式运行Glances需要bottle库
`--cached-time CACHED_TIME` | 设置服务器缓存时间 \[默认1秒]
`--open-web-browser` | 尝试在默认的 Web 浏览器中打开Web界面
`-f PROCESS_FILTER`, `--process-filter PROCESS_FILTER` | 设置进程过滤模式(正则表达式)
`--process-short-name` | 强制使用进程名称的短名称
`--hide-kernel-threads` | 在进程列表中隐藏内核线程Windows不可用
<!--rehype:className=style-list-->
### 命令行选项
:- | :-
:- | :-
`-b`, `--byte` | 以每秒字节数显示网络速率
`--diskio-show-ramfs` | 在 DiskIO 插件中显示RAM文件系统
`--diskio-iops` | 在 DiskIO 插件中显示每秒I/O操作数
`--fahrenheit` | 以华氏度显示温度(默认是摄氏度)
`--fs-free-space` | 显示文件系统的可用空间而非已用空间
`--theme-white` | 优化显示颜色以适应白色背景
<!--rehype:className=style-list-->
键盘快捷键
---
### 快捷键
| 快捷键 | 功能 |
|--------|-----------------------------|
| `ENTER` | 设置进程过滤器 |
| `a` | 自动排序进程列表 |
| `A` | 启用/禁用应用程序监控进程 |
| `b` | 在网络I/O中切换比特/秒或字节/秒 |
| `B` | 查看每秒磁盘I/O计数器 |
| `c` | 按CPU使用率排序进程 |
| `C` | 启用/禁用云统计 |
| `d` | 显示/隐藏磁盘I/O统计 |
| `D` | 启用/禁用Docker统计 |
| `e` | 启用/禁用顶级扩展统计 |
| `E` | 清除当前进程过滤器 |
| `f` | 显示/隐藏文件系统和文件夹监控统计 |
| `F` | 在文件系统使用和可用空间之间切换 |
| `g` | 为当前历史生成图表 |
| `G` | 启用/禁用GPU统计 |
| `h` | 显示/隐藏帮助屏幕 |
| `i` | 按I/O速率排序进程 |
| `I` | 显示/隐藏IP模块 |
| `+` | 增加选定进程的nice值/降低优先级(需要权限)- 仅在独立模式下 |
| `-` | 减少选定进程的nice值/提高优先级(需要权限)- 仅在独立模式下 |
| `k` | 终止选定进程(需要权限)- 仅在独立模式下 |
<!--rehype:className=shortcuts left-align-->
### 快捷键
| 快捷键 | 功能 |
|--------|-----------------------------|
| `K` | 显示/隐藏TCP连接 |
| `l` | 显示/隐藏日志消息 |
| `m` | 按内存使用率排序进程 |
| `M` | 重置进程摘要的最小/最大值 |
| `n` | 显示/隐藏网络统计 |
| `N` | 显示/隐藏当前时间 |
| `p` | 按名称排序进程 |
| `P` | 启用/禁用端口统计 |
| `q\|ESC\|CTRL-C` | 退出当前Glances会话 |
| `Q` | 显示/隐藏IRQ模块 |
| `r` | 重置历史记录 |
| `R` | 显示/隐藏RAID插件 |
| `s` | 显示/隐藏传感器统计 |
| `S` | 启用/禁用微小曲线图 |
| `t` | 按CPU时间排序进程TIME+ |
| `T` | 以组合方式查看网络I/O |
| `u` | 按用户排序进程 |
| `U` | 查看累积网络I/O |
| `w` | 删除已完成的警告日志消息 |
| `W` | 显示/隐藏Wifi模块 |
| `x` | 删除已完成的警告和严重日志消息 |
| `z` | 显示/隐藏进程统计 |
<!--rehype:className=shortcuts left-align-->
### 快捷键
| 快捷键 | 功能 |
|--------|-----------------------------|
| `0` | 启用/禁用Irix/Solaris模式。任务的CPU使用率将按CPU总数进行划分 |
| `1` | 在全局CPU和每个CPU统计之间切换 |
| `2` | 启用/禁用左侧边栏 |
| `3` | 启用/禁用快速查看模块 |
| `4` | 启用/禁用除快速查看和负载模块外的所有模块 |
| `5` | 启用/禁用顶部菜单快速查看、CPU、内存、交换区和负载 |
| `6` | 启用/禁用平均GPU模式 |
| `9` | 在黑白主题之间切换UI主题 |
| `/` | 在进程命令行或命令名称之间切换 |
| `F5` | 刷新curses用户界面的统计数据 |
| `LEFT` | 向左导航进程排序 |
| `RIGHT` | 向右导航进程排序 |
| `UP` | 在进程列表中向上 |
| `DOWN` | 在进程列表中向下。在Glances客户端浏览器中通过`--browser`命令行参数访问): |
| `ENTER` | 运行选定的服务器 |
| `UP` | 在服务器列表中向上 |
| `DOWN` | 在服务器列表中向下 |
| `q\|ESC` | 退出Glances |
<!--rehype:className=shortcuts left-align-->
配置
---
### 位置
<!--rehype:wrap-class=col-span-2-->
您可以将自己的 `glances.conf` 文件放在以下位置:
:-- | -- | --
:-- | -- | --
`Linux`, `SunOS` | ~/.config/glances/, /etc/glances/, /usr/share/docs/glances/ |
`*BSD` |~/.config/glances/, /usr/local/etc/glances/, /usr/share/docs/glances/ |
`macOS` | ~/Library/Application Support/glances/, /usr/local/etc/glances/, /usr/share/docs/glances/ |
`Windows` | %APPDATA%\glances\glances.conf |
---
- 在 Windows XP 上,%APPDATA% 为:`C:\Documents and Settings\<USERNAME>\Application Data`
- 在 Windows Vista 及更高版本上:`C:\Users\<用户名>\AppData\Roaming`
### 语法
```ini
[global]
# 刷新率(默认为至少 2 秒)
# 可以通过 -t <sec> 选项覆盖
# 也可以在每个插件部分覆盖它
refresh=2
# Glances 是否应该检查 PyPI 上是否有更新的版本?
check_update=false
# 历史大小(最大值数)
# 默认值为288001天每3秒1分
history_size=28800
```
### CPU 插件的示例
```ini
[cpu]
disable=False
refresh=3
user_careful=50
user_warning=70
user_critical=90
iowait_careful=50
iowait_warning=70
iowait_critical=90
system_careful=50
system_warning=70
system_critical=90
steal_careful=50
steal_warning=70
steal_critical=90
```
### InfluxDB 导出模块
```ini
[influxdb]
# 配置 --export influxdb 选项
# https://influxdb.com/
host=localhost
port=8086
user=root
password=root
db=glances
prefix=localhost
#tags=foo:bar,spam:eggs
```
### Nginx AMP
```ini
[amp_nginx]
# 应启用 Nginx 状态页面
# https://easyengine.io/tutorials/nginx/status-page/
enable=true
regex=\/usr\/sbin\/nginx
refresh=60
one_line=false
status_url=http://localhost/nginx_status
```
<!--rehype:className=wrap-text-->
导出统计服务
---
### CSV
```sh
$ glances --export csv \
--export-csv-file /tmp/glances.csv \
--quiet
```
可以将统计数据导出到 CSV 文件
### JSON
```sh
$ glances --export json \
--export-json-file /tmp/glances.json
```
可以将统计信息导出到 JSON 文件
### Cassandra
<!--rehype:wrap-class=row-span-2-->
您可以将统计数据导出到 Cassandra 或 Scylla 服务器
```ini
[cassandra]
host=localhost
port=9042
protocol_version=3
keyspace=glances
replication_factor=2
table=localhost
```
并运行 Glances
```sh
$ glances --export cassandra
```
数据模型如下:
```sql
CREATE TABLE <table> (plugin text, time timeuuid, stat map<text,float>, PRIMARY KEY (plugin, time))
```
### Graph
<!--rehype:wrap-class=col-span-2-->
```ini
[graph]
# --export graph 选项的配置
# 设置创建图形(.svg 文件)的路径
# 可以通过 --graph-path 命令行选项覆盖
path=/tmp
# 可以通过设置自动生成图表
# generate_every 为一个非零值,对应于之间的秒数
# 两代。将其设置为 0 以禁用图形自动生成。
generate_every=60
# 请参阅 Pygal lib 文档中的以下配置键定义
# http://pygal.org/en/stable/documentation/index.html
width=800
height=600
style=DarkStyle
```
并运行 Glances
```sh
$ glances --export graph \
--export-graph-path /tmp
```
### CouchDB
您可以将统计数据导出到 CouchDB 服务器
```ini
[mongodb]
host=localhost
port=27017
db=glances
user=root
password=example
```
并运行 Glances
```sh
$ glances --export mongodb
```
### InfluxDB
<!--rehype:wrap-class=col-span-2 row-span-4-->
您可以将统计数据导出到 InfluxDB 服务器(时间序列服务器)
测量 | 字段 | 标签
:-- | -- | --
cpu | user system iowait… | hostname
network | read_bytes write_bytes time_since_update… | hostname disk_name
diskio | rx tx time_since_update… | hostname interface_name
docker | cpu_percent memory_usage… | hostname name
gpu | proc mem temperature… | hostname gpu_id
<!--rehype:className=show-header-->
#### InfluxDB (最高版本 1.7.x
```ini
[influxdb]
host=localhost
port=8086
protocol=http
user=root
password=root
db=glances
# 所有测量名称都会添加前缀
# Ex: prefix=foo
# => foo.cpu
# => foo.mem
# 您还可以使用动态值
#prefix=foo
# 将为所有测量添加以下标签
# 您还可以使用动态值
# 注意:主机名始终作为标签添加
#tags=foo:bar,spam:eggs,domain:`domainname`
```
并运行 Glances
```sh
$ glances --export influxdb
```
#### InfluxDB v2来自 InfluxDB v1.8.x/Flux 和 InfluxDB v2.x
```ini
[influxdb2]
host=localhost
port=8086
protocol=http
org=nicolargo
bucket=glances
token=EjFUTWe8U-MIseEAkaVIgVnej_TrUpDy==
# 设置两个导出之间的间隔(以秒为单位)
# 如果时间间隔设置为 0
# 则使用 Glances 刷新时间(默认行为)
#interval=0
# 将为所有测量名称添加前缀
# Ex: prefix=foo
# => foo.cpu
# => foo.mem
# 您还可以使用动态值
#prefix=foo
# 将为所有测量添加以下标签
# 您还可以使用动态值.
# 注意:主机名始终作为标签添加
#tags=foo:bar,spam:eggs,domain:`domainname`
```
并运行 Glances
```sh
$ glances --export influxdb2
```
### Elasticsearch
可以将统计数据导出到 Elasticsearch 服务器
```ini
[elasticsearch]
host=localhost
port=9200
index=glances
```
并运行 Glances
```sh
$ glances --export elasticsearch
```
### MQTT
您可以将统计信息导出到 `MQTT` 服务器
```ini
[mqtt]
host=localhost
port=883
tls=true
user=glances
password=glances
topic=glances
topic_structure=per-metric
```
并运行 Glances
```sh
$ glances --export mqtt
```
### MongoDB
```ini
[couchdb]
host=localhost
port=
user=root
password=example
db=glances
```
并运行 Glances
```sh
$ glances --export couchdb
```
### OpenTSDB
```ini
[opentsdb]
host=localhost
port=4242
prefix=glances
tags=foo:bar,spam:eggs
```
并运行 Glances
```sh
$ glances --export opentsdb
```
### Kafka
<!--rehype:wrap-class=col-span-2 row-span-3-->
您可以将统计信息导出到 Kafka 服务器
```ini
[kafka]
host=localhost
port=9092
topic=glances
#compression=gzip
# Tags will be added for all events
#tags=foo:bar,spam:eggs
# You can also use dynamic values
#tags=hostname:`hostname -f`
```
并运行 Glances
```sh
$ glances --export kafka
```
内存插件的记录示例:
```py
ConsumerRecord(topic=u'glances', partition=0, offset=1305, timestamp=1490460592248, timestamp_type=0, key='mem', value=u'{"available": 2094710784, "used": 5777428480, "cached": 2513543168, "mem_careful": 50.0, "percent": 73.4, "free": 2094710784, "mem_critical": 90.0, "inactive": 2361626624, "shared": 475504640, "history_size": 28800.0, "mem_warning": 70.0, "total": 7872139264, "active": 4834361344, "buffers": 160112640}', checksum=214895201, serialized_key_size=3, serialized_value_size=303)
```
<!--rehype:className=wrap-text-->
使用 Kafka Glances 插件的 Python 代码示例:
```py
from kafka import KafkaConsumer
import json
consumer = KafkaConsumer('glances', value_deserializer=json.loads)
for s in consumer:
print(s)
```
### Prometheus
```ini
[prometheus]
host=localhost
port=9091
prefix=glances
labels=src:glances
```
并运行 Glances
```sh
$ glances --export prometheus
```
### RabbitMQ
```ini
[rabbitmq]
host=localhost
port=5672
user=glances
password=glances
queue=glances_queue
#protocol=amqps
```
并运行 Glances
```sh
$ glances --export rabbitmq
```
### RESTful
<!--rehype:wrap-class=row-span-2-->
```ini
[restful]
# --export-restful 选项的配置
# 例如,导出到 http://localhost:6789/
host=localhost
port=6789
protocol=http
path=/
```
URL语法
```
http://localhost:6789/
| | | |
| | | path
| | port
| host
protocol
```
并运行 Glances
```sh
$ glances --export restful
```
### ZeroMQ
<!--rehype:wrap-class=row-span-2-->
```ini
[zeromq]
host=127.0.0.1
port=5678
prefix=G
```
并运行 Glances
```sh
$ glances --export zeromq
```
以下是订阅 Glances 统计数据的简单 Python 客户端:
```py
import json
import zmq
context = zmq.Context()
subscriber = context.socket(zmq.SUB)
subscriber.setsockopt(zmq.SUBSCRIBE, 'G')
subscriber.connect("tcp://127.0.0.1:5678")
while True:
_, plugin, data_raw = subscriber.recv_multipart()
data = json.loads(data_raw)
print('{} => {}'.format(plugin, data))
subscriber.close()
context.term()
```
### Riemann
```ini
[riemann]
host=localhost
port=5555
```
并运行 Glances
```sh
$ glances --export riemann
```
### StatsD
```ini
[statsd]
host=localhost
port=8125
prefix=glances
```
并运行 Glances
```sh
$ glances --export statsd
```
另见
----
- [Glances 官方文档](https://nicolargo.github.io/glances/) _nicolargo.github.io_

1025
docs/hook.md Normal file

File diff suppressed because it is too large Load Diff

View File

@ -549,8 +549,8 @@ string.lower("STR") -- str
-- 指定替换的字符串个数, 最后一个参数可选,默认是全部替换
string.gsub("aaaa", "a", "b", 3) -- bbba 3
string.gsub("Today is 29/01/2019", "%d%d/%d%d/%d%d%d%d", "good day.")
-- Today is a good day. 1
string.gsub("Today is 29/01/2019", "%d%d/%d%d/%d%d%d%d", "a good day.")
-- Today is a good day.
-- 查找第一个匹配的字符串,第三个参数可以提供开始查找的位置,默认从 1 开始
-- 如果未找到,则返回 nil

View File

@ -314,6 +314,7 @@ $ npx create-react-app my-app --template typescript
`~/.npmrc` | 每个用户的配置文件
`$PREFIX/etc/npmrc` | 全局配置文件
`/path/to/npm/npmrc` | npm 内置配置文件
<!--rehype:className=left-align-->
### 配置内容
@ -336,6 +337,7 @@ $ npx create-react-app my-app --template typescript
`cnpm` | <https://r.cnpmjs.org/>
`taobao` | <https://registry.npmmirror.com/>
`npmMirror` | <https://skimdb.npmjs.com/registry/>
<!--rehype:className=left-align-->
### `.npmignore`

376
docs/pinia.md Normal file
View File

@ -0,0 +1,376 @@
Pinia 备忘清单
===
这是一份 [`Pinia`](https://pinia.vuejs.org/) 状态管理库的备忘单,列出了 Pinia 的常用命令和操作。
入门
---
### 安装 Pinia
```bash
npm install pinia
# or
yarn add pinia
# or
pnpm add pinia
```
### 定义 Store
<!--rehype:wrap-class=col-span-2 row-span-2-->
创建一个 store 文件(例如 `src/stores/counter.js`),并定义 `store`
```javascript
import { defineStore } from 'pinia'
export const useCounterStore = defineStore('counter', {
state: () => ({
count: 0
}),
actions: {
increment() {
this.count++
}
},
getters: {
doubleCount: (state) => state.count * 2
}
})
```
### 创建 Pinia 实例
```javascript
import { createApp } from 'vue'
import { createPinia } from 'pinia'
import App from './App.vue'
const app = createApp(App)
const pinia = createPinia()
app.use(pinia)
app.mount('#app')
```
在你的 [Vue](./vue.md) 应用中创建一个 Pinia 实例并将其传递给 [Vue](./vue.md)
### 热重载 Store
使用 Vite 时,你可以启用热重载功能:
```javascript
if (import.meta.hot) {
import.meta.hot.accept(acceptHMRUpdate(useCounterStore, import.meta.hot))
}
```
### 使用 Store
<!--rehype:wrap-class=row-span-2-->
在组件中使用 `store`
```javascript
<template>
<div>
<p>Count: {{ counterStore.count }}</p>
<p>Double Count: {{ counterStore.doubleCount }}</p>
<button @click="counterStore.increment">Increment</button>
</div>
</template>
<script>
import { useCounterStore } from '@/stores/counter'
export default {
setup() {
const counterStore = useCounterStore()
return {
counterStore
}
}
}
</script>
```
### Modules 模式
<!--rehype:wrap-class=row-span-2-->
Pinia 不使用传统的 Vuex 模块模式。相反,推荐使用独立的 store 文件:
```javascript
// src/stores/user.js
import { defineStore } from 'pinia'
export const useUserStore = defineStore('user', {
state: () => ({
name: 'Alice',
age: 25
}),
actions: {
setName(name) {
this.name = name
}
},
getters: {
isAdult: (state) => state.age >= 18
}
})
```
### 使用 Options API
如果你更喜欢 Options API可以这样使用 Pinia
```javascript
<script>
import { defineComponent } from 'vue'
import { useCounterStore } from '@/stores/counter'
export default defineComponent({
setup() {
const counterStore = useCounterStore()
return {
counterStore
}
}
})
</script>
```
高级用法
---
### 使用组合函数
你可以将 store 与组合函数一起使用:
```javascript
// src/composables/useCounter.js
import { useCounterStore } from '@/stores/counter'
export function useCounter() {
const counterStore = useCounterStore()
return {
count: counterStore.count,
doubleCount: counterStore.doubleCount,
increment: counterStore.increment
}
}
```
### 插件
<!--rehype:wrap-class=col-span-2-->
Pinia 支持插件。你可以编写插件来扩展 Pinia 的功能:
```javascript
// src/plugins/piniaPlugin.js
export function piniaPlugin({ store }) {
store.$onAction(({ name, store, args, after, onError }) => {
console.log(`Action ${name} was called with args:`, args)
})
}
// main.js
import { createPinia } from 'pinia'
import { piniaPlugin } from './plugins/piniaPlugin'
const pinia = createPinia()
pinia.use(piniaPlugin)
```
### 持久化状态
<!--rehype:wrap-class=row-span-4 col-span-2-->
#### 1. 安装 `pinia-plugin-persist`
<!--rehype:style=color:#228e6c;font-weight: bold;text-align: left;-->
```bash
npm pinia-plugin-persist
```
#### 2. 配置 Pinia 和 `pinia-plugin-persist`
<!--rehype:style=color:#228e6c;font-weight: bold;text-align: left;-->
在你的入口文件中配置 Pinia 和 `pinia-plugin-persist`
**⚠️ Vue 2 项目**
```javascript
import Vue from 'vue'
import vueCompositionApi from '@vue/composition-api'
import { createPinia, PiniaVuePlugin } from 'pinia'
import piniaPersist from 'pinia-plugin-persist'
import App from './App.vue'
Vue.use(vueCompositionApi)
Vue.use(PiniaVuePlugin)
const pinia = createPinia()
pinia.use(piniaPersist)
new Vue({
pinia,
render: h => h(App)
}).$mount('#app')
```
**Vue 3 项目:**
```javascript
import { createApp } from 'vue'
import { createPinia } from 'pinia'
import piniaPersist from 'pinia-plugin-persist'
import App from './App.vue'
const pinia = createPinia()
pinia.use(piniaPersist)
createApp(App)
.use(pinia)
.mount('#app')
```
#### 3. 创建 Store 并启用持久化
<!--rehype:style=color:#228e6c;font-weight: bold;text-align: left;-->
创建一个 Pinia store并启用持久化存储。
```javascript
// stores/userStore.js
import { defineStore } from 'pinia'
export const useUserStore = defineStore('userStore', {
state: () => ({
firstName: 'S',
lastName: 'L',
accessToken: 'xxxxxxxxxxxxx'
}),
actions: {
setToken(value) {
this.accessToken = value
}
},
persist: {
enabled: true,
strategies: [
{
storage: localStorage,
paths: ['accessToken']
}
]
}
})
```
#### 4. 使用 Store
<!--rehype:style=color:#228e6c;font-weight: bold;text-align: left;-->
在组件中使用创建好的 store。
```javascript
// src/components/SomeComponent.vue
<template>
<div>
<p>{{ userStore.firstName }} {{ userStore.lastName }}</p>
<p>{{ userStore.accessToken }}</p>
</div>
</template>
<script>
import { useUserStore } from '@/stores/userStore'
export default {
setup() {
const userStore = useUserStore()
return { userStore }
}
}
</script>
```
### SSR 支持
Pinia 支持服务端渲染 (SSR)。在你的 SSR 入口文件中创建 Pinia 实例:
```javascript
import { createPinia } from 'pinia'
export function createApp() {
const app = createSSRApp(App)
const pinia = createPinia()
app.use(pinia)
return { app, pinia }
}
```
明白了,让我们来结合 `pinia-plugin-persist` 插件完善 Pinia 备忘清单。
### 使用 Vue Devtools
Pinia 可以与 Vue Devtools 一起使用。确保你安装了最新版本的 Vue Devtools然后你可以在 Devtools 中查看和调试你的 Pinia store。
### 使用异步 Actions
Pinia 支持在 actions 中使用异步代码:
```javascript
// src/stores/todo.js
import { defineStore } from 'pinia'
import axios from 'axios'
export const useTodoStore = defineStore('todo', {
state: () => ({
todos: []
}),
actions: {
async fetchTodos() {
const response = await axios.get('/api/todos')
this.todos = response.data
}
}
})
```
### 测试 Pinia Store
你可以使用 Vue Test Utils 和 Jest 来测试你的 Pinia store
```javascript
// __tests__/counterStore.test.js
import { setActivePinia, createPinia } from 'pinia'
import { useCounterStore } from '@/stores/counter'
describe('Counter Store', () => {
beforeEach(() => {
setActivePinia(createPinia())
})
it('increments the count', () => {
const counterStore = useCounterStore()
expect(counterStore.count).toBe(0)
counterStore.increment()
expect(counterStore.count).toBe(1)
})
it('returns double count', () => {
const counterStore = useCounterStore()
counterStore.count = 2
expect(counterStore.doubleCount).toBe(4)
})
})
```
另见
---
- [Pinia 官方文档](https://pinia.vuejs.org/)
- [Pinia GitHub 仓库](https://github.com/vuejs/pinia)
- [Pinia 快速上手](https://pinia.vuejs.org/getting-started.html)
- [pinia-plugin-persist 官方文档](https://seb-l.github.io/pinia-plugin-persist/basic-usage.html)

279
docs/pnpm.md Normal file
View File

@ -0,0 +1,279 @@
pnpm 备忘清单
===
这是一份 [`pnpm`](https://pnpm.io/) 软件包管理器备忘单,其中列出了 `pnpm` 常用命令使用清单。
入门
---
### pnpm 与 npm 命令比较
<!--rehype:wrap-class=col-span-2 row-span-2-->
npm | pnpm | 说明
:- | :- | :-
`npm install` | `pnpm install` | 安装依赖
`npm init` | `pnpm init` | 创建 `package.json` 文件
`npm install <package>` | `pnpm add <package>` | 安装包
`npm install -g <package>` | `pnpm add -g <package>` | 全局安装包
`npm update` | `pnpm update` | 更新包
`npm cache clean` | `pnpm cache clean` | 清理缓存
参考 [npm](./npm.md) 备忘清单
### pnpm list
```shell
# 列出所有已安装的包
pnpm list
# 列出全局安装的包
pnpm list -g
# 查找过时的包
pnpm outdated
```
### pnpm why
```shell
# 显示为什么安装了某个包
pnpm why <package>
```
### pnpm install
<!--rehype:wrap-class=row-span-3-->
pnpm | 说明
:- | :-
`--no-lockfile` | 不生成 pnpm-lock.yaml 锁定文件
`--force` | 强制覆盖现有的 node_modules
`--frozen-lockfile` | 忽略 pnpm-lock.yaml 中的更改
`--offline` | 离线模式,不尝试从远程仓库安装包
`--shamefully-hoist` | 类似于 npm 的 hoist 行为
`--strict-peer-dependencies` | 严格检查 peer dependencies
<!--rehype:className=style-list-arrow-->
这些选项可用于 `pnpm install`
### pnpm add
<!--rehype:wrap-class=row-span-3-->
pnpm | 说明
:- | :-
`--save` | 将包添加到 dependencies
`--save-dev` | 将包添加到 devDependencies
`--global` | 全局安装包
`--exact` | 安装精确版本号的包
`--shamefully-hoist` | 类似于 npm 的 hoist 行为
`--strict-peer-dependencies` | 严格检查 peer dependencies
<!--rehype:className=style-list-arrow-->
这些选项可用于 `pnpm add`
### pnpm update
```shell
# 更新所有包
pnpm update
# 更新特定包
pnpm update <package>
# 更新到最新版本(包括 major 版本)
pnpm update --latest
```
### pnpm remove
```shell
# 从依赖中删除包
pnpm remove <package>
# 删除全局依赖包
pnpm remove -g create-react-app
# 删除特定版本的依赖包
pnpm remove lodash@4.17.21
```
### pnpm cache
```shell
# 清理 pnpm 缓存
pnpm cache clean
# 查看缓存中所有的包
pnpm cache list
```
示例
---
### 安装包
```bash
# 将包添加到“dependencies”
pnpm add <package>
# 将包添加到“devDependencies”
pnpm add -D <package>
# 将包作为精确版本添加
pnpm add --exact <package>
# 在全局范围内安装包
pnpm add -g <package>
# 安装特定版本的包
pnpm add <package>@<version>
```
### 移除包
```bash
pnpm remove <package>
# 删除多个依赖包
pnpm remove lodash express
# 删除全局依赖包
pnpm remove -g create-react-app
# 删除特定版本的依赖包
pnpm remove lodash@4.17.21
```
### 查看包
```bash
# 列出已安装的包
pnpm list
# 列出顶级安装的包
pnpm list --depth 0
# 列出全局安装的包
pnpm list -g
# 根据模式和深度列出包
pnpm list --pattern "lodash" --depth 1
```
### 清除
```bash
# 清理 node_modules 并删除不必要的文件
pnpm prune
# 检查过时的包
pnpm outdated
```
### 信息
```bash
# 显示关于安装包的原因的信息
pnpm why <package>
```
### 清理缓存
```bash
# 清除 pnpm 的全局缓存
pnpm cache clean
```
此外,您可以指定一个或多个要清理的包。
Monorepo
---
### 创建 Monorepo 工作区
<!--rehype:wrap-class=row-span-3-->
- 创建一个新的 pnpm 工作区:
```bash
pnpm init -w
```
- 将在项目的根目录中创建一个 `pnpm-workspace.yaml` 文件,内容如下:
```yaml
packages:
- 'packages/**'
- 'apps/**'
```
- 在 `pnpm-workspace.yaml` 中定义您的工作区结构:
```yaml
packages:
- 'packages/*'
- 'apps/*'
```
<!--rehype:className=style-timeline-->
### 添加包到 Monorepo 工作区
```bash
pnpm add <package> -w # 在工作区中添加包
```
### 运行脚本
<!--rehype:wrap-class=row-span-2-->
```bash
# 在所有包中运行脚本
pnpm -r run <script>
# 仅在某个包中运行脚本
pnpm --filter <package> run <script>
# 在某个包及其依赖中运行脚本
pnpm --filter <package>... run <script>
```
### 添加工作区范围的依赖
```bash
# 添加依赖到工作区根目录
pnpm add <package> -w
# 添加开发依赖到工作区根目录
pnpm add -D <package> -w
```
### 创建新的包
在 `packages` 目录中创建新的包,例如:
```bash
mkdir packages/new-package
cd packages/new-package
pnpm init
```
### 链接本地包
```bash
# 将本地包链接到当前工作区
pnpm link <local-package-path>
# 链接工作区中的包
pnpm add <local-package-name> --workspace
```
高级用法
---
### 工作区
```bash
# 创建工作区
pnpm init -w
# 在工作区中添加包
pnpm add <package> -w
```
### 链接
```bash
# 链接一个全局包到当前项目
pnpm link <package>
# 链接本地包到全局
pnpm link --global <package>
```
### 运行脚本
```bash
# 运行 package.json 中的脚本
pnpm run <script>
# 运行根目录中的包的脚本
pnpm run -w <script>
```
另见
---
- [pnpm 官方文档网站](https://pnpm.io/)
- [pnpm 常见问题解答](https://pnpm.io/motivation)

View File

@ -13,6 +13,7 @@ Pytorch 是一种开源机器学习框架,可加速从研究原型设计到生
- [Pytorch 官方备忘清单](https://pytorch.org/tutorials/beginner/ptcheat.html) _(pytorch.org)_
### 认识 Pytorch
<!--rehype:wrap-class=row-span-2-->
```python
from __future__ import print_function
@ -32,6 +33,7 @@ tensor([
Tensors 张量: 张量的概念类似于Numpy中的ndarray数据结构, 最大的区别在于Tensor可以利用GPU的加速功能.
### 创建一个全零矩阵
<!--rehype:wrap-class=row-span-2-->
```python
x = torch.zeros(5, 3, dtype=torch.long)
@ -95,6 +97,7 @@ tensor([[ 1.6978, -1.6979, 0.3093],
```
### 加法操作(4)
<!--rehype:wrap-class=row-span-2-->
```python
y.add_(x)
@ -118,6 +121,7 @@ tensor([-2.0902, -0.4489, -0.1441, 0.8035, -0.8341])
<!--rehype:className=wrap-text-->
### 张量形状
<!--rehype:wrap-class=row-span-2-->
```python
x = torch.randn(4, 4)
@ -178,13 +182,21 @@ tensor([2., 2., 2., 2., 2.], dtype=torch.float64)
```python
>>> x = torch.rand(1, 2, 1, 28, 1)
>>> x.squeeze().shape # squeeze不加参数默认去除所有为1的维度
# squeeze不加参数默认去除所有为1的维度
>>> x.squeeze().shape
torch.Size([2, 28])
>>> x.squeeze(dim=0).shape # squeeze加参数去除指定为1的维度
# squeeze加参数去除指定为1的维度
>>> x.squeeze(dim=0).shape
torch.Size([2, 1, 28, 1])
>>> x.squeeze(1).shape # squeeze加参数如果不为1则不变
# squeeze加参数如果不为1则不变
>>> x.squeeze(1).shape
torch.Size([1, 2, 1, 28, 1])
>>> torch.squeeze(x,-1).shape # 既可以是函数,也可以是方法
# 既可以是函数,也可以是方法
>>> torch.squeeze(x,-1).shape
torch.Size([1, 2, 1, 28])
```
@ -192,12 +204,59 @@ torch.Size([1, 2, 1, 28])
```python
>>> x = torch.rand(2, 28)
>>> x.unsqueeze(0).shape # unsqueeze必须加参数 _ 2 _ 28 _
torch.Size([1, 2, 28]) # 参数代表在哪里添加维度 0 1 2
>>> torch.unsqueeze(x, -1).shape # 既可以是函数,也可以是方法
# unsqueeze必须加参数 _ 2 _ 28 _
>>> x.unsqueeze(0).shape
# 参数代表在哪里添加维度 0 1 2
torch.Size([1, 2, 28])
# 既可以是函数,也可以是方法
>>> torch.unsqueeze(x, -1).shape
torch.Size([2, 28, 1])
```
Cuda 相关
---
### 检查 Cuda 是否可用
```python
>>> import torch.cuda
>>> torch.cuda.is_available()
>>> True
```
### 列出 GPU 设备
<!--rehype:wrap-class=col-span-2 row-span-2-->
```python
import torch
device_count = torch.cuda.device_count()
print("CUDA 设备")
for i in range(device_count):
device_name = torch.cuda.get_device_name(i)
total_memory = torch.cuda.get_device_properties(i).total_memory / (1024 ** 3)
print(f"├── 设备 {i}: {device_name}, 容量: {total_memory:.2f} GiB")
print("└── (结束)")
```
### 将模型、张量等数据在 GPU 和内存之间进行搬运
```python
import torch
# 将 0 替换为您的 GPU 设备索引或者直接使用 "cuda"
device = f"cuda:0"
# 移动到GPU
tensor_m = torch.tensor([1, 2, 3])
tensor_g = tensor_m.to(device)
model_m = torch.nn.Linear(1, 1)
model_g = model_m.to(device)
# 向后移动
tensor_m = tensor_g.cpu()
model_m = model_g.cpu()
```
导入 Imports
---
@ -206,28 +265,71 @@ torch.Size([2, 28, 1])
```python
# 根包
import torch
# 数据集表示和加载
```
数据集表示和加载
```python
from torch.utils.data import Dataset, DataLoader
```
<!--rehype:className=wrap-text-->
### 神经网络 API
<!--rehype:wrap-class=row-span-2-->
```python
# 计算图
import torch.autograd as autograd
# 计算图中的张量节点
from torch import Tensor
# 神经网络
```
神经网络
```python
import torch.nn as nn
# 层、激活等
import torch.nn.functional as F
# 优化器,例如 梯度下降、ADAM等
import torch.optim as optim
# 混合前端装饰器和跟踪 jit
```
混合前端装饰器和跟踪 jit
```python
from torch.jit import script, trace
```
### ONNX
<!--rehype:wrap-class=row-span-2-->
```python
torch.onnx.export(model, dummy data, xxxx.proto)
# 导出 ONNX 格式
# 使用经过训练的模型模型dummy
# 数据和所需的文件名
```
<!--rehype:className=wrap-text-->
加载 ONNX 模型
```python
model = onnx.load("alexnet.proto")
```
检查模型IT 是否结构良好
```python
onnx.checker.check_model(model)
```
打印一个人类可读的,图的表示
```python
onnx.helper.printable_graph(model.graph)
```
### Torchscript 和 JIT
```python
@ -242,25 +344,8 @@ torch.jit.trace()
装饰器用于指示被跟踪代码中的数据相关控制流
### ONNX
```python
torch.onnx.export(model, dummy data, xxxx.proto)
# 导出 ONNX 格式
# 使用经过训练的模型模型dummy
# 数据和所需的文件名
model = onnx.load("alexnet.proto")
# 加载 ONNX 模型
onnx.checker.check_model(model)
# 检查模型IT 是否结构良好
onnx.helper.printable_graph(model.graph)
# 打印一个人类可读的,图的表示
```
<!--rehype:className=wrap-text-->
### Vision
<!--rehype:wrap-class=col-span-2-->
```python
# 视觉数据集,架构 & 变换

View File

@ -80,9 +80,9 @@ npm run start # 监听 md 文件编译输出 HTML
<!--rehype:class=home-card-->
```
首页导航图标存放在 `scripts/assets` 目录中,如果你的备忘清单定义为 `docs/cron.md`,那么你的图标就定义为 `cron.svg` 存放到 `scripts/assets` 目录中,重新编译首页当行菜单就拥有了图标。
首页导航图标存放在 `/assets` 目录中,如果你的备忘清单定义为 `docs/cron.md`,那么你的图标就定义为 `cron.svg` 存放到 `/assets` 目录中,重新编译首页当行菜单就拥有了图标。
- 图标存放在 [`scripts/assets`](https://github.com/jaywcjlove/reference/blob/main/scripts/assets) 目录中
- 图标存放在 [`/assets`](https://github.com/jaywcjlove/reference/tree/main/assets) 目录中
- 图片名称与清单名称保持一致 `cron.md` -> `cron.svg` (注意大小写)
- SVG 图标尺寸 `<svg height="1em" width="1em"`
- SVG 图标颜色使用继承颜色值 `<svg fill="currentColor"`
@ -197,23 +197,37 @@ license = "支持 HTML 字符串"
```
### 支持更多配置加载
<!--rehype:wrap-class=col-span-2-->
```bash
.refsrc .refsrc.json
.refsrc.json5 .refsrc.jsonc
.refsrc.yaml .refsrc.yml
.refsrc.toml .refsrc.ini
.refsrc.js .refsrc.ts
.refsrc.cjs .refsrc.mjs
.config/refsrc .config/refsrc.json
.config/refsrc.json5 .config/refsrc.jsonc
.config/refsrc.yaml .config/refsrc.yml
.config/refsrc.toml .config/refsrc.ini
.config/refsrc.js .config/refsrc.ts
.config/refsrc.cjs .config/refsrc.mjs
refs.config.js refs.config.ts
refs.config.cjs refs.config.mjs
```
- `.refsrc`
- `.refsrc.json`
- `.refsrc.json5`
- `.refsrc.jsonc`
- `.refsrc.yaml`
- `.refsrc.yml`
- `.refsrc.toml`
- `.refsrc.ini`
- `.refsrc.js`
- `.refsrc.ts`
- `.refsrc.cjs`
- `.refsrc.mjs`
- `.config/refsrc`
- `.config/refsrc.json`
- `.config/refsrc.json5`
- `.config/refsrc.jsonc`
- `.config/refsrc.yaml`
- `.config/refsrc.yml`
- `.config/refsrc.toml`
- `.config/refsrc.ini`
- `.config/refsrc.js`
- `.config/refsrc.ts`
- `.config/refsrc.cjs`
- `.config/refsrc.mjs`
- `refs.config.js`
- `refs.config.ts`
- `refs.config.cjs`
- `refs.config.mjs`
<!--rehype:className=cols-3 style-none-->
### 环境变量
@ -798,7 +812,7 @@ H2 部分
### Title 6
```
在 `Title 1` 标题添加 `col-span-2` 和 `row-span-2` 占位类,使用 `空格` 间隔。
[#](https://github.com/jaywcjlove/reference/blob/8fad19506946ae84139002ff367e2f2bca9b0696/docs/quickreference.md?plain=1#L774-L775)<!--rehype:target=__blank--> 在 `Title 1` 标题添加 `col-span-2` 和 `row-span-2` 占位类,使用 `空格` 间隔。
表格
---
@ -813,14 +827,14 @@ H2 部分
`%A, %B %e, %Y` | Sunday, June 5, 2013
`%b %e %a` | Jun 5 Sun
#### Time
#### Time (H4)
:- | :-
:- | :-
`%H:%M` | 23:05
`%I:%M %p` | 11:05 PM
标题为 `H4` 的基本表格。
[#](https://github.com/jaywcjlove/reference/blob/8fad19506946ae84139002ff367e2f2bca9b0696/docs/quickreference.md?plain=1#L806-L823)<!--rehype:target=__blank--> 标题为 `H4` 的基本表格。
### 快捷键
@ -833,6 +847,9 @@ H2 部分
`R` | Rectangle
`O` | Oval
`U` | Rounded
<!--rehype:className=shortcuts-->
[#](https://github.com/jaywcjlove/reference/blob/8fad19506946ae84139002ff367e2f2bca9b0696/docs/quickreference.md?plain=1#L827-L836)<!--rehype:target=__blank--> `<!--rehype:className=shortcuts-->`
### 展示标题
@ -843,7 +860,7 @@ H2 部分
`/` | `/html/body/div` | Root
<!--rehype:className=show-header-->
`<!--rehype:className=show-header-->`
[#](https://github.com/jaywcjlove/reference/blob/ee03850619440e3700ed68ccc2ed21d3591a1490/docs/quickreference.md?plain=1#L839-L844)<!--rehype:target=__blank--> `<!--rehype:className=show-header-->`
### 列表样式展示表格
@ -854,7 +871,7 @@ H2 部分
`titleBarStyle.default` | 分别返回 _mac_ 或者 _win_ 的标准标题栏
<!--rehype:className=style-list-->
`<!--rehype:className=style-list-->`
[#](https://github.com/jaywcjlove/reference/blob/ee03850619440e3700ed68ccc2ed21d3591a1490/docs/quickreference.md?plain=1#L850-L855)<!--rehype:target=__blank--> `<!--rehype:className=style-list-->`
### 列表箭头样式展示表格
@ -865,7 +882,7 @@ H2 部分
`titleBarStyle.default` | 分别返回 _mac_ 或者 _win_ 的标准标题栏
<!--rehype:className=style-list-arrow-->
`<!--rehype:className=style-list-arrow-->`
[#](https://github.com/jaywcjlove/reference/blob/ee03850619440e3700ed68ccc2ed21d3591a1490/docs/quickreference.md?plain=1#L861-L866)<!--rehype:target=__blank--> `<!--rehype:className=style-list-arrow-->`
### 隐藏表头强制小尺寸自动换行
@ -876,7 +893,7 @@ H2 部分
`titleBarStyle.default` | 分别返回 _mac_ 或者 _win_ 的标准标题栏
<!--rehype:className=auto-wrap-->
`<!--rehype:className=auto-wrap-->`
[#](https://github.com/jaywcjlove/reference/blob/ee03850619440e3700ed68ccc2ed21d3591a1490/docs/quickreference.md?plain=1#L872-L877)<!--rehype:target=__blank--> `<!--rehype:className=auto-wrap-->`
### 表格末尾列左对齐
<!--rehype:wrap-class=col-span-2-->
@ -887,7 +904,7 @@ H2 部分
`./` | Relative
<!--rehype:className=show-header left-align-->
默认表格末尾列`右对齐`,添加 `<!--rehype:className=left-align-->` 类让其`左对齐`
[#示例](https://github.com/jaywcjlove/reference/blob/ee03850619440e3700ed68ccc2ed21d3591a1490/docs/quickreference.md?plain=1#L884-L888)<!--rehype:target=__blank--> 默认表格末尾列`右对齐`,添加 `<!--rehype:className=left-align-->` 类让其`左对齐`
### 强制 code 不换行
@ -897,7 +914,7 @@ H2 部分
| `adb reboot bootloader` | Reboots the device into fastboot |
<!--rehype:className=show-header code-nowrap-->
添加 `<!--rehype:className=code-nowrap-->` 注释
[#](https://github.com/jaywcjlove/reference/blob/ee03850619440e3700ed68ccc2ed21d3591a1490/docs/quickreference.md?plain=1#L894-L898)<!--rehype:target=__blank--> 添加 `<!--rehype:className=code-nowrap-->`
列表
---
@ -908,6 +925,8 @@ H2 部分
- Item 2
- Item 3
[#示例](https://github.com/jaywcjlove/reference/blob/ee03850619440e3700ed68ccc2ed21d3591a1490/docs/quickreference.md?plain=1#L905-L909)<!--rehype:target=__blank-->
### 四列
- Item 1
@ -920,7 +939,7 @@ H2 部分
- Item 8
<!--rehype:className=cols-4-->
`<!--rehype:className=cols-4-->`
[#](https://github.com/jaywcjlove/reference/blob/ee03850619440e3700ed68ccc2ed21d3591a1490/docs/quickreference.md?plain=1#L913-L921)<!--rehype:target=__blank--> `<!--rehype:className=cols-4-->`
### 列表步骤
<!--rehype:wrap-class=row-span-2-->
@ -944,7 +963,7 @@ H2 部分
```
<!--rehype:className=style-timeline-->
`<!--rehype:className=style-timeline-->`
[#](https://github.com/jaywcjlove/reference/blob/ee03850619440e3700ed68ccc2ed21d3591a1490/docs/quickreference.md?plain=1#L928-L945)<!--rehype:target=__blank--> `<!--rehype:className=style-timeline-->`
### 没有标记
@ -959,7 +978,7 @@ H2 部分
- Item 9
<!--rehype:className=cols-3 style-none-->
`<!--rehype:className=cols-3 style-none-->`
[#](https://github.com/jaywcjlove/reference/blob/ee03850619440e3700ed68ccc2ed21d3591a1490/docs/quickreference.md?plain=1#L951-L960)<!--rehype:target=__blank--> `<!--rehype:className=cols-3 style-none-->`
### 圆圈标记
@ -968,7 +987,7 @@ H2 部分
- Item 3
<!--rehype:className=style-round-->
`<!--rehype:className=style-round-->`
[#](https://github.com/jaywcjlove/reference/blob/ee03850619440e3700ed68ccc2ed21d3591a1490/docs/quickreference.md?plain=1#L966-L969)<!--rehype:target=__blank--> `<!--rehype:className=style-round-->`
### 箭头标记
@ -977,7 +996,7 @@ H2 部分
- Item 3
<!--rehype:className=style-arrow-->
`<!--rehype:className=style-arrow-->`
[#](https://github.com/jaywcjlove/reference/blob/ee03850619440e3700ed68ccc2ed21d3591a1490/docs/quickreference.md?plain=1#L975-L978)<!--rehype:target=__blank--> `<!--rehype:className=style-arrow-->`
H2 部分 - 5列效果展示
---
@ -990,6 +1009,8 @@ H2 部分 - 5列效果展示
...
```
[#示例](https://github.com/jaywcjlove/reference/blob/ee03850619440e3700ed68ccc2ed21d3591a1490/docs/quickreference.md?plain=1#L986-L991)<!--rehype:target=__blank-->
### Two
```
@ -1024,7 +1045,7 @@ H3 部分 - 占位效果展示
...合并两行
```
`<!--rehype:wrap-class=row-span-2-->`
[#](https://github.com/jaywcjlove/reference/blob/ee03850619440e3700ed68ccc2ed21d3591a1490/docs/quickreference.md?plain=1#L1020-L1027)<!--rehype:target=__blank--> `<!--rehype:wrap-class=row-span-2-->`
### col-span-2
<!--rehype:wrap-class=col-span-2-->
@ -1033,7 +1054,7 @@ H3 部分 - 占位效果展示
...合并两列
```
`<!--rehype:wrap-class=col-span-2-->`
[#](https://github.com/jaywcjlove/reference/blob/ee03850619440e3700ed68ccc2ed21d3591a1490/docs/quickreference.md?plain=1#L1020-L1027)<!--rehype:target=__blank--> `<!--rehype:wrap-class=col-span-2-->`
### 红色标题
<!--rehype:style=background:#e91e63;-->
@ -1042,7 +1063,7 @@ H3 部分 - 占位效果展示
...红色标题配置
```
`<!--rehype:style=background:#e91e63;-->`
[#](https://github.com/jaywcjlove/reference/blob/ee03850619440e3700ed68ccc2ed21d3591a1490/docs/quickreference.md?plain=1#L1038-L1043)<!--rehype:target=__blank--> `<!--rehype:style=background:#e91e63;-->`
### 黄色标题
<!--rehype:style=background:#d7a100;-->
@ -1051,18 +1072,16 @@ H3 部分 - 占位效果展示
...黄色标题配置
```
`<!--rehype:style=background:#d7a100;-->`
[#](https://github.com/jaywcjlove/reference/blob/ee03850619440e3700ed68ccc2ed21d3591a1490/docs/quickreference.md?plain=1#L1047-L1052)<!--rehype:target=__blank--> `<!--rehype:style=background:#d7a100;-->`
### col-span-3
<!--rehype:wrap-class=col-span-3-->
```
...
```
... [#示例](https://github.com/jaywcjlove/reference/blob/ee03850619440e3700ed68ccc2ed21d3591a1490/docs/quickreference.md?plain=1#L1056-L1061)<!--rehype:target=__blank--> 三列合并
### 卡片子项
每个部分可以有以下子项:
[#示例](https://github.com/jaywcjlove/reference/blob/ee03850619440e3700ed68ccc2ed21d3591a1490/docs/quickreference.md?plain=1#L1063-L1077)<!--rehype:target=__blank--> 每个部分可以有以下子项:
#### H4 子标题
@ -1080,13 +1099,15 @@ H3 部分 - 占位效果展示
每个盒子(卡片)都是一个 `H3` 部分。 盒子将包含 `H3` 自身内的所有东西。
这是一个包含段落的基本部分
[#示例](https://github.com/jaywcjlove/reference/blob/ee03850619440e3700ed68ccc2ed21d3591a1490/docs/quickreference.md?plain=1#L1079-L1083)<!--rehype:target=__blank--> 这是一个包含段落的基本部分
### H3 部分背景颜色
<!--rehype:wrap-style=background: #1b5064;-->
<!--rehype:wrap-style=background: #1e7da173;-->
```markdown
注释配置:
`<!--rehype:wrap-style=background: #1b5064;-->`
`<!--rehype:wrap-style=background: #1e7da173;-->`
```
<!--rehype:className=wrap-text -->
[#示例](https://github.com/jaywcjlove/reference/blob/ee03850619440e3700ed68ccc2ed21d3591a1490/docs/quickreference.md?plain=1#L1085-L1087)<!--rehype:target=__blank-->

View File

@ -10,12 +10,18 @@ RegEX 备忘清单
这是开始使用正则表达式(Regex)的快速备忘单。
- [Python 中的 Regex](#python-中的正则表达式) _(Quick Reference)_
- [JavaScript 中的 Regex](#javascript-中的正则表达式) _(Quick Reference)_
- [PHP 中的 Regex](#php中的正则表达式) _(Quick Reference)_
- [Java 中的 Regex](#java-中的正则表达式) _(Quick Reference)_
- [MySQL 中的 Regex](#mysql中的正则表达式) _(Quick Reference)_
- [Vim 中的 Regex](./vim#vim-搜索和替换) _(Quick Reference)_
- [Python 中的 Regex](#python-中的正则表达式)
_(速查手册)_
- [JavaScript 中的 Regex](#javascript-中的正则表达式)
_(速查手册)_
- [PHP 中的 Regex](#php中的正则表达式)
_(速查手册)_
- [Java 中的 Regex](#java-中的正则表达式)
_(速查手册)_
- [MySQL 中的 Regex](#mysql中的正则表达式)
_(速查手册)_
- [Vim 中的 Regex](./vim#vim-搜索和替换)
_(速查手册)_
- [在线 Regex 测试器](https://regex101.com/) _(regex101.com)_
- [轻松学习 Regex](https://github.com/ziishaned/learn-regex/blob/master/translations/README-cn.md) _(github.com)_
- [正则表达式实例搜集](https://jaywcjlove.github.io/regexp-example) _(jaywcjlove.github.io)_
@ -32,6 +38,7 @@ RegEX 备忘清单
`[0-9]` | 范围内的数字:`0-9`
`[a-zA-Z]` | 范围内的字符:<br>`a-z``A-Z`
`[a-zA-Z0-9]` | 范围内的字符:<br>`a-z``A-Z``0-9`
<!--rehype:className=left-align-->
### 量词
@ -47,24 +54,27 @@ RegEX 备忘清单
`a*` | 贪心量词
`a*?` | 惰性量词
`a*+` | 占有量词
<!--rehype:className=left-align-->
### 常用元字符
- \^
- \{
- \+
- \<
- \[
- \*
- \)
- \>
- \.
- \(
- \|
- \$
- \\
- \?
<!--rehype:className=cols-3 style-none-->
模式 | 描述
:-|-
`^` | 匹配字符串的开头
`{` | 开始一个数量限定符,指定出现次数
`+` | 匹配前面的元素一次或多次
`<` | 非标准的正则表达式元字符(在 HTML 中常用)
`[` | 开始一个字符类
`*` | 匹配前面的元素零次或多次
`)` | 结束捕获组
`>` | 非标准的正则表达式元字符(在 HTML 中常用)
`.` | 匹配除换行符之外的任意字符
`(` | 开始一个捕获组
`\|` | 在正则表达式模式中作为逻辑或操作
`$` | 匹配字符串的结尾
`\` | 转义元字符,使其具有字面意义
`?` | 匹配前面的元素零次或一次
<!--rehype:className=left-align-->
使用 `\` 转义这些特殊字符
@ -126,6 +136,7 @@ RegEX 备忘清单
`\z` | 字符串的绝对结尾
`\b` | 一个词的边界
`\B` | 非单词边界
<!--rehype:className=left-align-->
### 替代
@ -144,6 +155,7 @@ RegEX 备忘清单
`\U` | 大写转换
`\L` | 小写转换
`\E` | 终止任何转换
<!--rehype:className=left-align-->
### 组构造
@ -160,6 +172,7 @@ RegEX 备忘清单
`(?P<name>...)` | 命名捕获组
`(?imsxXU)` | 内联修饰符
`(?(DEFINE)...)` | 在使用它们之前预定义模式
<!--rehype:className=left-align-->
### 断言
@ -368,6 +381,7 @@ RegEX 备忘清单
:-|-
`(in\|out)put` | 匹配 <yel>input</yel><yel>output</yel>
`\d{5}(-\d{4})?` | 美国邮政编码 _(“+ 4”可选)_
<!--rehype:className=left-align-->
如果组后匹配失败,解析器会尝试每个替代方案。
<br>
@ -395,10 +409,13 @@ RegEX 备忘清单
:-|-
`(?>red\|green\|blue)` | 比非捕获更快
`(?>id\|identity)\b` | 匹配 <yel>id</yel>,但不匹配 <yel>id</yel>entity
<!--rehype:className=left-align-->
"id" 匹配,但 `\b` 在原子组之后失败,
<yel>id</yel> 匹配,但 `\b` 在原子组之后失败,
解析器不会回溯到组以重试“身份”
---
如果替代品重叠,请从长到短命令。
### 零宽度断言 Lookaround(前后预查)
@ -648,7 +665,7 @@ M(?(?=.*?\bher\b)s|r)\.
<!--rehype:className=show-header-->
Python 中的正则表达式
---------------
---
### 入门
@ -662,6 +679,7 @@ import re
<!--rehype:wrap-class=col-span-2 row-span-3-->
#### re.search()
<!--rehype:style=text-align: left;color: var(--primary-color);-->
```python
>>> sentence = 'This is a sample string'
@ -672,6 +690,7 @@ False
```
#### re.findall()
<!--rehype:style=text-align: left;color: var(--primary-color);-->
```python
>>> re.findall(r'\bs?pare?\b', 'par spar apparent spare part pare')
@ -681,6 +700,7 @@ False
```
#### re.finditer()
<!--rehype:style=text-align: left;color: var(--primary-color);-->
```python
>>> m_iter = re.finditer(r'[0-9]+', '45 349 651 593 4 204')
@ -689,6 +709,7 @@ False
```
#### re.split()
<!--rehype:style=text-align: left;color: var(--primary-color);-->
```python
>>> re.split(r'\d+', 'Sample123string42with777numbers')
@ -696,6 +717,7 @@ False
```
#### re.sub()
<!--rehype:style=text-align: left;color: var(--primary-color);-->
```python
>>> ip_lines = "catapults\nconcatenate\ncat"
@ -706,6 +728,7 @@ False
```
#### re.compile()
<!--rehype:style=text-align: left;color: var(--primary-color);-->
```python
>>> pet = re.compile(r'dog')

419
docs/rxjs.md Normal file
View File

@ -0,0 +1,419 @@
RxJS 备忘清单
===
[RxJS](https://rxjs.dev/)Reactive Extensions for JavaScript是一个强大的库用于处理异步事件和数据流。以下是 RxJS 的一些关键概念、操作符和方法的总结。
## 入门
### 安装 RxJS
```bash
npm install rxjs
```
### 清晰
<!--rehype:wrap-class=row-span-2-->
RxJS 的强大之处在于它使用纯函数生成值的能力。这意味着您的代码更不容易出错。通常情况下,您会创建一个不纯的函数,而代码的其他部分可能会弄乱您的状态。
```js
let count = 0;
document.addEventListener('click', () => {
console.log(`Clicked ${++count} times`)
});
```
使用 `RxJS` 可以隔离状态。
```js
import { fromEvent, scan } from 'rxjs';
fromEvent(document, 'click')
.pipe(scan((count) => count + 1, 0))
.subscribe((count) => {
console.log(`Clicked ${count} times`)
});
```
扫描操作符的工作原理与数组的 `reduce` 类似。它接受一个暴露给回调函数的值。回调的返回值将成为下次回调运行时公开的下一个值。
### 流
<!--rehype:wrap-class=row-span-2-->
`RxJS` 拥有一整套运算符,可以帮助您控制事件如何流经您的可观察对象。这是使用纯 JavaScript 每秒最多允许一次点击的方式:
```js
let count = 0;
let rate = 1000;
let lastClick = Date.now() - rate;
document.addEventListener('click', () => {
if (Date.now() - lastClick >= rate) {
console.log(`Clicked ${++count}times`);
lastClick = Date.now();
}
});
```
使用 RxJS
```js
import { fromEvent, throttleTime, scan
} from 'rxjs';
fromEvent(document, 'click')
.pipe(throttleTime(1000),
scan((count) => count + 1, 0)
)
.subscribe((count) => {
console.log(`Clicked ${count} times`)
});
```
### 第一个示例
通常情况下,您需要注册事件监听器。
```js
document.addEventListener('click', () => {
console.log('Clicked!')
});
```
使用 [RxJS](https://rxjs.dev/),您可以创建一个可观察对象。
```js
import { fromEvent } from 'rxjs';
fromEvent(document, 'click')
.subscribe(() => {
console.log('Clicked!')
});
```
### 导入所需的 Observable 和操作符
<!--rehype:wrap-class=col-span-2-->
```javascript
import { Observable, of, from, interval, fromEvent } from 'rxjs';
import { map, filter, switchMap, mergeMap, catchError, debounceTime,
distinctUntilChanged, take, tap, concatMap, delay, retryWhen, scan,
combineLatest, concat, merge, forkJoin, withLatestFrom, startWith, reduce
} from 'rxjs/operators';
```
## 创建 Observable
### of
```javascript
const obs = of(1, 2, 3);
obs.subscribe(console.log);
// 输出: 1 2 3
```
创建一个立即发送指定值并完成的 `Observable`
### from
```javascript
const obs = from([1, 2, 3]);
obs.subscribe(console.log);
// 输出: 1 2 3
```
从 Promise、数组、可迭代对象创建 `Observable`
### interval
```javascript
const obs = interval(1000);
obs.subscribe(console.log);
// 每秒输出一次递增的数字
```
创建一个定时发送递增整数的 `Observable`
### fromEvent
<!--rehype:wrap-class=col-span-2-->
```javascript
const button = document.querySelector('button');
const obs = fromEvent(button, 'click');
obs.subscribe(event => {
console.log('Button clicked!', event)
});
```
从 DOM 事件创建 `Observable`
## 操作符
### map
```javascript
const obs = of(1, 2, 3).pipe(
map(x => x * 2)
);
obs.subscribe(console.log);
// 输出: 2 4 6
```
`Observable` 发出的每个值应用一个函数
### filter
```javascript
const obs = of(1, 2, 3).pipe(
filter(x => x % 2 === 0)
);
obs.subscribe(console.log);
// 输出: 2
```
过滤 `Observable` 发出的值
### switchMap
```javascript
const obs = interval(1000).pipe(
switchMap(() => of('Hello'))
);
obs.subscribe(console.log);
// 每秒输出一次 "Hello"
```
`Observable` 每个值映射成 `Observable` 并订阅,前一个订阅将被取消
### mergeMap
```javascript
const obs = interval(1000).pipe(
mergeMap(() => of('Hello'))
);
obs.subscribe(console.log);
// 每秒输出一次 "Hello"
```
类似 `switchMap`,但允许多个内部 `Observable` 并发执行
### catchError
```javascript
const obs = of(1, 2, 3).pipe(
map(x => {
if (x === 2) throw 'Error!';
return x;
}),
catchError(err => of('发现一个错误:'+err))
);
obs.subscribe(console.log);
// 输出: 1 发现一个错误Error!
```
捕获 `Observable` 链中的错误
### debounceTime
```javascript
const obs = fromEvent(document,'mousemove')
.pipe(debounceTime(300));
obs.subscribe(event => {
console.log('Mouse moved!', event)
});
```
延迟处理,直到源 `Observable` 停止发出数据一定时间
### distinctUntilChanged
```javascript
const obs = of(1, 1, 2, 2, 3, 3).pipe(
distinctUntilChanged()
);
obs.subscribe(console.log);
// 输出: 1 2 3
```
忽略连续重复的值
### take
```javascript
const obs = interval(1000).pipe(
take(3)
);
obs.subscribe(console.log);
// 输出: 0 1 2
```
只发出前 n 个值
## 组合操作符
### combineLatest
```javascript
const obs1 = interval(1000);
const obs2 = of('A', 'B', 'C');
const combined = combineLatest(
[obs1, obs2]
);
combined.subscribe(console.log);
// 每秒输出一次两个 observables 的最新值
```
当两个 `Observable` 都发出新的值时,发出它们的组合
### concat
```javascript
const obs1 = of(1, 2, 3);
const obs2 = of(4, 5, 6);
const combined = concat(obs1, obs2);
combined.subscribe(console.log);
// 输出: 1 2 3 4 5 6
```
按顺序连接多个 `Observable`
### merge
```javascript
const obs1 = interval(1000).pipe(
map(x => 'A' + x)
);
const obs2 = interval(500).pipe(
map(x => 'B' + x)
);
const combined = merge(obs1, obs2);
combined.subscribe(console.log);
// 每秒输出 "A" 和 "B" 开头的递增数字
```
将多个 `Observable` 合并为一个
### forkJoin
```javascript
const obs1 = of(1, 2, 3);
const obs2 = of('A', 'B', 'C');
const combined = forkJoin([obs1, obs2]);
combined.subscribe(console.log);
// 输出: [3, 'C']
```
等待所有 `Observable` 完成,然后发出它们的最后一个值的数组
## 错误处理
### retryWhen
<!--rehype:wrap-class=col-span-2-->
```javascript
const obs = throwError('出了些问题!')
.pipe(
retryWhen(errors =>
errors.pipe(delayWhen(() => interval(1000)))
)
);
obs.subscribe(console.log, console.error);
// 输出: 出了些问题! (每秒重试一次)
```
`Observable` 发出错误时重试
## 实用操作符
### tap
```javascript
const obs = of(1, 2, 3).pipe(
tap(x => console.log(`Before: ${x}`)),
map(x => x * 2),
tap(x => console.log(`After: ${x}`))
);
obs.subscribe();
// 输出: Before: 1, After: 2, Before: 2,
// After: 4, Before: 3, After: 6
```
用于记录、测量或执行副作用操作
### startWith
```javascript
const obs = of(1, 2, 3).pipe(
startWith(0)
);
obs.subscribe(console.log);
// 输出: 0 1 2 3
```
`Observable` 序列前添加值
### scan
```javascript
const obs = of(1, 2, 3).pipe(
scan((acc, value) => acc + value, 0)
);
obs.subscribe(console.log);
// 输出: 1 3 6
```
`Observable` 发出的每个值应用累加器函数
### reduce
<!--rehype:wrap-class=col-span-2-->
```javascript
const obs = of(1, 2, 3).pipe(reduce((acc, value) => acc + value, 0));
obs.subscribe(console.log);
// 输出: 6
```
`Observable` 发出的值进行累加
### delay
```javascript
const obs = of('Hello').pipe(delay(2000));
obs.subscribe(console.log);
// 输出: 'Hello' (延迟2秒)
```
延迟 `Observable` 发出数据的时间
调度器
---
### 调度器说明
调度器Scheduler控制着 RxJS 操作的执行时机。常见的调度器有:
- `asyncScheduler`:异步执行任务
- `queueScheduler`:按队列顺序执行任务
- `animationFrameScheduler`:在浏览器的下一次重绘前执行任务
### 示例
<!--rehype:wrap-class=col-span-2-->
```javascript
const obs = of(1, 2, 3).pipe(observeOn(asyncScheduler));
console.log('Before subscribe');
obs.subscribe(console.log);
console.log('After subscribe');
// 输出: Before subscribe, After subscribe, 1, 2, 3
```
## 另见
- [RxJS 官方文档](https://rxjs.dev/)
- [RxJS 学习资源](https://rxjs.dev/guide/overview)
- [RxJS 操作符参考](https://rxjs.dev/guide/operators)

636
docs/springboot.md Normal file
View File

@ -0,0 +1,636 @@
Spring Boot 备忘清单
===
此快速参考备忘单提供了使用 Spring Boot 的用法
注:开发 springboot 需要要基本的 java 基础和 maven 基础。
入门
---
### 介绍
Spring Boot 是一个用于简化 Spring 应用程序开发的框架。它提供了一种简单的方式来创建、运行和部署 Spring 应用程序,并简化了配置和依赖管理。
### 项目创建与配置
<!--rehype:wrap-class=col-span-2-->
- 使用 [`Spring Initializr`](https://start.spring.io) 创建项目
- 国内可以使用阿里云的 [`Spring Initializr`](https://start.aliyun.com/) 创建项目选择依赖项如Web、JPA、Security和 Spring Boot 版本
- 添加所需的依赖项到 `pom.xml`(Maven) 或 `build.gradle`(Gradle) 文件中
-`src/main/resources` 目录下创建 `application.properties``application.yml` 文件,配置应用程序属性,例如数据库连接信息、端口号等
配置
---
### 配置文件说明
<!--rehype:wrap-class=row-span-2-->
在Spring Boot应用程序中通常使用YAML格式`.yml`文件)来配置应用程序的属性和设置。相比于传统的`.properties`文件YAML格式更加清晰易读并且支持层级结构和列表等复杂数据类型。以下是一些常用的Spring Boot YAML配置字段及其说明
- `server.port`: 配置应用程序的端口号。
- `spring.application.name`: 配置应用程序的名称。
- `spring.datasource.url`: 配置数据库连接的URL。
- `spring.datasource.username`: 配置数据库连接的用户名。
- `spring.datasource.password`: 配置数据库连接的密码。
- `logging.level`: 配置日志记录的级别,如`DEBUG``INFO``WARN``ERROR`等。
- `management.endpoints.web.exposure.include`: 配置哪些管理端点(如`health``info`可以通过Web访问。
- `spring.jpa.hibernate.ddl-auto`: 配置Hibernate的DDL模式`update``create``create-drop`等。
### 1. 应用程序配置
```yaml
spring:
application:
name: my-application
```
`spring.application.name`: 应用程序的名称。在集成服务发现和配置管理时特别有用也会影响Actuator端点的路径。
### 2. 服务器端口配置
```yaml
server:
port: 8080
```
`server.port`: 应用程序监听的HTTP端口号。默认为8080可以根据需要进行配置。
### 3. 数据源配置
<!--rehype:wrap-class=col-span-2-->
```yaml
spring:
datasource:
url: jdbc:mysql://localhost:3306/mydatabase
username: root
password: password
driver-class-name: com.mysql.cj.jdbc.Driver
```
#### 说明
- `spring.datasource.url`: 数据库连接URL。
- `spring.datasource.username``spring.datasource.password`: 数据库的用户名和密码。
- `spring.datasource.driver-class-name`: 数据库驱动类名。
### 4. **JPA 配置**
```yaml
spring:
jpa:
show-sql: true
hibernate:
ddl-auto: update
```
#### 说明
- `spring.jpa.show-sql`: 是否在控制台显示SQL语句。
- `spring.jpa.hibernate.ddl-auto`: Hibernate自动建表策略`update``create``validate`等。
### 5. 日志配置
```yaml
logging:
level:
org.springframework: INFO
com.example: DEBUG
```
#### 说明
- `logging.level`: 日志级别配置,可以针对不同的包或类设置不同的日志级别。
### 6. Spring Security 配置
```yaml
spring:
security:
user:
name: user
password: password
basic:
enabled: true
```
#### 说明
- `spring.security.user.name``spring.security.user.password`: 基本认证的用户名和密码。
- `spring.security.basic.enabled`: 是否启用基本认证。
### 7. Actuator 配置
```yaml
management:
endpoints:
web:
exposure:
include: health, info
```
#### 说明
- `management.endpoints.web.exposure.include`: 暴露给外部的Actuator端点可以设置为`*`来暴露所有端点。
### 8. 多环境配置
```yaml
spring:
profiles:
active: dev
```
#### 说明
- `spring.profiles.active`: 指定当前激活的环境配置文件,可以根据需要选择`dev``prod`等不同的配置文件。
### 9. **自定义属性配置**
```yaml
myapp:
custom:
property: value
```
#### 说明
- 自定义应用程序属性,可以在应用程序中通过`@Value`注解或`Environment`对象访问。
依赖管理
---
### 依赖管理介绍
- 在 Spring Boot 中,依赖管理是非常重要的一部分。
- 它通过简化依赖项的引入和版本管理,大大简化了项目的构建和维护过程。
- Spring Boot采用了 Starter 依赖项的概念,通过提供预配置的依赖项集合来简化项目的初始化和配置。
### Starter 依赖项
<!--rehype:wrap-class=row-span-2 col-span-2-->
Spring Boot 的 Starter 依赖项是预先配置的一组依赖项集合,它们以 `spring-boot-starter-*` 的命名格式提供。这些 Starter 依赖项可以按照功能领域进行分类,例如:
- `spring-boot-starter-web`: 支持构建Web应用程序包括Spring MVC和内嵌的Servlet容器如Tomcat
- `spring-boot-starter-data-jpa`: 支持使用Spring Data JPA访问数据库包括Hibernate和JPA实现。
- `spring-boot-starter-security`: 支持Spring Security用于身份验证和授权。
- `spring-boot-starter-test`: 支持单元测试和集成测试包括JUnit、Mockito等。
- `spring-boot-starter-actuator`: 支持集成Actuator用于监控和管理应用程序。
引入Starter依赖项可以快速添加特定功能Spring Boot会自动配置所需的组件和设置减少手动配置工作量。
### 自动依赖解析和版本管理
<!--rehype:wrap-class=row-span-2-->
Spring Boot的BOMBill of Materials集中管理各个 Starter 依赖项的版本,通过在`pom.xml`Maven`build.gradle`Gradle中引入 BOM可以简化依赖项版本管理。例如在 Maven 项目中:
```xml
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>2.6.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
```
这样一来,当你在项目中引入 Spring Boot 的 Starter 依赖项时不需要显式声明版本号Maven 会自动使用 BOM 中指定的版本。
### 自定义依赖管理
尽管Spring Boot提供了丰富的Starter依赖项和依赖管理功能但有时你可能需要自定义特定的依赖项或版本。在这种情况下你可以在`pom.xml``build.gradle`中显式声明所需的依赖项而不使用Starter依赖项。
例如在Maven项目中你可以这样声明一个依赖项
```xml
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<version>2.6.0</version>
</dependency>
```
这样做可以覆盖Spring Boot BOM中指定的版本允许你使用特定版本的依赖项。
### 排除和冲突解决
在实际项目中可能会遇到依赖项之间的冲突或不兼容性问题。Spring Boot允许你通过`<exclusions>`标签来排除Starter依赖项中的某些传递性依赖以解决冲突问题。
例如在Maven项目中排除传递性依赖
```xml
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</exclusion>
</exclusions>
</dependency>
```
这种排除机制使得你可以更精确地控制项目中依赖项的版本和组合,以避免不必要的冲突。
Spring Boot 核心功能
---
<!--rehype:body-class=cols-2-->
### 依赖注入Dependency Injection
依赖注入是Spring框架的核心概念之一它通过控制反转IoCInversion of Control的方式管理对象之间的依赖关系从而实现松耦合、可测试和可维护的代码结构。Spring Boot通过自动配置的方式支持依赖注入以下是一些关键点
#### 自动装配Auto-configuration
Spring Boot根据类路径中的依赖项自动配置应用程序上下文。这包括自动扫描和注册带有特定注解`@Component``@Service``@Repository`的Bean以及自动解析和注入这些Bean之间的依赖关系。
#### Bean的声明和管理
开发者可以使用`@Autowired`注解在需要依赖注入的地方注入其他BeanSpring Boot会自动解析和注入所需的依赖。例如
```java
@RestController
public class MyContr {
private final MyService myService;
@Autowired
public MyContr(MyService myService) {
this.myService = myService;
}
// Controller methods
}
```
在上面的例子中,`MyController`中的`MyService`依赖通过构造函数注入。
#### 条件化注入
Spring Boot支持根据条件选择性地注入Bean。例如可以使用 `@Conditional` 注解或 `@ConditionalOnProperty` 注解根据特定的条件决定是否创建和注入Bean。
### 面向切面编程Aspect-Oriented Programming
面向切面编程是一种软件开发方法用于分离横切关注点cross-cutting concerns例如日志、事务管理、安全性等以便更好地模块化和管理应用程序。Spring Boot通过整合Spring AOP框架支持面向切面编程以下是相关的说明
#### 切面Aspect
切面是一个模块化的类它包含了横切关注点的逻辑。在Spring Boot中可以使用`@Aspect`注解标记一个类作为切面,并通过`@Before``@After``@Around`等注解定义切面的具体行为。
#### 切点Pointcut
切点定义了在应用程序中哪些位置应用切面逻辑。切点表达式使用`execution`关键字指定要拦截的方法调用。例如:
```java
@Aspect
@Component
public class LoggingAspect {
@Before("execution(* com.example.service.*.*(..))")
public void beforeServiceMethods(JoinPoint joinPoint) {
// Advice logic before service method execution
}
// Other advices (e.g., @After, @Around) can be defined similarly
}
```
#### 通知Advice
通知是在切点处执行的具体逻辑,包括`@Before``@AfterReturning``@AfterThrowing``@Around`等。例如,在上面的例子中,`beforeServiceMethods`方法就是一个`@Before`通知,它在目标方法执行之前执行。
#### 配置和启用
Spring Boot通过自动配置和注解扫描使得使用AOP变得非常简单。通常情况下只需在切面类上加上`@Aspect`注解并确保它被Spring Boot的组件扫描机制扫描到即可。
Web 开发
---
### 1. 创建一个新的 Spring Boot 项目
<!--rehype:wrap-class=row-span-3-->
你可以使用 Spring Initializr 创建一个新的 Spring Boot 项目。访问 [start.spring.io](https://start.spring.io/) 并按照以下配置创建项目:
- **Project**: Maven 或 Gradle选择你的构建工具
- **Language**: Java
- **Spring Boot**: 选择最新的稳定版本
- **Project Metadata**:
- **Group**: com.example或者你喜欢的 Group ID
- **Artifact**: helloworld或者你喜欢的 Artifact ID
- **Dependencies**: 选择 "Spring Web"
点击 "Generate" 下载项目的 zip 文件。
### 2. 将项目导入到你的 IDE 中
解压下载的文件并导入到你喜欢的 IDE 中(如 IntelliJ IDEA、Eclipse 等)。
### 3. 实现 Hello World Controller
<!--rehype:wrap-class=row-span-3-->
在 IDE 中打开你的项目,导航到 `src/main/java/com/example/helloworld`。你会看到一个名为 `HelloworldApplication.java` 的类文件,这是 Spring Boot 应用程序的入口类。
在这个类的同级目录下创建一个新的 Java 类文件,例如 `HelloController.java`,并添加以下内容:
```java
package com.example.helloworld;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class HelloController {
@GetMapping("/")
public String hello() {
return "Hello, World!";
}
}
```
### 4. 运行应用程序
使用 Maven 或 Gradle 构建项目并启动应用程序。可以通过 IDE 的运行功能或者命令行执行以下命令:
```bash
mvn spring-boot:run
```
或者
```bash
./gradlew bootRun
```
### 5. 访问 Hello World 页面
在浏览器中访问 `http://localhost:8080/`,你应该能够看到显示 "Hello, World!" 的页面。
这样,你就成功创建了一个简单的 Spring Boot Web 应用程序,并实现了一个基本的 "Hello, World!" 示例。
## **数据访问**
### 1.创建过程和 web 项目示例一样
注意:需要选择 jpa 和对应数据库的驱动
### 2. 配置数据库连接
默认情况下Spring Boot 使用 H2 Database 作为内嵌数据库。如果你想使用其他数据库,可以在 `application.properties`(或 `application.yml`)文件中配置数据库连接信息。
例如,使用 H2 Database 的默认配置:
```properties
# application.properties
spring.datasource.url=jdbc:h2:mem:testdb
spring.datasource.driverClassName=org.h2.Driver
spring.datasource.username=username
spring.datasource.password=password
spring.jpa.database-platform=org.hibernate.dialect.H2Dialect
# Hibernate ddl auto (create, create-drop, validate, update)
spring.jpa.hibernate.ddl-auto=update
```
### 5. 创建一个简单的控制器来测试
<!--rehype:wrap-class=row-span-3-->
创建一个简单的控制器 `UserController`,用来处理 HTTP 请求,并操作 `UserRepository` 来访问数据库。
```java
package com.example.userdemo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@RestController
@RequestMapping("/users")
public class UserController {
@Autowired
private UserRepository userRepository;
// 获取所有用户
@GetMapping("/")
public List<User> getAllUsers() {
return userRepository.findAll();
}
// 通过 id 获取用户
@GetMapping("/{id}")
public User getUserById(@PathVariable("id") Long id) {
return userRepository.findById(id).orElse(null);
}
// POST 创建新用户
@PostMapping("/")
public User addUser(@RequestBody User user) {
return userRepository.save(user);
}
// PUT 更新用户
@PutMapping("/{id}")
public User updateUser(@PathVariable("id") Long id, @RequestBody User userDetails) {
User user = userRepository.findById(id).orElse(null);
if (user != null) {
user.setUsername(userDetails.getUsername());
user.setAge(userDetails.getAge());
user.setSex(userDetails.getSex());
return userRepository.save(user);
}
return null;
}
// DELETE 删除用户
@DeleteMapping("/{id}")
public void deleteUser(@PathVariable("id") Long id) {
userRepository.deleteById(id);
}
}
```
### 4. 创建 UserRepository 接口
<!--rehype:wrap-class=col-span-2-->
在同样的目录下创建一个接口 `UserRepository`,继承自 `JpaRepository<User, Long>`,这样 Spring Data JPA 将会自动实现一些基本的数据库操作方法。
```java
package com.example.userdemo;
import org.springframework.data.jpa.repository.JpaRepository;
public interface UserRepository extends JpaRepository<User, Long> {
}
```
### 3. 创建实体类 `User`
`src/main/java/com/example/userdemo` 目录下创建一个名为 `User` 的实体类:
```java
package com.example.userdemo;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
@Entity
public class User {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long userId;
private String username;
private Integer age;
private String sex;
// Constructors, getters, and setters 省略
}
```
### 6. 运行应用程序并测试
使用 Maven 或 Gradle 构建并运行你的应用程序。然后,可以使用 Postman 或浏览器访问以下 API 来测试你的应用程序:
- **GET** `http://localhost:8080/users/`
获取所有用户
- **GET** `http://localhost:8080/users/{id}`
根据用户ID获取用户信息
- **POST** `http://localhost:8080/users/`
添加新用户Body 中包含 JSON 数据)
- **PUT** `http://localhost:8080/users/{id}`
更新用户信息Body 中包含 JSON 数据)
- **DELETE** `http://localhost:8080/users/{id}`
删除用户
测试
---
### 1. 创建一个简单的项目
`src/main/java/com/example/demo` 目录下创建一个名为 `HelloController.java` 的类:
```java
package com.example.demo;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class HelloController {
@GetMapping("/hello")
public String hello() {
return "Hello, World!";
}
}
```
创建过程同 web 项目创建
### 2. 编写测试类
<!--rehype:wrap-class=col-span-2-->
`src/test/java/com/example/demo` 目录下创建一个名为 `HelloControllerTest.java` 的测试类:
```java
package com.example.demo;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit.jupiter.web.SpringJUnitWebConfig;
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.request.MockMvcRequestBuilders;
import org.springframework.test.web.servlet.result.MockMvcResultMatchers;
import static org.springframework.test.web.servlet.result.MockMvcResultHandlers.print;
@SpringBootTest
@AutoConfigureMockMvc
public class HelloControllerTest {
@Autowired
private MockMvc mockMvc;
@Test
public void helloTest() throws Exception {
mockMvc.perform(MockMvcRequestBuilders.get("/hello"))
.andExpect(MockMvcResultMatchers.status().isOk())
.andExpect(MockMvcResultMatchers.content().string("Hello, World!"))
.andDo(print());
}
}
```
### 3. 解释测试类的关键点
<!--rehype:wrap-class=col-span-2-->
- `@SpringBootTest`: 这个注解告诉 Spring Boot 在测试时启动整个 Spring 应用程序上下文。
- `@AutoConfigureMockMvc`: 这个注解确保在测试中自动配置 MockMvc 实例,用于模拟 HTTP 请求。
- `@Autowired private MockMvc mockMvc`: 注入 MockMvc 实例,用于执行 HTTP 请求并验证响应。
- `@Test public void helloTest()`: 这是一个 JUnit 测试方法,用来测试 `HelloController` 中的 `hello()` 方法。
- `mockMvc.perform(...)`: 执行一个 GET 请求到 `/hello` 接口。
- `andExpect(MockMvcResultMatchers.status().isOk())`: 预期响应的状态码是 200 OK。
- `andExpect(MockMvcResultMatchers.content().string("Hello, World!"))`: 预期响应的内容是 "Hello, World!"。
- `andDo(print())`: 打印请求和响应的详细信息,方便调试。
### 4. 运行测试
运行测试,确保程序正确.
部署与扩展
---
### 1. 打包方式
<!--rehype:wrap-class=col-span-2-->
Spring Boot 应用程序可以打包为以下几种方式之一:
#### 可执行 JAR 文件
- 最常见的方式是将 Spring Boot 应用程序打包成一个可执行的 JAR 文件Java Archive
- JAR 文件中包含了所有的依赖项,可以通过 `java -jar` 命令来运行。
#### WAR 文件
- 如果你需要将 Spring Boot 应用程序部署到外部的 Servlet 容器(如 Tomcat、Jetty 等),你可以将应用程序打包成一个 WAR 文件Web Application Archive
- WAR 文件适合传统的 Java Web 应用程序部署方式。
### 3. 打包过程概述
<!--rehype:wrap-class=row-span-2-->
当你运行 Maven 的构建命令时,它们会执行以下几个主要步骤来打包你的应用程序:
- `依赖项解析和下载`:构建工具会检查你项目中的依赖项,下载缺失的依赖并构建整个依赖树。
- `编译代码`:构建工具会编译你的 Java 代码、资源文件等。
- `运行测试`:通常会执行单元测试和集成测试,确保代码质量和功能正确性。
- `打包应用程序`
- 对于可执行 JAR 文件:构建工具会将编译后的类文件、资源文件和依赖项打包到一个 JAR 文件中。同时,它会生成一个 MANIFEST.MF 文件指定应用程序的入口点main class
- 对于 WAR 文件:构建工具会将编译后的类文件、资源文件和依赖项打包成一个 WAR 文件,包括 WEB-INF 目录和其他必要的内容。
- `输出结果`:构建工具会在指定的目录下生成打包好的 JAR 或 WAR 文件,通常位于 `target` 目录下Maven
<!--rehype:className=style-timeline-->
在你的 Spring Boot 项目中,通常有一个入口类(如 `Application.java` 或者根据你的项目命名)。这个类使用 `@SpringBootApplication` 注解标记,它包含了 `main` 方法用来启动应用程序。
### 2. 打包工具
通常使用以下两种构建工具来打包 Spring Boot 应用程序:
#### **Maven**
- 使用 Maven 的 `mvn package` 命令可以将应用程序打包为 JAR 或 WAR 文件。
-`pom.xml` 文件中Spring Boot 应用程序通常会依赖于 `spring-boot-starter-parent` 父项目,这简化了 Maven 配置和依赖管理。
### 4. 示例
假设你有一个简单的 Spring Boot 应用程序,并且已经配置好了 Maven 或 Gradle。运行以下命令即可进行打包
- **Maven**`mvn clean package`
构建工具会执行以上步骤,生成可执行的 JAR 文件或 WAR 文件,你可以根据需要进行部署和运行。

1046
docs/stylex.md Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
Twitter
Twitter(X)
===
Twitter 上的 26 个键盘快捷键和高级搜索参考备忘清单
[Twitter](https://x.com) 上的 26 个键盘快捷键和高级搜索参考备忘清单
键盘快捷键
----

174
docs/vimium.md Normal file
View File

@ -0,0 +1,174 @@
Vimium 备忘清单
===
这是开始使用 [Vimium](https://github.com/philc/vimium) 浏览器扩展的快速参考备忘单,可以帮助用户更高效地浏览网页
入门
----
### 功能特点
#### 键盘导航
- 使用类似 Vim 的快捷键进行网页滚动、打开链接、管理标签页等操作
#### 快捷键自定义
- 用户可根据个人习惯自定义快捷键,提升使用体验
#### 无鼠标操作
- 通过键盘快捷键完成几乎所有浏览器操作,减少对鼠标的依赖,提高效率
### 安装
**Chrome 浏览器**
- [Chrome web store](https://chromewebstore.google.com/detail/vimium/dbepggeogbaibhgnhhndojpepiihcmeb)
**Edge 浏览器**
- [Edge Add-ons](https://microsoftedge.microsoft.com/addons/detail/vimium/djmieaghokpkpjfbpelnlkfgfjapaopa)
**Firefox 浏览器**
- [Firefox Add-ons](https://addons.mozilla.org/en-GB/firefox/addon/vimium-ff/)
### 快捷键自定义
```json
{
"customKeybindings": {
"scrollUp": "k",
"scrollDown": "j",
"scrollLeft": "h",
"scrollRight": "l",
"reload": "r",
"openLinkInCurrentTab": "f",
"openLinkInNewTab": "F"
}
}
```
键盘快捷键
---
### 基本导航
<!--rehype:wrap-class=row-span-3-->
快捷键 | 功能
:-- | ---
`?` | 显示帮助对话框,列出所有可用按键
`h` | 向左滚动
`j` | 向下滚动
`k` | 向上滚动
`l` | 向右滚动
`gg` | 滚动到页面顶部
`G` | 滚动到页面底部
`d` | 向下滚动半页
`u` | 向上滚动半页
`f` | 在当前标签页中打开链接
`F` | 在新标签页中打开链接
`r` | 重新加载页面
`gs` | 查看页面源代码
`I` | 进入插入模式 -- 所有命令将被忽略,直到你按下 Esc 退出
`yy` | 复制当前网址到剪贴板
`yf` | 复制链接地址到剪贴板
`gf` | 向前切换到下一个框架
`gF` | 聚焦主框架/顶部框架
<!--rehype:className=shortcuts left-align-->
### 导航到新页面
快捷键 | 功能
:-- | ---
`o` | 打开网址、书签或历史记录条目
`O` | 在新标签页中打开网址、书签或历史记录条目
`b` | 打开书签
`B` | 在新标签页中打开书签
<!--rehype:className=shortcuts left-align-->
### 浏览您的历史
快捷键 | 功能
:-- | ---
`H` | 后退到历史记录
`L` | 前进到历史记录
<!--rehype:className=shortcuts left-align-->
### 操作选项卡
<!--rehype:wrap-class=row-span-2-->
快捷键 | 功能
:-- | ---
`J, gT` | 向左切换一个标签页
`K, gt` | 向右切换一个标签页
`g0` | 跳转到第一个标签页</br>使用 ng0 跳转到第 n 个标签页
`g$` | 跳转到最后一个标签页
`^` | 访问上一个访问过的标签页
`t` | 创建新标签页
`yt` | 复制当前标签页
`x` | 关闭当前标签页
`X` | 恢复关闭的标签页(撤销 'x' 命令)
`T` | 搜索打开的标签页
`W` | 将当前标签页移动到新窗口
`<a-p>` | 固定/取消固定当前标签页
<!--rehype:className=shortcuts left-align-->
### 链接操作
| 快捷键 | 功能 |
| -------- | -------------------------- |
| `f` | 打开链接 |
| `F` | 在新标签页中打开链接 |
| `gf` | 打开下一个框架 |
| `gu` | 进入当前URL的父级路径 |
| `gU` | 进入当前URL的根路径 |
<!--rehype:className=shortcuts left-align-->
### 标签页操作
| 快捷键 | 功能 |
| -------- | -------------------------- |
| `J` | 切换到左边的标签页 |
| `K` | 切换到右边的标签页 |
| `t` | 创建新标签页 |
| `x` | 关闭当前标签页 |
| `X` | 恢复最近关闭的标签页 |
| `T` | 搜索打开的标签页 |
<!--rehype:className=shortcuts left-align-->
### 搜索与复制
| 快捷键 | 功能 |
| -------- | -------------------------- |
| `/` | 在页面中搜索 |
| `n` | 下一个搜索结果 |
| `N` | 上一个搜索结果 |
| `yy` | 复制当前页面的URL |
| `yf` | 复制链接 |
<!--rehype:className=shortcuts left-align-->
### 插入模式
| 快捷键 | 功能 |
| -------- | -------------------------- |
| `i` | 进入插入模式 |
| `I` | 进入插入模式(已聚焦元素) |
<!--rehype:className=shortcuts left-align-->
### 开发者工具
| 快捷键 | 功能 |
| -------- | -------------------------- |
| `gi` | 聚焦第一个输入框 |
| `gI` | 聚焦最后一个输入框 |
| `gs` | 查看页面源代码 |
| `gf` | 打开下一个框架 |
| `gF` | 打开所有框架 |
<!--rehype:className=shortcuts left-align-->
另见
----
- [Vimium 官方文档](https://github.com/philc/vimium)

View File

@ -1,6 +1,6 @@
{
"name": "@wcj/reference",
"version": "1.43.0",
"version": "1.44.0",
"description": "为开发人员分享快速参考备忘单(主要是方便自己)。",
"author": "jaywcjlove",
"license": "MIT",