Compare commits
568 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2435ec541b | ||
|
|
9f0cbc9c91 | ||
|
|
4affbe12a8 | ||
|
|
be4dbe6c13 | ||
|
|
74be8a4ba0 | ||
|
|
b4e3ba78a7 | ||
|
|
cc040b328a | ||
|
|
f036d00bdb | ||
|
|
668b9fe6da | ||
|
|
6af39111be | ||
|
|
1ebefcd42a | ||
|
|
7492af652a | ||
|
|
91cd804737 | ||
|
|
74eb2d0cfb | ||
|
|
f08d8cee72 | ||
|
|
770a6e3ecf | ||
|
|
71529ce520 | ||
|
|
b4ba469d7a | ||
|
|
ce9270a230 | ||
|
|
851899f359 | ||
|
|
6d0c09c52b | ||
|
|
fb9408759e | ||
|
|
95627ca561 | ||
|
|
e6e522e190 | ||
|
|
53abe065dd | ||
|
|
886d5d749b | ||
|
|
f02f2cfef6 | ||
|
|
284d894283 | ||
|
|
53bc354a63 | ||
|
|
4b4f361e7a | ||
|
|
c822e74120 | ||
|
|
a8314905a3 | ||
|
|
8486dc4ead | ||
|
|
10b779cd59 | ||
|
|
a3874c1af0 | ||
|
|
9979cd6b41 | ||
|
|
7c5209a0e4 | ||
|
|
9ec70f61c2 | ||
|
|
f82ffcc589 | ||
|
|
837740be91 | ||
|
|
c85669ed18 | ||
|
|
18663c80bd | ||
|
|
3b8f251564 | ||
|
|
c4f39e99a3 | ||
|
|
fc493bdfc2 | ||
|
|
3f1b8a15c4 | ||
|
|
403e79bbf7 | ||
|
|
c62670ddfd | ||
|
|
fb2612335c | ||
|
|
34b858a392 | ||
|
|
2196468b0b | ||
|
|
b1ad378ff2 | ||
|
|
29f1b64f4a | ||
|
|
059d3afb40 | ||
|
|
b9407bacdc | ||
|
|
6742495261 | ||
|
|
dba099a6ae | ||
|
|
9b11fe4aa8 | ||
|
|
7d40c537aa | ||
|
|
d5387c8b9d | ||
|
|
719387ba48 | ||
|
|
ca80b477fb | ||
|
|
95f841a667 | ||
|
|
2478e94303 | ||
|
|
508383a235 | ||
|
|
0b58d6057c | ||
|
|
b4db543088 | ||
|
|
4f132524a0 | ||
|
|
46c07b01b2 | ||
|
|
e4266a394f | ||
|
|
af12b11ced | ||
|
|
0c0492919c | ||
|
|
9893a18276 | ||
|
|
4ff0011317 | ||
|
|
9035c92853 | ||
|
|
f39f922578 | ||
|
|
ea84393d77 | ||
|
|
6ebe8410b3 | ||
|
|
9961be4fc9 | ||
|
|
f78869094b | ||
|
|
9198a543d2 | ||
|
|
11e5aa5158 | ||
|
|
0980d53f43 | ||
|
|
74426ba24b | ||
|
|
9fac0fb20b | ||
|
|
7a5da97aff | ||
|
|
86f24c0724 | ||
|
|
38a5603ffc | ||
|
|
33bc22f094 | ||
|
|
cfc51a8da6 | ||
|
|
c2faaea62b | ||
|
|
759396147c | ||
|
|
2c56431af6 | ||
|
|
b00fd39440 | ||
|
|
77d1a9e89d | ||
|
|
50f3830673 | ||
|
|
0251f31ea4 | ||
|
|
3c2f65ee0f | ||
|
|
5d8f8cf376 | ||
|
|
1776fa139c | ||
|
|
43b0cffc0c | ||
|
|
b89630def9 | ||
|
|
5a4f7cdf37 | ||
|
|
6687a0989a | ||
|
|
03874e30ea | ||
|
|
184f2be3fe | ||
|
|
7056d441a6 | ||
|
|
d6d8ee05ca | ||
|
|
b76f1ee0e4 | ||
|
|
97a83d2094 | ||
|
|
4f757330fb | ||
|
|
ec74c928a7 | ||
|
|
2e985e4fee | ||
|
|
cca2f658b3 | ||
|
|
3e3a7c4bd3 | ||
|
|
f2210fa2c3 | ||
|
|
02fed846ad | ||
|
|
7e18748595 | ||
|
|
866b8081c4 | ||
|
|
a817c3ef5c | ||
|
|
61e2fdb221 | ||
|
|
2251b24c61 | ||
|
|
c0567c6abf | ||
|
|
1ad3c1ddd5 | ||
|
|
a39923a5fb | ||
|
|
027ceead3d | ||
|
|
5f1201ee76 | ||
|
|
a172b1d5e8 | ||
|
|
65e99b1650 | ||
|
|
28257459f7 | ||
|
|
66871598a9 | ||
|
|
ea4c9c9e86 | ||
|
|
d0f3c95f1b | ||
|
|
a5b3b23d16 | ||
|
|
91d788741b | ||
|
|
48c8cef906 | ||
|
|
4b02ff685a | ||
|
|
8f75108d8b | ||
|
|
c0786cce01 | ||
|
|
9410da12c3 | ||
|
|
ad034b476d | ||
|
|
91ba353e23 | ||
|
|
799f041fcf | ||
|
|
20cca08e43 | ||
|
|
732caab18d | ||
|
|
c6064801c5 | ||
|
|
1e0da1903f | ||
|
|
a160cfa338 | ||
|
|
59e2b25346 | ||
|
|
63ce1ab296 | ||
|
|
2ec2657daf | ||
|
|
3abdb35ccd | ||
|
|
0e0def2d88 | ||
|
|
ae5a826b0d | ||
|
|
4d311ed58b | ||
|
|
3c5578a2f3 | ||
|
|
899d85223d | ||
|
|
5f521444be | ||
|
|
225c72510d | ||
|
|
e140614012 | ||
|
|
7d52e09f27 | ||
|
|
0abfabe64c | ||
|
|
f1fef44b71 | ||
|
|
c861330de9 | ||
|
|
0dd17923bc | ||
|
|
47c412520e | ||
|
|
28872d3391 | ||
|
|
d243e4261b | ||
|
|
dd0cdb393d | ||
|
|
cb3b1b89c5 | ||
|
|
721b876dea | ||
|
|
1cd3c369ea | ||
|
|
e15d66956c | ||
|
|
32862fe194 | ||
|
|
626e70a666 | ||
|
|
47cf42deff | ||
|
|
55ee13ad5f | ||
|
|
3a106842b3 | ||
|
|
0feb5644c9 | ||
|
|
139d107454 | ||
|
|
7011e08a95 | ||
|
|
d48cf7d4ec | ||
|
|
b833cb0981 | ||
|
|
e97857cb7e | ||
|
|
faed604ead | ||
|
|
6b8fdb3366 | ||
|
|
78f60f418c | ||
|
|
9e66decded | ||
|
|
4e2bc83644 | ||
|
|
d2585a431c | ||
|
|
1abd69f13f | ||
|
|
13ce84c95a | ||
|
|
43effcf0cb | ||
|
|
5cdd5d8d89 | ||
|
|
4ab24ae284 | ||
|
|
102b0862b9 | ||
|
|
0b9af04f70 | ||
|
|
68b804b7f5 | ||
|
|
ce0b7c6cd0 | ||
|
|
007394b051 | ||
|
|
3577721578 | ||
|
|
e0b540d174 | ||
|
|
7650bbac40 | ||
|
|
ffb15d6542 | ||
|
|
4a9e2d0ed7 | ||
|
|
3e732813c8 | ||
|
|
4381fe820e | ||
|
|
1c866c011f | ||
|
|
856094374d | ||
|
|
4ca8110520 | ||
|
|
cb8d9dfb45 | ||
|
|
fb3e277fed | ||
|
|
c2454acd73 | ||
|
|
3301d5a7ee | ||
|
|
d37f9c6442 | ||
|
|
4661fdc6b9 | ||
|
|
3f064a5457 | ||
|
|
582d26a6d9 | ||
|
|
0cb2ec73cc | ||
|
|
e4dda9a41a | ||
|
|
6937111dce | ||
|
|
27d597c801 | ||
|
|
04676e51df | ||
|
|
340934876e | ||
|
|
95da603a74 | ||
|
|
975ddb3193 | ||
|
|
ee9a764b8f | ||
|
|
d9a0c8cf07 | ||
|
|
4c7c88626b | ||
|
|
3ca296f8f7 | ||
|
|
fe07d5fd8c | ||
|
|
5b256b077e | ||
|
|
2655ce4914 | ||
|
|
1d6db04e39 | ||
|
|
1b4be7d870 | ||
|
|
ba9b4a5ca1 | ||
|
|
15cf70fb50 | ||
|
|
b463143e63 | ||
|
|
740b2b8871 | ||
|
|
9eb9edd04a | ||
|
|
882efb7310 | ||
|
|
a1dfc43d67 | ||
|
|
c9e729bc7e | ||
|
|
46e0ef5443 | ||
|
|
c9ae7d673e | ||
|
|
adf39710da | ||
|
|
b7f0db51fe | ||
|
|
c99af98f7d | ||
|
|
2e96576084 | ||
|
|
17921854d3 | ||
|
|
f401c87bbf | ||
|
|
a9974dfd20 | ||
|
|
0fd9e8af65 | ||
|
|
9f2ad7a295 | ||
|
|
0c618e1c01 | ||
|
|
19e258c591 | ||
|
|
13701d39ee | ||
|
|
a5759ea2d3 | ||
|
|
0c78352ef7 | ||
|
|
5e5666d347 | ||
|
|
884e8dbeff | ||
|
|
e3dbd1b196 | ||
|
|
828afdad47 | ||
|
|
c99f3c8788 | ||
|
|
cec3255efc | ||
|
|
a0a957483c | ||
|
|
8ec4235082 | ||
|
|
6f95c250e6 | ||
|
|
792451b75f | ||
|
|
d57b60064c | ||
|
|
3ec25b8951 | ||
|
|
6d86d679f0 | ||
|
|
95d21e81a9 | ||
|
|
99c30d38fd | ||
|
|
7cb9f0e058 | ||
|
|
f945549091 | ||
|
|
229b4af4a5 | ||
|
|
b673ede608 | ||
|
|
2297475e5a | ||
|
|
03e52c1126 | ||
|
|
e544b8f7b3 | ||
|
|
a7b01e4ce0 | ||
|
|
ea4637c28f | ||
|
|
fe047b1e5a | ||
|
|
4c8694d784 | ||
|
|
61046b519b | ||
|
|
8af3950731 | ||
|
|
3f329c15ec | ||
|
|
485d80489b | ||
|
|
0eb3ac6165 | ||
|
|
869f3de520 | ||
|
|
da9780f4a7 | ||
|
|
8807e483fc | ||
|
|
d5d79d72c6 | ||
|
|
db215dcb2d | ||
|
|
7f4fd32453 | ||
|
|
81d60eacaf | ||
|
|
453a8b9a05 | ||
|
|
b00b74f695 | ||
|
|
21b8c17818 | ||
|
|
a54ceebf02 | ||
|
|
2771b42a96 | ||
|
|
579d1de673 | ||
|
|
daaa4c5f09 | ||
|
|
b414893b15 | ||
|
|
072ddcca73 | ||
|
|
5e773f0696 | ||
|
|
3bcb61d409 | ||
|
|
ad9aaf759e | ||
|
|
211809a177 | ||
|
|
e7b8958368 | ||
|
|
d7df8bc6fe | ||
|
|
ba05c9d952 | ||
|
|
d02dc80480 | ||
|
|
eb1157523d | ||
|
|
6c8217202a | ||
|
|
b3893d8478 | ||
|
|
006c4bf587 | ||
|
|
0c7e4081a5 | ||
|
|
cfac374221 | ||
|
|
579d25d3a1 | ||
|
|
2cbafe0ef5 | ||
|
|
a9e3fb135e | ||
|
|
44e775a1ee | ||
|
|
933b1957e4 | ||
|
|
20ecc2eef2 | ||
|
|
4750e61a30 | ||
|
|
91b022bf4d | ||
|
|
ad3c46c009 | ||
|
|
4917ecf3a7 | ||
|
|
cf997d6ac0 | ||
|
|
435cfdf739 | ||
|
|
4412bf6a01 | ||
|
|
da39a1ad3d | ||
|
|
02bb059452 | ||
|
|
5b28ed2caf | ||
|
|
7eb30c080a | ||
|
|
3c6c459b17 | ||
|
|
5cb04086b1 | ||
|
|
27c3a9578f | ||
|
|
d7b1d03761 | ||
|
|
f03cc68c0d | ||
|
|
3a41d66cef | ||
|
|
0f52c6fdfe | ||
|
|
c63d27edcf | ||
|
|
6b9ef0aa43 | ||
|
|
7c220e3efc | ||
|
|
a73f837fc1 | ||
|
|
4ccef1281f | ||
|
|
f0cfadf240 | ||
|
|
67c9cc4d8e | ||
|
|
a92759f0ed | ||
|
|
e9a61371f0 | ||
|
|
881dfa5df3 | ||
|
|
bbd2fa2ebf | ||
|
|
af5e05b7d8 | ||
|
|
3986b1ca29 | ||
|
|
416e1ff9fd | ||
|
|
1f0fc6c925 | ||
|
|
ad2fd7b642 | ||
|
|
345e968c4c | ||
|
|
72b973a923 | ||
|
|
8ae69f2386 | ||
|
|
29bb4e487c | ||
|
|
3519f863f4 | ||
|
|
df32d5a429 | ||
|
|
e3e0896834 | ||
|
|
71c4aea9ca | ||
|
|
3662bb703c | ||
|
|
2c6244b6f8 | ||
|
|
292551a8f2 | ||
|
|
af2f380a18 | ||
|
|
9411c434a8 | ||
|
|
02f1d13471 | ||
|
|
37f8c7d69e | ||
|
|
aa52a25839 | ||
|
|
d41aaa9569 | ||
|
|
32cd8e4d5d | ||
|
|
cf9c76d5c7 | ||
|
|
15323378b5 | ||
|
|
7fb6ce9190 | ||
|
|
145aa54a4e | ||
|
|
1e22344f72 | ||
|
|
596bff3f4a | ||
|
|
30f8feb59b | ||
|
|
81596b6c88 | ||
|
|
612f874723 | ||
|
|
51d30f35d2 | ||
|
|
804e6ef7eb | ||
|
|
e3628fc62d | ||
|
|
184ec1c187 | ||
|
|
0be49cd510 | ||
|
|
f6fe236778 | ||
|
|
b6d62f4f74 | ||
|
|
4c67490ade | ||
|
|
3749de233c | ||
|
|
a69be1efba | ||
|
|
b0444f82bf | ||
|
|
c1dd21bf0c | ||
|
|
c249e0e609 | ||
|
|
0fc608a1ff | ||
|
|
c0d987694e | ||
|
|
a74c7e2092 | ||
|
|
88559b491c | ||
|
|
eeb42297ac | ||
|
|
70842a31b5 | ||
|
|
5ffc6faf3d | ||
|
|
ade6fbe3d0 | ||
|
|
feba5e1704 | ||
|
|
ce1e1a0c1d | ||
|
|
661ee94e68 | ||
|
|
93e3166fc5 | ||
|
|
33909b96f8 | ||
|
|
001388aa4a | ||
|
|
33683eab41 | ||
|
|
77b2c7a133 | ||
|
|
f510d354af | ||
|
|
f549244389 | ||
|
|
2bac216f98 | ||
|
|
acf4c11182 | ||
|
|
dbc29e409a | ||
|
|
0fb45105c9 | ||
|
|
ddc7f2dd47 | ||
|
|
660dfe103d | ||
|
|
cdeeeb14bb | ||
|
|
22f2c1472b | ||
|
|
ea3391734b | ||
|
|
5f90dd9265 | ||
|
|
638fb0bbce | ||
|
|
58efbde216 | ||
|
|
d604a0d557 | ||
|
|
c4ebb484cd | ||
|
|
2307a5796a | ||
|
|
5ea93312bd | ||
|
|
f0da2a3397 | ||
|
|
8963525b9a | ||
|
|
4e1a4bb641 | ||
|
|
1a37518aab | ||
|
|
01757edbef | ||
|
|
f36bb4bcbb | ||
|
|
d42cbc7d2c | ||
|
|
f80b5795bc | ||
|
|
90b9b407b3 | ||
|
|
1a0415d432 | ||
|
|
e6dab60332 | ||
|
|
58991c482e | ||
|
|
eea1a03da8 | ||
|
|
a3d3d4b0dd | ||
|
|
8c8b721015 | ||
|
|
ec6d1677d6 | ||
|
|
e25753169f | ||
|
|
ca6a407ca8 | ||
|
|
d7ea92c019 | ||
|
|
f25137d53d | ||
|
|
3e40d6e54f | ||
|
|
145bdf9119 | ||
|
|
daccdf940a | ||
|
|
29b9e61adb | ||
|
|
708329d8f2 | ||
|
|
fac5af10c8 | ||
|
|
a45e63a966 | ||
|
|
6c3b017099 | ||
|
|
68aaed2cef | ||
|
|
a05328f389 | ||
|
|
707e939bf6 | ||
|
|
94a5baec46 | ||
|
|
0d7f6653b6 | ||
|
|
4f4ac84ec9 | ||
|
|
a8fbc4f8e1 | ||
|
|
3cbec70a5e | ||
|
|
8e9132f900 | ||
|
|
aadda3d5c5 | ||
|
|
031b7f1976 | ||
|
|
34bf61c2fb | ||
|
|
3e05d637d3 | ||
|
|
658abb0e00 | ||
|
|
5dc858cfe5 | ||
|
|
29c4430e3a | ||
|
|
229193a584 | ||
|
|
222f5bc604 | ||
|
|
4b22796c36 | ||
|
|
eb01adb655 | ||
|
|
ebc7ef957a | ||
|
|
91e0fb3af7 | ||
|
|
3b817385a8 | ||
|
|
d19915eac8 | ||
|
|
3478e345eb | ||
|
|
70b561c710 | ||
|
|
60fae2b928 | ||
|
|
85d74eb81a | ||
|
|
99c34277e1 | ||
|
|
1013713630 | ||
|
|
942f2c9563 | ||
|
|
0be71ca830 | ||
|
|
121db975c4 | ||
|
|
8f54901b92 | ||
|
|
09fd8603cb | ||
|
|
1fb3dd7c34 | ||
|
|
819704c974 | ||
|
|
41e7f5e2ce | ||
|
|
3fa46ae173 | ||
|
|
d4115b3044 | ||
|
|
60c463b1cb | ||
|
|
aadb7e664b | ||
|
|
deeed5ec0b | ||
|
|
c0903a400c | ||
|
|
80761d5cf6 | ||
|
|
2fbe314f16 | ||
|
|
e657882897 | ||
|
|
04b0b48d94 | ||
|
|
7e32739eb6 | ||
|
|
9659f0f074 | ||
|
|
e1b5344903 | ||
|
|
f5c4e78c11 | ||
|
|
08edd2ad3d | ||
|
|
9f7014bc52 | ||
|
|
8197b8f641 | ||
|
|
1c55ee64bf | ||
|
|
8cca95af19 | ||
|
|
4138d22968 | ||
|
|
9529667952 | ||
|
|
6730b65788 | ||
|
|
a527cb28a0 | ||
|
|
100297d821 | ||
|
|
7ef107d114 | ||
|
|
864da459ef | ||
|
|
44e5c5a248 | ||
|
|
a3dab064ce | ||
|
|
4b9ff8a35e | ||
|
|
fa2c86a964 | ||
|
|
d7008594f8 | ||
|
|
df9c2ac08b | ||
|
|
7494981f5f | ||
|
|
ae490e878e | ||
|
|
ae594eb45a | ||
|
|
8fad195069 | ||
|
|
8dbec19255 | ||
|
|
8880d82092 | ||
|
|
ee03850619 | ||
|
|
9acc906680 | ||
|
|
05191c8c2c | ||
|
|
3b0416a2c3 | ||
|
|
10dfe11942 | ||
|
|
a0480a90dd | ||
|
|
1bb046db08 | ||
|
|
1cbc663abf | ||
|
|
29a3787140 | ||
|
|
e28914b3c7 | ||
|
|
6d9782c019 | ||
|
|
8727334a7c | ||
|
|
861d35482a | ||
|
|
5708867a5d | ||
|
|
02240aaab0 | ||
|
|
1189c92fd7 | ||
|
|
a1a1bd60f8 | ||
|
|
739b18048d | ||
|
|
bcd60d6020 | ||
|
|
afbe61aebc | ||
|
|
f2183a90c3 | ||
|
|
a10d0f850d | ||
|
|
167fef356f | ||
|
|
5e22e28a2d | ||
|
|
3a1d780bbe | ||
|
|
a2b8fc493b | ||
|
|
7eaa5786d1 | ||
|
|
2dbcac300f | ||
|
|
127f2752dd | ||
|
|
19ed3fa3b2 |
13
.github/FUNDING.yml
vendored
@@ -1,9 +1,4 @@
|
||||
# These are supported funding model platforms
|
||||
|
||||
# github: [jaywcjlove]
|
||||
# patreon: # Replace with a single Patreon username
|
||||
# open_collective: # Replace with a single Open Collective username
|
||||
# ko_fi: # Replace with a single Ko-fi username
|
||||
# tidelift: #npm/mocker-api
|
||||
# community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
||||
custom: https://jaywcjlove.github.io/#/sponsor
|
||||
github: [jaywcjlove]
|
||||
#ko_fi: jaywcjlove
|
||||
#buy_me_a_coffee: jaywcjlove
|
||||
# custom: ["https://wangchujiang.com/#/sponsor"]
|
||||
|
||||
20
.github/workflows/ci.yml
vendored
@@ -9,13 +9,15 @@ jobs:
|
||||
if: github.repository == 'jaywcjlove/reference'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: 20
|
||||
node-version: 24
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
|
||||
- run: npm install
|
||||
- run: npm run build
|
||||
- run: cp -rp icons ./dist
|
||||
|
||||
- name: Generate Contributors Images
|
||||
uses: jaywcjlove/github-action-contributors@main
|
||||
@@ -29,6 +31,7 @@ jobs:
|
||||
uses: jaywcjlove/github-action-modify-file-content@main
|
||||
with:
|
||||
path: CONTRIBUTING.md
|
||||
trim_whitespace: false
|
||||
body: |
|
||||
${{steps.contributors.outputs.htmlList}}
|
||||
|
||||
@@ -36,6 +39,7 @@ jobs:
|
||||
uses: jaywcjlove/github-action-modify-file-content@main
|
||||
with:
|
||||
path: README.md
|
||||
trim_whitespace: false
|
||||
body: |
|
||||
${{steps.contributors.outputs.htmlList}}
|
||||
|
||||
@@ -88,12 +92,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: |
|
||||
[](https://jaywcjlove.github.io/#/sponsor)
|
||||
|
||||
|
||||
7
.github/workflows/win.yml
vendored
@@ -9,10 +9,11 @@ jobs:
|
||||
if: github.repository == 'jaywcjlove/reference'
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: 20
|
||||
node-version: 24
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
|
||||
- run: npm install
|
||||
- run: npm run build
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
"MD014": false,
|
||||
"MD024": false,
|
||||
"MD033": false,
|
||||
"MD036": false,
|
||||
"MD040": false,
|
||||
"MD055": false,
|
||||
"MD056": false,
|
||||
|
||||
12
.refsrc.json
@@ -13,6 +13,18 @@
|
||||
"github": {
|
||||
"url": "https://github.com/jaywcjlove/reference"
|
||||
},
|
||||
"favicon": "{{RELATIVE_PATH}}icons/favicon.svg",
|
||||
"meta": [
|
||||
{ "name": "author", "content": "jaywcjlove" },
|
||||
{ "name": "license", "content": "MIT" },
|
||||
{ "name": "funding", "content": "https://jaywcjlove.github.io/#/sponsor" },
|
||||
{ "rel": "apple-touch-icon", "href": "{{RELATIVE_PATH}}icons/touch-icon-iphone.png" },
|
||||
{ "rel": "apple-touch-icon", "sizes": "152x152", "href": "{{RELATIVE_PATH}}icons/touch-icon-ipad.png" },
|
||||
{ "rel": "apple-touch-icon", "sizes": "180x180", "href": "{{RELATIVE_PATH}}icons/touch-icon-iphone.png" },
|
||||
{ "rel": "apple-touch-icon", "sizes": "167x167", "href": "{{RELATIVE_PATH}}icons/touch-icon-ipad-retina.png" },
|
||||
{ "rel": "apple-touch-icon", "sizes": "120x120", "href": "{{RELATIVE_PATH}}icons/touch-icon-iphone-retina.png" }
|
||||
],
|
||||
"analyticsId": "G-9MWEWXSDQK",
|
||||
"giscus": {
|
||||
"src": "https://giscus.app/client.js",
|
||||
"data-repo": "jaywcjlove/reference",
|
||||
|
||||
408
CONTRIBUTING.md
@@ -249,36 +249,106 @@ REF_LABEL=网站首页
|
||||
|
||||
由于中国国内访问,时常打不开,你可以访问下面镜像网站。
|
||||
|
||||
- [baiyapeng.cc](https://ref.cc.baiyapeng.cc)
|
||||
- [stacktao.cn](https://ref.stacktao.cn)
|
||||
- [chanlun.pro](https://ref.chanlun.pro)
|
||||
- [ljdyjh.cn](https://ref.ljdyjh.cn)
|
||||
- [szsyw.cn](https://projects.szsyw.cn/reference/)
|
||||
- [hanauta.icu](https://ref.hanauta.icu)
|
||||
- [doc.xyz.sb](https://doc.xyz.sb)
|
||||
- [quickref.cn](https://quickref.cn)
|
||||
- [ecdata.cn](http://ref.ecdata.cn)
|
||||
- [aibk.cn](https://quickref.aibk.cn)
|
||||
- [jgeek.cn](http://reference.jgeek.cn/)
|
||||
- [laoleng.vip](http://bbs.laoleng.vip/reference/)
|
||||
- [liujiapeng.com](https://www.liujiapeng.com/)
|
||||
- [dbyun.net](https://www.dbyun.net/reference/index.html)
|
||||
- [dc6.fun](https://dc6.fun/reference/)
|
||||
- [if010.com](https://quickref.if010.com/)
|
||||
- [pipecraft.net](https://quickref.pipecraft.net/)
|
||||
- [isteed.cc](https://ref.isteed.cc/)
|
||||
- [1han.wiki](https://code.1han.wiki/)
|
||||
- [linzhe.top](https://linzhe.top/)
|
||||
- [xushanxiang.com](https://xushanxiang.com/ref/)
|
||||
- [winnerzr01.github.io](https://winnerzr01.github.io/Quick-Reference/index.html)
|
||||
- [quickref.hestudio.net](https://quickref.hestudio.net)
|
||||
- [surcode.cn](https://ref.surcode.cn)
|
||||
- [cms.im](https://quickref.cms.im/)
|
||||
- [nuomiphp.com](https://reference.tool.nuomiphp.com/)
|
||||
- [axchen.top](https://ref.tool.axchen.top)
|
||||
- [tamamo.top](https://ref.tamamo.top)
|
||||
- [sakuraovo.site](https://quick-re.site-ali.sakuraovo.site)
|
||||
- [nyanon.online](https://quick-re.nyanon.online)
|
||||
- [0x0f.dev](https://ref.0x0f.dev)
|
||||
- [78888889.xyz](https://reference.78888889.xyz)
|
||||
- [pusukeji.com](https://reference.pusukeji.com/)
|
||||
- [magese.com](https://ref.magese.com)
|
||||
- [doraemon.press](https://reference.doraemon.press/)
|
||||
- [foreverlink.love](https://reference.foreverlink.love)
|
||||
- [xod.cc](https://ref.xod.cc)
|
||||
- [jhao.me](http://reference.jhao.me/)
|
||||
- [maoo.me](https://note.maoo.me)
|
||||
- [luckyits.com](https://ref.luckyits.com/)
|
||||
- [9up.dev](https://devref.9up.dev)
|
||||
- [ylmty.cc](https://docs.ylmty.cc)
|
||||
- [mingming.dev](https://ref.mingming.dev)
|
||||
- [itzcy.com](https://reference.itzcy.com/)
|
||||
- [ref.v-ta.com](https://ref.v-ta.com)
|
||||
- [eryajf.net](https://ref.eryajf.net/)
|
||||
- [kjchmc.cn](https://ref.kjchmc.cn/)
|
||||
- [likeadmin.cn](https://www.likeadmin.cn/quickref/)
|
||||
- [isteed.cc](https://ref.isteed.cc/)
|
||||
- [666666.dev](https://cheat.666666.dev)
|
||||
- [srebro.cn](https://ref.srebro.cn)
|
||||
- [guoxudong.io](https://reference.guoxudong.io/)
|
||||
- [terryyoung.cn](http://ref.terryyoung.cn/)
|
||||
- [quickref.binscor.top](https://quickref.binscor.top)
|
||||
- [zone.id](https://cyref.zone.id/)
|
||||
- [aibk.cn](https://quickref.aibk.cn)
|
||||
- [docflow.cn](https://ref.docflow.cn)
|
||||
- [quickref.hestudio.net](https://quickref.hestudio.net)
|
||||
- [qiubit.cc](http://ref.qiubit.cc)
|
||||
- [aoh.cc](https://aoh.cc/)
|
||||
- [reference.code05.com](https://reference.code05.com/)
|
||||
- [kyoma.top](https://reference.kyoma.top/)
|
||||
- [quickreference.pages.dev](https://quickreference.pages.dev/)
|
||||
- [code05.com](https://reference.code05.com/)
|
||||
- [xhfun.cn](https://ref.xhfun.cn/)
|
||||
- [ownit.top](https://memo.ownit.top/)
|
||||
- [moeyuuko.com](https://ref.moeyuuko.com/)
|
||||
- [haah.net](https://ref.haah.net)
|
||||
- [ownit.top](https://memo.ownit.top)
|
||||
- [laoleng.vip](http://bbs.laoleng.vip/reference/)
|
||||
- [if010.com](https://quickref.if010.com/)
|
||||
- [cms.im](https://quickref.cms.im/)
|
||||
- [itcent.cn](https://code.itcent.cn/)
|
||||
- [coolxy.top](https://refer.coolxy.top)
|
||||
- [kclouder.cn](https://www.kclouder.cn/reference)
|
||||
- [xalaok.top](https://ref.xalaok.top)
|
||||
- [hao.kim](https://ref.hao.kim)
|
||||
- [tool.sakura.vin](https://tool.sakura.vin/ref/)
|
||||
- [chenchen.site](https://img.chenchen.site/reference/)
|
||||
- [jgeek.cn](http://reference.jgeek.cn/)
|
||||
- [gaojs.com.cn](https://study.gaojs.com.cn)
|
||||
- [15926.tech](https://ref.15926.tech)
|
||||
- [okhk.net](https://ref.okhk.net)
|
||||
- [wdft.com](https://ref.wdft.com)
|
||||
- [likui.info](https://r.likui.info)
|
||||
- [ruiange.work](https://code.ruiange.work/)
|
||||
- [denganliang.com](https://ref.denganliang.com)
|
||||
- [ivanz.cc](https://ref.ivanz.cc)
|
||||
- [dev6.site](https://ref.dev6.site/)
|
||||
- [zishu.me](https://ref.zishu.me/)
|
||||
- [sucan2233.cn](http://reference.sucan2233.cn)
|
||||
- [bobh.cool](https://quickref.bobh.cool)
|
||||
- [tangwudi.com](https://doc.tangwudi.com)
|
||||
- [osz.icu](https://ref.osz.icu/)
|
||||
- [docs.willxup.top](https://docs.willxup.top)
|
||||
- [wangchunfei.com](https://ref.wangchunfei.com/)
|
||||
- [object.cool](https://r.object.cool)
|
||||
- [jeremyjone.com](https://ref.jeremyjone.com/)
|
||||
- [gistudy.net](https://reference.gistudy.net/)
|
||||
- [deyout.com](https://ref.deyout.com)
|
||||
- [const.team](https://reference.const.team)
|
||||
- [liamng.de](https://refer.liamng.de)
|
||||
- [zcsk18.cn](https://reference.zcsk18.cn/)
|
||||
- [hhxyrk.icu](http://hhxy.hhxyrk.icu/)
|
||||
- [vhcffh.com](https://docs.vhcffh.com)
|
||||
- [childish.vip](https://reference.childish.vip)
|
||||
- [hackshen.com](https://reference.hackshen.com)
|
||||
- [afetera.top](https://note.afetera.top)
|
||||
- [trtuaazz.com](https://reference.trtuaazz.com)
|
||||
- [anhaoyang.com](http://dev-doc.anhaoyang.com/)
|
||||
- [xxcxx.lat](https://xxcxx.lat/)
|
||||
- [fishlee.net](https://cr.fishlee.net/)
|
||||
- [yunshangmanyou.com](https://quick.yunshangmanyou.com)
|
||||
- [xiaokaixuan.com](https://xiaokaixuan.com/xkx/rq/index.html)
|
||||
- [opzz.top](https://reference.opzz.top)
|
||||
- [songbaixin.xin](https://home.songbaixin.xin:26009/)
|
||||
- [dev.bi](https://dev.bi)
|
||||
- [ecdata.cn](http://ref.ecdata.cn)
|
||||
- [cnxiaobai.com](https://quickref.cnxiaobai.com)
|
||||
- [web.app](https://reference-f1cf1.web.app)
|
||||
- [OneNAS.space](https://ref.onenas.space)
|
||||
- [leonus.cn](https://ref.leonus.cn/)
|
||||
- [taotaome.com](http://www.taotaome.com/)
|
||||
- [hurcaguari.top](https://help.hurcaguari.top)
|
||||
- [cutterman.cn](https://blog.cutterman.cn/reference/index.html)
|
||||
- [notes-bin.top](https://notes-bin.top:10443)
|
||||
- [dongdong741236.cn](https://code.dongdong741236.cn/)
|
||||
|
||||
感谢🙏
|
||||
|
||||
@@ -328,151 +398,205 @@ jobs:
|
||||
|
||||
请参阅[贡献指南](./CONTRIBUTING.md)了解如何开始。一如既往,感谢我们出色的贡献者!
|
||||
|
||||
<!--GAMFC--><a href="https://github.com/jaywcjlove" title="小弟调调"><img src="https://avatars.githubusercontent.com/u/1680273?v=4" width="42;" alt="小弟调调"/></a>
|
||||
<!--GAMFC-->
|
||||
<a href="https://github.com/jaywcjlove" title="小弟调调"><img src="https://avatars.githubusercontent.com/u/1680273?v=4" width="42;" alt="小弟调调"/></a>
|
||||
<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/zhangymPerson" title="zhangym"><img src="https://avatars.githubusercontent.com/u/40376181?v=4" width="42;" alt="zhangym"/></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/h7ml" title="h7ml"><img src="https://avatars.githubusercontent.com/u/55233292?v=4" width="42;" alt="h7ml"/></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/aixcyi" title="砹小翼"><img src="https://avatars.githubusercontent.com/u/75880483?v=4" width="42;" alt="砹小翼"/></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/aixcyi" title="阿羽"><img src="https://avatars.githubusercontent.com/u/75880483?v=4" width="42;" alt="阿羽"/></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/liduchuan" title="Alex"><img src="https://avatars.githubusercontent.com/u/115539090?v=4" width="42;" alt="Alex"/></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/ChuwuYo" title="ChuwuYo"><img src="https://avatars.githubusercontent.com/u/141227996?v=4" width="42;" alt="ChuwuYo"/></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/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/zine0" title="zine yu"><img src="https://avatars.githubusercontent.com/u/46991452?v=4" width="42;" alt="zine yu"/></a>
|
||||
<a href="https://github.com/richuff" title="richuff"><img src="https://avatars.githubusercontent.com/u/162144087?v=4" width="42;" alt="richuff"/></a>
|
||||
<a href="https://github.com/QinIndexCode" title="Qin"><img src="https://avatars.githubusercontent.com/u/177287013?v=4" width="42;" alt="Qin"/></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>
|
||||
<a href="https://github.com/Willxup" title="Will"><img src="https://avatars.githubusercontent.com/u/51990395?v=4" width="42;" alt="Will"/></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/Harris-H" title="Hao He"><img src="https://avatars.githubusercontent.com/u/57698783?v=4" width="42;" alt="Hao He"/></a>
|
||||
<a href="https://github.com/LiuYuan-SHU" title="Yuan Liu"><img src="https://avatars.githubusercontent.com/u/96400967?v=4" width="42;" alt="Yuan Liu"/></a>
|
||||
<a href="https://github.com/lvelvee" title="Lve Lvee"><img src="https://avatars.githubusercontent.com/u/25785753?v=4" width="42;" alt="Lve Lvee"/></a>
|
||||
<a href="https://github.com/wsypower" title="魏"><img src="https://avatars.githubusercontent.com/u/31298317?v=4" width="42;" alt="魏"/></a>
|
||||
<a href="https://github.com/itldg" title="老大哥"><img src="https://avatars.githubusercontent.com/u/13432299?v=4" width="42;" alt="老大哥"/></a>
|
||||
<a href="https://github.com/catcto" title="小武Alan"><img src="https://avatars.githubusercontent.com/u/5467932?v=4" width="42;" alt="小武Alan"/></a>
|
||||
<a href="https://github.com/ryanhex53" title="ryanhex53"><img src="https://avatars.githubusercontent.com/u/360426?v=4" width="42;" alt="ryanhex53"/></a>
|
||||
<a href="https://github.com/partoneplay" title="partoneplay"><img src="https://avatars.githubusercontent.com/u/5189132?v=4" width="42;" alt="partoneplay"/></a>
|
||||
<a href="https://github.com/pangxiaoli" title="pangxiaoli"><img src="https://avatars.githubusercontent.com/u/54620953?v=4" width="42;" alt="pangxiaoli"/></a>
|
||||
<a href="https://github.com/4twocc" title="42:p"><img src="https://avatars.githubusercontent.com/u/34529275?v=4" width="42;" alt="42:p"/></a>
|
||||
<a href="https://github.com/infanx" title="infanx"><img src="https://avatars.githubusercontent.com/u/65985757?v=4" width="42;" alt="infanx"/></a>
|
||||
<a href="https://github.com/1834423612" title="kjch"><img src="https://avatars.githubusercontent.com/u/49981661?v=4" width="42;" alt="kjch"/></a>
|
||||
<a href="https://github.com/mancuoj" title="mancuoj"><img src="https://avatars.githubusercontent.com/u/45707684?v=4" width="42;" alt="mancuoj"/></a>
|
||||
<a href="https://github.com/webeautiful" title="Albert"><img src="https://avatars.githubusercontent.com/u/3364316?v=4" width="42;" alt="Albert"/></a>
|
||||
<a href="https://github.com/dadatom" title="Da Da"><img src="https://avatars.githubusercontent.com/u/33886943?v=4" width="42;" alt="Da Da"/></a>
|
||||
<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/pangxiaoli" title="pangxiaoli"><img src="https://avatars.githubusercontent.com/u/54620953?v=4" width="42;" alt="pangxiaoli"/></a>
|
||||
<a href="https://github.com/partoneplay" title="佐博"><img src="https://avatars.githubusercontent.com/u/5189132?v=4" width="42;" alt="佐博"/></a>
|
||||
<a href="https://github.com/ryanhex53" title="ryanhex53"><img src="https://avatars.githubusercontent.com/u/360426?v=4" width="42;" alt="ryanhex53"/></a>
|
||||
<a href="https://github.com/witt-bit" title="witt"><img src="https://avatars.githubusercontent.com/u/52407727?v=4" width="42;" alt="witt"/></a>
|
||||
<a href="https://github.com/zcq100" title="zcq100"><img src="https://avatars.githubusercontent.com/u/425234?v=4" width="42;" alt="zcq100"/></a>
|
||||
<a href="https://github.com/catcto" title="小武Alan"><img src="https://avatars.githubusercontent.com/u/5467932?v=4" width="42;" alt="小武Alan"/></a>
|
||||
<a href="https://github.com/sundakai" title="永恒"><img src="https://avatars.githubusercontent.com/u/21995250?v=4" width="42;" alt="永恒"/></a>
|
||||
<a href="https://github.com/itldg" title="老大哥"><img src="https://avatars.githubusercontent.com/u/13432299?v=4" width="42;" alt="老大哥"/></a>
|
||||
<a href="https://github.com/wsypower" title="魏"><img src="https://avatars.githubusercontent.com/u/31298317?v=4" width="42;" alt="魏"/></a>
|
||||
<a href="https://github.com/buyfakett" title="buyfakett"><img src="https://avatars.githubusercontent.com/u/46560426?v=4" width="42;" alt="buyfakett"/></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/AmosHuKe" title="Amos"><img src="https://avatars.githubusercontent.com/u/32262985?v=4" width="42;" alt="Amos"/></a>
|
||||
<a href="https://github.com/qjksxy" title="Apin"><img src="https://avatars.githubusercontent.com/u/81305669?v=4" width="42;" alt="Apin"/></a>
|
||||
<a href="https://github.com/BlacAmDK" title="BlacAmDK"><img src="https://avatars.githubusercontent.com/u/10971397?v=4" width="42;" alt="BlacAmDK"/></a>
|
||||
<a href="https://github.com/kinoward" title="Kino Ward"><img src="https://avatars.githubusercontent.com/u/33886943?v=4" width="42;" alt="Kino Ward"/></a>
|
||||
<a href="https://github.com/InkSha" title="InkSha"><img src="https://avatars.githubusercontent.com/u/79246657?v=4" width="42;" alt="InkSha"/></a>
|
||||
<a href="https://github.com/ljq" title="Jaco Liu"><img src="https://avatars.githubusercontent.com/u/7278286?v=4" width="42;" alt="Jaco 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/Kisa-Dong" title="Kisa-Dong"><img src="https://avatars.githubusercontent.com/u/84782008?v=4" width="42;" alt="Kisa-Dong"/></a>
|
||||
<a href="https://github.com/LystranG" title="Lystran"><img src="https://avatars.githubusercontent.com/u/49083828?v=4" width="42;" alt="Lystran"/></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/ThanatosXingYu" title="Thanatos"><img src="https://avatars.githubusercontent.com/u/53430376?v=4" width="42;" alt="Thanatos"/></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/izven" title="Zhang"><img src="https://avatars.githubusercontent.com/u/2149051?v=4" width="42;" alt="Zhang"/></a>
|
||||
<a href="https://github.com/findnr" title="findnr"><img src="https://avatars.githubusercontent.com/u/217852450?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/jussker" title="jussker"><img src="https://avatars.githubusercontent.com/u/33953356?v=4" width="42;" alt="jussker"/></a>
|
||||
<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/joyfully-W" title="joyfully-W"><img src="https://avatars.githubusercontent.com/u/32212924?v=4" width="42;" alt="joyfully-W"/></a>
|
||||
<a href="https://github.com/jldxpm" title="Peng Min"><img src="https://avatars.githubusercontent.com/u/128905630?v=4" width="42;" alt="Peng Min"/></a>
|
||||
<a href="https://github.com/jlchen5" title="J.Chen"><img src="https://avatars.githubusercontent.com/u/61578993?v=4" width="42;" alt="J.Chen"/></a>
|
||||
<a href="https://github.com/jackyrwj" title="jackyrwj"><img src="https://avatars.githubusercontent.com/u/32791282?v=4" width="42;" alt="jackyrwj"/></a>
|
||||
<a href="https://github.com/auroraslot" title="irony"><img src="https://avatars.githubusercontent.com/u/48817882?v=4" width="42;" alt="irony"/></a>
|
||||
<a href="https://github.com/icer233" title="icer"><img src="https://avatars.githubusercontent.com/u/74440627?v=4" width="42;" alt="icer"/></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/kcmeven" title="Evan-k"><img src="https://avatars.githubusercontent.com/u/48147837?v=4" width="42;" alt="Evan-k"/></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="yujian"><img src="https://avatars.githubusercontent.com/u/48818060?v=4" width="42;" alt="yujian"/></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/liliangrong777" title="liliangrong777"><img src="https://avatars.githubusercontent.com/u/58727146?v=4" width="42;" alt="liliangrong777"/></a>
|
||||
<a href="https://github.com/qiukuip" title="qiukuip | 秋葵Pie"><img src="https://avatars.githubusercontent.com/u/44923922?v=4" width="42;" alt="qiukuip | 秋葵Pie"/></a>
|
||||
<a href="https://github.com/childeyouyu" title="youyu"><img src="https://avatars.githubusercontent.com/u/89082776?v=4" width="42;" alt="youyu"/></a>
|
||||
<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/lijc210" title="cizai"><img src="https://avatars.githubusercontent.com/u/10651081?v=4" width="42;" alt="cizai"/></a>
|
||||
<a href="https://github.com/gaoxiaoduan" title="Coder Duan"><img src="https://avatars.githubusercontent.com/u/69953511?v=4" width="42;" alt="Coder Duan"/></a>
|
||||
<a href="https://github.com/cool9203" title="cool9203"><img src="https://avatars.githubusercontent.com/u/29609607?v=4" width="42;" alt="cool9203"/></a>
|
||||
<a href="https://github.com/emoji-share" title="emoji-share🤪"><img src="https://avatars.githubusercontent.com/u/192275245?v=4" width="42;" alt="emoji-share🤪"/></a>
|
||||
<a href="https://github.com/fakevn" title="fakevn"><img src="https://avatars.githubusercontent.com/u/11464386?v=4" width="42;" alt="fakevn"/></a>
|
||||
<a href="https://github.com/fenglielie" title="fenglielie"><img src="https://avatars.githubusercontent.com/u/51266402?v=4" width="42;" alt="fenglielie"/></a>
|
||||
<a href="https://github.com/fjqz177" title="fjqz177"><img src="https://avatars.githubusercontent.com/u/83070583?v=4" width="42;" alt="fjqz177"/></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>
|
||||
<a href="https://github.com/godot42x" title="godot42x"><img src="https://avatars.githubusercontent.com/u/79260851?v=4" width="42;" alt="godot42x"/></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/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>
|
||||
<a href="https://github.com/auroraslot" title="irony"><img src="https://avatars.githubusercontent.com/u/48817882?v=4" width="42;" alt="irony"/></a>
|
||||
<a href="https://github.com/jlchen5" title="jlchen5"><img src="https://avatars.githubusercontent.com/u/61578993?v=4" width="42;" alt="jlchen5"/></a>
|
||||
<a href="https://github.com/joyfully-W" title="joyfully-W"><img src="https://avatars.githubusercontent.com/u/32212924?v=4" width="42;" alt="joyfully-W"/></a>
|
||||
<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/Zeng-qh" title="都一样"><img src="https://avatars.githubusercontent.com/u/40046415?v=4" width="42;" alt="都一样"/></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>
|
||||
<a href="https://github.com/fjqz177" title="fjqz177"><img src="https://avatars.githubusercontent.com/u/83070583?v=4" width="42;" alt="fjqz177"/></a>
|
||||
<a href="https://github.com/fakevn" title="fakevn"><img src="https://avatars.githubusercontent.com/u/11464386?v=4" width="42;" alt="fakevn"/></a>
|
||||
<a href="https://github.com/cool9203" title="cool9203"><img src="https://avatars.githubusercontent.com/u/29609607?v=4" width="42;" alt="cool9203"/></a>
|
||||
<a href="https://github.com/gaoxiaoduan" title="CoderDuan"><img src="https://avatars.githubusercontent.com/u/69953511?v=4" width="42;" alt="CoderDuan"/></a>
|
||||
<a href="https://github.com/lijc210" title="cizai"><img src="https://avatars.githubusercontent.com/u/10651081?v=4" width="42;" alt="cizai"/></a>
|
||||
<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/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>
|
||||
<a href="https://github.com/zhouhw0306" title="zhouhw0306"><img src="https://avatars.githubusercontent.com/u/82752681?v=4" width="42;" alt="zhouhw0306"/></a>
|
||||
<a href="https://github.com/hiyms" title="yms"><img src="https://avatars.githubusercontent.com/u/84654050?v=4" width="42;" alt="yms"/></a>
|
||||
<a href="https://github.com/xing133" title="xing133"><img src="https://avatars.githubusercontent.com/u/5336490?v=4" width="42;" alt="xing133"/></a>
|
||||
<a href="https://github.com/wjjwkwindy" title="Hudson Alen"><img src="https://avatars.githubusercontent.com/u/9508591?v=4" width="42;" alt="Hudson Alen"/></a>
|
||||
<a href="https://github.com/wannima66" title="tmen"><img src="https://avatars.githubusercontent.com/u/26410255?v=4" width="42;" alt="tmen"/></a>
|
||||
<a href="https://github.com/swift-fs" title="swift"><img src="https://avatars.githubusercontent.com/u/77133741?v=4" width="42;" alt="swift"/></a>
|
||||
<a href="https://github.com/suyangzuo" title="suyangzuo"><img src="https://avatars.githubusercontent.com/u/50766353?v=4" width="42;" alt="suyangzuo"/></a>
|
||||
<a href="https://github.com/Mowmowj" title="nexo"><img src="https://avatars.githubusercontent.com/u/24759562?v=4" width="42;" alt="nexo"/></a>
|
||||
<a href="https://github.com/phygerr" title="phygerr"><img src="https://avatars.githubusercontent.com/u/42068889?v=4" width="42;" alt="phygerr"/></a>
|
||||
<a href="https://github.com/onewesong" title="onewesong"><img src="https://avatars.githubusercontent.com/u/17920822?v=4" width="42;" alt="onewesong"/></a>
|
||||
<a href="https://github.com/miclon-dev" title="miclon-dev"><img src="https://avatars.githubusercontent.com/u/111753685?v=4" width="42;" alt="miclon-dev"/></a>
|
||||
<a href="https://github.com/zxx457" title="Xianxin Zeng"><img src="https://avatars.githubusercontent.com/u/114141362?v=4" width="42;" alt="Xianxin Zeng"/></a>
|
||||
<a href="https://github.com/BingChunMoLi" title="冰彦糖"><img src="https://avatars.githubusercontent.com/u/44092516?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/kele527" title="吹衣轻飏"><img src="https://avatars.githubusercontent.com/u/345445?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/ZIDOUZI" title="子斗子"><img src="https://avatars.githubusercontent.com/u/53157536?v=4" width="42;" alt="子斗子"/></a>
|
||||
<a href="https://github.com/Fengjing95" title="小枫"><img src="https://avatars.githubusercontent.com/u/51731411?v=4" width="42;" alt="小枫"/></a>
|
||||
<a href="https://github.com/LongYinStudio" title="敬培全"><img src="https://avatars.githubusercontent.com/u/42208852?v=4" width="42;" alt="敬培全"/></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/HChenX" title="焕晨HChen"><img src="https://avatars.githubusercontent.com/u/123531821?v=4" width="42;" alt="焕晨HChen"/></a>
|
||||
<a href="https://github.com/rainbowatcher" title="rainbowatcher"><img src="https://avatars.githubusercontent.com/u/42316353?v=4" width="42;" alt="rainbowatcher"/></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/qwxingzhe" title="行者"><img src="https://avatars.githubusercontent.com/u/7071651?v=4" width="42;" alt="行者"/></a>
|
||||
<a href="https://github.com/binscor" title="binscor"><img src="https://avatars.githubusercontent.com/u/37325821?v=4" width="42;" alt="binscor"/></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/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/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>
|
||||
<a href="https://github.com/JetSquirrel" title="JetSquirrel"><img src="https://avatars.githubusercontent.com/u/20291255?v=4" width="42;" alt="JetSquirrel"/></a>
|
||||
<a href="https://github.com/jeremyjone" title="Jeremy Jone"><img src="https://avatars.githubusercontent.com/u/37676231?v=4" width="42;" alt="Jeremy Jone"/></a>
|
||||
<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/miclon-dev" title="miclon-dev"><img src="https://avatars.githubusercontent.com/u/111753685?v=4" width="42;" alt="miclon-dev"/></a>
|
||||
<a href="https://github.com/notes-bin" title="notes-bin"><img src="https://avatars.githubusercontent.com/u/58727373?v=4" width="42;" alt="notes-bin"/></a>
|
||||
<a href="https://github.com/onewesong" title="onewesong"><img src="https://avatars.githubusercontent.com/u/17920822?v=4" width="42;" alt="onewesong"/></a>
|
||||
<a href="https://github.com/openapphub" title="openapphub"><img src="https://avatars.githubusercontent.com/u/175949671?v=4" width="42;" alt="openapphub"/></a>
|
||||
<a href="https://github.com/phygerr" title="phygerr"><img src="https://avatars.githubusercontent.com/u/42068889?v=4" width="42;" alt="phygerr"/></a>
|
||||
<a href="https://github.com/ri-fumo" title="ri-fumo"><img src="https://avatars.githubusercontent.com/u/190000479?v=4" width="42;" alt="ri-fumo"/></a>
|
||||
<a href="https://github.com/shanhai1024" title="shanhai1024"><img src="https://avatars.githubusercontent.com/u/56210461?v=4" width="42;" alt="shanhai1024"/></a>
|
||||
<a href="https://github.com/Mowmowj" title="nexo"><img src="https://avatars.githubusercontent.com/u/24759562?v=4" width="42;" alt="nexo"/></a>
|
||||
<a href="https://github.com/suyangzuo" title="suyangzuo"><img src="https://avatars.githubusercontent.com/u/50766353?v=4" width="42;" alt="suyangzuo"/></a>
|
||||
<a href="https://github.com/swift-fs" title="swift-fs"><img src="https://avatars.githubusercontent.com/u/77133741?v=4" width="42;" alt="swift-fs"/></a>
|
||||
<a href="https://github.com/wannima66" title="tmen"><img src="https://avatars.githubusercontent.com/u/26410255?v=4" width="42;" alt="tmen"/></a>
|
||||
<a href="https://github.com/tutourenshi" title="tutourenshi"><img src="https://avatars.githubusercontent.com/u/70181730?v=4" width="42;" alt="tutourenshi"/></a>
|
||||
<a href="https://github.com/wjjwkwindy" title="Hudson Alen"><img src="https://avatars.githubusercontent.com/u/9508591?v=4" width="42;" alt="Hudson Alen"/></a>
|
||||
<a href="https://github.com/xing133" title="xing133"><img src="https://avatars.githubusercontent.com/u/5336490?v=4" width="42;" alt="xing133"/></a>
|
||||
<a href="https://github.com/giteeking" title="xunjian"><img src="https://avatars.githubusercontent.com/u/166626162?v=4" width="42;" alt="xunjian"/></a>
|
||||
<a href="https://github.com/hiyms" title="yms"><img src="https://avatars.githubusercontent.com/u/84654050?v=4" width="42;" alt="yms"/></a>
|
||||
<a href="https://github.com/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>
|
||||
<a href="https://github.com/dasferco" title="Dasferco"><img src="https://avatars.githubusercontent.com/u/92622404?v=4" width="42;" alt="Dasferco"/></a>
|
||||
<a href="https://github.com/Damao2250" title="Damao"><img src="https://avatars.githubusercontent.com/u/19251992?v=4" width="42;" alt="Damao"/></a>
|
||||
<a href="https://github.com/DEEMO101" title="DEEMO101"><img src="https://avatars.githubusercontent.com/u/35123091?v=4" width="42;" alt="DEEMO101"/></a>
|
||||
<a href="https://github.com/ohto-ai" title="Choo"><img src="https://avatars.githubusercontent.com/u/46275725?v=4" width="42;" alt="Choo"/></a>
|
||||
<a href="https://github.com/CharlotteZeng" title="hanchZ"><img src="https://avatars.githubusercontent.com/u/19461184?v=4" width="42;" alt="hanchZ"/></a>
|
||||
<a href="https://github.com/ch3nnn" title="chentong"><img src="https://avatars.githubusercontent.com/u/40114564?v=4" width="42;" alt="chentong"/></a>
|
||||
<a href="https://github.com/Brid9e" title="Joe"><img src="https://avatars.githubusercontent.com/u/85558909?v=4" width="42;" alt="Joe"/></a>
|
||||
<a href="https://github.com/BobH-Official" title="BobH"><img src="https://avatars.githubusercontent.com/u/29333228?v=4" width="42;" alt="BobH"/></a>
|
||||
<a href="https://github.com/Blanket58" title="Blanket58"><img src="https://avatars.githubusercontent.com/u/39766189?v=4" width="42;" alt="Blanket58"/></a>
|
||||
<a href="https://github.com/BlacAmDK" title="BlacAmDK"><img src="https://avatars.githubusercontent.com/u/10971397?v=4" width="42;" alt="BlacAmDK"/></a>
|
||||
<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/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>
|
||||
<a href="https://github.com/hi-liyan" title="李李李"><img src="https://avatars.githubusercontent.com/u/40056492?v=4" width="42;" alt="李李李"/></a>
|
||||
<a href="https://github.com/BATTLEHAWK00" title="While True: learn()"><img src="https://avatars.githubusercontent.com/u/45313304?v=4" width="42;" alt="While True: learn()"/></a>
|
||||
<a href="https://github.com/dwgeneral" title="Happy-Engineer"><img src="https://avatars.githubusercontent.com/u/8654993?v=4" width="42;" alt="Happy-Engineer"/></a>
|
||||
<a href="https://github.com/whb1998a" title="Wafer"><img src="https://avatars.githubusercontent.com/u/44045064?v=4" width="42;" alt="Wafer"/></a>
|
||||
<a href="https://github.com/YLee9527" title="Terry Young"><img src="https://avatars.githubusercontent.com/u/18697332?v=4" width="42;" alt="Terry Young"/></a>
|
||||
<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/Furry-Monster" title="Furry-Monster"><img src="https://avatars.githubusercontent.com/u/158404543?v=4" width="42;" alt="Furry-Monster"/></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/Ding-Kyoma" title="HooinKyoma"><img src="https://avatars.githubusercontent.com/u/44542198?v=4" width="42;" alt="HooinKyoma"/></a>
|
||||
<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/jeremyjone" title="Jeremy Jone"><img src="https://avatars.githubusercontent.com/u/37676231?v=4" width="42;" alt="Jeremy Jone"/></a>
|
||||
<a href="https://github.com/JetSquirrel" title="JetSquirrel"><img src="https://avatars.githubusercontent.com/u/20291255?v=4" width="42;" alt="JetSquirrel"/></a>
|
||||
<a href="https://github.com/Jruing" title="Jruing"><img src="https://avatars.githubusercontent.com/u/31944565?v=4" width="42;" alt="Jruing"/></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>
|
||||
<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/likeadmin-likeshop" title="likeadmin通过管理后台-likeshop全开源商城"><img src="https://avatars.githubusercontent.com/u/77180968?v=4" width="42;" alt="likeadmin通过管理后台-likeshop全开源商城"/></a>
|
||||
<a href="https://github.com/liuyuhe666" title="Liu Yuhe"><img src="https://avatars.githubusercontent.com/u/171144077?v=4" width="42;" alt="Liu Yuhe"/></a>
|
||||
<a href="https://github.com/lvelvee" title="Lve Lvee"><img src="https://avatars.githubusercontent.com/u/25785753?v=4" width="42;" alt="Lve Lvee"/></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/TRDSCSH" title="TRDSCSH"><img src="https://avatars.githubusercontent.com/u/125717891?v=4" width="42;" alt="TRDSCSH"/></a>
|
||||
<a href="https://github.com/Xiwin" title="Xiwin"><img src="https://avatars.githubusercontent.com/u/107191230?v=4" width="42;" alt="Xiwin"/></a>
|
||||
<a href="https://github.com/DataEraserC" title="Sacabambaspis"><img src="https://avatars.githubusercontent.com/u/102341238?v=4" width="42;" alt="Sacabambaspis"/></a>
|
||||
<a href="https://github.com/qinxiongzhou" title="Ryan Zhou"><img src="https://avatars.githubusercontent.com/u/33239096?v=4" width="42;" alt="Ryan Zhou"/></a>
|
||||
<a href="https://github.com/RivailleF" title="RivailleF"><img src="https://avatars.githubusercontent.com/u/93083015?v=4" width="42;" alt="RivailleF"/></a>
|
||||
<a href="https://github.com/QDelta" title="QDelta"><img src="https://avatars.githubusercontent.com/u/60222316?v=4" width="42;" alt="QDelta"/></a>
|
||||
<a href="https://github.com/sevenleave" title="Poirot Hercule"><img src="https://avatars.githubusercontent.com/u/24411140?v=4" width="42;" alt="Poirot Hercule"/></a>
|
||||
<a href="https://github.com/PipecraftNet" title="Pipecraft"><img src="https://avatars.githubusercontent.com/u/88728670?v=4" width="42;" alt="Pipecraft"/></a>
|
||||
<a href="https://github.com/Perzch" title="Perzch"><img src="https://avatars.githubusercontent.com/u/67987641?v=4" width="42;" alt="Perzch"/></a>
|
||||
<a href="https://github.com/PILIHU2022" title="PILIHU2022"><img src="https://avatars.githubusercontent.com/u/100511118?v=4" width="42;" alt="PILIHU2022"/></a>
|
||||
<a href="https://github.com/HanaNoryu" title="Noryu"><img src="https://avatars.githubusercontent.com/u/109856546?v=4" width="42;" alt="Noryu"/></a>
|
||||
<a href="https://github.com/NianwenDan" title="NianwenDan"><img src="https://avatars.githubusercontent.com/u/74407127?v=4" width="42;" alt="NianwenDan"/></a>
|
||||
<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/13812700839" title="花殇"><img src="https://avatars.githubusercontent.com/u/58072506?v=4" width="42;" alt="花殇"/></a>
|
||||
<a href="https://github.com/JinchuanL" title="ANDY"><img src="https://avatars.githubusercontent.com/u/68026794?v=4" width="42;" alt="ANDY"/></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/Attack825" title="Attack825"><img src="https://avatars.githubusercontent.com/u/68852184?v=4" width="42;" alt="Attack825"/></a>
|
||||
<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/Blanket58" title="Blanket58"><img src="https://avatars.githubusercontent.com/u/39766189?v=4" width="42;" alt="Blanket58"/></a>
|
||||
<a href="https://github.com/BobH-Official" title="BobH"><img src="https://avatars.githubusercontent.com/u/29333228?v=4" width="42;" alt="BobH"/></a>
|
||||
<a href="https://github.com/Brid9e" title="brid9e"><img src="https://avatars.githubusercontent.com/u/85558909?v=4" width="42;" alt="brid9e"/></a>
|
||||
<a href="https://github.com/ch3nnn" title="chentong"><img src="https://avatars.githubusercontent.com/u/40114564?v=4" width="42;" alt="chentong"/></a>
|
||||
<a href="https://github.com/CharlotteZeng" title="hanchZ"><img src="https://avatars.githubusercontent.com/u/19461184?v=4" width="42;" alt="hanchZ"/></a>
|
||||
<a href="https://github.com/ohto-ai" title="AI"><img src="https://avatars.githubusercontent.com/u/46275725?v=4" width="42;" alt="AI"/></a>
|
||||
<a href="https://github.com/chinaphp" title="Coffee"><img src="https://avatars.githubusercontent.com/u/520827?v=4" width="42;" alt="Coffee"/></a>
|
||||
<a href="https://github.com/DEEMO101" title="DEEMO101"><img src="https://avatars.githubusercontent.com/u/35123091?v=4" width="42;" alt="DEEMO101"/></a>
|
||||
<a href="https://github.com/Damao2250" title="Damao"><img src="https://avatars.githubusercontent.com/u/19251992?v=4" width="42;" alt="Damao"/></a>
|
||||
<a href="https://github.com/dasferco" title="Dasferco"><img src="https://avatars.githubusercontent.com/u/92622404?v=4" width="42;" alt="Dasferco"/></a>
|
||||
<a href="https://github.com/demigodliu" title="DemigodLiu"><img src="https://avatars.githubusercontent.com/u/30372735?v=4" width="42;" alt="DemigodLiu"/></a>
|
||||
<a href="https://github.com/dogxii" title="Dogxi"><img src="https://avatars.githubusercontent.com/u/106546046?v=4" width="42;" alt="Dogxi"/></a>
|
||||
<a href="https://github.com/YLee9527" title="Terry Young"><img src="https://avatars.githubusercontent.com/u/18697332?v=4" width="42;" alt="Terry Young"/></a>
|
||||
<a href="https://github.com/whb1998a" title="Wafer"><img src="https://avatars.githubusercontent.com/u/44045064?v=4" width="42;" alt="Wafer"/></a>
|
||||
<a href="https://github.com/dwgeneral" title="Happy-Engineer"><img src="https://avatars.githubusercontent.com/u/8654993?v=4" width="42;" alt="Happy-Engineer"/></a>
|
||||
<a href="https://github.com/BATTLEHAWK00" title="While True: learn()"><img src="https://avatars.githubusercontent.com/u/45313304?v=4" width="42;" alt="While True: learn()"/></a>
|
||||
<a href="https://github.com/hi-liyan" title="李李李"><img src="https://avatars.githubusercontent.com/u/40056492?v=4" width="42;" alt="李李李"/></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>
|
||||
<a href="https://github.com/zkassing" title="You Kuan Zhang"><img src="https://avatars.githubusercontent.com/u/13414184?v=4" width="42;" alt="You Kuan Zhang"/></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/HeZephyr" title="Zephyr He"><img src="https://avatars.githubusercontent.com/u/67893254?v=4" width="42;" alt="Zephyr He"/></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/zhu0629" title="zhucong"><img src="https://avatars.githubusercontent.com/u/13188450?v=4" width="42;" alt="zhucong"/></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/y52y" title="Zyj"><img src="https://avatars.githubusercontent.com/u/51304324?v=4" width="42;" alt="Zyj"/></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/zlfyuan" title="bgbgPang"><img src="https://avatars.githubusercontent.com/u/19658018?v=4" width="42;" alt="bgbgPang"/></a>
|
||||
<a href="https://github.com/cgluWxh" title="cgluWxh"><img src="https://avatars.githubusercontent.com/u/18211130?v=4" width="42;" alt="cgluWxh"/></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/Mieriki" title="Mieriki"><img src="https://avatars.githubusercontent.com/u/142009318?v=4" width="42;" alt="Mieriki"/></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/Moeyuuko" title="Moeyuuko"><img src="https://avatars.githubusercontent.com/u/14266681?v=4" width="42;" alt="Moeyuuko"/></a>
|
||||
<a href="https://github.com/mo3et" title="Monet Lee"><img src="https://avatars.githubusercontent.com/u/34803812?v=4" width="42;" alt="Monet Lee"/></a>
|
||||
<a href="https://github.com/NianwenDan" title="NianwenDan"><img src="https://avatars.githubusercontent.com/u/74407127?v=4" width="42;" alt="NianwenDan"/></a>
|
||||
<a href="https://github.com/Noryu-01" title="Noryu"><img src="https://avatars.githubusercontent.com/u/109856546?v=4" width="42;" alt="Noryu"/></a>
|
||||
<a href="https://github.com/PILIHU2022" title="Spark"><img src="https://avatars.githubusercontent.com/u/100511118?v=4" width="42;" alt="Spark"/></a>
|
||||
<a href="https://github.com/Perzch" title="Chunhwan"><img src="https://avatars.githubusercontent.com/u/67987641?v=4" width="42;" alt="Chunhwan"/></a>
|
||||
<a href="https://github.com/PipecraftNet" title="Pipecraft"><img src="https://avatars.githubusercontent.com/u/88728670?v=4" width="42;" alt="Pipecraft"/></a>
|
||||
<a href="https://github.com/sevenleave" title="Poirot Hercule"><img src="https://avatars.githubusercontent.com/u/24411140?v=4" width="42;" alt="Poirot Hercule"/></a>
|
||||
<a href="https://github.com/QDelta" title="QDelta"><img src="https://avatars.githubusercontent.com/u/60222316?v=4" width="42;" alt="QDelta"/></a>
|
||||
<a href="https://github.com/Qliangw" title="Qliangw"><img src="https://avatars.githubusercontent.com/u/22791711?v=4" width="42;" alt="Qliangw"/></a>
|
||||
<a href="https://github.com/RivailleF" title="RivailleF"><img src="https://avatars.githubusercontent.com/u/93083015?v=4" width="42;" alt="RivailleF"/></a>
|
||||
<a href="https://github.com/qinxiongzhou" title="Ryan Zhou"><img src="https://avatars.githubusercontent.com/u/33239096?v=4" width="42;" alt="Ryan Zhou"/></a>
|
||||
<a href="https://github.com/DataEraserC" title="Sacabambaspis"><img src="https://avatars.githubusercontent.com/u/102341238?v=4" width="42;" alt="Sacabambaspis"/></a>
|
||||
<a href="https://github.com/N0x-xOn" title="shawing"><img src="https://avatars.githubusercontent.com/u/107191230?v=4" width="42;" alt="shawing"/></a>
|
||||
|
||||
|
||||
<!--GAMFC-END-->
|
||||
|
||||
上图贡献者列表,由 [contributors](https://github.com/jaywcjlove/github-action-contributors) 自动生成贡献者图片。
|
||||
|
||||
|
||||
BIN
appicon/Warp-Github-LG-01.png
Normal file
|
After Width: | Height: | Size: 635 KiB |
BIN
appicon/audioer.png
Executable file
|
After Width: | Height: | Size: 50 KiB |
BIN
appicon/copybook-generator.png
Executable file
|
After Width: | Height: | Size: 22 KiB |
BIN
appicon/create-custom-symbols.png
Normal file
|
After Width: | Height: | Size: 72 KiB |
BIN
appicon/daybar.png
Normal file
|
After Width: | Height: | Size: 28 KiB |
BIN
appicon/deskmark.png
Executable file
|
After Width: | Height: | Size: 56 KiB |
BIN
appicon/devhub.png
Normal file
|
After Width: | Height: | Size: 51 KiB |
BIN
appicon/devtutor.png
Normal file
|
After Width: | Height: | Size: 94 KiB |
BIN
appicon/file-sentinel.png
Executable file
|
After Width: | Height: | Size: 17 KiB |
BIN
appicon/focus-cursor.png
Normal file
|
After Width: | Height: | Size: 34 KiB |
BIN
appicon/iconed.png
Normal file
|
After Width: | Height: | Size: 45 KiB |
BIN
appicon/iconize-folder.png
Executable file
|
After Width: | Height: | Size: 40 KiB |
BIN
appicon/key-clicker.png
Executable file
|
After Width: | Height: | Size: 35 KiB |
BIN
appicon/keyzer.png
Executable file
|
After Width: | Height: | Size: 48 KiB |
BIN
appicon/menuist.png
Executable file
|
After Width: | Height: | Size: 35 KiB |
BIN
appicon/mousio-hint.png
Executable file
|
After Width: | Height: | Size: 29 KiB |
BIN
appicon/mousio.png
Executable file
|
After Width: | Height: | Size: 27 KiB |
BIN
appicon/musicer.png
Normal file
|
After Width: | Height: | Size: 39 KiB |
BIN
appicon/palette-genius.png
Executable file
|
After Width: | Height: | Size: 79 KiB |
BIN
appicon/paste-quick.png
Executable file
|
After Width: | Height: | Size: 40 KiB |
BIN
appicon/quick-rss.png
Normal file
|
After Width: | Height: | Size: 51 KiB |
BIN
appicon/regex-mate.png
Executable file
|
After Width: | Height: | Size: 89 KiB |
BIN
appicon/resume-revise.png
Normal file
|
After Width: | Height: | Size: 34 KiB |
BIN
appicon/scap.png
Executable file
|
After Width: | Height: | Size: 112 KiB |
BIN
appicon/screen-test.png
Executable file
|
After Width: | Height: | Size: 123 KiB |
BIN
appicon/symbol-scribe.png
Normal file
|
After Width: | Height: | Size: 27 KiB |
BIN
appicon/textsound-saver.png
Executable file
|
After Width: | Height: | Size: 30 KiB |
BIN
appicon/time-passage.png
Normal file
|
After Width: | Height: | Size: 23 KiB |
BIN
appicon/vidcrop.png
Executable file
|
After Width: | Height: | Size: 116 KiB |
BIN
appicon/videoer.png
Executable file
|
After Width: | Height: | Size: 52 KiB |
BIN
appicon/vidwall-hub.png
Executable file
|
After Width: | Height: | Size: 33 KiB |
BIN
appicon/vidwall.png
Normal file
|
After Width: | Height: | Size: 51 KiB |
BIN
appicon/web-serve.png
Executable file
|
After Width: | Height: | Size: 43 KiB |
13
assets/bun.svg
Normal 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 |
2
assets/canvas.svg
Normal file
@@ -0,0 +1,2 @@
|
||||
<svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" fill="currentColor" width="1em" height="1em"><path d="M861.098667 736.554667l73.472 146.261333a38.4 38.4 0 0 1-1.706667 37.546667 38.826667 38.826667 0 0 1-32.981333 18.304H512a38.741333 38.741333 0 0 1-33.066667-18.261334 38.4 38.4 0 0 1-1.664-37.589333l10.752-21.333333H221.098667a58.026667 58.026667 0 0 1-58.197334-57.941334V474.453333C116.096 439.168 85.333333 383.829333 85.333333 321.024 85.333333 214.570667 172.373333 128 279.253333 128c63.146667 0 118.698667 30.592 154.154667 77.226667h369.493333a58.026667 58.026667 0 0 1 58.197334 57.898666v473.429334zm-155.178667-136.192-131.157333 261.12h262.357333l-131.2-261.12zM240.469333 510.122667v274.133333h286.336l144.426667-287.488c13.184-26.154667 56.234667-26.154667 69.376 0l42.922667 85.333333V282.453333h-314.282667a192.64 192.64 0 0 1-52.992 174.933334 194.773333 194.773333 0 0 1-175.786667 52.778666zm38.826667-73.301334a116.053333 116.053333 0 0 0 116.352-115.797333A116.053333 116.053333 0 0 0 279.253333 205.226667a116.053333 116.053333 0 0 0-116.352 115.797333 116.053333 116.053333 0 0 0 116.352 115.797333z"></path>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
5
assets/chatgpt.svg
Normal 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 |
1
assets/claude.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" height="1em" width="1em" viewBox="0 0 40 40"><path fill="currentColor" d="M7.75,26.28 L15.52,21.92 L15.65,21.54 L15.52,21.33 L15.14,21.33 L13.84,21.25 L9.4,21.13 L5.55,20.97 L1.82,20.77 L0.88,20.57 L0,19.41 L0.09,18.83 L0.88,18.3 L2.01,18.4 L4.51,18.57 L8.26,18.83 L10.98,18.99 L15.01,19.41 L15.65,19.41 L15.74,19.15 L15.52,18.99 L15.35,18.83 L11.47,16.2 L7.27,13.42 L5.07,11.82 L3.88,11.01 L3.28,10.25 L3.02,8.59 L4.1,7.4 L5.55,7.5 L5.92,7.6 L7.39,8.73 L10.53,11.16 L14.63,14.18 L15.23,14.68 L15.47,14.51 L15.5,14.39 L15.23,13.94 L13,9.91 L10.62,5.81 L9.56,4.11 L9.28,3.09 C9.18,2.67 9.11,2.32 9.11,1.89 L10.34,0.22 L11.02,0 L12.66,0.22 L13.35,0.82 L14.37,3.15 L16.02,6.82 L18.58,11.81 L19.33,13.29 L19.73,14.66 L19.88,15.08 L20.14,15.08 L20.14,14.84 L20.35,12.03 L20.74,8.58 L21.12,4.14 L21.25,2.89 L21.87,1.39 L23.1,0.58 L24.06,1.04 L24.85,2.17 L24.74,2.9 L24.27,5.95 L23.35,10.73 L22.75,13.93 L23.1,13.93 L23.5,13.53 L25.12,11.38 L27.84,7.98 L29.04,6.63 L30.44,5.14 L31.34,4.43 L33.04,4.43 L34.29,6.29 L33.73,8.21 L31.98,10.43 L30.53,12.31 L28.45,15.11 L27.15,17.35 L27.27,17.53 L27.58,17.5 L32.28,16.5 L34.82,16.04 L37.85,15.52 L39.22,16.16 L39.37,16.81 L38.83,18.14 L35.59,18.94 L31.79,19.7 L26.13,21.04 L26.06,21.09 L26.14,21.19 L28.69,21.43 L29.78,21.49 L32.45,21.49 L37.42,21.86 L38.72,22.72 L39.5,23.77 L39.37,24.57 L37.37,25.59 L34.67,24.95 L28.37,23.45 L26.21,22.91 L25.91,22.91 L25.91,23.09 L27.71,24.85 L31.01,27.83 L35.14,31.67 L35.35,32.62 L34.82,33.37 L34.26,33.29 L30.63,30.56 L29.23,29.33 L26.06,26.66 L25.85,26.66 L25.85,26.94 L26.58,28.01 L30.44,33.81 L30.64,35.59 L30.36,36.17 L29.36,36.52 L28.26,36.32 L26,33.15 L23.67,29.58 L21.79,26.38 L21.56,26.51 L20.45,38.46 L19.93,39.07 L18.73,39.53 L17.73,38.77 L17.2,37.54 L17.73,35.11 L18.37,31.94 L18.89,29.42 L19.36,26.29 L19.64,25.25 L19.62,25.18 L19.39,25.21 L17.03,28.45 L13.44,33.3 L10.6,36.34 L9.92,36.61 L8.74,36 L8.85,34.91 L9.51,33.94 L13.44,28.94 L15.81,25.84 L17.34,24.05 L17.33,23.79 L17.24,23.79 L6.8,30.57 L4.94,30.81 L4.14,30.06 L4.24,28.83 L4.62,28.43 L7.76,26.27 L7.75,26.28 Z"/></svg>
|
||||
|
After Width: | Height: | Size: 2.1 KiB |
3
assets/docker-compose.svg
Normal 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
@@ -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 |
3
assets/github-cli.svg
Normal file
@@ -0,0 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 1984 2048" height="1em" width="1em">
|
||||
<path d="M663.6 1589.6c0 8-9.2 14.4-20.8 14.4-13.2 1.2-22.4-5.2-22.4-14.4 0-8 9.2-14.4 20.8-14.4 12-1.2 22.4 5.2 22.4 14.4zm-124.4-18c-2.8 8 5.2 17.2 17.2 19.6 10.4 4 22.4 0 24.8-8s-5.2-17.2-17.2-20.8c-10.4-2.8-22 1.2-24.8 9.2zm176.8-6.8c-11.6 2.8-19.6 10.4-18.4 19.6 1.2 8 11.6 13.2 23.6 10.4 11.6-2.8 19.6-10.4 18.4-18.4-1.2-7.6-12-12.8-23.6-11.6zM979.2 32C424.4 32 0 453.2 0 1008c0 443.6 279.2 823.2 678 956.8 51.2 9.2 69.2-22.4 69.2-48.4 0-24.8-1.2-161.6-1.2-245.6 0 0-280 60-338.8-119.2 0 0-45.6-116.4-111.2-146.4 0 0-91.6-62.8 6.4-61.6 0 0 99.6 8 154.4 103.2 87.6 154.4 234.4 110 291.6 83.6 9.2-64 35.2-108.4 64-134.8-223.6-24.8-449.2-57.2-449.2-442 0-110 30.4-165.2 94.4-235.6-10.4-26-44.4-133.2 10.4-271.6 83.6-26 276 108 276 108 80-22.4 166-34 251.2-34s171.2 11.6 251.2 34c0 0 192.4-134.4 276-108 54.8 138.8 20.8 245.6 10.4 271.6 64 70.8 103.2 126 103.2 235.6 0 386-235.6 416.8-459.2 442 36.8 31.6 68 91.6 68 185.6 0 134.8-1.2 301.6-1.2 334.4 0 26 18.4 57.6 69.2 48.4 400-132.8 671.2-512.4 671.2-956 0-554.8-450-976-1004.8-976zM388.8 1411.6c-5.2 4-4 13.2 2.8 20.8 6.4 6.4 15.6 9.2 20.8 4 5.2-4 4-13.2-2.8-20.8-6.4-6.4-15.6-9.2-20.8-4zm-43.2-32.4c-2.8 5.2 1.2 11.6 9.2 15.6 6.4 4 14.4 2.8 17.2-2.8 2.8-5.2-1.2-11.6-9.2-15.6-8-2.4-14.4-1.2-17.2 2.8zm129.6 142.4c-6.4 5.2-4 17.2 5.2 24.8 9.2 9.2 20.8 10.4 26 4 5.2-5.2 2.8-17.2-5.2-24.8-8.8-9.2-20.8-10.4-26-4zm-45.6-58.8c-6.4 4-6.4 14.4 0 23.6 6.4 9.2 17.2 13.2 22.4 9.2 6.4-5.2 6.4-15.6 0-24.8-5.6-9.2-16-13.2-22.4-8z"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.6 KiB |
8
assets/jupyter.svg
Normal file
@@ -0,0 +1,8 @@
|
||||
<svg viewBox="0 0 256 300" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid" height="1em" width="1em">
|
||||
<path d="M10.584 156.41v-32.753h7.136v35.256a21.302 21.302 0 0 1-4.686 15.976A18.213 18.213 0 0 1 .89 179.31l-.745-5.325a11.61 11.61 0 0 0 7.775-2.982c1.917-2.237 2.663-5.273 2.663-14.592Zm53.22-4.201c0 3.994 0 7.562.32 10.651h-6.338l-.426-6.337a14.752 14.752 0 0 1-12.941 7.242c-6.178 0-13.527-3.355-13.527-17.041v-22.74h7.136v21.302c0 7.402 2.29 12.355 8.734 12.355a9.958 9.958 0 0 0 10.065-10.065v-23.859h7.136v28.279l-.16.213Zm13.527-15.555c0-4.953 0-9-.32-12.675h6.39l.32 6.657a15.445 15.445 0 0 1 13.953-7.562c9.48 0 16.616 7.935 16.616 19.757 0 13.953-8.574 20.877-17.84 20.877a13.794 13.794 0 0 1-12.09-6.125v21.302h-7.03v-42.231Zm7.03 10.385c.019.966.126 1.928.319 2.875a10.97 10.97 0 0 0 10.651 8.255c7.509 0 11.93-6.124 11.93-15.018 0-7.775-4.155-14.432-11.664-14.432a12.249 12.249 0 0 0-11.237 11.663v6.657Zm42.644-23.095 8.574 22.953a132.673 132.673 0 0 1 2.503 7.935c.745-2.344 1.544-5.326 2.503-8.095l7.775-22.793h7.509l-10.651 27.692c-5.326 13.314-8.574 20.184-13.474 24.338a19.385 19.385 0 0 1-8.734 4.58l-1.757-5.965a18.906 18.906 0 0 0 6.23-3.461 21.302 21.302 0 0 0 6.019-7.882c.29-.53.488-1.107.585-1.704a6.125 6.125 0 0 0-.479-1.864l-14.485-35.84h7.775l.107.106Zm47.809-11.173v11.183h10.225v5.326h-10.225v20.983c0 4.793 1.384 7.562 5.325 7.562 1.4.023 2.796-.138 4.154-.48l.32 5.326a17.575 17.575 0 0 1-6.338.959 9.906 9.906 0 0 1-7.722-2.983 14.326 14.326 0 0 1-2.77-10.118v-21.302h-6.07V123.9h6.177v-9.48l6.924-1.65Zm23.37 31.877a12.516 12.516 0 0 0 13.474 13.473 25.988 25.988 0 0 0 10.651-2.024l1.225 5.326a31.953 31.953 0 0 1-13.048 2.396 18.106 18.106 0 0 1-19.278-19.598c0-11.716 6.976-20.982 18.373-20.982 12.781 0 15.977 11.183 15.977 18.32.068 1.1.068 2.202 0 3.302h-27.533l.16-.213Zm20.877-5.326a10.064 10.064 0 0 0-9.906-11.503 11.77 11.77 0 0 0-10.917 11.503h20.823Zm17.324-3.269c0-4.58 0-8.52-.32-12.142h6.391v7.616h.32a11.77 11.77 0 0 1 10.651-8.521 7.775 7.775 0 0 1 2.024 0v6.657a10.645 10.645 0 0 0-2.45 0 9.958 9.958 0 0 0-9.533 9.053 19.772 19.772 0 0 0-.32 3.302v20.716h-7.029v-26.627l.266-.054Z" fill="#4E4E4E"/>
|
||||
<path d="M233.258 16.962a18.053 18.053 0 1 1-18.8-16.935 17.84 17.84 0 0 1 18.8 16.935Z" fill="#767677"/>
|
||||
<path d="M127.953 225.541c-47.93 0-90.055-17.201-111.836-42.604a119.239 119.239 0 0 0 223.672 0c-21.728 25.403-63.693 42.604-111.836 42.604Zm0-165.187c47.93 0 90.055 17.202 111.836 42.604a119.243 119.243 0 0 0-111.836-77.88 119.239 119.239 0 0 0-111.836 77.88c21.781-25.455 63.694-42.604 111.836-42.604Z" fill="#F37726"/>
|
||||
<path d="M61.972 274.975a22.74 22.74 0 1 1-23.699-21.302 22.527 22.527 0 0 1 23.699 21.302Z" fill="#9E9E9E"/>
|
||||
<path d="M21.564 54.565a13.102 13.102 0 1 1 12.728-13.633 13.26 13.26 0 0 1-12.728 13.633Z" fill="#616262"/>
|
||||
</svg>
|
||||
|
||||
|
After Width: | Height: | Size: 2.8 KiB |
1
assets/leaf.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 44 50"><g fill="none" fill-rule="evenodd"><polygon fill="#FFF" points="0 18.234 21.191 0 43.403 18.234 43.403 18.365 21.702 35.818 0 18.365"/><path fill="#40C4FF" d="M21.8169,35.8142 L21.9452,35.8142 C21.9452,35.8142 21.9868,39.0876 21.9452,40.6557 C21.9036,42.2237 21.8169,40.6557 21.8169,40.6557 L0,23.1217 L0,18.2803 L21.8169,35.8142 Z"/><polygon fill="#3DC4FF" points="21.817 40.525 21.945 40.525 21.945 45.235 21.817 45.366 0 27.832 0 22.991"/><polygon fill="#FFF" fill-opacity=".25" points="21.817 40.525 21.945 40.525 21.945 45.235 21.817 45.366 0 27.832 0 22.991"/><polygon fill="#3DC4FF" points="21.817 45.236 21.945 45.105 21.945 49.684 21.817 49.815 0 32.281 0 27.702"/><polygon fill="#FFF" fill-opacity=".5" points="21.817 45.236 21.945 45.105 21.945 49.684 21.817 49.815 0 32.281 0 27.702"/><polygon fill="#E040FB" points="21.656 35.814 21.656 40.656 43.403 23.122 43.403 18.28"/><polygon fill="#E040FB" points="21.656 40.525 21.656 45.366 43.403 27.832 43.403 22.991"/><polygon fill="#FFF" fill-opacity=".25" points="21.656 40.525 21.656 45.366 43.403 27.832 43.403 22.991"/><polygon fill="#E040FB" points="21.656 45.236 21.656 49.815 43.403 32.412 43.403 27.702"/><polygon fill="#FFF" fill-opacity=".5" points="21.656 45.236 21.656 49.815 43.403 32.412 43.403 27.702"/><path fill="#1C1C1F" fill-rule="nonzero" d="M14.559,11.6222 C14.559,11.6222 24.812,11.948 27.5377,14.2818 C30.2635,16.6157 30.6498,20.725 28.4006,23.4601 C26.1514,26.1953 22.1185,26.5206 19.3927,24.1868 C16.667,21.8529 14.559,11.6222 14.559,11.6222 Z"/></g></svg>
|
||||
|
After Width: | Height: | Size: 1.6 KiB |
5
assets/minio.svg
Normal file
@@ -0,0 +1,5 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 162.612 24.465" xmlns:v="https://vecta.io/nano">
|
||||
<path
|
||||
d="M52.751.414h9.108v23.63h-9.108zM41.711.74l-18.488 9.92a.919.919 0 0 1-.856 0L3.879.74A2.808 2.808 0 0 0 2.558.414h-.023A2.4 2.4 0 0 0 0 2.641v21.376h9.1V13.842a.918.918 0 0 1 1.385-.682l10.361 5.568a3.634 3.634 0 0 0 3.336.028l10.933-5.634a.917.917 0 0 1 1.371.69v10.205h9.1V2.641A2.4 2.4 0 0 0 43.055.414h-.023a2.808 2.808 0 0 0-1.321.326zm65.564-.326h-9.237v10.755a.913.913 0 0 1-1.338.706L72.762.675a2.824 2.824 0 0 0-1.191-.261h-.016a2.4 2.4 0 0 0-2.535 2.227v21.377h9.163V13.275a.914.914 0 0 1 1.337-.707l24.032 11.2a2.813 2.813 0 0 0 1.188.26 2.4 2.4 0 0 0 2.535-2.227zm7.161 23.63V.414h4.191v23.63zm28.856.421c-11.274 0-19.272-4.7-19.272-12.232C124.02 4.741 132.066 0 143.292 0s19.32 4.7 19.32 12.233-7.902 12.232-19.32 12.232zm0-21.333c-8.383 0-14.84 3.217-14.84 9.1 0 5.926 6.457 9.1 14.84 9.1s14.887-3.174 14.887-9.1c0-5.883-6.504-9.1-14.887-9.1z"
|
||||
fill="#c72c48" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.0 KiB |
26
assets/nix.svg
Normal file
@@ -0,0 +1,26 @@
|
||||
<svg fill="currentColor" height="1em" width="1em" viewBox="0 0 573 573" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g transform="translate(-44, 0)" fill-rule="nonzero">
|
||||
<g transform="translate(-0, 0)">
|
||||
<g transform="translate(179.2478, 344.2665) rotate(60) translate(-179.2478, -344.2665)translate(39.4675, 217.9911)" fill="#7EBAE4">
|
||||
<polygon points="247.986334 -1.77635684e-15 165.324004 143.175778 7.10542736e-15 143.175778 31.5740916 197.862998 133.750004 197.862998 165.324004 252.550728 279.560554 54.68749"></polygon>
|
||||
</g>
|
||||
<g transform="translate(204.7907, 184.1915) rotate(120) translate(-204.7907, -184.1915)translate(65.0104, 57.9162)" fill="#5277C3">
|
||||
<polygon points="247.986334 -1.77635684e-15 165.324004 143.175778 7.10542736e-15 143.175778 31.5740916 197.862998 133.750004 197.862998 165.324004 252.550728 279.560554 54.68749"></polygon>
|
||||
</g>
|
||||
<g transform="translate(356.1917, 126.2754) rotate(180) translate(-356.1917, -126.2754)translate(216.4114, 0)" fill="#7EBAE4">
|
||||
<polygon points="247.986334 -1.77635684e-15 165.324004 143.175778 7.10542736e-15 143.175778 31.5740916 197.862998 133.750004 197.862998 165.324004 252.550728 279.560554 54.68749"></polygon>
|
||||
</g>
|
||||
<g transform="translate(482.0485, 228.4337) rotate(-120) translate(-482.0485, -228.4337)translate(342.2683, 102.1584)" fill="#5277C3">
|
||||
<polygon points="247.986334 -1.77635684e-15 165.324004 143.175778 7.10542736e-15 143.175778 31.5740916 197.862998 133.750004 197.862998 165.324004 252.550728 279.560554 54.68749"></polygon>
|
||||
</g>
|
||||
<g transform="translate(456.5059, 388.5084) rotate(-60) translate(-456.5059, -388.5084)translate(316.7256, 262.233)" fill="#7EBAE4">
|
||||
<polygon points="247.986334 -1.77635684e-15 165.324004 143.175778 7.10542736e-15 143.175778 31.5740916 197.862998 133.750004 197.862998 165.324004 252.550728 279.560554 54.68749"></polygon>
|
||||
</g>
|
||||
<g transform="translate(165.3253, 320.1492)" fill="#5277C3">
|
||||
<polygon points="247.986334 -1.77635684e-15 165.324004 143.175778 7.10542736e-15 143.175778 31.5740916 197.862998 133.750004 197.862998 165.324004 252.550728 279.560554 54.68749"></polygon>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.5 KiB |
1
assets/pinia.svg
Normal 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
@@ -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 |
5
assets/powershell.svg
Normal file
@@ -0,0 +1,5 @@
|
||||
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" height="1em" width="1em">
|
||||
<path d="m64 10.5-7.11 42a4.64 4.64 0 0 1-4.62 3.5H4.44C2.24 56 .72 54.43 1 52.5l7.11-42a3.93 3.93 0 0 1 1.3-2.19A5 5 0 0 1 12.73 7h47.83a3.25 3.25 0 0 1 3.35 2.32A2.73 2.73 0 0 1 64 10.5z" fill="#0078d7"/>
|
||||
<path fill="#fff" d="M17.72 49.6a2.43 2.43 0 0 1-1.45-4.38l20.54-15.11L22 16.18a2.42 2.42 0 0 1-.1-3.43 2.45 2.45 0 0 1 3.45-.1l17 15.92a2.42 2.42 0 0 1-.22 3.72L19.17 49.13a2.44 2.44 0 0 1-1.45.47zm26.87.4H33.41a2.5 2.5 0 0 1 0-5h11.18a2.5 2.5 0 0 1 0 5z"/>
|
||||
<path fill="#fff" d="m63.91 9.32-7.06 42.27a4 4 0 0 1-.95 2C44.76 42.64 21.52 19.89 9.41 8.31A5 5 0 0 1 12.73 7h47.83a3.25 3.25 0 0 1 3.35 2.32z" opacity=".25"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 760 B |
27
assets/rxjs.svg
Normal 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
@@ -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 |
25
assets/sqlite.svg
Normal file
@@ -0,0 +1,25 @@
|
||||
<svg viewBox="0 0 256 256" fill="none" xmlns="http://www.w3.org/2000/svg" height="1em" width="1em">
|
||||
<g clip-path="url(#a)">
|
||||
<path
|
||||
d="M60 0C26.863 0 0 26.863 0 60v136c0 33.137 26.863 60 60 60h108.46c-1.779-5.243-3.172-13.546-3.956-23.023-.675-8.152-.899-17.171-.525-25.87-.101-1.286-.162-2.122-.162-2.122s-1.874-12.61-4.571-22.969c-1.194-4.598-2.553-8.756-3.98-11.166-.735-1.243.08-6.351 2.131-13.916 1.2 2.071 6.263 10.932 7.28 13.788 1.145 3.228 1.385 4.153 1.385 4.153s-2.777-14.272-7.333-22.6a303.417 303.417 0 0 1 3.542-11.066c1.578 2.767 5.165 9.121 6.461 12.132.12.279.228.541.307.757.184.522.339.965.478 1.371.731 2.118.909 2.792.909 2.792s-.271-1.386-.775-3.524c-.213-.903-.478-1.965-.773-3.096-1.148-4.409-2.892-10.181-5.125-14.704 5.732-29.794 24.181-68.807 44.057-89.868 1.713-1.814 3.434-3.511 5.158-5.041 11.619-10.3 23.392-13.78 33.115-5.118 7.034 6.267 9.912 14.925 9.917 24.89V60c0-33.137-26.863-60-60-60H60Z"
|
||||
fill="#D9D9D9" />
|
||||
<path
|
||||
d="M60 0C26.863 0 0 26.863 0 60v136c0 33.137 26.863 60 60 60h108.46c-1.779-5.243-3.172-13.546-3.956-23.023-.675-8.152-.899-17.171-.525-25.87-.101-1.286-.162-2.122-.162-2.122s-1.874-12.61-4.571-22.969c-1.194-4.598-2.553-8.756-3.98-11.166-.735-1.243.08-6.351 2.131-13.916 1.2 2.071 6.263 10.932 7.28 13.788 1.145 3.228 1.385 4.153 1.385 4.153s-2.777-14.272-7.333-22.6a303.417 303.417 0 0 1 3.542-11.066c1.578 2.767 5.165 9.121 6.461 12.132.12.279.228.541.307.757.184.522.339.965.478 1.371.731 2.118.909 2.792.909 2.792s-.271-1.386-.775-3.524c-.213-.903-.478-1.965-.773-3.096-1.148-4.409-2.892-10.181-5.125-14.704 5.732-29.794 24.181-68.807 44.057-89.868 1.713-1.814 3.434-3.511 5.158-5.041 11.619-10.3 23.392-13.78 33.115-5.118 7.034 6.267 9.912 14.925 9.917 24.89V60c0-33.137-26.863-60-60-60H60Z"
|
||||
fill="url(#b)" />
|
||||
<path
|
||||
d="M246.083 36.91c-9.723-8.662-21.496-5.183-33.115 5.118-1.724 1.53-3.445 3.227-5.158 5.04-19.876 21.063-38.325 60.075-44.057 89.869 2.233 4.523 3.977 10.295 5.125 14.704.295 1.131.56 2.193.773 3.096.504 2.138.775 3.524.775 3.524s-.178-.674-.909-2.792c-.139-.406-.294-.849-.478-1.371a15.467 15.467 0 0 0-.307-.757c-1.296-3.011-4.883-9.365-6.461-12.132a303.417 303.417 0 0 0-3.542 11.066c4.556 8.328 7.333 22.6 7.333 22.6s-.24-.925-1.385-4.153c-1.017-2.856-6.08-11.717-7.28-13.788-2.051 7.565-2.866 12.673-2.131 13.916 1.427 2.41 2.786 6.568 3.98 11.166 2.697 10.359 4.571 22.969 4.571 22.969s.061.836.162 2.122c-.374 8.699-.15 17.718.525 25.87.893 10.791 2.575 20.062 4.719 25.023l1.455-.793c-3.148-9.774-4.427-22.584-3.867-37.358.847-22.581 6.05-49.813 15.662-78.196 16.24-42.847 38.772-77.224 59.394-93.642-18.796 16.956-44.235 71.839-51.85 92.163-8.526 22.759-14.569 44.117-18.21 64.579 6.283-19.183 26.598-27.429 26.598-27.429s9.964-12.274 21.608-29.81c-6.975 1.589-18.428 4.309-22.265 5.919-5.658 2.371-7.183 3.18-7.183 3.18s18.33-11.15 34.056-16.198c21.628-34.025 45.19-82.362 21.462-103.505M28.52 49c-3.063 0-5.554.895-7.463 2.683-1.91 1.79-2.878 4.137-2.878 7.012 0 1.49.24 2.848.714 4.093.474 1.247 1.212 2.403 2.203 3.447.992 1.045 2.977 2.465 5.936 4.27 3.63 2.186 6.005 3.96 7.145 5.346 1.141 1.385 1.707 2.836 1.707 4.348 0 2.026-.675 3.642-2.064 4.858-1.391 1.215-3.251 1.82-5.558 1.82-2.433 0-4.552-.845-6.372-2.526-1.82-1.682-2.738-3.908-2.759-6.698H18V87.78h1.131c.346-.959.824-1.45 1.45-1.45.3 0 1.005.205 2.104.588 2.671.938 4.865 1.39 6.59 1.39 2.971 0 5.508-1.026 7.622-3.114 2.11-2.086 3.176-4.602 3.176-7.54 0-2.278-.704-4.305-2.084-6.071-1.381-1.769-4.066-3.826-8.08-6.19-3.452-2.046-5.694-3.713-6.728-5.013-1.036-1.298-1.568-2.733-1.568-4.309 0-1.704.634-3.072 1.885-4.093 1.252-1.022 2.891-1.528 4.943-1.528 2.309 0 4.233.676 5.756 2.037 1.521 1.363 2.401 3.252 2.66 5.68h1.132v-8.774h-1.053c-.128.447-.247.733-.357.861-.106.128-.311.196-.615.196-.366 0-1.019-.152-1.945-.45-1.985-.66-3.816-.999-5.499-.999Zm36.98 0c-3.733 0-7.121.868-10.183 2.605-3.066 1.734-5.493 4.14-7.285 7.207-1.79 3.066-2.68 6.323-2.68 9.793 0 4.662 1.547 8.816 4.665 12.456 3.12 3.638 6.858 5.905 11.195 6.777.992.51 2.41 1.826 4.268 3.956 2.093 2.404 3.864 4.138 5.32 5.17a16.074 16.074 0 0 0 4.684 2.292c1.661.499 3.457.744 5.4.744 2.351 0 4.457-.403 6.311-1.234l-.416-1.018a10.184 10.184 0 0 1-3.434.568c-1.642 0-3.3-.534-4.963-1.606-1.66-1.075-3.736-3.125-6.213-6.15-1.164-1.45-1.967-2.364-2.421-2.722 4.745-.915 8.648-3.184 11.691-6.816 3.043-3.63 4.565-7.774 4.565-12.417 0-5.514-1.988-10.147-5.935-13.925C76.12 50.9 71.262 49 65.5 49Zm23.085 0 .06 1.195c2.484 0 3.876.722 4.188 2.174.115.52.169 1.478.178 2.86l-.02 26.42c-.02 1.973-.305 3.233-.853 3.78-.549.543-1.476.882-2.819 1.018l-.06 1.195h24.773l.635-5.993h-1.131c-.323 1.632-1.064 2.802-2.243 3.466-1.183.67-3.273 1-6.293 1h-2.342c-2.717 0-4.289-.97-4.704-2.92a6.011 6.011 0 0 1-.12-1.253l.1-26.714c0-1.97.252-3.29.774-3.937.528-.643 1.48-1.004 2.858-1.096L101.507 49H88.585Zm-22.688 1.45c4.21 0 7.647 1.635 10.302 4.935 2.654 3.3 3.97 7.824 3.97 13.553 0 5.428-1.335 9.774-4.01 13.044-2.675 3.268-6.235 4.896-10.66 4.896-4.25 0-7.696-1.679-10.34-5.053-2.643-3.374-3.95-7.755-3.95-13.142 0-5.535 1.323-9.967 3.989-13.279 2.665-3.308 6.233-4.955 10.699-4.955Zm56.968 5.679c-.604 0-1.065.201-1.409.607-.353.404-.461.894-.338 1.489.119.576.449 1.082.973 1.508.521.425 1.083.646 1.687.646.584 0 1.03-.221 1.35-.646.32-.426.417-.931.298-1.508-.124-.595-.442-1.085-.933-1.489-.497-.406-1.044-.607-1.628-.607Zm16.336 4.054c-1.027 3.897-3.252 6.006-6.669 6.346l.039 1.116h3.99l-.079 13.2c.006 2.258.076 3.76.238 4.525.393 1.83 1.605 2.761 3.632 2.761 2.934 0 6.012-1.763 9.23-5.288l-.972-.822c-2.324 2.32-4.379 3.486-6.173 3.486-1.103 0-1.787-.626-2.045-1.86a4.658 4.658 0 0 1-.099-1.058l.04-14.944h6.093l-.059-1.782h-6.015v-5.68h-1.151Zm23.561 4.975c-3.408 0-6.181 1.632-8.336 4.877-2.145 3.25-2.809 6.85-1.965 10.81.496 2.32 1.484 4.12 2.997 5.387 1.51 1.267 3.426 1.9 5.716 1.9 2.133 0 5.103-.534 6.352-1.607 1.253-1.072 2.408-2.81 3.474-5.19l-.854-.881c-1.7 3.087-5.133 4.642-7.721 4.642-3.559 0-5.738-1.927-6.55-5.758a13.745 13.745 0 0 1-.239-1.567c4.234-.662 7.442-1.833 9.608-3.526 2.163-1.693 4.336-3.489 3.93-5.386-.242-1.127-.835-2.013-1.747-2.683-.924-.67-3.324-1.018-4.665-1.018Zm-37.257.137-7.344 1.665v1.292l2.54-.313c1.231 0 1.955.55 2.184 1.645.077.367.125.881.139 1.528l-.08 11.849c-.02 1.64-.205 2.593-.575 2.879-.374.287-1.36.43-2.958.43l-.04 1.117h11.652l-.02-1.116c-1.619 0-2.668-.126-3.136-.372-.46-.245-.776-.69-.913-1.371-.106-.492-.152-1.338-.159-2.507l.04-16.726h-1.33Zm35.392 2.194c.709 0 1.394.27 2.084.802.68.531 1.095 1.122 1.23 1.763.665 3.15-2.166 5.328-8.535 6.542-.182-2.297.222-4.383 1.251-6.268 1.021-1.883 2.351-2.84 3.97-2.84Z"
|
||||
fill="#003B57" />
|
||||
</g>
|
||||
<defs>
|
||||
<linearGradient id="b" x1="147.614" y1="5.239" x2="147.614" y2="241.763"
|
||||
gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#97D9F6" />
|
||||
<stop offset=".92" stop-color="#0F80CC" />
|
||||
<stop offset="1" stop-color="#0F80CC" />
|
||||
</linearGradient>
|
||||
<clipPath id="a">
|
||||
<rect width="256" height="256" rx="60" fill="#fff" />
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
||||
|
||||
|
After Width: | Height: | Size: 6.9 KiB |
1
assets/stylex.svg
Normal 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 |
4
assets/time-zones.svg
Normal file
@@ -0,0 +1,4 @@
|
||||
<svg viewBox="0 0 1024 1024" fill="currentColor" xmlns="http://www.w3.org/2000/svg" height="1em" width="1em">
|
||||
<path d="M945 412H689c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h256c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM811 548H689c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h122c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM477.3 322.5H434c-6.2 0-11.2 5-11.2 11.2v248c0 3.6 1.7 6.9 4.6 9l148.9 108.6c5 3.6 12 2.6 15.6-2.4l25.7-35.1v-.1c3.6-5 2.5-12-2.5-15.6l-126.7-91.6V333.7c.1-6.2-5-11.2-11.1-11.2z"/>
|
||||
<path d="M804.8 673.9H747c-5.6 0-10.9 2.9-13.9 7.7-12.7 20.1-27.5 38.7-44.5 55.7-29.3 29.3-63.4 52.3-101.3 68.3-39.3 16.6-81 25-124 25-43.1 0-84.8-8.4-124-25-37.9-16-72-39-101.3-68.3s-52.3-63.4-68.3-101.3c-16.6-39.2-25-80.9-25-124 0-43.1 8.4-84.7 25-124 16-37.9 39-72 68.3-101.3 29.3-29.3 63.4-52.3 101.3-68.3 39.2-16.6 81-25 124-25 43.1 0 84.8 8.4 124 25 37.9 16 72 39 101.3 68.3 17 17 31.8 35.6 44.5 55.7 3 4.8 8.3 7.7 13.9 7.7h57.8c6.9 0 11.3-7.2 8.2-13.3-65.2-129.7-197.4-214-345-215.7-216.1-2.7-395.6 174.2-396 390.1C71.6 727.5 246.9 903 463.2 903c149.5 0 283.9-84.6 349.8-215.8 3.1-6.1-1.4-13.3-8.2-13.3z"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
3
assets/uv.svg
Normal file
@@ -0,0 +1,3 @@
|
||||
<svg width="41" height="41" viewBox="0 0 41 41" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M-5.28619e-06 0.168629L0.0843098 20.1685L0.151762 36.1683C0.161075 38.3774 1.95947 40.1607 4.16859 40.1514L20.1684 40.084L30.1684 40.0418L31.1852 40.0375C33.3877 40.0282 35.1683 38.2026 35.1683 36V36L37.0003 36L37.0003 39.9992L40.1683 39.9996L39.9996 -9.94653e-07L21.5998 0.0775689L21.6774 16.0185L21.6774 25.9998L20.0774 25.9998L18.3998 25.9998L18.4774 16.032L18.3998 0.0910593L-5.28619e-06 0.168629Z" fill="currentColor" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 537 B |
41
assets/wails.svg
Normal file
@@ -0,0 +1,41 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="43px" height="25px" viewBox="0 0 43 25" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>wails</title>
|
||||
<defs>
|
||||
<linearGradient x1="-0.2%" y1="49.9996942%" x2="99.8%" y2="49.9996942%" id="linearGradient-1">
|
||||
<stop stop-color="#E33232" offset="0%"></stop>
|
||||
<stop stop-color="#6B000D" offset="100%"></stop>
|
||||
</linearGradient>
|
||||
<linearGradient x1="57.4612403%" y1="49.999806%" x2="105.910853%" y2="49.999806%" id="linearGradient-2">
|
||||
<stop stop-color="#E33232" offset="0%"></stop>
|
||||
<stop stop-color="#6B000D" offset="100%"></stop>
|
||||
</linearGradient>
|
||||
<linearGradient x1="37.15%" y1="49.9997381%" x2="137.15%" y2="49.9997381%" id="linearGradient-3">
|
||||
<stop stop-color="#E33232" offset="0%"></stop>
|
||||
<stop stop-color="#6B000D" offset="100%"></stop>
|
||||
</linearGradient>
|
||||
<linearGradient x1="112.55%" y1="91.3957%" x2="32.3601%" y2="31.6497%" id="linearGradient-4">
|
||||
<stop stop-color="#E33232" offset="0%"></stop>
|
||||
<stop stop-color="#6B000D" offset="100%"></stop>
|
||||
</linearGradient>
|
||||
<linearGradient x1="11.95%" y1="49.9998072%" x2="111.95%" y2="49.9998072%" id="linearGradient-5">
|
||||
<stop stop-color="#E33232" offset="0%"></stop>
|
||||
<stop stop-color="#6B000D" offset="100%"></stop>
|
||||
</linearGradient>
|
||||
<linearGradient x1="25.85%" y1="50.0000968%" x2="125.85%" y2="50.0000968%" id="linearGradient-6">
|
||||
<stop stop-color="#E33232" offset="0%"></stop>
|
||||
<stop stop-color="#6B000D" offset="100%"></stop>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="wails" transform="translate(-2, -16)">
|
||||
<polygon id="Path" fill="url(#linearGradient-1)" fill-rule="nonzero" transform="translate(7.0309, 29.4785) scale(-1, 1) rotate(1.5717) translate(-7.0309, -29.4785)" points="11.9494683 28.4327958 2.11242576 30.5241355 3.85520888 28.6651669"></polygon>
|
||||
<polygon id="Path" fill="url(#linearGradient-2)" fill-rule="nonzero" transform="translate(36.5284, 31.0714) scale(-1, 1) rotate(-8.5836) translate(-36.5284, -31.0714)" points="45.1336155 28.6949336 37.2037952 36.9916435 27.9231538 35.590792 37.9375746 32.7974273 30.7582105 31.7134351 40.7726313 28.9200704 33.6016056 27.8360782 43.2241214 25.1511127"></polygon>
|
||||
<polygon id="Path" fill="url(#linearGradient-3)" fill-rule="nonzero" transform="translate(26.7683, 36.8365) scale(-1, 1) rotate(-54.8194) translate(-26.7683, -36.8365)" points="31.562747 36.2208083 28.8692495 35.9745456 27.514805 43.5625128 20.0037949 32.9116542 28.8230753 30.1104168 33.532848 30.1104168"></polygon>
|
||||
<polygon id="Path" fill="url(#linearGradient-4)" fill-rule="nonzero" transform="translate(25.014, 20.7986) scale(-1, 1) rotate(128.5441) translate(-25.014, -20.7986)" points="21.9947129 16.4027699 26.1092974 16.4027699 27.4413571 19.4221053 28.0333837 25.1943641"></polygon>
|
||||
<polygon id="Path" fill="url(#linearGradient-5)" fill-rule="nonzero" transform="translate(36.3109, 20.727) scale(-1, 1) rotate(-14.7678) translate(-36.3109, -20.727)" points="38.8713907 20.875032 39.5522206 22.562306 33.0695361 18.8917449"></polygon>
|
||||
<polygon id="Path" fill="#FFFFFF" transform="translate(23.7731, 24.2307) rotate(-70.4489) translate(-23.7731, -24.2307)" points="23.1059371 22.8465329 24.9921646 25.6148058 22.5539813 23.7394335"></polygon>
|
||||
<polygon id="Path" fill="url(#linearGradient-6)" fill-rule="nonzero" transform="translate(21.3064, 24.9941) scale(-1, 1) rotate(-6.2086) translate(-21.3064, -24.9941)" points="19.70206 25.0327874 20.4365745 24.298273 35.7067436 25.4580326 32.0341713 28.4347491 22.8720698 27.6229174 19.70206 30.2130473 29.8692865 32.493908 26.4286662 35.2773312 17.3052234 32.1846388 13.7872857 26.2698644 6.90604496 14.7109263"></polygon>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 4.0 KiB |
1
assets/zed.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" fill="currentColor" height="1em" width="1em"><path d="M141.744 113.262C126.017 113.262 113.262 126.008 113.262 141.744L113.262 768.331 56.3 768.331 56.3 141.744C56.3 94.554 94.554 56.3 141.744 56.3L904.837 56.3C942.903 56.3 961.959 102.315 935.044 129.23L465.054 599.228 597.444 599.228 597.444 540.481 654.406 540.481 654.406 613.469C654.406 637.061 635.279 656.191 611.684 656.191L408.088 656.191 310.184 754.091 754.091 754.091 754.091 398.075 811.053 398.075 811.053 754.091C811.053 785.553 785.55 811.053 754.091 811.053L253.221 811.053 153.537 910.737 882.256 910.737C897.983 910.737 910.737 897.992 910.737 882.256L910.737 255.669 967.7 255.669 967.7 882.256C967.7 929.446 929.446 967.7 882.256 967.7L119.163 967.7C81.096 967.7 62.041 921.685 88.956 894.769L557.166 426.556 426.556 426.556 426.556 483.519 369.594 483.519 369.594 412.316C369.594 388.723 388.721 369.594 412.316 369.594L614.128 369.594 713.813 269.909 269.909 269.909 269.909 625.925 212.947 625.925 212.947 269.909C212.947 238.446 238.446 212.947 269.909 212.947L770.775 212.947 870.46 113.262 141.744 113.262Z"></path></svg>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
183
docs/7zip.md
Normal file
@@ -0,0 +1,183 @@
|
||||
7zip 备忘清单
|
||||
====
|
||||
|
||||
7z(7-Zip / p7zip)命令用于创建、更新、查看与解压压缩包,常见格式包括 `7z`、`zip`、`tar` 等。
|
||||
|
||||
入门
|
||||
----
|
||||
|
||||
### 7z 用法
|
||||
|
||||
```shell
|
||||
$ 7z <命令> [<开关>..] <压缩包名称> [<文件名>..]
|
||||
```
|
||||
<!--rehype:className=wrap-text-->
|
||||
|
||||
常见命令:
|
||||
|
||||
- `a` 添加文件到压缩包(创建/追加)
|
||||
- `x` 解压(保留完整路径)
|
||||
- `e` 解压(不保留目录结构)
|
||||
- `l` 列出压缩包内容
|
||||
- `t` 测试压缩包完整性
|
||||
|
||||
安装:
|
||||
|
||||
```shell
|
||||
# Debian/Ubuntu
|
||||
$ sudo apt install p7zip-full
|
||||
|
||||
# RHEL/CentOS/Fedora
|
||||
$ sudo yum install p7zip p7zip-plugins
|
||||
|
||||
# macOS (Homebrew)
|
||||
$ brew install sevenzip
|
||||
```
|
||||
|
||||
### 命令
|
||||
<!--rehype:wrap-class=col-span-2-->
|
||||
|
||||
参数 | 描述 | 参数 | 描述
|
||||
:--- | :--- | :--- | :---
|
||||
`a` | **add:** 添加/创建压缩包 | `x` | **extract:** 解压(保留完整路径)
|
||||
`e` | **extract:** 解压(不保留目录名) | `l` | **list:** 列出压缩包内容
|
||||
`t` | **test:** 测试压缩包完整性 | `h` | **hash:** 计算文件哈希
|
||||
`u` | **update:** 更新压缩包内文件 | `d` | **delete:** 从压缩包中删除文件
|
||||
`rn` | **rename:** 重命名压缩包内文件 | `i` | **info:** 查看支持的格式信息
|
||||
`b` | **benchmark:** 性能测试 | |
|
||||
|
||||
### 语法形式和选项
|
||||
|
||||
:- | :-
|
||||
:- | :-
|
||||
**基本语法** | `7z <命令> [开关...] 压缩包 [文件...]`
|
||||
**创建 7z 压缩包** | `7z a -t7z archive.7z 文件/目录...`
|
||||
**创建 zip 压缩包** | `7z a -tzip archive.zip 文件/目录...`
|
||||
**解压(保留路径)** | `7z x archive.7z -o输出目录`
|
||||
**解压(不保留目录)** | `7z e archive.7z -o输出目录`
|
||||
**列出内容** | `7z l archive.7z`
|
||||
**测试完整性** | `7z t archive.7z`
|
||||
**计算哈希** | `7z h -scrcSHA256 文件...`
|
||||
**创建分卷压缩包** | `7z a archive.7z 大文件.iso -v1g`
|
||||
<!--rehype:className=style-list-arrow-->
|
||||
|
||||
### 常用开关示例
|
||||
<!--rehype:wrap-class=col-span-2 row-span-1-->
|
||||
|
||||
参数 | 描述 | 参数 | 描述
|
||||
:--- | :--- | :--- | :---
|
||||
`--` | 停止解析后续参数为开关 | `-t{Type}` | 指定压缩格式(如 `-t7z` / `-tzip`),默认为`7z`
|
||||
`-o{目录}` | 指定输出目录(解压) | `-p{密码}` | 设置密码
|
||||
`-r[-\|0]` | 递归子目录(`-r` / `-r-` / `-r0`) | `-mx[N]` | 压缩等级:`-mx0`(不压缩) `-mx1`(最快)… `-mx9`(最强)
|
||||
`-mmt[N]` | 线程数(如 `-mmt4`) | `-y` | 所有询问默认回答 Yes
|
||||
`-ao{a\|s\|t\|u}` | 覆盖策略:a 全覆盖 / s 跳过 / t 仅覆盖旧文件 / u 自动重命名 | |
|
||||
`-v{Size}[b\|k\|m\|g]` | 分卷(如 `-v1g` / `-v500m`) | `-sdel` | 压缩后删除源文件
|
||||
`-sfx[{name}]` | 生成自解压压缩包(SFX) | `-bd` | 关闭进度指示器
|
||||
`-bb[0-3]` | 输出日志等级 | `-bt` | 输出执行时间统计
|
||||
`-so` | 输出到 stdout | `-si[{name}]` | 从 stdin 读入数据
|
||||
`-scrc[CRC64\|SHA1\|SHA256\|*]` | 指定校验/哈希算法(用于 `x/e/h`) | `@listfile` | 从列表文件读取文件名
|
||||
`-i...` | 仅包含匹配项(include) | `-x...` | 排除匹配项(exclude)
|
||||
`-slt` | `l` 命令输出技术信息 | `-spf` | 使用绝对路径
|
||||
|
||||
7z 压缩示例
|
||||
--------
|
||||
|
||||
### 创建新的 7z 压缩包
|
||||
|
||||
```shell
|
||||
$ 7z a -t7z archive.7z file1 file2 dir1/
|
||||
```
|
||||
|
||||
### 创建分卷压缩包
|
||||
|
||||
```shell
|
||||
$ 7z a big.7z big.iso -v1g
|
||||
```
|
||||
|
||||
压缩时会自动根据文件名后缀判断压缩格式,所以可以忽略 `-t` 开关
|
||||
|
||||
### 设置压缩等级与线程数
|
||||
|
||||
```shell
|
||||
$ 7z a archive.7z dir1/ -mx9 -mmt4
|
||||
```
|
||||
|
||||
### 排除目录或文件
|
||||
<!--rehype:wrap-class=col-span-2-->
|
||||
|
||||
```shell
|
||||
$ 7z a archive.7z example/ '-x!example/node_modules/*' '-x!example/dist/*'
|
||||
```
|
||||
<!--rehype:className=wrap-text-->
|
||||
|
||||
### 从列表文件读取待压缩文件
|
||||
|
||||
```shell
|
||||
$ 7z a archive.7z @files.txt
|
||||
```
|
||||
|
||||
`files.txt` 每行一个文件路径(相对或绝对路径均可)。
|
||||
|
||||
### 压缩后删除源文件
|
||||
|
||||
```shell
|
||||
$ 7z a archive.7z dir1/ -sdel
|
||||
```
|
||||
|
||||
7z 解压示例
|
||||
--------
|
||||
|
||||
### 解压并保留目录结构(推荐)
|
||||
|
||||
```shell
|
||||
$ 7z x archive.7z
|
||||
```
|
||||
|
||||
### 解压到指定目录
|
||||
|
||||
```shell
|
||||
$ 7z x archive.7z -o./output
|
||||
```
|
||||
|
||||
### 解压但不保留目录结构
|
||||
|
||||
```shell
|
||||
$ 7z e archive.7z -o./output
|
||||
```
|
||||
|
||||
### 解压时覆盖策略
|
||||
|
||||
```shell
|
||||
$ 7z x archive.7z -o./output -aoa
|
||||
```
|
||||
|
||||
### 仅解压匹配的文件
|
||||
|
||||
```shell
|
||||
$ 7z x archive.7z '*.log' -o./output
|
||||
```
|
||||
|
||||
### 列出压缩包内容(含技术信息)
|
||||
|
||||
```shell
|
||||
$ 7z l archive.7z -slt
|
||||
```
|
||||
|
||||
### 测试压缩包完整性
|
||||
|
||||
```shell
|
||||
$ 7z t archive.7z
|
||||
```
|
||||
|
||||
### 计算文件哈希(SHA256)
|
||||
|
||||
```shell
|
||||
$ 7z h -scrcSHA256 file1 file2
|
||||
```
|
||||
|
||||
另见
|
||||
----
|
||||
|
||||
- [7-Zip 官网](https://www.7-zip.org/) _(7-zip.org)_
|
||||
- [7-Zip 简体中文网站](https://sparanoid.com/lab/7z/) _(7-zip.org)_
|
||||
- [7z 命令帮助文档](https://jaywcjlove.github.io/linux-command/c/7z.html) _(linux-command)_
|
||||
33
docs/adb.md
@@ -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 到您的计算机
|
||||
|
||||
19
docs/bash.md
@@ -1043,6 +1043,7 @@ echo "${args[@]}"
|
||||
将参数放入数组中,然后追加
|
||||
|
||||
### 调试模式
|
||||
<!--rehype:wrap-class=col-span-2-->
|
||||
|
||||
启用调试模式,会把脚本中的每条命令的执行情况打印出来。它可以在整个会话或脚本上运行,也可以在脚本内以编程方式启用。
|
||||
|
||||
@@ -1056,11 +1057,23 @@ $ bash -x myscript.sh
|
||||
|
||||
```bash
|
||||
#!/bin/bash
|
||||
set -x # Enable debugging
|
||||
# some code here
|
||||
set +x # Disable debugging output.
|
||||
set -x # 启用调试模式(显示执行的每一行命令)
|
||||
# 此处放置要执行的代码
|
||||
set +x # 关闭调试输出(停止显示命令)
|
||||
```
|
||||
|
||||
### 命令行光标移动类
|
||||
|
||||
| 快捷键 | 作用 |
|
||||
|----------|-------------|
|
||||
| `Ctrl` + `A` | 移动到命令行开头 |
|
||||
| `Ctrl` + `E` | 移动到命令行末尾 |
|
||||
| `Alt` + `B` | 向左移动一个“词” |
|
||||
| `Alt` + `F` | 向右移动一个“词” |
|
||||
| `Ctrl` + `B` | 向左移动一个字符(←) |
|
||||
| `Ctrl` + `F` | 向右移动一个字符(→) |
|
||||
<!--rehype:className=shortcuts left-align-->
|
||||
|
||||
Bash 颜色
|
||||
----
|
||||
|
||||
|
||||
262
docs/bun.md
Normal 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)
|
||||
253
docs/canvas.md
Normal file
@@ -0,0 +1,253 @@
|
||||
HTML Canvas 备忘清单
|
||||
===
|
||||
|
||||
这份 HTML Canvas 快速参考备忘单列出了常见的 HTML5 Canvas 设计标签,以易读的格式呈现。
|
||||
|
||||
入门
|
||||
---
|
||||
<!--rehype:body-class=cols-4-->
|
||||
|
||||
### 基本设置
|
||||
<!--rehype:wrap-class=col-span-2-->
|
||||
|
||||
```html
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Canvas 示例</title>
|
||||
</head>
|
||||
<body>
|
||||
<canvas id="myCanvas" width="500" height="400"
|
||||
style="border:1px solid #000000;">
|
||||
</canvas>
|
||||
<script src="script.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
```
|
||||
|
||||
### 获取上下文
|
||||
<!--rehype:wrap-class=col-span-2-->
|
||||
|
||||
```js
|
||||
const canvas = document.getElementById("myCanvas");
|
||||
|
||||
const ctx = canvas.getContext("2d");
|
||||
```
|
||||
|
||||
绘制形状
|
||||
---
|
||||
|
||||
### 矩形
|
||||
<!--rehype:wrap-class=col-span-2-->
|
||||
|
||||
```js
|
||||
ctx.fillStyle = "red";
|
||||
ctx.fillRect(10, 10, 150, 100); // x, y, 宽度, 高度
|
||||
|
||||
ctx.strokeStyle = "blue";
|
||||
ctx.lineWidth = 5;
|
||||
ctx.strokeRect(200, 10, 150, 100); // x, y, 宽度, 高度
|
||||
|
||||
ctx.clearRect(15, 15, 30, 30); // x, y, 宽度, 高度
|
||||
```
|
||||
|
||||
路径
|
||||
---
|
||||
|
||||
### 线条
|
||||
|
||||
```js
|
||||
ctx.beginPath();
|
||||
ctx.moveTo(50, 50); // 起始点
|
||||
ctx.lineTo(200, 50); // 结束点
|
||||
ctx.lineTo(200, 200); // 下一个线条结束点
|
||||
ctx.closePath(); // 将结束点连接到起始点
|
||||
ctx.stroke();
|
||||
```
|
||||
|
||||
### 圆形
|
||||
|
||||
```js
|
||||
ctx.beginPath();
|
||||
// x, y, 半径, 起始角度, 结束角度
|
||||
ctx.arc(150, 150, 75, 0, 2 * Math.PI);
|
||||
ctx.fillStyle = "green";
|
||||
ctx.fill();
|
||||
ctx.stroke();
|
||||
```
|
||||
|
||||
### 弧
|
||||
|
||||
```js
|
||||
ctx.beginPath();
|
||||
// x, y, 半径, 起始角度, 结束角度
|
||||
ctx.arc(150, 150, 75, 0, Math.PI);
|
||||
ctx.stroke();
|
||||
```
|
||||
|
||||
贝塞尔曲线和二次曲线
|
||||
---
|
||||
|
||||
### 二次曲线
|
||||
|
||||
```js
|
||||
ctx.beginPath();
|
||||
ctx.moveTo(50, 250);
|
||||
// cpX, cpY, 终点X, 终点Y
|
||||
ctx.quadraticCurveTo(200, 100, 400, 250);
|
||||
ctx.stroke();
|
||||
```
|
||||
|
||||
### 贝塞尔曲线
|
||||
|
||||
```js
|
||||
ctx.beginPath();
|
||||
ctx.moveTo(50, 300);
|
||||
// cp1X, cp1Y, cp2X, cp2Y, 终点X, 终点Y
|
||||
ctx.bezierCurveTo(150, 100, 350, 500, 450, 300);
|
||||
ctx.stroke();
|
||||
```
|
||||
|
||||
### 文本
|
||||
|
||||
```js
|
||||
ctx.font = "30px Arial";
|
||||
ctx.fillStyle = "black";
|
||||
// 文本, x, y
|
||||
ctx.fillText("Hello Canvas", 10, 50);
|
||||
// 文本, x, y
|
||||
ctx.strokeText("Hello Canvas", 10, 100);
|
||||
```
|
||||
|
||||
### 图像
|
||||
<!--rehype:wrap-class=col-span-3-->
|
||||
|
||||
```js
|
||||
const img = new Image();
|
||||
img.src = "path/to/image.jpg";
|
||||
img.onload = () => {
|
||||
ctx.drawImage(img, 10, 10); // img, x, y
|
||||
ctx.drawImage(img, 50, 50, 100, 100); // img, x, y, 宽度, 高度
|
||||
ctx.drawImage(img, 100, 100, 100, 100, 150, 150, 200, 200); // img, sx, sy, sWidth, sHeight, dx, dy, dWidth, dHeight
|
||||
};
|
||||
```
|
||||
|
||||
变换
|
||||
---
|
||||
|
||||
### 平移
|
||||
|
||||
```js
|
||||
ctx.translate(100, 100); // x, y
|
||||
ctx.fillRect(0, 0, 50, 50);
|
||||
```
|
||||
|
||||
### 旋转
|
||||
|
||||
```js
|
||||
// 角度(以弧度为单位)
|
||||
ctx.rotate((Math.PI / 180) * 45);
|
||||
ctx.fillRect(100, 100, 50, 50);
|
||||
```
|
||||
|
||||
### 缩放
|
||||
|
||||
```js
|
||||
ctx.scale(2, 2); // x, y
|
||||
ctx.fillRect(50, 50, 50, 50);
|
||||
```
|
||||
|
||||
渐变
|
||||
---
|
||||
|
||||
### 线性渐变
|
||||
<!--rehype:wrap-class=col-span-2-->
|
||||
|
||||
```js
|
||||
const linearGradient = ctx.createLinearGradient(0, 0, 200, 0); // x0, y0, x1, y1
|
||||
linearGradient.addColorStop(0, "red");
|
||||
linearGradient.addColorStop(1, "blue");
|
||||
ctx.fillStyle = linearGradient;
|
||||
ctx.fillRect(10, 10, 200, 100);
|
||||
```
|
||||
|
||||
### 径向渐变
|
||||
|
||||
```js
|
||||
const radialGradient = ctx.createRadialGradient(75, 50, 5, 90, 60, 100); // x0, y0, r0, x1, y1, r1
|
||||
radialGradient.addColorStop(0, "red");
|
||||
radialGradient.addColorStop(1, "blue");
|
||||
ctx.fillStyle = radialGradient;
|
||||
ctx.fillRect(10, 10, 200, 100);
|
||||
```
|
||||
|
||||
### 图案
|
||||
<!--rehype:wrap-class=col-span-2-->
|
||||
|
||||
```js
|
||||
const img = new Image();
|
||||
img.src = "path/to/image.jpg";
|
||||
img.onload = () => {
|
||||
// 'repeat', 'repeat-x', 'repeat-y', 'no-repeat'
|
||||
const pattern = ctx.createPattern(img, "repeat");
|
||||
ctx.fillStyle = pattern;
|
||||
ctx.fillRect(0, 0, 300, 300);
|
||||
};
|
||||
```
|
||||
|
||||
### 阴影
|
||||
|
||||
```js
|
||||
ctx.shadowColor = "rgba(0, 0, 0, 0.5)";
|
||||
ctx.shadowBlur = 10;
|
||||
ctx.shadowOffsetX = 5;
|
||||
ctx.shadowOffsetY = 5;
|
||||
|
||||
ctx.fillStyle = "red";
|
||||
ctx.fillRect(100, 100, 100, 100);
|
||||
```
|
||||
|
||||
合成
|
||||
---
|
||||
|
||||
### 全局透明度
|
||||
|
||||
```js
|
||||
ctx.globalAlpha = 0.5;
|
||||
ctx.fillStyle = "red";
|
||||
ctx.fillRect(100, 100, 100, 100);
|
||||
|
||||
ctx.fillStyle = "blue";
|
||||
ctx.fillRect(150, 150, 100, 100);
|
||||
```
|
||||
|
||||
### 全局合成操作
|
||||
|
||||
```js
|
||||
ctx.globalCompositeOperation = "source-over"; // 默认
|
||||
ctx.fillStyle = "red";
|
||||
ctx.fillRect(100, 100, 100, 100);
|
||||
|
||||
ctx.globalCompositeOperation = "destination-over";
|
||||
ctx.fillStyle = "blue";
|
||||
ctx.fillRect(150, 150, 100, 100);
|
||||
```
|
||||
|
||||
### 动画
|
||||
|
||||
```js
|
||||
let x = 0;
|
||||
function draw() {
|
||||
ctx.clearRect(0, 0, canvas.width, canvas.height);
|
||||
ctx.fillStyle = "blue";
|
||||
ctx.fillRect(x, 100, 50, 50);
|
||||
x += 2;
|
||||
requestAnimationFrame(draw);
|
||||
}
|
||||
draw();
|
||||
```
|
||||
|
||||
参考阅读
|
||||
---
|
||||
|
||||
- [MDN 文档](https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API)
|
||||
619
docs/chatgpt.md
Normal file
@@ -0,0 +1,619 @@
|
||||
ChatGPT
|
||||
===
|
||||
|
||||
此备忘单列出了来自世界各地的提示和提示,说明如何有效使用 ChatGPT。
|
||||
|
||||
入门指南
|
||||
---
|
||||
|
||||
### ChatGPT 介绍
|
||||
|
||||
ChatGPT 是 OpenAI 于 2022 年发布的 AI 聊天机器人,基于 GPT-3.5、GPT-4 等模型,支持自动生成文本、问答、总结和编程等多种语言处理任务。
|
||||
|
||||
- 网址: <https://chatgpt.com/>
|
||||
|
||||
### 国内类似的平台
|
||||
|
||||
- [文心一言(百度)](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-->
|
||||
|
||||
为你的企业或创意命名
|
||||
|
||||
```bash
|
||||
你能帮我为我的科技创业公司起个有创意的名字吗?
|
||||
|
||||
帮我想个朗朗上口的名字给我的面包店。
|
||||
```
|
||||
|
||||
为课程或培训项目创建大纲
|
||||
|
||||
```sh
|
||||
请帮我创建一个面向初学者的网页开发课程大纲。
|
||||
|
||||
能否为客户服务工作坊设计一个培训项目的大纲?
|
||||
```
|
||||
|
||||
提供特定职位的面试问题
|
||||
|
||||
```sh
|
||||
我在面试软件工程师职位,你能给我一些面试问题吗?
|
||||
|
||||
请给我一些常见的市场经理面试问题。
|
||||
```
|
||||
|
||||
为商业伙伴、客户或客户提供礼物创意
|
||||
|
||||
```sh
|
||||
我需要一些送给客户的礼物创意,你能帮忙吗?
|
||||
|
||||
有什么独特的礼物可以送给我的商业伙伴?
|
||||
```
|
||||
|
||||
从一长串名字或邮箱中随机挑选比赛获奖者
|
||||
|
||||
```sh
|
||||
我想从100个名字中挑选一位获奖者,你能帮忙吗?
|
||||
|
||||
能帮我从1000个邮箱中随机挑选5个用于赠品抽奖吗?
|
||||
```
|
||||
|
||||
### 编程
|
||||
<!--rehype:wrap-class=row-span-3-->
|
||||
|
||||
解释代码为什么无法正常工作
|
||||
|
||||
```js
|
||||
为什么这段代码不能运行?
|
||||
var x = 5;
|
||||
var y = 0;
|
||||
console.log(x/y);
|
||||
```
|
||||
|
||||
解释代码的含义
|
||||
|
||||
```js
|
||||
这段代码的作用是什么?
|
||||
function addNumbers(a, b) {
|
||||
return a + b;
|
||||
}
|
||||
```
|
||||
|
||||
将代码转换为指定的语言
|
||||
|
||||
```js
|
||||
把这段代码翻译成 Python:
|
||||
function addNumbers(a, b) {
|
||||
return a + b;
|
||||
}
|
||||
```
|
||||
|
||||
编写完整的软件程序
|
||||
|
||||
```js
|
||||
写一个计算给定数的阶乘的 Python 程序。
|
||||
|
||||
如何用 JavaScript 发起一个 HTTP 请求?
|
||||
```
|
||||
|
||||
生成正则表达式 (regex)
|
||||
|
||||
```js
|
||||
创建一个匹配所有电子邮件地址的正则表达式?
|
||||
|
||||
生成一个8位密码的正则表达式。
|
||||
```
|
||||
|
||||
为代码库添加注释
|
||||
|
||||
```js
|
||||
为这段代码添加注释:
|
||||
function addNumbers(a, b) {
|
||||
return a + b;
|
||||
}
|
||||
```
|
||||
|
||||
修改代码行的 CSS
|
||||
|
||||
```html
|
||||
更新这行的 CSS 将字体颜色更改为蓝色?
|
||||
<p class="example">Hello, World!</p>
|
||||
```
|
||||
|
||||
修改代码行的 HTML
|
||||
|
||||
```html
|
||||
给这个标题标签添加一个 "header" 类?
|
||||
<h1>Hello, World!</h1>
|
||||
```
|
||||
|
||||
### 电子表格
|
||||
|
||||
帮助创建一个电子表格公式
|
||||
|
||||
```
|
||||
你能帮我创建一个公式来计算单元格 A1 到 A10 的总和吗?
|
||||
```
|
||||
<!--rehype:className=wrap-text-->
|
||||
|
||||
解释一个公式
|
||||
|
||||
```
|
||||
你能用简单的语言解释一下公式 =SUM(A1:A10) 的含义吗?
|
||||
```
|
||||
<!--rehype:className=wrap-text-->
|
||||
|
||||
创建占位符的虚拟数据
|
||||
|
||||
```
|
||||
你能帮我生成一些虚拟数据,作为我的电子表格的占位符吗?
|
||||
```
|
||||
<!--rehype:className=wrap-text-->
|
||||
|
||||
帮助创建复杂的宏
|
||||
|
||||
```
|
||||
我需要创建一个宏,计算单元格 B1 到 B10 的平均值并将结果插入到单元格 C1。你能帮我吗?
|
||||
```
|
||||
<!--rehype:className=wrap-text-->
|
||||
|
||||
提供提高电子表格效率的建议
|
||||
|
||||
```
|
||||
你能给我一些提高电子表格效率的建议吗?
|
||||
```
|
||||
|
||||
### 电子邮件
|
||||
<!--rehype:wrap-class=row-span-2-->
|
||||
|
||||
创建电子邮件活动
|
||||
|
||||
```
|
||||
邀请 Jack 周末晚餐的邮件
|
||||
|
||||
创建一个针对新客户的引导流程邮件序列
|
||||
```
|
||||
|
||||
格式化和校对邮件
|
||||
|
||||
```
|
||||
帮我校对并格式化我刚写的这封邮件:
|
||||
Hello, do you have any actual tips or tricks for ChatGPT please?
|
||||
```
|
||||
<!--rehype:className=wrap-text-->
|
||||
|
||||
提供有效电子邮件营销的建议
|
||||
|
||||
```
|
||||
给我一些提高邮件打开率和点击率的建议
|
||||
|
||||
建议一些方法,让我的邮件内容对订阅者更具吸引力和相关性。
|
||||
```
|
||||
<!--rehype:className=wrap-text-->
|
||||
|
||||
自动回复邮件
|
||||
|
||||
```
|
||||
给他发送邮件,内容为 "That's a good suggestion, it's coming soon":
|
||||
Hello, do you have any actual tips or tricks for ChatGPT please?
|
||||
```
|
||||
<!--rehype:className=wrap-text-->
|
||||
|
||||
从文本中提取电子邮件地址
|
||||
|
||||
```sh
|
||||
帮我提取所有的电子邮件地址:
|
||||
Sed sit amet sodales tom@gmail.com, at jack@gmail.com enim. 18261@outlook.com ut eros
|
||||
```
|
||||
<!--rehype:className=wrap-text-->
|
||||
|
||||
### 社交媒体
|
||||
|
||||
提供任何主题的表情包创意
|
||||
|
||||
```
|
||||
你能给我一些关于【狗狗】的表情包创意吗?
|
||||
```
|
||||
|
||||
提供能提升互动的帖子创意
|
||||
|
||||
```
|
||||
我想发一个关于气候变化的帖子,能与我的粉丝产生互动。你能给我一些创意吗?
|
||||
```
|
||||
<!--rehype:className=wrap-text-->
|
||||
|
||||
生成标签和配文
|
||||
|
||||
```
|
||||
我需要一些适合风景日落照片的标签和配文。你能帮我生成一些吗?
|
||||
```
|
||||
<!--rehype:className=wrap-text-->
|
||||
|
||||
提供回复建议
|
||||
|
||||
```
|
||||
我刚收到一条关于项目状态的消息。你能给我一个回复建议吗?
|
||||
```
|
||||
<!--rehype:className=wrap-text-->
|
||||
|
||||
### 阅读
|
||||
|
||||
总结长文本
|
||||
|
||||
```
|
||||
你能帮我总结一下这篇文章吗?[你的文本]
|
||||
```
|
||||
|
||||
翻译外语
|
||||
|
||||
```
|
||||
你能把这句话翻译成西班牙语吗?[你的文本]
|
||||
```
|
||||
|
||||
推荐类似的书籍
|
||||
|
||||
```
|
||||
你能推荐一些和《饥饿游戏》类似的书吗?
|
||||
```
|
||||
|
||||
### 设计
|
||||
|
||||
创建 AI 设计提示词
|
||||
|
||||
```
|
||||
你能帮我生成一个为新运动品牌设计标志的提示词吗?
|
||||
```
|
||||
|
||||
博客或视频的缩略图建议
|
||||
|
||||
```
|
||||
你能推荐一些引人注目的缩略图设计,适合我最新关于健康饮食的 YouTube 视频吗?
|
||||
```
|
||||
<!--rehype:className=wrap-text-->
|
||||
|
||||
字体搭配
|
||||
|
||||
```
|
||||
你能为旅行博客的标题设计推荐一组字体搭配吗?
|
||||
```
|
||||
|
||||
颜色搭配
|
||||
|
||||
```
|
||||
你能推荐一个适合婚礼摄影网站的配色方案吗?
|
||||
```
|
||||
|
||||
### 数据分析
|
||||
|
||||
从大量文本中提取数字
|
||||
|
||||
```
|
||||
请从这段文本中提取所有数字:[你的文本]
|
||||
```
|
||||
|
||||
根据你提供的文本或数据创建表格
|
||||
|
||||
```
|
||||
你能根据这些数据创建一个表格吗?:[你的数据]
|
||||
```
|
||||
|
||||
从大列表中筛选数据
|
||||
|
||||
```
|
||||
请根据特定条件筛选此列表:[你的列表]
|
||||
```
|
||||
|
||||
### 付费广告
|
||||
|
||||
提供广告创意
|
||||
|
||||
```
|
||||
给我一些新产品发布的广告创意。
|
||||
```
|
||||
|
||||
检查跟踪代码错误(标签管理器等)
|
||||
|
||||
```
|
||||
检查我的标签管理器代码是否有错误。
|
||||
```
|
||||
|
||||
提供广告文案创意
|
||||
|
||||
```
|
||||
为一家【旅游】公司建议广告文案。
|
||||
```
|
||||
|
||||
Facebook 受众建议
|
||||
|
||||
```
|
||||
推荐适合服装系列广告活动的 Facebook 受众。
|
||||
```
|
||||
|
||||
为广告创建正文、标题和/或号召性用语
|
||||
|
||||
```
|
||||
为一个新的健身计划广告创建标题、正文和号召性用语。
|
||||
```
|
||||
|
||||
### 亚马逊 FBA
|
||||
|
||||
编写或重写产品描述
|
||||
|
||||
```
|
||||
请帮我为最新商品写一个新颖且吸引人的产品描述。
|
||||
```
|
||||
|
||||
编写或重写申诉信
|
||||
|
||||
```
|
||||
我需要帮助重写我的申诉信,使其更具说服力。
|
||||
```
|
||||
|
||||
编写或重写供应商联系邮件
|
||||
|
||||
```
|
||||
你能帮我写一封有效的邮件,以联系潜在供应商吗?
|
||||
```
|
||||
|
||||
帮助寻找适合打包销售的商品
|
||||
|
||||
```
|
||||
请推荐一些适合为客户打包销售的商品。
|
||||
```
|
||||
|
||||
整理产品和定价数据
|
||||
|
||||
```
|
||||
你能帮我把产品和定价信息整理成一个整洁易管理的表格吗?
|
||||
```
|
||||
<!--rehype:className=wrap-text-->
|
||||
|
||||
### SEO
|
||||
<!--rehype:wrap-class=col-span-2 row-span-2-->
|
||||
|
||||
生成或查找关键词
|
||||
|
||||
- 为[主题]生成一系列相关关键词。
|
||||
- 识别[主题]内容优化的长尾关键词。
|
||||
- 查找[主题]的最佳表现关键词。
|
||||
- 为[主题]生成一系列 LSI 关键词。
|
||||
- 查找[主题]的低竞争关键词。
|
||||
- 为[主题]关键词创建同义词列表。
|
||||
- 查找[主题] PPC 广告活动的最佳关键词。
|
||||
- 查找[主题]语音搜索优化的最佳关键词。
|
||||
- 列出[主题]的最佳关键词用于特色摘要。
|
||||
- 查找[主题]视频优化的最佳关键词。
|
||||
- 查找[主题]的最佳关键词。
|
||||
- 查找[主题] AMP 优化的最佳关键词。
|
||||
- 查找[主题]社交媒体优化的最佳关键词。
|
||||
<!--rehype:className=style-round-->
|
||||
|
||||
更多关于 SEO 的 ChatGPT 提示
|
||||
|
||||
- 为[主题]创建元描述和标题标签。
|
||||
- 查找与[主题]相关的内部链接机会。
|
||||
- 为[主题]生成博客文章和主题创意。
|
||||
- 研究[主题]内容中使用的行业术语。
|
||||
- 查找权威网站以获取与[主题]内容相关的反向链接。
|
||||
- 创建与[主题]相关的 XML 网站地图示例。
|
||||
- 研究[主题]的最佳元标签。
|
||||
- 研究[主题]内容的最佳内部链接结构。
|
||||
- 生成与[主题]相关的常见问题列表。
|
||||
- 为与[主题]相关的图片创建最佳替代文本标签列表。
|
||||
- 为[主题]创建相关子主题列表。
|
||||
- 查找与[主题]相关的内容发布时间的最佳时机。
|
||||
- 研究与[主题]相关的最佳外部链接策略。
|
||||
- 查找与[主题] SEO 使用的最流行工具。
|
||||
- 为[主题]创建潜在影响者列表。
|
||||
- 研究[主题]的最佳模式标记。
|
||||
- 查找[主题]内容的最佳标题标签。
|
||||
- 为[主题]创建潜在的链接建设机会列表。
|
||||
- 研究[主题]反向链接的最佳锚文本。
|
||||
- 创建[主题]的潜在客座博客机会列表。
|
||||
- 研究[主题]的最佳本地 SEO 策略。
|
||||
- 研究[主题]网站性能的最佳分析工具。
|
||||
- 为[主题]创建潜在合作伙伴关系列表。
|
||||
- 研究[主题]的最佳移动优化策略。
|
||||
- 研究[主题]的最佳电子商务优化策略,并提供关键词聚类。
|
||||
- 创建[主题]的潜在联盟营销机会列表。
|
||||
- [主题]的最佳联盟营销网站有哪些?
|
||||
- [主题]的最佳国际 SEO 策略是什么?
|
||||
- 创建与[主题]相关的潜在播客或播客嘉宾机会列表。
|
||||
- 研究[主题]的最佳 Google 我的商家优化策略。
|
||||
- 查找与[主题]相关的热门内容主题。
|
||||
- 研究[主题]的最佳 SEO 策略并提供可操作步骤。
|
||||
- 创建与[主题]相关的潜在视频系列或网络研讨会创意列表。
|
||||
- 研究与[主题]相关的竞争对手策略。
|
||||
- 查找与[主题]相关的规范标签示例。
|
||||
- 为[主题]创建一个面向多个地理位置的示例关键词列表。
|
||||
- 生成针对不同客户购买漏斗阶段的[主题]关键词创意。
|
||||
- 识别与[主题]相关的行业标签。
|
||||
<!--rehype:className=style-round-->
|
||||
|
||||
### 写作/博客
|
||||
|
||||
为你的创意写作项目创建标题
|
||||
|
||||
```
|
||||
我短篇小说集的标题:[你的文章]
|
||||
```
|
||||
|
||||
创建大纲
|
||||
|
||||
```
|
||||
关于锻炼的论文大纲。
|
||||
```
|
||||
|
||||
生成内容创意
|
||||
|
||||
```
|
||||
可持续时尚博客的创意?
|
||||
```
|
||||
|
||||
总结你提供的任何文本
|
||||
|
||||
```
|
||||
总结一下这篇关于可再生能源的文章?[你的文章]
|
||||
```
|
||||
|
||||
创建完整的博客文章
|
||||
|
||||
```
|
||||
关于[财务规划]的博客文章?
|
||||
```
|
||||
|
||||
扩展句子、段落或长文本
|
||||
|
||||
```
|
||||
扩展关于爵士音乐的这句话?[你的句子]
|
||||
```
|
||||
|
||||
改变你的写作语气
|
||||
|
||||
```
|
||||
将这份报告的语气改为对话式?[你的报告]
|
||||
```
|
||||
|
||||
校对或编辑你的写作
|
||||
|
||||
```
|
||||
校对这篇文章?[你的文章]
|
||||
```
|
||||
|
||||
用标题格式化文本(适合博客文章)
|
||||
|
||||
```
|
||||
为我的博客文章格式化标题?[你的帖子]
|
||||
```
|
||||
|
||||
检查任何文本的偏见
|
||||
|
||||
```
|
||||
检查这篇文章是否存在偏见?[你的文章]
|
||||
```
|
||||
|
||||
检测任何文本的抄袭
|
||||
|
||||
```
|
||||
检测这篇论文的抄袭情况?[你的论文]
|
||||
```
|
||||
|
||||
提供域名创意
|
||||
|
||||
```
|
||||
我[园艺博客]的域名?
|
||||
```
|
||||
|
||||
### 教师/课程创建者
|
||||
|
||||
将事实或统计数据转换为多项选择题
|
||||
|
||||
```sh
|
||||
你能把这份关于世界历史的事实列表转成多项选择题吗?[你的列表]
|
||||
```
|
||||
<!--rehype:className=wrap-text-->
|
||||
|
||||
特定主题的作业创意
|
||||
|
||||
```
|
||||
我需要一些关于美国独立战争的历史作业创意。你能建议一些吗?
|
||||
```
|
||||
<!--rehype:className=wrap-text-->
|
||||
|
||||
从学生列表中创建分组
|
||||
|
||||
```
|
||||
我有一份30名学生的名单。你能把他们分成6人一组进行小组项目吗?
|
||||
```
|
||||
<!--rehype:className=wrap-text-->
|
||||
|
||||
根据考试成绩创建曲线
|
||||
|
||||
```
|
||||
我需要根据学生的考试成绩创建一个评分曲线。你能帮忙吗?
|
||||
```
|
||||
<!--rehype:className=wrap-text-->
|
||||
|
||||
评分作业
|
||||
|
||||
```
|
||||
你能给这篇历史论文评分并提供改进建议吗?
|
||||
```
|
||||
|
||||
### YouTube
|
||||
|
||||
从文字稿中创建时间戳
|
||||
|
||||
```
|
||||
你能为这段播客节目的文字稿创建时间戳吗?[你的文字稿]
|
||||
```
|
||||
<!--rehype:className=wrap-text-->
|
||||
|
||||
将 YouTube 视频转换为带格式的博客文章
|
||||
|
||||
```
|
||||
你能把这段关于烹饪的 YouTube 视频转成带有标题和项目符号的博客文章吗?[视频链接]
|
||||
```
|
||||
<!--rehype:className=wrap-text-->
|
||||
|
||||
想出视频大纲或脚本
|
||||
|
||||
```
|
||||
我需要一个关于冥想好处的视频大纲。你能帮忙吗?
|
||||
```
|
||||
|
||||
创建对评论的回复
|
||||
|
||||
```
|
||||
你能写一个周到且礼貌的回复,回应我 YouTube 视频上的这条负面评论吗?
|
||||
```
|
||||
<!--rehype:className=wrap-text-->
|
||||
|
||||
给你缩略图创意
|
||||
|
||||
```
|
||||
我需要一些关于“DIY 家居装饰”视频的缩略图创意。你能建议一些吗?
|
||||
```
|
||||
<!--rehype:className=wrap-text-->
|
||||
|
||||
分析你的脚本或文字稿并告诉你语气
|
||||
|
||||
```
|
||||
你能分析这段关于环境问题的视频脚本,并告诉我语气是什么吗?[你的脚本]
|
||||
```
|
||||
<!--rehype:className=wrap-text-->
|
||||
|
||||
任何主题的视频创意
|
||||
|
||||
```
|
||||
我想制作一系列关于时尚的视频。你能给我建议一些单集的创意吗?
|
||||
```
|
||||
<!--rehype:className=wrap-text-->
|
||||
|
||||
### 研究
|
||||
|
||||
帮助研究2021年前发生的任何事情
|
||||
|
||||
- 用简单的术语解释量子计算。
|
||||
- 有什么创意适合10岁生日派对的吗?
|
||||
- 我如何在 JavaScript 中发出 HTTP 请求?
|
||||
- 你能告诉我美国内战前的事件吗?
|
||||
- 你能告诉我印刷机的发明吗?
|
||||
- 你能研究一下奥林匹克运动会的历史吗?
|
||||
- 你能给我关于法国大革命的信息吗?
|
||||
- 我对拜占庭帝国的历史感兴趣。你能帮我了解更多吗?
|
||||
- 等等...
|
||||
<!--rehype:className=style-round-->
|
||||
|
||||
## 参考资料
|
||||
|
||||
- [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/)
|
||||
- [Comprehensive Cheatsheet](https://github.com/bg-write/chatGPT-cheatsheet)
|
||||
594
docs/cisco-devices.md
Normal file
@@ -0,0 +1,594 @@
|
||||
Cisco 网络设备备忘清单
|
||||
===
|
||||
|
||||
本清单提供了 Cisco 网络设备常用命令示例
|
||||
|
||||
清单内容基于 [**Cisco Packet Tracer**](https://www.netacad.com/cisco-packet-tracer) 进行
|
||||
|
||||
模式
|
||||
---
|
||||
|
||||
### 模式简介
|
||||
<!--rehype:wrap-class=col-span-3-->
|
||||
|
||||
是指命令行界面的操作层级,不同模式可执行不同范围的命令
|
||||
|
||||
以下列出了一些基本的模式
|
||||
|
||||
| 模式 | 命令提示符 | 进入方式 |
|
||||
| :-: | :-: | :-: |
|
||||
| 用户模式 | `用户名称>` | 默认进入 |
|
||||
| 特权模式 | `用户名称#` | 通过 enable 进入 |
|
||||
| 全局配置模式 | `用户名称(config)#` | 通过 config terminal 进入 |
|
||||
| VLAN 模式 | `用户名称(config-vlan)#` | 通过 vlan vlan-ID 进入 |
|
||||
| 接口配置模式 | `用户名称(config-if)#` | 通过 interface 接口 进入 |
|
||||
| Line 模式 | `用户名称(config-line)#` | 通过 line vty 端口 进入 |
|
||||
<!--rehype:className=show-header-->
|
||||
|
||||
### 进入特权模式
|
||||
|
||||
```shell
|
||||
enable # 进入到特权模式
|
||||
```
|
||||
|
||||
### 进入全局模式
|
||||
|
||||
```shell
|
||||
configure terminal # 进入到全局模式
|
||||
```
|
||||
|
||||
### 进入 line 模式
|
||||
|
||||
```shell
|
||||
line vty 0 # 进入 line 模式 的 0 端口
|
||||
```
|
||||
|
||||
### 退回上级模式
|
||||
|
||||
退回到上一级模式, 如全局模式退到特权模式,特权模式退到普通模式
|
||||
|
||||
```shell
|
||||
exit
|
||||
```
|
||||
|
||||
### 强制执行
|
||||
|
||||
在任何模式下均可
|
||||
|
||||
```shell
|
||||
do ~ # 强制执行 ~
|
||||
```
|
||||
|
||||
### 取消命令
|
||||
|
||||
```shell
|
||||
no ~ # 取消命令 ~
|
||||
```
|
||||
|
||||
基本操作
|
||||
---
|
||||
|
||||
### 修改主机名称
|
||||
|
||||
需要在全局模式下进行
|
||||
|
||||
```shell
|
||||
hostname NAME # 修改名称为 NAME
|
||||
```
|
||||
|
||||
### 查看设备配置
|
||||
|
||||
需要在特权模式下进行
|
||||
|
||||
```shell
|
||||
show running-config # 查看设备配置
|
||||
```
|
||||
|
||||
### 关闭端口
|
||||
|
||||
需要在接口配置模式下进行
|
||||
|
||||
```shell
|
||||
shutdown ~ # 关闭端口 ~
|
||||
```
|
||||
|
||||
### 设置进入特权模式密码
|
||||
<!--rehype:wrap-class=col-span-2-->
|
||||
|
||||
需要在全局模式下进行
|
||||
|
||||
#### 明文密码
|
||||
|
||||
```shell
|
||||
enable password PASSWORD # 设置进入 特权模式 的密码为 PASSWORD
|
||||
```
|
||||
|
||||
#### 密文密码
|
||||
|
||||
```shell
|
||||
enable secret PASSWORD # 设置进入 特权模式 的密码为 PASSWORD
|
||||
```
|
||||
|
||||
vlan 配置
|
||||
---
|
||||
|
||||
### 创建并进入 vlan
|
||||
|
||||
需要在全局模式下进行
|
||||
|
||||
vlan-ID 可以是任何符合 vlan 范围的数字,如果 vlan 存在,则直接进入
|
||||
|
||||
```shell
|
||||
vlan vlan-ID
|
||||
```
|
||||
|
||||
### 修改 vlan 名称
|
||||
|
||||
在进入 vlan 后,将当前 vlan 名称变更为 NAME
|
||||
|
||||
```shell
|
||||
name NAME
|
||||
```
|
||||
|
||||
### 取消 vlan
|
||||
|
||||
需要离开 vlan 后,在全局模式下才能取消 vlan
|
||||
|
||||
```shell
|
||||
no vlan vlan-ID
|
||||
```
|
||||
|
||||
### 配置 vlan trunk
|
||||
<!--rehype:wrap-class=col-span-2-->
|
||||
|
||||
#### 首先创建需要配置的对应 vlan
|
||||
|
||||
```sh
|
||||
vlan vlan-id
|
||||
```
|
||||
|
||||
#### 添加端口到 vlan 当中
|
||||
|
||||
```sh
|
||||
# 进入 范围在 1 - 10 的所有接口
|
||||
interface range f0/1 - 10
|
||||
# 进入 范围在 1 - 10 的所有接口 和 单独的 f0/12 接口
|
||||
interface range f0/1 - 11, f0/12
|
||||
# 进入 单个 接口 f0/1
|
||||
interface f0/1
|
||||
```
|
||||
|
||||
#### 进入接口后
|
||||
|
||||
```sh
|
||||
# vlan-id 为 需要将 当前接口 添加到 的 vlan id,为数字
|
||||
switchport access vlan vlan-id
|
||||
```
|
||||
|
||||
#### 进入两个交换机相连接口
|
||||
|
||||
```sh
|
||||
# 设置模式 trunk
|
||||
switchport mode trunk
|
||||
```
|
||||
|
||||
#### 在 trunk 中 添加或删除 vlan
|
||||
|
||||
```sh
|
||||
# 首先需要进入 配置 trunk 的接口
|
||||
switchport trunk allowed vlan add vlan-id
|
||||
switchport trunk allowed vlan remove vlan-id
|
||||
```
|
||||
|
||||
#### 查看 trunk 配置
|
||||
|
||||
```sh
|
||||
# 特权模式下
|
||||
# interface-id 为配置 trunk 的接口名称
|
||||
show interfaces interface-id switchport
|
||||
```
|
||||
|
||||
接口操作
|
||||
---
|
||||
|
||||
### 进入接口
|
||||
|
||||
需要在全局模式下进行
|
||||
|
||||
#### 单个接口
|
||||
|
||||
```shell
|
||||
# 进入单个接口
|
||||
# 进入接口 f0/1
|
||||
interface f0/1
|
||||
```
|
||||
|
||||
#### 多个接口
|
||||
|
||||
```shell
|
||||
# 进入接口 f0/1 直到 f0/8 和 f0/10
|
||||
interface range f0/1 - 8, f0/10
|
||||
```
|
||||
|
||||
### 添加接口到 vlan 中
|
||||
|
||||
将进入到的当前接口添加到对应 vlan-ID 的 vlan 中
|
||||
|
||||
```shell
|
||||
switchport access vlan vlan-ID
|
||||
```
|
||||
|
||||
### 将接口从 vlan 中移出
|
||||
|
||||
取消添加到对应 vlan-ID 的 vlan 的接口
|
||||
|
||||
```shell
|
||||
no switchport access vlan vlan-ID
|
||||
```
|
||||
|
||||
设备调试
|
||||
---
|
||||
|
||||
### 配置 console 口令
|
||||
|
||||
设置进入终端的密码
|
||||
|
||||
```shell
|
||||
# 配置端口
|
||||
line console 0
|
||||
# 设置密码为 123
|
||||
password 123
|
||||
# 载入
|
||||
login
|
||||
```
|
||||
|
||||
### 配置远程
|
||||
<!--rehype:wrap-class=row-span-2 col-span-2-->
|
||||
|
||||
#### 配置远程用户
|
||||
|
||||
```shell
|
||||
# 0 为一个用户
|
||||
# 0 - 2 为 0, 1, 2 三个用户
|
||||
# 0 - 15 为 16 个用户
|
||||
line vty 0
|
||||
line vty 0 - 2
|
||||
line vty 0 - 15
|
||||
# 配置密码为 123456
|
||||
password 123456
|
||||
# 载入设置
|
||||
login
|
||||
```
|
||||
|
||||
#### 配置接口
|
||||
|
||||
```shell
|
||||
# 进入 vlan 1
|
||||
interface vlan 1
|
||||
# 配置 ip 地址
|
||||
# 192.168.100.254 为需要配置的 ip 地址
|
||||
# 255.255.255.0 为子网掩码
|
||||
ip address 192.168.100.254 255.255.255.0
|
||||
# 启动远程
|
||||
# no 为取消 ~
|
||||
# shutdown 为关闭
|
||||
# no shutdown 就是取消关闭,即启动
|
||||
no shutdown
|
||||
```
|
||||
|
||||
#### 连接远程
|
||||
|
||||
```shell
|
||||
# 需要先配置远程的电脑 ip 地址
|
||||
# 需要与 配置的 远程 ip 地址频段一致
|
||||
# 如 远程 ip 地址为 192.168.100.254
|
||||
# 电脑 ip 地址需要与 远程 ip 地址在同一频段 即 192.168.100.~
|
||||
# 然后通过在 电脑 的命令提示行使用 ping 命令查看是否连接成功
|
||||
# 连接成功之后通过 telnet 访问远程
|
||||
telnet 192.168.100.254
|
||||
```
|
||||
|
||||
路由配置
|
||||
---
|
||||
|
||||
### 静态路由
|
||||
<!--rehype:wrap-class=col-span-2-->
|
||||
|
||||
```sh
|
||||
# 首先需要配置 IP 地址
|
||||
## 电脑配置
|
||||
### IP地址配置 (假设为:192.168.1.1)
|
||||
### 默认网关 (需与IP地址同段,假设为:192.168.1.254)
|
||||
## 路由器配置
|
||||
### 首先进入与电脑连接的接口 (假设为 f0/0)
|
||||
### 需在 全局模式 下
|
||||
interface f0/0
|
||||
### 进入接口后
|
||||
### 在 接口模式 下
|
||||
ip address 192.168.1.254 255.255.255.0
|
||||
### 192.168.1.254 为 在 电脑所配置的默认网关
|
||||
### 255.255.255.0 为 子网掩码
|
||||
### 然后启动接口 否则无法连接
|
||||
no shutdown
|
||||
### 进入两个路由器相连的接口 (假设为 s1/0)
|
||||
interface s1/0
|
||||
### 同样需要配置 IP地址
|
||||
ip address 10.10.10.1 255.0.0.0
|
||||
### 然后配置时钟
|
||||
clock rate 64000
|
||||
### 64000 为 时钟速率
|
||||
### 同时也需要启动接口
|
||||
no shutdown
|
||||
|
||||
# 配置跳转路由
|
||||
## 在 全局模式 下
|
||||
ip route 192.168.1.0 255.255.255.0 10.10.10.1
|
||||
### 其中 192.168.1.0 为 需要到达的目标 IP地址
|
||||
### 第四位 0 表示无指定值,即 1 - 254 的值都能匹配
|
||||
### 255.255.255.0 为 子网掩码
|
||||
### 目标地址有几位明确的,就需要几位255
|
||||
### 10.10.10.1 为 下一跳地址
|
||||
### 下一跳可以理解为 公交车的下一站
|
||||
### 而目标 IP地址则为公交车的终点站
|
||||
```
|
||||
|
||||
### 默认路由
|
||||
<!--rehype:wrap-class=col-span-2-->
|
||||
|
||||
```sh
|
||||
# 首先需要清空所有路由
|
||||
## 然后重新配置
|
||||
ip route 0.0.0.0 0.0.0.0 0.0.0.0
|
||||
|
||||
# 第一个 0.0.0.0 为 目标 IP地址 固定不变
|
||||
## 0 表示无指定目标,因此匹配所有 IP地址
|
||||
|
||||
# 第二个 0.0.0.0 为 目标地址的子网掩码 固定不变
|
||||
## 目标 IP地址 有几位不为 0 则有几位是 255
|
||||
## 如:目标 IP地址 为:10.10.0.0
|
||||
## 则 子网掩码为 255.255.0.0
|
||||
|
||||
# 第三个 0.0.0.0 为 下一跳的 IP地址 随下一跳地址变化
|
||||
## 如:下一跳地址为 10.10.10.1 则 命令为
|
||||
ip route 0.0.0.0 0.0.0.0 10.10.10.1
|
||||
```
|
||||
|
||||
### 单臂路由
|
||||
<!--rehype:wrap-class=col-span-2-->
|
||||
|
||||
```sh
|
||||
# 首先需要在 PC 配置IP和网关 (假设分别为 192.168.1.1、192.168.1.254)
|
||||
# 然后进入交换机创建 vlan (假设 vlan 为 1)
|
||||
vlan 1
|
||||
## 并将与PC相连的接口 添加到 vlan 当中 (假设接口为 f0/1)
|
||||
interface f0/1
|
||||
## 配置接口为access口
|
||||
switchport mode access
|
||||
switchport access vlan 1
|
||||
## 然后在于路由器相连的接口中放通vlan (假设为 g0/0接口)
|
||||
int g0/0
|
||||
## 设置 trunk
|
||||
switchport mode trunk
|
||||
## 放通所有vlan
|
||||
switchport trunk allowed vlan all
|
||||
# 进入路由器
|
||||
## 首先需要开启
|
||||
### 需要进入与交换机相连的接口 (假设为 f0/1)
|
||||
interface f0/1
|
||||
### 开启接口
|
||||
no sh
|
||||
## 然后进入 f0/1.1 (f0/1.1 为 f0/1 的子接口)
|
||||
int f0/1.1
|
||||
## 配置封装 trunk 到 vlan 中 (假设 vlan 为 1)
|
||||
encapsulation dot1Q 1
|
||||
## 随后配置 IP 和 掩码
|
||||
ip address 192.168.1.254 255.255.255.0
|
||||
```
|
||||
|
||||
### 动态路由
|
||||
<!--rehype:wrap-class=col-span-2-->
|
||||
|
||||
```sh
|
||||
# 首先配置电脑IP及网关 (假设为 192.168.1.1、192.168.1.254)
|
||||
# 然后配置路由器
|
||||
## 进入与电脑相连的接口 (假设为 f0/1),开启,并配置IP地址
|
||||
int f0/1
|
||||
no sh
|
||||
ip address 192.168.1.254 255.255.255.0
|
||||
## 然后进入与其它路由器相连的接口 (假设为 f0/0),开启
|
||||
## 并为接口配置IP (假设为 10.10.10.1)
|
||||
int f0/0
|
||||
ip address 10.10.10.1 255.0.0.0
|
||||
## 然后回到全局模式开始RIP配置
|
||||
route rip
|
||||
network 192.168.1.0
|
||||
## network 后面跟的IP地址为与当前路由器所相连的接口所配置的IP,0表示全网段
|
||||
## 即 network 后,所有在 192.168.1.1 - 254 这个范围的IP都能联通
|
||||
```
|
||||
|
||||
### OSPF 配置
|
||||
<!--rehype:wrap-class=col-span-2-->
|
||||
|
||||
```sh
|
||||
# 添加环回地址
|
||||
## 进入环回接口
|
||||
interface loopback 0
|
||||
## 配置ip
|
||||
ip address IP-Address subnet-mask
|
||||
## 配置 ospf 点对点
|
||||
ip ospf network point-to-point
|
||||
|
||||
# OSPF 路由进程
|
||||
## 进程号可自定义
|
||||
## 用于识别当前路由器上的多个进程
|
||||
router ospf 进程号
|
||||
## 发布网段在区域
|
||||
### 网段 如:192.168.10.~
|
||||
### 网段可以是与子网地址,网络地址,接口地址...
|
||||
### 正向掩码若为 255.0.0.0 则反向掩码为 0.255.255.255
|
||||
### 255.255.255.192 - 0.0.0.63
|
||||
### 区域号可自定义
|
||||
network 网段 反向掩码 area 区域号
|
||||
## 设置 router ID
|
||||
### ID 为 IP地址
|
||||
### 是在 OSPF区域当中唯一标识路由器的IP地址
|
||||
### 优先选取最大的环回接口IP
|
||||
### 若没有则选取最大物理接口IP
|
||||
router-id ID
|
||||
## 修改 接口 cost值
|
||||
### OSPF 使用 cost值来决定最佳路径
|
||||
### cost值类似权重值
|
||||
### 需要首先进入对应接口当中
|
||||
ip ospf cost cost值
|
||||
## 配置 OSPF计时器
|
||||
### TIME 为 时间 单位为 s
|
||||
ip ospf hello-interval TIME(s)
|
||||
ip ospf dead-interval TIME(s)
|
||||
```
|
||||
|
||||
交换机配置
|
||||
---
|
||||
|
||||
### VTP协议
|
||||
<!--rehype:wrap-class=col-span-2-->
|
||||
|
||||
```sh
|
||||
# 可以通过 VTP协议 在一台交换机上集中进行配置变更
|
||||
# 所做的变更会自动传播到当前网络中的所有交换机上
|
||||
|
||||
# VTP 域
|
||||
## 域内的每台交换机必须使用相同 VTP域名
|
||||
## 一台交换机只能加入一个 VTP域
|
||||
## 交换机必须是相连的,且之间须启用 Trunk 中继
|
||||
|
||||
# VTP 模式
|
||||
## 服务器模式
|
||||
vtp mode server
|
||||
### 充当VTP服务器,控制它所在域中的VLAN生成和修改,并向外发送VTP通告
|
||||
## 客户机模式
|
||||
vtp mode client
|
||||
### 此模式的交换机不允许增删VLAN,监听其它交换机的VTP通告,并修改对应配置
|
||||
## 透明模式
|
||||
vtp mode transparent
|
||||
### 不参与VTP,可增删本地VLAN,但不向外通告,也不接受VTP通告修改自身VLAN数据库,可转发VTP通告
|
||||
|
||||
# 流程
|
||||
## 首先创建一个 VTP服务器
|
||||
vtp mode server
|
||||
### 配置 VTP域名 为 VTP
|
||||
vtp domain VTP
|
||||
## 然后创建 VTP客户端
|
||||
vtp mode client
|
||||
### 需要在创建 VTP客户端前 先配置 trunk
|
||||
### 进入当前交换机与 VTP服务器交换机 相连的接口 (假设为 f0/24)
|
||||
int f0/24
|
||||
switchport mode trunk
|
||||
### VTP服务器交换机 与 当前交换机相连接口 在 f0/24 设 trunk 时自动变为 trunk
|
||||
### 不需要再手动配置 trunk
|
||||
### 并将客户端配置到 VTP 这个 VTP域名 下
|
||||
vtp domain VTP
|
||||
|
||||
# VTP 相关命令
|
||||
## 查看配置
|
||||
do sh vtp status
|
||||
## VTP 版本
|
||||
vtp version versions
|
||||
### VTP 版本号大的 VLAN信息 将覆盖 VTP版本号低的
|
||||
## 设置VTP口令 为 VTPPASSWORD
|
||||
vtp password VTPPASSWORD
|
||||
### 只有在 域名和口令 相同的情况下 才会同步 vlan
|
||||
|
||||
```
|
||||
|
||||
### STP 协议
|
||||
<!--rehype:wrap-class=col-span-2-->
|
||||
|
||||
```shell
|
||||
# 概念
|
||||
## RB(Root Bridge) 根网桥
|
||||
### 网络中倒数的根,整个网络中只存在一个根
|
||||
## RP(Root Port)根端口
|
||||
## DP(design Port)指定端口
|
||||
|
||||
# 命令
|
||||
## 查看STP的配置
|
||||
show spanning-tree
|
||||
## 查看 f0/0 端口状态
|
||||
show spanning-tree interface f0/0
|
||||
## 查看某个 vlan 下的 stp 配置信息
|
||||
show spanning-tree vlan vlan-id
|
||||
## 配置生成树模式为 STP 或 RSTP
|
||||
spanning-tree mode pvst
|
||||
spanning-tree mode rapid-pvst
|
||||
## 配置交换机在 VLAN1 中的优先级
|
||||
spanning-tree vlan 1 priority <0-61440>
|
||||
## 配置为 vlan1 的根网桥
|
||||
spanning-tree vlan root primary
|
||||
## 配置为 vlan1 的次根网桥
|
||||
spanning-tree vlan 1 root secondary
|
||||
## 将 f0/0 接口在 vlan1 生成树的路径开销变更为 18
|
||||
interface f0/0
|
||||
spanning-tree vlan 1 cost 18
|
||||
## 将 f0/0 接口在 vlan1 生成树的端口优先级变更为 16
|
||||
interface f0/0
|
||||
spanning-tree vlan 1 port-priority 16
|
||||
```
|
||||
|
||||
### 三层交换机
|
||||
<!--rehype:wrap-class=col-span-2-->
|
||||
|
||||
```shell
|
||||
# 首先在三层交换机上启动路由
|
||||
ip routing
|
||||
# 然后配置vlan的ip地址
|
||||
int vlan vlan-id
|
||||
## 添加IP地址
|
||||
ip address ip-address subnet-mask
|
||||
## 启动当前接口
|
||||
no sh
|
||||
# 然后进入交换机与添加到vlan中的ip地址一致的终端相连的接口
|
||||
## 将当前接口添加到赋予当前接口连接的终端ip地址一致的vlan中
|
||||
```
|
||||
|
||||
### 三层交换机DHCP配置
|
||||
<!--rehype:wrap-class=col-span-2-->
|
||||
|
||||
```sh
|
||||
# 首先创建与连接的电脑终端数量一致的vlan
|
||||
# 然后进入到与中介交换机相连的接口
|
||||
## 使用trunk 放通创建的vlan
|
||||
switchport trunk allowed vlan vlan-id/all
|
||||
# 进入创建的vlan当中
|
||||
int vlan vlan-id
|
||||
## 配置当前vlan的IP为对应当前vlan的终端IP
|
||||
ip address IP-Address subnet-mask
|
||||
## 开启当前vlan接口
|
||||
no sh
|
||||
# 对 DHCP 地址池地址进行排除
|
||||
## 排除的为vlan的ip地址
|
||||
ip dhcp exculded-address IP-Address
|
||||
# 创建DHCP地址池
|
||||
## DHCP_AddressName 为可自定义的地址名称
|
||||
ip dhcp pool DHCP_AddressName
|
||||
## 设置当前DHCP地址池网段
|
||||
### ip-address 为可自定义的ip地址
|
||||
### subnet-mask 为可自定义的子网掩码
|
||||
### 需要注意,子网掩码需要与对应vlan的子网掩码一致
|
||||
### 否则无法接通
|
||||
network ip-address subnet-mask
|
||||
## 设置DNS DNS-Address 为可自定义的 dns 地址
|
||||
dns-server DNS-Address
|
||||
## 设置默认网关 IP-Address 为可自定义的IP地址
|
||||
default-route IP-Address
|
||||
|
||||
# 进入中介交换机
|
||||
## 创建与三层交换机相同的vlan
|
||||
## 进入与三层交换机相连的接口
|
||||
### 将接口模式设为 trunk 并 放通创建的vlan
|
||||
### 可使用 all 代替全部vlan
|
||||
switchport mode trunk
|
||||
switchport trunk allowed vlan vlan-id,vlan-id...
|
||||
## 进入与电脑终端相连的接口
|
||||
### 将接口分配到指定ip的vlan下
|
||||
### 最后在电脑终端IP配置为DHCP即可
|
||||
```
|
||||
433
docs/claude.md
Normal file
@@ -0,0 +1,433 @@
|
||||
ClaudeCode 备忘清单
|
||||
===
|
||||
|
||||
ClaudeCode 命令行开发工具快速参考备忘单。
|
||||
|
||||
CLI 参考
|
||||
---
|
||||
|
||||
### 命令行
|
||||
<!--rehype:wrap-class=col-span-2-->
|
||||
|
||||
| 命令 | 描述 | 示例 |
|
||||
| --- | --- | --- |
|
||||
| `claude` | 启动交互式 REPL | `claude` |
|
||||
| `claude "query"` | 使用初始提示启动 REPL | `claude "explain this project"` |
|
||||
| `claude -p "query"` | 通过 SDK 查询,然后退出 | `claude -p "explain this function"` |
|
||||
| `cat file \| claude -p "query"` | 处理管道内容 | `cat logs.txt \| claude -p "explain"` |
|
||||
| `claude -c` | 继续最近的对话 | `claude -c` |
|
||||
| `claude -c -p "query"` | 通过 SDK 继续 | `claude -c -p "Check for type errors"` |
|
||||
| `claude -r "<session-id>" "query"` | 通过 ID 恢复会话 | `claude -r "abc123" "Finish this PR"` |
|
||||
| `claude update` | 更新到最新版本 | `claude update` |
|
||||
| `claude mcp` | 配置模型上下文协议 (MCP) 服务器 | 请参阅 [Claude Code MCP 文档](https://docs.anthropic.com/zh-CN/docs/claude-code/mcp)。 |
|
||||
<!--rehype:className=left-align-->
|
||||
|
||||
### CLI 标志
|
||||
<!--rehype:wrap-class=row-span-2-->
|
||||
|
||||
使用这些命令行标志自定义 Claude Code 的行为:
|
||||
|
||||
| 标志 | 描述 | 示例 |
|
||||
| --- | --- | --- |
|
||||
| `--add-dir` | 添加额外的工作目录供 Claude 访问(验证每个路径是否作为目录存在) | `claude --add-dir ../apps ../lib` |
|
||||
| `--allowedTools` | 除了 [settings.json 文件](https://docs.anthropic.com/zh-CN/docs/claude-code/settings) 之外,应该在不提示用户许可的情况下允许的工具列表 | `"Bash(git log:*)" "Bash(git diff:*)" "Read"` |
|
||||
| `--disallowedTools` | 除了 [settings.json 文件](https://docs.anthropic.com/zh-CN/docs/claude-code/settings) 之外,应该在不提示用户许可的情况下禁止的工具列表 | `"Bash(git log:*)" "Bash(git diff:*)" "Edit"` |
|
||||
| `--print`, `-p` | 打印响应而不使用交互模式(有关编程使用详细信息,请参阅 [SDK 文档](https://docs.anthropic.com/zh-CN/docs/claude-code/sdk)) | `claude -p "query"` |
|
||||
| `--append-system-prompt` | 附加到系统提示(仅与 `--print` 一起使用) | `claude --append-system-prompt "Custom instruction"` |
|
||||
| `--output-format` | 为打印模式指定输出格式(选项:`text`、`json`、`stream-json`) | `claude -p "query" --output-format json` |
|
||||
| `--input-format` | 为打印模式指定输入格式(选项:`text`、`stream-json`) | `claude -p --output-format json --input-format stream-json` |
|
||||
| `--verbose` | 启用详细日志记录,显示完整的轮次输出(在打印和交互模式中都有助于调试) | `claude --verbose` |
|
||||
| `--max-turns` | 在非交互模式下限制代理轮次数量 | `claude -p --max-turns 3 "query"` |
|
||||
| `--model` | 使用最新模型的别名(`sonnet` 或 `opus`)或模型的全名为当前会话设置模型 | `claude --model claude-sonnet-4-20250514` |
|
||||
| `--permission-mode` | 在指定的[权限模式](iam#permission-modes)下开始 | `claude --permission-mode plan` |
|
||||
| `--permission-prompt-tool` | 指定一个 MCP 工具来处理非交互模式下的权限提示 | `claude -p --permission-prompt-tool mcp_auth_tool "query"` |
|
||||
| `--resume` | 通过 ID 恢复特定会话,或在交互模式下选择 | `claude --resume abc123 "query"` |
|
||||
| `--continue` | 在当前目录中加载最近的对话 | `claude --continue` |
|
||||
| `--dangerously-skip-permissions` | 跳过权限提示(谨慎使用) | `claude --dangerously-skip-permissions` |
|
||||
<!--rehype:className=style-list-arrow squarefill-->
|
||||
|
||||
### 内置斜杠命令
|
||||
<!--rehype:wrap-class=col-span-2-->
|
||||
|
||||
| 命令 | 用途 |
|
||||
| --- | --- |
|
||||
| `/add-dir` | 添加额外的工作目录 |
|
||||
| `/agents` | 管理用于专门任务的自定义AI子代理 |
|
||||
| `/bug` | 报告错误(将对话发送给Anthropic) |
|
||||
| `/clear` | 清除对话历史 |
|
||||
| `/compact [instructions]` | 压缩对话,可选择性地提供重点指令 |
|
||||
| `/config` | 查看/修改配置 |
|
||||
| `/cost` | 显示令牌使用统计(请参阅[成本跟踪指南](https://docs.anthropic.com/zh-CN/docs/claude-code/costs#using-the-cost-command)了解订阅特定详情) |
|
||||
| `/doctor` | 检查您的Claude Code安装的健康状况 |
|
||||
| `/help` | 获取使用帮助 |
|
||||
| `/init` | 使用CLAUDE.md指南初始化项目 |
|
||||
| `/login` | 切换Anthropic账户 |
|
||||
| `/logout` | 从您的Anthropic账户登出 |
|
||||
| `/mcp` | 管理MCP服务器连接和OAuth身份验证 |
|
||||
| `/memory` | 编辑CLAUDE.md内存文件 |
|
||||
| `/model` | 选择或更改AI模型 |
|
||||
| `/permissions` | 查看或更新[权限](https://docs.anthropic.com/zh-CN/docs/claude-code/iam#configuring-permissions) |
|
||||
| `/pr_comments` | 查看拉取请求评论 |
|
||||
| `/review` | 请求代码审查 |
|
||||
| `/status` | 查看账户和系统状态 |
|
||||
| `/terminal-setup` | 安装Shift+Enter键绑定用于换行(仅限iTerm2和VSCode) |
|
||||
| `/vim` | 进入vim模式以在插入和命令模式之间切换 |
|
||||
<!--rehype:className=left-align-->
|
||||
|
||||
键盘快捷键
|
||||
---
|
||||
|
||||
### 通用控制
|
||||
|
||||
| 快捷键 | 描述 | 上下文 |
|
||||
| --- | --- | --- |
|
||||
| `Ctrl+C` | 取消当前输入或生成 | 标准中断 |
|
||||
| `Ctrl+D` | 退出 Claude Code 会话 | EOF 信号 |
|
||||
| `Ctrl+L` | 清除终端屏幕 | 保留对话历史 |
|
||||
| `上/下箭头` | 导航命令历史 | 回调之前的输入 |
|
||||
| `Esc` + `Esc` | 编辑上一条消息 | 双击 Esc 键修改 |
|
||||
| `Shift+Tab` | 切换权限模式 | 在自动接受模式、计划模式和正常模式之间切换 |
|
||||
<!--rehype:className=left-align shortcuts-->
|
||||
|
||||
### 多行输入
|
||||
|
||||
| 方法 | 快捷键 | 上下文 |
|
||||
| --- | --- | --- |
|
||||
| 快速转义 | `\` + `Enter` | 在所有终端中有效 |
|
||||
| macOS 默认 | `Option+Enter` | macOS 上的默认设置 |
|
||||
| 终端设置 | `Shift+Enter` | 在 `/terminal-setup` 之后 |
|
||||
| 控制序列 | `Ctrl+J` | 多行换行符 |
|
||||
| 粘贴模式 | 直接粘贴 | 用于代码块、日志 |
|
||||
<!--rehype:className=left-align shortcuts-->
|
||||
|
||||
### 快速命令
|
||||
|
||||
| 快捷键 | 描述 | 注释 |
|
||||
| --- | --- | --- |
|
||||
| 开头的 `#` | 内存快捷键 - 添加到 CLAUDE.md | 提示文件选择 |
|
||||
| 开头的 `/` | 斜杠命令 | 参见[斜杠命令](https://docs.anthropic.com/zh-CN/docs/claude-code/slash-commands) |
|
||||
| 开头的 `!` | Bash 模式 | 直接运行命令并将执行输出添加到会话中 |
|
||||
<!--rehype:className=left-align shortcuts-->
|
||||
|
||||
Vim 编辑器模式
|
||||
---
|
||||
|
||||
### 模式切换
|
||||
|
||||
| 命令 | 操作 | 从模式 |
|
||||
| --- | --- | --- |
|
||||
| `Esc` | 进入 NORMAL 模式 | INSERT |
|
||||
| `i` | 在光标前插入 | NORMAL |
|
||||
| `I` | 在行首插入 | NORMAL |
|
||||
| `a` | 在光标后插入 | NORMAL |
|
||||
| `A` | 在行尾插入 | NORMAL |
|
||||
| `o` | 在下方打开新行 | NORMAL |
|
||||
| `O` | 在上方打开新行 | NORMAL |
|
||||
|
||||
### 导航(NORMAL 模式)
|
||||
|
||||
| 命令 | 操作 |
|
||||
| --- | --- |
|
||||
| `h`/`j`/`k`/`l` | 向左/下/上/右移动 |
|
||||
| `w` | 下一个单词 |
|
||||
| `e` | 单词末尾 |
|
||||
| `b` | 上一个单词 |
|
||||
| `0` | 行首 |
|
||||
| `$` | 行尾 |
|
||||
| `^` | 第一个非空白字符 |
|
||||
| `gg` | 输入开头 |
|
||||
| `G` | 输入末尾 |
|
||||
|
||||
### 编辑(NORMAL 模式)
|
||||
|
||||
| 命令 | 操作 |
|
||||
| --- | --- |
|
||||
| `x` | 删除字符 |
|
||||
| `dd` | 删除行 |
|
||||
| `D` | 删除到行尾 |
|
||||
| `dw`/`de`/`db` | 删除单词/到末尾/向后 |
|
||||
| `cc` | 更改行 |
|
||||
| `C` | 更改到行尾 |
|
||||
| `cw`/`ce`/`cb` | 更改单词/到末尾/向后 |
|
||||
| `.` | 重复上次更改 |
|
||||
|
||||
Hooks 参考
|
||||
---
|
||||
|
||||
### 配置
|
||||
|
||||
* `~/.claude/settings.json` 用户设置
|
||||
* `.claude/settings.json` 项目设置
|
||||
* `.claude/settings.local.json` 本地项目设置(不提交)
|
||||
* 企业管理策略设置
|
||||
|
||||
### 结构
|
||||
<!--rehype:wrap-class=col-span-2 row-span-2-->
|
||||
|
||||
```json
|
||||
{
|
||||
"hooks": {
|
||||
"EventName": [
|
||||
{
|
||||
"matcher": "ToolPattern",
|
||||
"hooks": [
|
||||
{ "type": "command", "command": "your-command-here" }
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### <pur>matcher</pur> 匹配工具名称的模式,区分大小写(仅适用于 `PreToolUse` 和 `PostToolUse`)
|
||||
|
||||
* 简单字符串精确匹配:`Write` 仅匹配 Write 工具
|
||||
* 支持正则表达式:`Edit|Write` 或 `Notebook.*`
|
||||
* 使用 `*` 匹配所有工具。您也可以使用空字符串(`""`)或留空 `matcher`。
|
||||
|
||||
#### <pur>hooks</pur> 当模式匹配时要执行的命令数组
|
||||
|
||||
* `type`:目前仅支持 `"command"`
|
||||
* `command`:要执行的 bash 命令(可以使用 `$CLAUDE_PROJECT_DIR` 环境变量)
|
||||
* `timeout`:(可选)命令应该运行多长时间(以秒为单位),在取消该特定命令之前。
|
||||
|
||||
### 项目特定的 Hook 脚本
|
||||
|
||||
```json {9}
|
||||
{
|
||||
"hooks": {
|
||||
"PostToolUse": [
|
||||
{
|
||||
"matcher": "Write|Edit",
|
||||
"hooks": [
|
||||
{
|
||||
"type": "command",
|
||||
"command": "$CLAUDE_PROJECT_DIR/.claude/hooks/check-style.sh"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
可通过环境变量 `CLAUDE_PROJECT_DIR` 引用项目中的脚本,确保无论 Claude 当前目录如何都能正常使用(仅在生成 hook 命令时可用)
|
||||
|
||||
Hook 事件
|
||||
---
|
||||
|
||||
### PreToolUse
|
||||
|
||||
#### 常见匹配器
|
||||
|
||||
* `Task` - 子代理任务(参见[子代理文档](https://docs.anthropic.com/zh-CN/docs/claude-code/sub-agents))
|
||||
* `Bash` - Shell 命令
|
||||
* `Glob` - 文件模式匹配
|
||||
* `Grep` - 内容搜索
|
||||
* `Read` - 文件读取
|
||||
* `Edit`、`MultiEdit` - 文件编辑
|
||||
* `Write` - 文件写入
|
||||
* `WebFetch`、`WebSearch` - Web 操作
|
||||
|
||||
在 Claude 创建工具参数之后、处理工具调用之前运行。
|
||||
|
||||
### 其它 Hook
|
||||
|
||||
Hook | 描述
|
||||
--- | ---
|
||||
`PostToolUse` | 在工具成功完成后立即运行。
|
||||
`UserPromptSubmit` | 当用户提交提示时、Claude 处理之前运行。这允许您根据提示/对话添加额外的上下文、验证提示或阻止某些类型的提示。
|
||||
`Stop` | 当主 Claude Code 代理完成响应时运行。如果停止是由于用户中断而发生的,则不会运行。
|
||||
`SubagentStop` | 当 Claude Code 子代理(Task 工具调用)完成响应时运行。
|
||||
<!--rehype:className=style-list-arrow square-->
|
||||
|
||||
### Notification
|
||||
|
||||
当 Claude Code 发送通知时运行。通知在以下情况下发送:
|
||||
|
||||
Hook | 描述
|
||||
--- | ---
|
||||
Claude 需要您的权限来使用工具。 | 示例:“Claude needs your permission to use Bash”
|
||||
提示输入已空闲至少 `60` 秒。 | “Claude is waiting for your input”
|
||||
<!--rehype:className=style-list-arrow square-->
|
||||
|
||||
### PreCompact
|
||||
|
||||
在 Claude Code 即将运行压缩操作之前运行。
|
||||
|
||||
#### 匹配器
|
||||
<!--rehype:style=text-align:left;-->
|
||||
|
||||
Hook | 描述
|
||||
--- | ---
|
||||
`manual` | 从 `/compact` 调用
|
||||
`auto` | 从自动压缩调用(由于上下文窗口已满)
|
||||
<!--rehype:className=style-list-arrow square-->
|
||||
|
||||
### SessionStart
|
||||
|
||||
当 Claude Code 启动新会话或恢复现有会话时运行(目前确实会在底层启动新会话)
|
||||
|
||||
#### 匹配器
|
||||
<!--rehype:style=text-align:left;-->
|
||||
|
||||
* `startup` - 从启动调用
|
||||
* `resume` - 从 `--resume`、`--continue` 或 `/resume` 调用
|
||||
* `clear` - 从 `/clear` 调用
|
||||
* `compact` - 从自动或手动压缩调用。
|
||||
|
||||
对于加载开发上下文(如现有问题或代码库的最近更改)很有用。
|
||||
|
||||
### SessionEnd
|
||||
|
||||
#### hook 输入中的 reason 字段将是以下之一
|
||||
<!--rehype:style=text-align:left;-->
|
||||
|
||||
* `clear` - 使用 /clear 命令清除会话
|
||||
* `logout` - 用户注销
|
||||
* `prompt_input_exit` - 用户在提示输入可见时退出
|
||||
* `other` - 其他退出原因
|
||||
|
||||
当 Claude Code 会话结束时运行。对于清理任务、记录会话统计信息或保存会话状态很有用。
|
||||
|
||||
Hook 输入
|
||||
---
|
||||
|
||||
### 示例
|
||||
|
||||
Hooks 通过 `stdin` 接收包含会话信息和事件特定数据的 JSON 数据:
|
||||
|
||||
```json
|
||||
{
|
||||
// 通用字段
|
||||
session_id: string
|
||||
// 对话 JSON 的路径
|
||||
transcript_path: string
|
||||
// 调用 hook 时的当前工作目录
|
||||
cwd: string
|
||||
|
||||
// 事件特定字段
|
||||
hook_event_name: string
|
||||
...
|
||||
}
|
||||
```
|
||||
|
||||
### PreToolUse 输入
|
||||
|
||||
`tool_input` 的确切模式取决于工具。
|
||||
|
||||
```json {5}
|
||||
{
|
||||
"session_id": "abc123",
|
||||
"transcript_path": "/Users/.../.claude/projects/.../00893aaf-19fa-41d2-8238-13269b9b3ca0.jsonl",
|
||||
"cwd": "/Users/...",
|
||||
"hook_event_name": "PreToolUse",
|
||||
"tool_name": "Write",
|
||||
"tool_input": {
|
||||
"file_path": "/path/to/file.txt",
|
||||
"content": "file content"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### PostToolUse 输入
|
||||
|
||||
`tool_input` 和 `tool_response` 的确切模式取决于工具。
|
||||
|
||||
```json {5}
|
||||
{
|
||||
"session_id": "abc123",
|
||||
"transcript_path": "/Users/.../.claude/projects/.../00893aaf-19fa-41d2-8238-13269b9b3ca0.jsonl",
|
||||
"cwd": "/Users/...",
|
||||
"hook_event_name": "PostToolUse",
|
||||
"tool_name": "Write",
|
||||
"tool_input": {
|
||||
"file_path": "/path/to/file.txt",
|
||||
"content": "file content"
|
||||
},
|
||||
"tool_response": {
|
||||
"filePath": "/path/to/file.txt",
|
||||
"success": true
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Notification 输入
|
||||
|
||||
```json {5}
|
||||
{
|
||||
"session_id": "abc123",
|
||||
"transcript_path": "/Users/.../.claude/projects/.../00893aaf-19fa-41d2-8238-13269b9b3ca0.jsonl",
|
||||
"cwd": "/Users/...",
|
||||
"hook_event_name": "Notification",
|
||||
"message": "Task completed successfully"
|
||||
}
|
||||
```
|
||||
|
||||
### UserPromptSubmit 输入
|
||||
|
||||
```json {5}
|
||||
{
|
||||
"session_id": "abc123",
|
||||
"transcript_path": "/Users/.../.claude/projects/.../00893aaf-19fa-41d2-8238-13269b9b3ca0.jsonl",
|
||||
"cwd": "/Users/...",
|
||||
"hook_event_name": "UserPromptSubmit",
|
||||
"prompt": "Write a function to calculate the factorial of a number"
|
||||
}
|
||||
```
|
||||
|
||||
### Stop 和 SubagentStop 输入
|
||||
|
||||
```json {4}
|
||||
{
|
||||
"session_id": "abc123",
|
||||
"transcript_path": "~/.claude/projects/.../00893aaf-19fa-41d2-8238-13269b9b3ca0.jsonl",
|
||||
"hook_event_name": "Stop",
|
||||
"stop_hook_active": true
|
||||
}
|
||||
```
|
||||
|
||||
当 Claude Code 已经因为 `stop hook` 而继续时,`stop_hook_active` 为 `true`。检查此值或处理记录以防止 Claude Code 无限运行。
|
||||
|
||||
### PreCompact 输入
|
||||
|
||||
```json {4}
|
||||
{
|
||||
"session_id": "abc123",
|
||||
"transcript_path": "~/.claude/projects/.../00893aaf-19fa-41d2-8238-13269b9b3ca0.jsonl",
|
||||
"hook_event_name": "PreCompact",
|
||||
"trigger": "manual",
|
||||
"custom_instructions": ""
|
||||
}
|
||||
```
|
||||
|
||||
对于 `manual`,`custom_instructions` 来自用户传递给 `/compact` 的内容。对于 `auto`,`custom_instructions` 为空。
|
||||
|
||||
### SessionStart 输入
|
||||
|
||||
```json {4}
|
||||
{
|
||||
"session_id": "abc123",
|
||||
"transcript_path": "~/.claude/projects/.../00893aaf-19fa-41d2-8238-13269b9b3ca0.jsonl",
|
||||
"hook_event_name": "SessionStart",
|
||||
"source": "startup"
|
||||
}
|
||||
```
|
||||
|
||||
### SessionEnd 输入
|
||||
|
||||
```json {5}
|
||||
{
|
||||
"session_id": "abc123",
|
||||
"transcript_path": "~/.claude/projects/.../00893aaf-19fa-41d2-8238-13269b9b3ca0.jsonl",
|
||||
"cwd": "/Users/...",
|
||||
"hook_event_name": "SessionEnd",
|
||||
"reason": "exit"
|
||||
}
|
||||
```
|
||||
|
||||
另见
|
||||
----
|
||||
|
||||
* [Claude 代码参考](https://docs.anthropic.com/zh-CN/docs/claude-code/cli-reference) _(docs.anthropic.com)_
|
||||
* [送你一张Claude Code速查表](https://mp.weixin.qq.com/s/LbQbzvXh49Qo22nArTv4Og) _(weixin.qq.com)_
|
||||
12
docs/cmd.md
@@ -192,6 +192,16 @@ attrib命令可以列出或修改磁盘上文件的属性,
|
||||
`netstat -s` | 查看正在使用的所有协议使用情况
|
||||
`nbtstat -A ip` | 对方136到139其中一个端口开了的话,就可查看对方最近登陆的用户名
|
||||
|
||||
### taskkill 命令
|
||||
|
||||
参数 | action
|
||||
:--- | :--
|
||||
`taskkill /f | 强制终止进程(最常用,防止进程无响应)
|
||||
`taskkill /im 映像名` | 通过进程名称结束,例如:taskkill /im notepad.exe
|
||||
`taskkill /pid 进程号` | 通过 PID 结束,通常配合 netstat -ano 查询到的 PID 使用
|
||||
`taskkill /t` | 终止指定的进程及其子进程
|
||||
`taskkill /s 远程IP` | 结束远程指定机器上的任务
|
||||
|
||||
启动程序
|
||||
--------
|
||||
|
||||
@@ -209,7 +219,7 @@ attrib命令可以列出或修改磁盘上文件的属性,
|
||||
`cliconfg` | SQL SERVER 客户端网络实用工具
|
||||
`cmstp` | 连接管理器配置文件安装程序
|
||||
`compmgmt.msc` | 计算机管理
|
||||
`omexp.msc` | 打开系统组件服务
|
||||
`comexp.msc` | 打开系统组件服务
|
||||
`control` | 控制面版
|
||||
|
||||
### 启动程序(二)
|
||||
|
||||
156
docs/cpp.md
@@ -30,7 +30,7 @@ Hello Quick Reference
|
||||
int number = 5; // 整数
|
||||
float f = 0.95; // 浮点数
|
||||
double PI = 3.14159; // 浮点数
|
||||
char yes = 'Y'; // 特点
|
||||
char yes = 'Y'; // 字符
|
||||
std::string s = "ME"; // 字符串(文本)
|
||||
bool isRight = true; // 布尔值
|
||||
// 常量
|
||||
@@ -177,7 +177,7 @@ marks[0] = 92;
|
||||
marks[1] = 97;
|
||||
marks[2] = 98;
|
||||
// 定义和初始化
|
||||
std::array<int, 3> = {92, 97, 98};
|
||||
std::array<int, 3> marks = {92, 97, 98};
|
||||
// 有空成员
|
||||
std::array<int, 3> marks = {92, 97};
|
||||
std::cout << marks[2]; // 输出: 0
|
||||
@@ -322,19 +322,19 @@ else
|
||||
| Example | Meaning |
|
||||
|----------------|------------------------|
|
||||
| `exp1 && exp2` | Both are true _(AND)_ |
|
||||
| `exp1 || exp2` | Either is true _(OR)_ |
|
||||
| <code>exp1 || exp2</code> | Either is true _(OR)_ |
|
||||
| `!exp` | `exp` is false _(NOT)_ |
|
||||
|
||||
#### 位运算符
|
||||
|
||||
| Operator | Description |
|
||||
|----------|-------------------------|
|
||||
| `a & b` | Binary AND |
|
||||
| `a | b` | Binary OR |
|
||||
| `a ^ b` | Binary XOR |
|
||||
| `a ~ b` | Binary One's Complement |
|
||||
| `a << b` | Binary Shift Left |
|
||||
| `a >> b` | Binary Shift Right |
|
||||
| 运算符 | 描述 |
|
||||
|--------|------|
|
||||
| `a & b` | 按位与 |
|
||||
| <code>a | b</code> | 按位或 |
|
||||
| `a ^ b` | 按位异或 |
|
||||
| `~a` | 按位取反 |
|
||||
| `a << b` | 左移 |
|
||||
| `a >> b` | 右移 |
|
||||
|
||||
### 三元运算符
|
||||
|
||||
@@ -614,14 +614,14 @@ auto func = []() -> return_type { };
|
||||
```cpp
|
||||
int val1 = 123, val2 = 456;
|
||||
string str1("123"), str2(456);
|
||||
|
||||
|
||||
auto func1 = [=, &str1]() -> int
|
||||
{
|
||||
return val1 == std::stoi(str1)
|
||||
? val1 : val2;
|
||||
};
|
||||
|
||||
auto func2 = [&, val1]() -> int
|
||||
|
||||
auto func2 = [&, val1]() -> string
|
||||
{
|
||||
return str1 == std::to_string(val1)
|
||||
? str1 : str2;
|
||||
@@ -646,6 +646,128 @@ std::for_each(vec.begin(), vec.end(),
|
||||
});
|
||||
```
|
||||
|
||||
## C++智能指针
|
||||
|
||||
### 智能指针基础
|
||||
<!--rehype:wrap-class=row-span-2-->
|
||||
|
||||
```cpp
|
||||
#include <memory>
|
||||
|
||||
// 创建独占所有权的指针
|
||||
std::unique_ptr<int> p1 = std::make_unique<int>(42);
|
||||
// 不能复制,只能移动
|
||||
std::unique_ptr<int> p2 = std::move(p1);
|
||||
// p1 现在为 nullptr
|
||||
|
||||
// 创建共享所有权的指针
|
||||
std::shared_ptr<int> sp1 = std::make_shared<int>(42);
|
||||
// 可以复制,引用计数增加
|
||||
std::shared_ptr<int> sp2 = sp1;
|
||||
// 获取引用计数
|
||||
std::cout << sp1.use_count(); // 输出: 2
|
||||
|
||||
// 创建弱引用,不增加引用计数
|
||||
std::weak_ptr<int> wp = sp1;
|
||||
```
|
||||
|
||||
### unique_ptr
|
||||
|
||||
```cpp
|
||||
// 创建方式1:使用 make_unique (C++14)
|
||||
auto p1 = std::make_unique<int>(42);
|
||||
|
||||
// 创建方式2:直接构造
|
||||
std::unique_ptr<int> p2(new int(42));
|
||||
|
||||
// 访问资源
|
||||
std::cout << *p1 << std::endl;
|
||||
*p1 = 100;
|
||||
|
||||
// 获取原始指针(不转移所有权)
|
||||
int* raw = p1.get();
|
||||
|
||||
// 释放所有权并返回原始指针
|
||||
int* released = p1.release();
|
||||
// p1 现在为 nullptr
|
||||
|
||||
// 替换管理的对象
|
||||
p1.reset(new int(50));
|
||||
```
|
||||
|
||||
### shared_ptr
|
||||
|
||||
```cpp
|
||||
// 创建方式1:使用 make_shared
|
||||
auto sp1 = std::make_shared<int>(42);
|
||||
|
||||
// 创建方式2:直接构造
|
||||
std::shared_ptr<int> sp2(new int(42));
|
||||
|
||||
// 复制和共享所有权
|
||||
std::shared_ptr<int> sp3 = sp1;
|
||||
std::cout << sp1.use_count(); // 输出: 2
|
||||
|
||||
// 访问资源
|
||||
std::cout << *sp1 << std::endl;
|
||||
*sp1 = 100; // 所有指向该资源的shared_ptr都会看到这个修改
|
||||
|
||||
// 重置指针
|
||||
sp1.reset(); // sp1变为nullptr,引用计数减1
|
||||
```
|
||||
|
||||
### weak_ptr
|
||||
|
||||
```cpp
|
||||
std::shared_ptr<int> sp = std::make_shared<int>(42);
|
||||
std::weak_ptr<int> wp = sp;
|
||||
|
||||
// 检查引用对象是否存在
|
||||
if (auto locked = wp.lock()) {
|
||||
std::cout << *locked << std::endl; // 输出: 42
|
||||
} else {
|
||||
std::cout << "对象已被销毁" << std::endl;
|
||||
}
|
||||
|
||||
// 检查是否过期
|
||||
bool is_expired = wp.expired(); // false
|
||||
|
||||
// 获取引用计数
|
||||
std::cout << wp.use_count(); // 输出: 1
|
||||
|
||||
// 当所有shared_ptr都被销毁时
|
||||
sp.reset();
|
||||
if (wp.expired()) {
|
||||
std::cout << "对象已被销毁" << std::endl;
|
||||
}
|
||||
```
|
||||
|
||||
### 循环引用问题
|
||||
|
||||
```cpp
|
||||
struct Node {
|
||||
std::string name;
|
||||
std::shared_ptr<Node> next;
|
||||
// 使用weak_ptr避免循环引用
|
||||
std::weak_ptr<Node> parent;
|
||||
|
||||
Node(const std::string& n) : name(n) {}
|
||||
~Node() { std::cout << "销毁: " << name << std::endl; }
|
||||
};
|
||||
|
||||
// 创建循环引用
|
||||
void createCycle() {
|
||||
auto node1 = std::make_shared<Node>("Node1");
|
||||
auto node2 = std::make_shared<Node>("Node2");
|
||||
|
||||
node1->next = node2;
|
||||
node2->parent = node1; // 使用weak_ptr避免循环引用
|
||||
|
||||
// 函数结束时,node1和node2会被正确销毁
|
||||
// 如果parent也是shared_ptr,则会造成内存泄漏
|
||||
}
|
||||
```
|
||||
|
||||
## C++多线程
|
||||
|
||||
### 多线程介绍
|
||||
@@ -926,7 +1048,7 @@ int val = result.get();
|
||||
extern double foo(int val) {}
|
||||
|
||||
std::future<double> result =
|
||||
async(foo, 5);
|
||||
std::async(foo, 5);
|
||||
|
||||
//返回值类型
|
||||
std::future_status status;
|
||||
@@ -935,7 +1057,7 @@ status = result.wait_for(
|
||||
std::chrono::seconds(1)
|
||||
);
|
||||
// 等待到某一时间点
|
||||
status = result.wait_for(
|
||||
status = result.wait_until(
|
||||
std::chrono::now() +
|
||||
std::chrono::seconds(1)
|
||||
);
|
||||
@@ -1108,7 +1230,7 @@ C++ 预处理器
|
||||
|
||||
```cpp
|
||||
#ifdef DEBUG
|
||||
console.log('hi');
|
||||
std::cout << "hi" << std::endl;
|
||||
#elif defined VERBOSE
|
||||
...
|
||||
#else
|
||||
|
||||
255
docs/cs.md
@@ -1321,6 +1321,261 @@ var result = students
|
||||
["Charlie","Damon","David"]
|
||||
```
|
||||
|
||||
事件和委托
|
||||
----
|
||||
|
||||
### 介绍
|
||||
|
||||
在 .NET 中,委托支持后期绑定,允许调用方在运行时提供方法的一部分,而不是在创建委托时定义完整算法,从而增强了灵活性和扩展性。
|
||||
|
||||
### 多播委托
|
||||
<!--rehype:wrap-class=col-span-2 row-span-6-->
|
||||
|
||||
我们预先提供这些可用的方法
|
||||
|
||||
```cs
|
||||
public void Sub(int x, int y)
|
||||
{
|
||||
Console.WriteLine("x-y=" + (x - y));
|
||||
}
|
||||
|
||||
public void Mul(int x, int y)
|
||||
{
|
||||
Console.WriteLine("x*y=" + (x * y));
|
||||
}
|
||||
```
|
||||
|
||||
定义一个委托类型
|
||||
|
||||
```cs
|
||||
public delegate void MyDelegate3(int x, int y);
|
||||
```
|
||||
|
||||
定义一个方法,接收委托作为参数
|
||||
|
||||
```cs
|
||||
public void MyMethod3(int x, int y, MyDelegate3 myDelegate)
|
||||
{
|
||||
myDelegate(x, y);
|
||||
}
|
||||
```
|
||||
|
||||
定义另一个委托类型
|
||||
|
||||
```cs
|
||||
public delegate void MyDelegate4(int x, int y);
|
||||
```
|
||||
|
||||
定义一个方法,接收委托作为参数
|
||||
|
||||
```cs
|
||||
public void MyMethod4(int x, int y, MyDelegate4 myDelegate)
|
||||
{
|
||||
myDelegate(x, y);
|
||||
}
|
||||
```
|
||||
|
||||
定义一个方法,接收委托作为参数
|
||||
|
||||
```cs
|
||||
public void MyMethod5(int x, int y, MyDelegate3 myDelegate, MyDelegate4 myDelegate2)
|
||||
{
|
||||
myDelegate(x, y);
|
||||
myDelegate2(x, y);
|
||||
}
|
||||
```
|
||||
|
||||
#### 多播委托
|
||||
|
||||
```cs
|
||||
MyDelegate3 myDelegate31 = new MyDelegate3(Sub);
|
||||
MyDelegate4 myDelegate41 = new MyDelegate4(Mul);
|
||||
```
|
||||
|
||||
调用 MyMethod3 方法,并传入委托作为参数
|
||||
|
||||
```cs
|
||||
MyMethod3(10, 5, myDelegate31);
|
||||
// output:
|
||||
// x-y=5
|
||||
```
|
||||
|
||||
调用 MyMethod4 方法,并传入委托作为参数
|
||||
|
||||
```cs
|
||||
MyMethod4(10, 5, myDelegate41);
|
||||
// output:
|
||||
// x*y=50
|
||||
```
|
||||
|
||||
调用 MyMethod5 方法,并传入委托作为参数
|
||||
|
||||
```cs
|
||||
MyMethod5(10, 5, myDelegate31, myDelegate41);
|
||||
// output:
|
||||
// x-y=5
|
||||
// x*y=50
|
||||
```
|
||||
|
||||
### 定义委托类型
|
||||
|
||||
使用 `delegate` 关键字定义委托
|
||||
|
||||
```cs
|
||||
public delegate void MyDelegate(
|
||||
int x, string y
|
||||
);
|
||||
```
|
||||
|
||||
上述委托对应的函数实现应该类似:
|
||||
|
||||
```cs
|
||||
public void MyMethod(int x, string y);
|
||||
```
|
||||
|
||||
### 创建委托实例
|
||||
|
||||
```cs
|
||||
// 创建委托实例
|
||||
MyDelegate myDelegate = new MyDelegate(
|
||||
MyMethod
|
||||
);
|
||||
```
|
||||
|
||||
### 调用委托
|
||||
|
||||
```cs
|
||||
// 调用委托,传入对应类型的参数
|
||||
myDelegate(10, "Hello");
|
||||
```
|
||||
|
||||
### 委托作为参数
|
||||
|
||||
```cs
|
||||
// 定义另一个委托类型
|
||||
public delegate int MyDelegate2(
|
||||
int x, int y
|
||||
);
|
||||
|
||||
// 定义一个方法,接收委托作为参数
|
||||
public int MyMethod2(
|
||||
int x, int y, MyDelegate2 myDelegate
|
||||
)
|
||||
{
|
||||
return myDelegate(x, y);
|
||||
}
|
||||
|
||||
// 创建委托实例
|
||||
MyDelegate2 myDelegate2 = new MyDelegate2(
|
||||
Add
|
||||
);
|
||||
|
||||
// 调用 MyMethod2 方法,并传入委托作为参数
|
||||
int result = MyMethod2(
|
||||
10, 20, myDelegate2
|
||||
);
|
||||
```
|
||||
|
||||
### Action 委托
|
||||
|
||||
Action 委托的变体最多可包含 16 个参数,且返回类型为 `void`
|
||||
|
||||
```cs
|
||||
// 创建一个Action
|
||||
public Action<int, string> myAction;
|
||||
|
||||
// 给Action赋值
|
||||
myAction = (x, y) => Console.WriteLine(
|
||||
"x+y=" + (x + y)
|
||||
);
|
||||
|
||||
// 直接调用Action
|
||||
myAction(10, "Hello");
|
||||
|
||||
// 使用 null 合并运算符调用Action
|
||||
myAction?.Invoke(10, "Hello");
|
||||
```
|
||||
|
||||
### Func 委托
|
||||
<!--rehype:wrap-class=row-span-2-->
|
||||
|
||||
Func 委托的变体可包含最多16个参数,返回类型可以是任意类型 T
|
||||
|
||||
```cs
|
||||
// 创建一个Func,最后一个参数是返回类型
|
||||
public Func<int, int, string> myFunc;
|
||||
|
||||
// 给Func赋值
|
||||
myFunc = (x, y) => "x+y=" + (x + y);
|
||||
|
||||
// 调用Func
|
||||
string result = myFunc(10, 20);
|
||||
|
||||
// 使用 null 合并运算符调用Func
|
||||
string result2 = myFunc?.Invoke(10, 20);
|
||||
```
|
||||
|
||||
事件与委托类似,都是后期绑定机制。实际上,事件是建立在委托基础上的一种语言支持,它是 C# 对委托的封装,提供了更面向对象的编程模型,并实现了观察者模式。
|
||||
|
||||
### 事件定义
|
||||
<!--rehype:wrap-class=col-span-2-->
|
||||
|
||||
```cs
|
||||
// 使用 event 关键字定义事件
|
||||
public event EventHandler<EventArgs> MyEvent;
|
||||
```
|
||||
|
||||
### 事件订阅
|
||||
<!--rehype:wrap-class=col-span-2-->
|
||||
|
||||
我们实现定义一个方法作为事件处理器,并订阅事件
|
||||
|
||||
```cs
|
||||
public void MyEventHandler(object sender, EventArgs e)
|
||||
{
|
||||
// 事件处理逻辑
|
||||
// ...
|
||||
}
|
||||
```
|
||||
|
||||
```cs
|
||||
// 订阅事件
|
||||
MyEvent += MyEventHandler;
|
||||
|
||||
// 取消订阅事件
|
||||
MyEvent -= MyEventHandler;
|
||||
```
|
||||
|
||||
### 事件触发
|
||||
|
||||
```cs
|
||||
// 触发事件
|
||||
MyEvent?.Invoke(this, new EventArgs());
|
||||
```
|
||||
|
||||
### 事件参数
|
||||
<!--rehype:wrap-class=col-span-2-->
|
||||
|
||||
```cs
|
||||
// 定义事件参数
|
||||
public class MyEventArgs : EventArgs
|
||||
{
|
||||
public int Value { get; set; }
|
||||
}
|
||||
|
||||
// 新的Handler
|
||||
public void MyEventHandler2(object sender, MyEventArgs e)
|
||||
{
|
||||
// 事件处理逻辑,这里可以获取到事件参数
|
||||
Console.WriteLine("事件参数的值:" + e.Value);
|
||||
}
|
||||
|
||||
// 触发事件
|
||||
// output:
|
||||
// 事件参数的值:10
|
||||
MyEvent?.Invoke(this, new MyEventArgs { Value = 10 });
|
||||
```
|
||||
|
||||
语法糖
|
||||
----
|
||||
|
||||
|
||||
12
docs/css.md
@@ -156,7 +156,7 @@ div {
|
||||
```css
|
||||
#container {
|
||||
display: grid;
|
||||
s grid: repeat(2, 60px) / auto-flow 80px;
|
||||
grid: repeat(2, 60px) / auto-flow 80px;
|
||||
}
|
||||
#container > div {
|
||||
background-color: #8ca0ff;
|
||||
@@ -1977,6 +1977,16 @@ ul > li:not(:last-child)::after {
|
||||
|
||||
使列表项看起来像一个真实的逗号分隔列表,使用 `:not()` 伪类,最后一项不会添加逗号
|
||||
|
||||
### 表格中数字使用制表数字
|
||||
|
||||
```css
|
||||
.revenue {
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
```
|
||||
|
||||
表格中一列数字列对其
|
||||
|
||||
另见
|
||||
---------
|
||||
|
||||
|
||||
174
docs/dart.md
@@ -9,6 +9,8 @@ Dart 备忘清单
|
||||
### 安装 Dart
|
||||
<!--rehype:wrap-class=row-span-2-->
|
||||
|
||||
> 完整教程请参阅 Dart 中文社区 [https://dart.cn/get-dart/](https://dart.cn/get-dart/)
|
||||
|
||||
#### Windows
|
||||
|
||||
```bash
|
||||
@@ -88,8 +90,8 @@ double height = 1.85;
|
||||
// 您还可以将变量声明为 num
|
||||
// x 可以同时具有 int 和 double 值
|
||||
num x = 1;
|
||||
num += 2.5;
|
||||
print(num); // 打印: 3.5
|
||||
x += 2.5;
|
||||
print(x); // 打印: 3.5
|
||||
|
||||
String name = "Nicola";
|
||||
bool isFavourite = true;
|
||||
@@ -130,6 +132,15 @@ import 'dart:math';
|
||||
import 'package:test/test.dart';
|
||||
// 导入文件
|
||||
import 'path/to/my_other_file.dart';
|
||||
// 指定前缀
|
||||
import 'package:lib/lib.dart' as lib;
|
||||
lib.Element element = lib.Element();
|
||||
// 仅导入 foo
|
||||
import 'package:lib1/lib1.dart' show foo;
|
||||
// 不导入 foo
|
||||
import 'package:lib2/lib2.dart' hide foo;
|
||||
// 延迟导入,仅在需要时导入
|
||||
import 'package:greetings/hello.dart' deferred as hello;
|
||||
```
|
||||
|
||||
操作符
|
||||
@@ -184,10 +195,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 变为 1;1 变为 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 +285,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 +303,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
|
||||
```
|
||||
|
||||
控制流:循环
|
||||
-----
|
||||
|
||||
@@ -276,7 +381,7 @@ const constantCities = const ["New York", "Mumbai", "Tokyo"];
|
||||
```dart
|
||||
// 映射是关联键和值的对象
|
||||
var person = Map<String, String>();
|
||||
// 要初始化地图,请执行以下操作:
|
||||
// 要初始化映射,请执行以下操作:
|
||||
person['firstName'] = 'Nicola';
|
||||
person['lastName'] = 'Tesla';
|
||||
print(person);
|
||||
@@ -301,7 +406,7 @@ var halogens = {'fluorine', 'chlorine', 'bromine', 'iodine', 'astatine'};
|
||||
// 创建一个空集
|
||||
var names = <String>{};
|
||||
Set<String> names = {}; // 这也有效
|
||||
//var names = {}; // 创建地图,而不是集合
|
||||
//var names = {}; // 创建映射,而不是集合
|
||||
```
|
||||
|
||||
函数
|
||||
@@ -737,7 +842,8 @@ Future<String> login() {
|
||||
// 异步
|
||||
main() async {
|
||||
print('Authenticating please wait...');
|
||||
print(await userName());
|
||||
String result = await login();
|
||||
print(result);
|
||||
}
|
||||
```
|
||||
|
||||
@@ -778,8 +884,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 +943,6 @@ var user = User()
|
||||
..age = 24;
|
||||
```
|
||||
|
||||
### 扩展运算符 (...)
|
||||
|
||||
```dart
|
||||
// 将多个值插入到集合中
|
||||
var list = [1, 2, 3];
|
||||
var list2 = [0, ...list];
|
||||
print(list2.length); // 打印: 4
|
||||
```
|
||||
|
||||
### 延迟初始化
|
||||
|
||||
```dart
|
||||
@@ -812,7 +951,7 @@ late String token;
|
||||
|
||||
void main(List<String> args) {
|
||||
/// print(token);
|
||||
/// Field 'token' has not been initialized
|
||||
/// 字段 "token "尚未初始化
|
||||
/// 在初始化前调用就会报错
|
||||
token = "tokenContent";
|
||||
print(token);
|
||||
@@ -823,3 +962,4 @@ void main(List<String> args) {
|
||||
----
|
||||
|
||||
- [Dart 官方文档](https://dart.dev/) _(dart.dev)_
|
||||
- [Dart 中文社区官方文档](https://dart.cn/) _(dart.cn)_
|
||||
|
||||
683
docs/docker-compose.md
Normal file
@@ -0,0 +1,683 @@
|
||||
Docker Compose 备忘清单
|
||||
===
|
||||
|
||||
这是 [docker-compose](https://docs.docker.com/compose/) 的快速参考备忘单。你可以在这里找到最常见的 Docker Compose 使用方式。
|
||||
|
||||
入门
|
||||
---
|
||||
|
||||
### Docker Compose 是什么?
|
||||
|
||||
- **Docker Compose** 是由 [Docker](./docker.md) 社区维护的开源工具,用于定义和运行多容器应用。
|
||||
- 通过单个 [YAML](./yaml.md) 文件配置服务,可用一条命令启动、停止或重启整个应用。
|
||||
- [Docker Compose 开源地址](https://github.com/docker/compose)
|
||||
- [Docker Compose 发行地址](https://github.com/docker/compose/releases) _github.com_
|
||||
|
||||
### 基本概念
|
||||
|
||||
- **服务 (services):** 一个服务指的是一个容器,即一个应用程序的一个实例。
|
||||
- **容器 (container):** [Docker](./docker.md) 容器,其中运行着应用程序的一个实例。
|
||||
- **镜像 (image):** [Docker](./docker.md) 镜像,用于创建容器的模板。
|
||||
- **Docker-Compose 文件:** 一个 [YAML](./yaml.md) 文件,描述了应用程序的各个服务以及它们之间的关系、配置等信息。
|
||||
|
||||
### Docker-Compose 文件结构
|
||||
|
||||
- `version`: _Docker-Compose_ 文件的版本。
|
||||
- `services`: 定义了各个服务,每个服务都有自己的配置项,如镜像、端口映射、依赖等。
|
||||
- `networks`: 定义了应用程序使用的网络,可以自定义网络以控制服务之间的通信。
|
||||
- `volumes`: 定义了应用程序使用的卷,用于持久化数据或与主机共享文件。
|
||||
|
||||
### 安装
|
||||
<!--rehype:wrap-class=row-span-2-->
|
||||
|
||||
Docker 20.10 起,CLI 支持插件机制,官方已将 Compose 迁移为 CLI 插件。推荐使用 `docker compose`(空格,无横线),旧项目如需兼容 `docker-compose` 可安装 `docker-compose-plugin` 或使用软链接。
|
||||
|
||||
```bash
|
||||
sudo ln -s /usr/lib/docker/cli-plugins/docker-compose /usr/local/bin/docker-compose
|
||||
```
|
||||
<!--rehype:className=wrap-text-->
|
||||
|
||||
对于 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-->
|
||||
|
||||
### 其他命令
|
||||
<!--rehype:wrap-class=col-span-3-->
|
||||
|
||||
```bash
|
||||
docker compose up -d --remove-orphans --pull always --force-recreate
|
||||
```
|
||||
|
||||
| 参数 | 说明|
|
||||
|-----|----|
|
||||
| `-d / --detach` | 后台运行容器。|
|
||||
| `--remove-orphans` | 删除孤儿容器和网络配置。|
|
||||
| `--pull always` | 每次启动前都从远程仓库拉取最新镜像,确保使用最新镜像,而不是本地缓存。还可以用--pull missing(只拉不存在的镜像)或 --pull never(不拉取)。|
|
||||
| `--force-recreate` | 强制重新创建容器,即使配置或镜像没有变化。|
|
||||
<!--rehype:className=left-align-->
|
||||
|
||||
Docker Compose 配置
|
||||
---
|
||||
|
||||
### 示例配置文件
|
||||
<!--rehype:wrap-class=col-span-2-->
|
||||
|
||||
`docker-compose` 使用 [YAML](./yaml.md) 文件定义和运行多容器应用,通常命名为 `docker-compose.yml`(新版本建议用 `compose.yaml`)。
|
||||
该文件集中描述多个容器的服务、依赖关系等。下面是一个包含常用配置项和说明的模板:
|
||||
|
||||
```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"
|
||||
# 将容器的端口 22(SSH端口)映射到主机的端口 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 搜索域。它可以是单个值或列表。
|
||||
@@ -163,7 +163,10 @@ $ docker build - < Dockerfile
|
||||
$ docker build - < context.tar.gz
|
||||
$ docker build -t eon/nginx-server .
|
||||
$ docker build -f myOtherDockerfile .
|
||||
$ docker build --build-arg https_proxy=127.0.0.1:8088 # 使用http代理构建
|
||||
$ curl example.com/remote/Dockerfile | docker build -f - .
|
||||
$ docker save -o <保存路径>/myimage.tar myimage:latest # 导出
|
||||
$ docker load -i <路径>/myimage.tar # 导入
|
||||
```
|
||||
|
||||
### 删除 \<none> 镜像
|
||||
@@ -348,24 +351,6 @@ $ docker volume ls # 检查卷
|
||||
$ docker volume prune # 清理未使用的卷
|
||||
```
|
||||
|
||||
### Docker Compose
|
||||
<!--rehype:wrap-class=row-span-2-->
|
||||
|
||||
:- | :-
|
||||
:- | :-
|
||||
`docker-compose up` | 创建和启动容器
|
||||
`docker-compose up -d` | 以分离模式创建和启动容器
|
||||
`docker-compose down` | 停止和删除容器、网络、映像和卷
|
||||
`docker-compose logs` | 查看容器的输出
|
||||
`docker-compose restart` | 重启所有服务
|
||||
`docker-compose pull` | 拉取所有服务的镜像
|
||||
`docker-compose build` | 构建所有服务的镜像
|
||||
`docker-compose config` | 验证并查看 Compose 文件
|
||||
`docker-compose scale <service_name>=<replica>` | 为服务指定容器个数
|
||||
`docker-compose top` | 显示正在运行的进程
|
||||
`docker-compose run -rm -p 2022:22 web bash` | 启动 Web 服务并运行 bash 作为其命令,删除旧容器
|
||||
<!--rehype:className=left-align-->
|
||||
|
||||
### Docker Services
|
||||
|
||||
:- | :-
|
||||
@@ -390,27 +375,6 @@ $ docker volume prune # 清理未使用的卷
|
||||
`docker stack rm <appname>` | 拆掉一个应用程序
|
||||
<!--rehype:className=left-align-->
|
||||
|
||||
### Docker Machine
|
||||
<!--rehype:wrap-class=col-span-2-->
|
||||
|
||||
:- | :-
|
||||
:- | :-
|
||||
`docker-machine create --driver virtualbox myvm1` | 创建虚拟机(Mac、Win7、Linux)
|
||||
`docker-machine create -d hyperv --hyperv-virtual-switch "myswitch" myvm1` | Win10
|
||||
`docker-machine env myvm1` | 查看有关您的节点的基本信息
|
||||
`docker-machine ssh myvm1 "docker node ls"` | 列出集群中的节点
|
||||
`docker-machine ssh myvm1 "docker node inspect <node ID>"` | 检查节点
|
||||
`docker-machine ssh myvm1 "docker swarm join-token -q worker"` | 查看加入令牌
|
||||
`docker-machine ssh myvm1` | 打开与 VM 的 SSH 会话; 输入“exit”结束
|
||||
`docker-machine ssh myvm2 "docker swarm leave"` | 让工人离开群体
|
||||
`docker-machine ssh myvm1 "docker swarm leave -f"` | 让主人离开,杀群
|
||||
`docker-machine start myvm1` | 启动当前未运行的 VM
|
||||
`docker-machine stop $(docker-machine ls -q)` | 停止所有正在运行的虚拟机
|
||||
`docker-machine rm $(docker-machine ls -q)` | 删除所有虚拟机及其磁盘映像
|
||||
`docker-machine scp docker-compose.yml myvm1:~` | 将文件复制到节点的主目录
|
||||
`docker-machine ssh myvm1 "docker stack deploy -c <file> <app>"` | 部署应用
|
||||
<!--rehype:className=left-align-->
|
||||
|
||||
### docker 主要命令
|
||||
<!--rehype:wrap-class=row-span-3-->
|
||||
|
||||
@@ -471,18 +435,34 @@ $ docker volume prune # 清理未使用的卷
|
||||
`docker image` | 管理镜像
|
||||
`docker manifest` | 管理 Docker 镜像清单和清单列表
|
||||
`docker network` | 管理网络
|
||||
`docker node` | 管理 Swarm 节点
|
||||
`docker plugin` | 管理插件
|
||||
`docker scan*` | Docker 扫描(Docker Inc.,v0.16.0)
|
||||
`docker secret` | 管理 Docker 机密
|
||||
`docker service` | 管理服务
|
||||
`docker stack` | 管理 Docker 堆栈
|
||||
`docker swarm` | 管理群
|
||||
`docker system` | 管理 Docker
|
||||
`docker trust` | 管理对 Docker 映像的信任
|
||||
`docker volume` | 管理卷
|
||||
`docker search` | 搜索镜像
|
||||
<!--rehype:className=left-align-->
|
||||
|
||||
### 功能状态
|
||||
<!--rehype:wrap-class=row-span-3-->
|
||||
截至 2025 年 8 月最新官方信息,以下功能处于维护模式,建议迁移到Kubernetes,或者其他编排工具。
|
||||
|
||||
| 命令 | 用途 | 状态说明 |
|
||||
| ---------------- | ----------- | ---------- |
|
||||
| `docker swarm` | 管理 Swarm 集群 | 维护模式 |
|
||||
| `docker service` | Swarm 服务管理 | 维护模式 |
|
||||
| `docker stack` | Swarm 多服务部署 | 维护模式 |
|
||||
| `docker node` | Swarm 节点管理 | 维护模式 |
|
||||
| `docker plugin` | 插件管理 | 生态活跃度低,维护中 |
|
||||
|
||||
已废弃或被移除
|
||||
|
||||
| 命令 | 用途 | 取代方式 |
|
||||
| ---------------------- | ----------------- | ---------------------------------------------- |
|
||||
| `docker-machine` | 创建/管理远程 Docker 主机 | 使用 cloud provider CLI 或 SSH + `docker context` |
|
||||
| `docker trust` | 内容信任(Notary v1) | 迁移到 **Notary v2**(镜像签名) |
|
||||
| `docker app` | CNAB 应用包管理 | 已并入 Compose/其他工具 |
|
||||
| `docker search`(旧 API) | Docker Hub 搜索 | 用 Hub Web API 或 CLI 插件 |
|
||||
| `docker manifest`(旧版本) | 多平台镜像管理 | 已集成到 `docker buildx imagetools` |
|
||||
|
||||
### docker 全局参数
|
||||
|
||||
```bash
|
||||
@@ -689,7 +669,7 @@ $ docker run -d --name portainer \
|
||||
--restart=always \
|
||||
-v /var/run/docker.sock:/var/run/docker.sock \
|
||||
-v $HOME/portainer:/data \
|
||||
portainer/portainer-ee:latest
|
||||
portainer/portainer-ce:latest
|
||||
```
|
||||
|
||||
### Nginx
|
||||
@@ -916,7 +896,7 @@ if010/dameng
|
||||
### 人大金仓
|
||||
|
||||
```bash
|
||||
docker run -idt -p 5432:54321 --restart=always \
|
||||
docker run -idt -p 54321:54321 --restart=always \
|
||||
--name Kingbase --privileged=true \
|
||||
-e DB_MODE=oracle \
|
||||
-e NEED_START=yes \
|
||||
@@ -934,7 +914,7 @@ if010/kingbase:v009r001c001b0025 /usr/sbin/init
|
||||
-- | --
|
||||
:-- | --
|
||||
`-itd` | 以后台方式启动容器,保持 STDIN 打开
|
||||
`-p 5432:54321` | 将主机的 5432 端口映射到容器的 5432 端口,访问数据库
|
||||
`-p 54321:54321` | 将主机的 54321 端口映射到容器的 54321 端口,访问数据库
|
||||
`--name Kingbase` | 给容器指定名称为 "Kingbase"
|
||||
`--restart=always` | 容器退出时,总是重新启动容器
|
||||
<!--rehype:className=auto-wrap left-align-->
|
||||
|
||||
125
docs/dotnet-cli.md
Normal file
@@ -0,0 +1,125 @@
|
||||
.NET CLI 备忘清单
|
||||
===
|
||||
|
||||
本备忘单总结了 [.NET](https://learn.microsoft.com/zh-cn/dotnet/core/tools/) 命令行接口 (CLI) 工具,以供快速参考
|
||||
|
||||
.NET CLI 备忘清单
|
||||
---
|
||||
<!--rehype:style=display: none;-->
|
||||
|
||||
### 介绍
|
||||
|
||||
`.NET CLI` 命令由 **驱动程序(`dotnet`)**、**命令**、**参数** 和 **选项** 组成。典型流程如下:
|
||||
|
||||
```bash
|
||||
# 创建控制台应用
|
||||
dotnet new console
|
||||
# 构建并指定输出目录
|
||||
dotnet build --output ./build_output
|
||||
# 运行构建结果
|
||||
dotnet ./build_output/my_app.dll
|
||||
```
|
||||
|
||||
### 基本命令
|
||||
<!--rehype:wrap-class=col-span-2 row-span-2-->
|
||||
|
||||
| 命令 | 说明 | 示例 |
|
||||
|--------------|--------------|--------------|
|
||||
| `new` | 创建新项目或文件模板 | `dotnet new console` |
|
||||
| `restore` | 还原项目依赖项 | `dotnet restore` |
|
||||
| `build` | 构建项目 | `dotnet build` |
|
||||
| `publish` | 发布应用以部署 | `dotnet publish -c Release -o ./publish`|
|
||||
| `run` | 运行项目 | `dotnet run` |
|
||||
| `test` | 运行测试(使用 xUnit/NUnit 等) | `dotnet test` |
|
||||
| `vstest` | 运行已编译的测试程序集 | `dotnet vstest ./bin/Debug/test.dll` |
|
||||
| `pack` | 打包为 NuGet 包 | `dotnet pack` |
|
||||
| `migrate` | 迁移旧版项目(已弃用) | `dotnet migrate` |
|
||||
| `clean` | 清理构建输出 | `dotnet clean` |
|
||||
| `sln` | 管理 `.sln` 解决方案文件 | `dotnet sln add ./MyApp/MyApp.csproj` |
|
||||
| `help` | 显示帮助信息 | `dotnet help build` |
|
||||
| `store` | 预编译和缓存程序集(高级用法) | `dotnet store` |
|
||||
| `watch` | 监视文件更改并自动运行命令 | `dotnet watch run` |
|
||||
| `format` | 格式化代码(自 .NET 6 起支持) | `dotnet format` |
|
||||
<!--rehype:className=left-align -->
|
||||
|
||||
### 项目修改命令
|
||||
<!--rehype:wrap-class=row-span-2-->
|
||||
|
||||
| 命令 | 说明 | 示例 |
|
||||
|--------------|--------------|--------------|
|
||||
| `package add` | 添加 NuGet 包依赖 | `dotnet add package Newtonsoft.Json` |
|
||||
| `package list` | 列出项目中的所有包依赖 | `dotnet list package` |
|
||||
| `package remove` | 移除 NuGet 包依赖 | `dotnet remove package Newtonsoft.Json` |
|
||||
| `package search` | 搜索 NuGet 包 | `dotnet search package Newtonsoft.Json` |
|
||||
| `reference add` | 添加项目引用(*.csproj) | `dotnet add reference ../CommonLib/CommonLib.csproj` |
|
||||
| `reference list` | 列出当前项目引用的其他项目 | `dotnet list reference` |
|
||||
| `reference remove` | 移除项目引用 | `dotnet remove reference ../CommonLib/CommonLib.csproj` |
|
||||
<!--rehype:className=left-align style-list-arrow-->
|
||||
|
||||
### 工作负荷管理命令
|
||||
<!--rehype:wrap-class=col-span-2-->
|
||||
|
||||
| 命令 | 说明 | 示例 |
|
||||
|--------------|--------------|--------------|
|
||||
| `workload` | 顶级命令,显示所有 workload 子命令 | `dotnet workload --help` |
|
||||
| `workload install` | 安装指定的工作负荷(如 MAUI、Web 等) | `dotnet workload install maui` |
|
||||
| `workload uninstall` | 卸载指定的工作负荷 | `dotnet workload uninstall maui` |
|
||||
| `workload update` | 更新所有已安装的工作负荷 | `dotnet workload update` |
|
||||
| `workload list` | 显示当前已安装的工作负荷 | `dotnet workload list` |
|
||||
| `workload restore` | 还原项目所需的工作负荷 | `dotnet workload restore` |
|
||||
| `workload search` | 搜索可用的工作负荷 | `dotnet workload search` |
|
||||
| `workload repair` | 修复已安装的工作负荷 | `dotnet workload repair` |
|
||||
| `workload config` | 配置自定义源、缓存路径等(.NET 8.0.400+) | `dotnet workload config list` |
|
||||
<!--rehype:className=left-align-->
|
||||
|
||||
### NuGet 命令
|
||||
<!--rehype:wrap-class=col-span-3-->
|
||||
|
||||
| 命令 | 说明 | 示例 |
|
||||
|--------------|--------------|--------------|
|
||||
| `nuget delete` | 从源中删除一个 NuGet 包 | `dotnet nuget delete MyLib 1.0.0 -s https://api.nuget.org/v3/index.json`|
|
||||
| `nuget locals` | 清理 NuGet 缓存 | `dotnet nuget locals all --clear` |
|
||||
| `nuget push` | 将 NuGet 包推送到服务器(如 nuget.org) | `dotnet nuget push MyLib.1.0.0.nupkg -k API_KEY -s https://api.nuget.org/v3/index.json` |
|
||||
| `nuget add source` | 添加一个新的 NuGet 源 | `dotnet nuget add source https://myserver/index.json -n MySource` |
|
||||
| `nuget disable source` | 禁用一个现有的 NuGet 源 | `dotnet nuget disable source MySource` |
|
||||
| `nuget enable source` | 启用已禁用的 NuGet 源 | `dotnet nuget enable source MySource` |
|
||||
| `nuget list source` | 列出所有已配置的 NuGet 源 | `dotnet nuget list source` |
|
||||
| `nuget remove source` | 移除已配置的 NuGet 源 | `dotnet nuget remove source MySource` |
|
||||
| `nuget update source` | 更新现有 NuGet 源信息 | `dotnet nuget update source MySource -s https://new-url` |
|
||||
| `nuget verify` | 验证 NuGet 包签名(.NET 5+) | `dotnet nuget verify MyLib.1.0.0.nupkg` |
|
||||
| `nuget trust` | 管理受信任的签名证书(.NET 5+) | `dotnet nuget trust list` |
|
||||
| `nuget sign` | 对 NuGet 包进行签名(.NET 6+) | `dotnet nuget sign MyLib.1.0.0.nupkg --certificate-path cert.pfx` |
|
||||
| `package search` | 搜索 NuGet 包(.NET 8.0.2xx+) | `dotnet package search Newtonsoft.Json` |
|
||||
| `nuget why` | 显示为什么某个包被安装(.NET 8.0.4xx+)| `dotnet nuget why Newtonsoft.Json` |
|
||||
<!--rehype:className=left-align-->
|
||||
|
||||
### 高级命令
|
||||
|
||||
| 命令 | 说明 | 示例 |
|
||||
|--------------|--------------|--------------|
|
||||
| `sdk check` | 显示可用的 SDK/运行时版本,并检测更新 | `dotnet sdk check` |
|
||||
| `msbuild` | 使用 MSBuild 构建项目(提供更多构建自定义性) | `dotnet msbuild /t:Clean;Build /p:Configuration=Release` |
|
||||
| `build-server` | 管理后端构建服务器(如清理缓存、关闭等) | `dotnet build-server shutdown` |
|
||||
| `dev-certs` | 管理开发 HTTPS 证书 | `dotnet dev-certs https --trust` |
|
||||
| `dotnet install script` | 获取可安装指定版本 .NET 的脚本(Linux/macOS) | `curl -sSL https://dot.net/v1/dotnet-install.sh \| bash` |
|
||||
<!--rehype:className=left-align style-list-arrow-->
|
||||
|
||||
### 工具管理命令
|
||||
<!--rehype:wrap-class=col-span-2-->
|
||||
|
||||
| 命令 | 说明 | 示例 |
|
||||
|--------------|--------------|--------------|
|
||||
| `tool install` | 安装 .NET 工具(本地或全局) | `dotnet tool install -g dotnet-ef` |
|
||||
| `tool list` | 列出已安装的工具 | `dotnet tool list -g` |
|
||||
| `tool update` | 更新指定工具 | `dotnet tool update -g dotnet-ef` |
|
||||
| `tool restore` | 恢复项目中定义的工具(基于 manifest) | `dotnet tool restore` |
|
||||
| `tool run` | 运行本地安装的工具 | `dotnet tool run my-tool` |
|
||||
| `tool uninstall` | 卸载已安装的工具 | `dotnet tool uninstall -g dotnet-ef` |
|
||||
| `tool search` | 搜索 NuGet 上可用的工具 | `dotnet tool search dotnet-ef` |
|
||||
<!--rehype:className=left-align-->
|
||||
|
||||
另请参阅
|
||||
---
|
||||
|
||||
- [dotnet/sdk GitHub 存储库](https://github.com/dotnet/sdk/) _(github.com/dotnet)_
|
||||
- [.NET 安装指南](https://learn.microsoft.com/zh-cn/dotnet/core/install/windows) _(learn.microsoft.com)_
|
||||
@@ -985,6 +985,7 @@ Github emoji 图标标记
|
||||
--------
|
||||
|
||||
- [Emoji searcher](https://emoji.muan.co/) _(muan.co)_
|
||||
- [Share Emojis-With Your 🥺Fiends With An Great Way And Unique✅ |copy & download|](https://emoji-share.com/) _(emoji-share.com)_
|
||||
- [Get Emoji — All Emojis to ✂️ Copy and 📋 Paste](https://getemoji.com/) _(getemoji.com)_
|
||||
- [Emoji Guide – 🔥 The Ultimate Emoji Guide: 🌈 Meanings, 🍎 Platforms, 🆘 Codes and 😍 More](https://emojiguide.com/) _(emojiguide.com)_
|
||||
- [Full Emoji List, v15.0](https://unicode.org/emoji/charts/full-emoji-list.html) _(unicode.org)_
|
||||
|
||||
450
docs/erlang.md
Normal 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)
|
||||
@@ -59,7 +59,7 @@ JavaScript 工具
|
||||
[JSDoc](https://jsdoc.app/)<!--rehype:target=_blank&style=background: rgb(197 149 199/var(\-\-bg\-opacity));-->
|
||||
[UglifyJS](http://lisperator.net/uglifyjs/transform)<!--rehype:target=_blank&style=background: rgb(106 106 106/var(\-\-bg\-opacity));-->
|
||||
[Prettier](https://prettier.io/)<!--rehype:target=_blank&style=background: rgb(197 149 199/var(\-\-bg\-opacity));-->
|
||||
[Biome - JS 语言格式化](https://prettier.io/)<!--rehype:target=_blank&style=background: rgb(96 165 250/var(\-\-bg\-opacity));&class=contributing tag&data-lang=格式化-->
|
||||
[Biome - JS 语言格式化](https://biomejs.dev/)<!--rehype:target=_blank&style=background: rgb(96 165 250/var(\-\-bg\-opacity));&class=contributing tag&data-lang=格式化-->
|
||||
<!--rehype:class=home-card-->
|
||||
|
||||
JavaScript 测试工具
|
||||
@@ -82,7 +82,6 @@ CSS 工具
|
||||
[ColorZilla](http://www.colorzilla.com/gradient-editor/)<!--rehype:target=_blank&style=background: rgb(106 106 106/var(\-\-bg\-opacity));-->
|
||||
[CSS Protips](https://github.com/AllThingsSmitty/css-protips)<!--rehype:target=_blank&style=background: rgb(106 106 106/var(\-\-bg\-opacity));-->
|
||||
[CSS3 Maker](http://www.css3maker.com/)<!--rehype:target=_blank&style=background: rgb(106 106 106/var(\-\-bg\-opacity));-->
|
||||
[cssnano](http://cssnano.co/)<!--rehype:target=_blank&style=background: rgb(106 106 106/var(\-\-bg\-opacity));-->
|
||||
[CSSPIN](https://webkul.github.io/csspin/)<!--rehype:target=_blank&style=background: rgb(106 106 106/var(\-\-bg\-opacity));-->
|
||||
[CSSreference](https://cssreference.io/)<!--rehype:target=_blank&style=background: rgb(106 106 106/var(\-\-bg\-opacity));-->
|
||||
[CSSTree](https://github.com/csstree/csstree)<!--rehype:target=_blank&style=background: rgb(106 106 106/var(\-\-bg\-opacity));-->
|
||||
|
||||
@@ -117,6 +117,7 @@ $ ffmpeg -i movie.webm movie.mp4
|
||||
`-vol` | 以 256 的倍数更改音频音量,其中 256 = 100%(正常)音量。例如 512 = 200%
|
||||
`-newaudio` | 将新的音频流添加到当前输出流
|
||||
`-alang code` | 设置当前音频流的 ISO 639 语言代码(3 个字母)
|
||||
`-ac nTract` | 指定立体声通道数(n个声道)。例如 nTract = 2 即2个声道
|
||||
|
||||
视频编辑
|
||||
---
|
||||
|
||||
390
docs/flutter.md
@@ -8,6 +8,8 @@ Flutter 备忘清单
|
||||
|
||||
### macOS 操作系统上安装和配置
|
||||
|
||||
> 完整教程请参阅 Flutter 中文社区的 [安装和环境配置](https://docs.flutter.cn/get-started/install)
|
||||
|
||||
```bash
|
||||
$ sudo softwareupdate --install-rosetta --agree-to-license
|
||||
```
|
||||
@@ -18,15 +20,15 @@ $ sudo softwareupdate --install-rosetta --agree-to-license
|
||||
#### 获取 Flutter SDK
|
||||
|
||||
- 安装包来获取最新的 stable Flutter SDK:
|
||||
- Intel [`flutter_macos_3.3.8-stable.zip`](https://storage.flutter-io.cn/flutter_infra_release/releases/stable/macos/flutter_macos_3.3.8-stable.zip)
|
||||
- Apple 芯片 [`flutter_macos_arm64_3.3.8-stable.zip`](https://storage.flutter-io.cn/flutter_infra_release/releases/stable/macos/flutter_macos_arm64_3.3.8-stable.zip)
|
||||
- Intel [`flutter_macos_3.22.2-stable.zip`](https://storage.flutter-io.cn/flutter_infra_release/releases/stable/macos/flutter_macos_3.22.2-stable.zip)
|
||||
- Apple 芯片 [`flutter_macos_arm64_3.22.2-stable.zip`](https://storage.flutter-io.cn/flutter_infra_release/releases/stable/macos/flutter_macos_arm64_3.22.2-stable.zip)
|
||||
|
||||
想要获取到其他版本的安装包,请参阅 [SDK 版本列表](https://flutter.cn/docs/development/tools/sdk/releases) 页面
|
||||
想要获取到其他版本的安装包,请参阅 [SDK 版本列表](https://docs.flutter.cn/release/archive) 页面
|
||||
- 将文件解压到目标路径, 比如:
|
||||
|
||||
```bash
|
||||
$ cd ~/development
|
||||
$ unzip ~/Downloads/flutter_macos_3.3.8-stable.zip
|
||||
$ unzip ~/Downloads/flutter_macos_3.22.2-stable.zip
|
||||
```
|
||||
<!--rehype:className=wrap-text-->
|
||||
- 配置 `flutter` 的 PATH 环境变量:
|
||||
@@ -39,10 +41,13 @@ $ sudo softwareupdate --install-rosetta --agree-to-license
|
||||
<!--rehype:className=style-timeline-->
|
||||
|
||||
### Windows 操作系统上安装和配置
|
||||
<!--rehype:wrap-class=col-span-2-->
|
||||
|
||||
> 完整教程请参阅 Flutter 中文社区的 [安装和环境配置](https://docs.flutter.cn/get-started/install)
|
||||
|
||||
- 点击下方的安装包,获取 stable 发行通道的 Flutter SDK 最新版本:
|
||||
- [flutter_windows_3.3.8-stable.zip](https://storage.flutter-io.cn/flutter_infra_release/releases/stable/windows/flutter_windows_3.3.8-stable.zip)
|
||||
- 要查看其他发行通道和以往的版本,请参阅 [SDK 版本列表](https://flutter.cn/docs/development/tools/sdk/releases) 页面
|
||||
- [flutter_windows_3.22.2-stable.zip](https://storage.flutter-io.cn/flutter_infra_release/releases/stable/windows/flutter_windows_3.22.2-stable.zip)
|
||||
- 要查看其他发行通道和以往的版本,请参阅 [SDK 版本列表](https://docs.flutter.cn/release/archive) 页面
|
||||
- 将压缩包解压,然后把其中的 `flutter` 目录整个放在你想放置 `Flutter SDK` 的路径中(例如 `C:\src\flutter`)
|
||||
- 更新 `path` 环境变量,在开始菜单的搜索功能键入`「env」`,然后选择 `编辑系统环境变量`。在 **`用户变量`** 一栏中,检查是否有 **`Path`** 这个条目:
|
||||
- 如果存在这个条目,以 `;` 分隔已有的内容,加入 `flutter\bin` 目录的完整路径。
|
||||
@@ -587,7 +592,7 @@ Container(
|
||||
|
||||
### Center
|
||||
|
||||
Center 组件实际上继承于Align。用于专门剧中。
|
||||
Center 组件实际上继承于Align。用于专门居中。
|
||||
|
||||
```dart
|
||||
//与 Align中代码效果一致
|
||||
@@ -779,7 +784,8 @@ ListView.separated(
|
||||
```
|
||||
|
||||
### GridView
|
||||
<!--rehype:wrap-class=col-span-2-->
|
||||
<!--rehype:wrap-class=col-span-2 row-span-2-->
|
||||
|
||||
`GridView`可将元素显示为二维网格状的列表组件,并支持主轴方向滚动。
|
||||
使用GridView() 构造函数,需要传入gridDelegate和children。Flutter中已经提供了两种实现方式,分别是:
|
||||
|
||||
@@ -889,9 +895,377 @@ PageView.builder(
|
||||
),
|
||||
```
|
||||
|
||||
Flutter 动画组件
|
||||
---
|
||||
|
||||
### 1.隐式动画
|
||||
|
||||
在动画组件内,直接配置curve和duration属性
|
||||
|
||||
#### AnimatedContainer
|
||||
|
||||
使用AnimatedContainer组件,配置curve曲线过渡和duration过渡时间
|
||||
|
||||
```dart
|
||||
class HomeState extends StatefulWidget{
|
||||
const HomeState({Key? key}) : super(key:key);
|
||||
|
||||
@override
|
||||
State<HomeState> createState()=>_HomeState();
|
||||
}
|
||||
|
||||
class _HomeState extends State<HomeState>{
|
||||
bool press = false; //设置动画触发的条件
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MaterialApp(
|
||||
home: Scaffold(
|
||||
floatingActionButton:FloatingActionButton(onPressed: (){
|
||||
setState(() {
|
||||
press = true; //点击FloatingActionButton进行动画效果
|
||||
});
|
||||
}
|
||||
,child: const Icon(Icons.add),) ,
|
||||
appBar: AppBar(
|
||||
title: const Text("测试"),
|
||||
),
|
||||
body: Center(
|
||||
child: AnimatedContainer(
|
||||
curve: Curves.ease, //曲线
|
||||
duration: const Duration(seconds: 1), //延时
|
||||
width: press ? 200 : 300,
|
||||
height: 200,
|
||||
color:Colors.yellow,
|
||||
transform: press ? Matrix4.translationValues(0, 0, 0) :
|
||||
Matrix4.translationValues(100, 100, 0)
|
||||
),
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### AnimatedPadding
|
||||
|
||||
通过配置padding值的改变,引起组件的移动动画效果,同样支持curve和duration的配置
|
||||
|
||||
```dart
|
||||
class _HomeState extends State<HomeState>{
|
||||
bool press = false;
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MaterialApp(
|
||||
home: Scaffold(
|
||||
floatingActionButton:FloatingActionButton(onPressed: (){
|
||||
setState(() {
|
||||
press = true;
|
||||
});
|
||||
}
|
||||
,child: const Icon(Icons.add),) ,
|
||||
appBar: AppBar(
|
||||
title: const Text("测试"),
|
||||
),
|
||||
body: Center(
|
||||
child: AnimatedPadding(
|
||||
padding: EdgeInsets.fromLTRB(10, press ? 10 : 400, 0, 0), //配置边距值
|
||||
curve: Curves.ease, //曲线
|
||||
duration: const Duration(seconds: 1), //延时
|
||||
child: Container(
|
||||
width: 200,
|
||||
height: 200,
|
||||
color:Colors.yellow,
|
||||
),
|
||||
),
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### AnimatedAlign
|
||||
|
||||
通过配置alignment值的改变,引起组件的对齐动画效果,同样支持curve和duration的配置
|
||||
|
||||
```dart
|
||||
class _HomeState extends State<HomeState>{
|
||||
bool press = false;
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MaterialApp(
|
||||
home: Scaffold(
|
||||
floatingActionButton:FloatingActionButton(onPressed: (){
|
||||
setState(() {
|
||||
press = true;
|
||||
});
|
||||
}
|
||||
,child: const Icon(Icons.add),) ,
|
||||
appBar: AppBar(
|
||||
title: const Text("测试"),
|
||||
),
|
||||
body: Center(
|
||||
child: AnimatedAlign(
|
||||
alignment: press ? Alignment.center : Alignment.topCenter,
|
||||
curve: Curves.ease, //曲线
|
||||
duration: const Duration(seconds: 1), //延时
|
||||
child: Container(
|
||||
width: 200,
|
||||
height: 200,
|
||||
color:Colors.yellow,
|
||||
),
|
||||
),
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### AnimatedOpacity
|
||||
|
||||
通过配置opacity值的改变,引起组件的透明度变化动画效果,同样支持curve和duration的配置
|
||||
|
||||
```dart
|
||||
class _HomeState extends State<HomeState>{
|
||||
bool press = false;
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MaterialApp(
|
||||
home: Scaffold(
|
||||
floatingActionButton:FloatingActionButton(onPressed: (){
|
||||
setState(() {
|
||||
press = true;
|
||||
});
|
||||
}
|
||||
,child: const Icon(Icons.add),) ,
|
||||
appBar: AppBar(
|
||||
title: const Text("测试"),
|
||||
),
|
||||
body: Center(
|
||||
child: AnimatedOpacity(
|
||||
opacity: press ? 1 : 0.1,
|
||||
curve: Curves.ease, //曲线
|
||||
duration: const Duration(seconds: 1), //延时
|
||||
child: Container(
|
||||
width: 200,
|
||||
height: 200,
|
||||
color:Colors.yellow,
|
||||
),
|
||||
),
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### AnimatedPositioned
|
||||
|
||||
通过配置top,left,right,bottom值的改变,引起组件的距离变化动画效果,同样支持curve和duration的配置
|
||||
|
||||
```dart
|
||||
class _HomeState extends State<HomeState>{
|
||||
bool press = false;
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MaterialApp(
|
||||
home: Scaffold(
|
||||
floatingActionButton:FloatingActionButton(onPressed: (){
|
||||
setState(() {
|
||||
press = true;
|
||||
});
|
||||
}
|
||||
,child: const Icon(Icons.add),) ,
|
||||
appBar: AppBar(
|
||||
title: const Text("测试"),
|
||||
),
|
||||
body:Stack(
|
||||
children: [
|
||||
AnimatedPositioned(
|
||||
top: press ? 0 : 100,
|
||||
left:press ? 0 : 100,
|
||||
curve: Curves.ease, //曲线
|
||||
duration: const Duration(seconds: 1), //延时
|
||||
child: Container(
|
||||
width: 200,
|
||||
height: 200,
|
||||
color:Colors.yellow,
|
||||
),
|
||||
),
|
||||
],
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### 2.显示动画
|
||||
<!--rehype:wrap-class=col-span-2-->
|
||||
|
||||
使用显示动画时,定义 `AnimationController`,并在组件中使用 `SingleTickerProviderStateMixin`。
|
||||
|
||||
#### RotationTransition
|
||||
|
||||
`RotationTransition` 实现旋转动画,`turns` 为 `AnimationController`。在 `initState` 中设置 `vsync` 和 `duration`,使用 `..repeat()` 实现动画循环。
|
||||
|
||||
```dart
|
||||
class _Boxed extends State<Boxed> with SingleTickerProviderStateMixin{
|
||||
late AnimationController _controller;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_controller = AnimationController(
|
||||
vsync: this,
|
||||
duration: const Duration(seconds: 1)
|
||||
)..repeat(); // 让程序和手机的刷新频率统一
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return SizedBox(
|
||||
height: 100,
|
||||
width: 100,
|
||||
child: RotationTransition(turns: _controller,
|
||||
child: const FlutterLogo(size: 60),
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### AnimationController
|
||||
|
||||
```dart
|
||||
class _HomeState extends State<HomeState> with SingleTickerProviderStateMixin {
|
||||
|
||||
late AnimationController _controller;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
// 让程序和手机的刷新频率统一
|
||||
_controller = AnimationController(vsync: this, duration: const Duration(seconds: 1));
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MaterialApp(
|
||||
home: Scaffold(
|
||||
floatingActionButton:FloatingActionButton(onPressed: () {
|
||||
_controller.repeat(); //重复播放
|
||||
},child:const Icon(Icons.add),) ,
|
||||
appBar: AppBar(
|
||||
title: const Text("测试"),
|
||||
),
|
||||
body: Center(
|
||||
child: Column(
|
||||
children: [
|
||||
RotationTransition(
|
||||
turns: _controller,
|
||||
child: const FlutterLogo(size: 60),
|
||||
),
|
||||
ElevatedButton(onPressed: (){
|
||||
_controller.forward(); // 👈 播放一次
|
||||
}, child:const Icon(Icons.refresh)),
|
||||
ElevatedButton(onPressed: (){
|
||||
_controller.reverse(); // 👈 倒序播放
|
||||
}, child:const Icon(Icons.refresh)),
|
||||
ElevatedButton(onPressed: (){
|
||||
_controller.stop(); // 👈 停止
|
||||
}, child:const Icon(Icons.refresh)),
|
||||
ElevatedButton(onPressed: (){
|
||||
_controller.reset(); // 👈 重置
|
||||
}, child:const Icon(Icons.refresh)),
|
||||
]
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### FadeTransition
|
||||
|
||||
`FadeTransition` 实现透明度变化,`opacity` 为 `AnimationController`。可以通过 `reverse()` 实现从实体逐渐变透明。
|
||||
|
||||
```dart
|
||||
class _HomeState extends State<HomeState> with SingleTickerProviderStateMixin {
|
||||
|
||||
late AnimationController _controller;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
//让程序和手机的刷新频率统一
|
||||
_controller = AnimationController(vsync: this, duration: const Duration(seconds: 1));
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MaterialApp(
|
||||
home: Scaffold(
|
||||
floatingActionButton:FloatingActionButton(onPressed: (){
|
||||
_controller.repeat(); //重复播放
|
||||
},child:const Icon(Icons.add),) ,
|
||||
appBar: AppBar(
|
||||
title: const Text("测试"),
|
||||
),
|
||||
body: Center(
|
||||
child: FadeTransition(opacity: _controller,
|
||||
child: const FlutterLogo(size: 60,),
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
也可以通过 lowerBound 和 upperBound 来配置 controller 的最低和最高值
|
||||
|
||||
#### ScaleTransition
|
||||
|
||||
`ScaleTransition` 实现缩放动画,`scale` 为 `AnimationController`,可以通过 `reverse()` 实现从大到小的动画效果。
|
||||
|
||||
```dart
|
||||
class _HomeState extends State<HomeState> with SingleTickerProviderStateMixin {
|
||||
late AnimationController _controller;
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
// 让程序和手机的刷新频率统一
|
||||
_controller = AnimationController(vsync: this, duration: const Duration(seconds: 1));
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MaterialApp(
|
||||
home: Scaffold(
|
||||
floatingActionButton:FloatingActionButton(onPressed: (){
|
||||
_controller.repeat(); //重复播放
|
||||
},child:const Icon(Icons.add),) ,
|
||||
appBar: AppBar(
|
||||
title: const Text("测试"),
|
||||
),
|
||||
body: Center(
|
||||
child: ScaleTransition(scale: _controller,
|
||||
child: const FlutterLogo(size: 60,),
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
另见
|
||||
---
|
||||
|
||||
- [Dart 备忘清单](./dart.md) _(jaywcjlove.github.io)_
|
||||
- [flutter 官网](https://flutter.dev) _(flutter.dev)_
|
||||
- [flutter 中文社区官网](https://flutter.cn) _(flutter.cn)_
|
||||
- [flutter 中文开发者社区](https://flutterchina.club/) _(flutterchina.club)_
|
||||
|
||||
56
docs/git.md
@@ -167,6 +167,12 @@ $ git checkout -b new_branch
|
||||
$ git branch -d my_branch
|
||||
```
|
||||
|
||||
删除本地存在远程不存在的分支
|
||||
|
||||
```shell
|
||||
$ git remote prune origin
|
||||
```
|
||||
|
||||
将分支 `A` 合并到分支 `B`
|
||||
|
||||
```shell
|
||||
@@ -564,6 +570,7 @@ $ git log Branch1 ^Branch2
|
||||
```
|
||||
|
||||
### git 迁移
|
||||
<!--rehype:wrap-class=col-span-2-->
|
||||
|
||||
- 从原地址克隆一份裸版本库
|
||||
|
||||
@@ -1129,6 +1136,7 @@ Host github.com
|
||||
<!--rehype:className=wrap-text-->
|
||||
|
||||
### Fork仓库同步上游仓库
|
||||
<!--rehype:wrap-class=col-span-2-->
|
||||
|
||||
- 设置上游仓库
|
||||
|
||||
@@ -1279,6 +1287,54 @@ Conventional Commmits
|
||||
| `test:` | 添加测试代码或修正已有的测试 |
|
||||
<!--rehype:className=left-align-->
|
||||
|
||||
patch 补丁的使用
|
||||
----
|
||||
|
||||
### 简单创建
|
||||
|
||||
```bash
|
||||
$ git diff commit_id > my.patch
|
||||
```
|
||||
|
||||
### 简单应用
|
||||
|
||||
- **检查**补丁
|
||||
|
||||
```bash
|
||||
# 检查下这个补丁能否被正常应用
|
||||
$ git apply --check path/to/my.patch
|
||||
```
|
||||
|
||||
- **使用**补丁
|
||||
|
||||
```
|
||||
# 检查通过使用该补丁
|
||||
$ git apply < path/to/my.patch
|
||||
```
|
||||
|
||||
- 若有冲突则**解决**
|
||||
|
||||
```
|
||||
# 检查不通过可以自动合入patch不冲突的代码,同时保留冲突部分
|
||||
$ git apply --reject path/to/my.patch
|
||||
```
|
||||
|
||||
<!--rehype:className=style-timeline-->
|
||||
|
||||
### Email patch 方式
|
||||
|
||||
```bash
|
||||
# 创建指定 commit sha1 id 之前的 n 次提交补丁
|
||||
$ git format-patch commit_id -n
|
||||
# 创建 300f59991f22826c8478f0c019387c4ca815b085 这个提交的patch
|
||||
$ git format-patch commit_id -1
|
||||
# 提取当前分支最上面的3次提交,生成补丁
|
||||
$ git format-patch -3
|
||||
# 发送者可使用 git-send-email 发送 git format-patch 的结果给接收者
|
||||
# 接收者保存邮件到文件 email.txt,然后应用补丁创建一个提交,会自动包含作者的信息
|
||||
$ git am < email.txt
|
||||
```
|
||||
|
||||
另见
|
||||
---
|
||||
|
||||
|
||||
@@ -574,6 +574,7 @@ jobs:
|
||||
|
||||
```yml
|
||||
- run: npm publish --access public
|
||||
continue-on-error: true
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
|
||||
```
|
||||
@@ -857,7 +858,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 +888,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 +938,68 @@ 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
|
||||
```
|
||||
|
||||
### 传递环境变量
|
||||
<!--rehype:wrap-class=col-span-2-->
|
||||
|
||||
在 `ci.yml` 上保存环境变量
|
||||
|
||||
```yml
|
||||
- name: Save commit message to environment variable
|
||||
run: echo "COMMIT_MESSAGE=${{ github.event.head_commit.message }}" >> $GITHUB_ENV
|
||||
```
|
||||
|
||||
在 `tag.yml` 上获取环境变量
|
||||
|
||||
```yml
|
||||
- name: Read commit message
|
||||
run: |
|
||||
echo "Commit: ${{ github.event.workflow_run.head_commit.message }}"
|
||||
```
|
||||
|
||||
### 触发下一个工作流
|
||||
|
||||
在 `tag.yml` 上添加判断 `tag` 创建成功触发 `tag-creation-success` 的工作流
|
||||
|
||||
```yml
|
||||
- name: Trigger next workflow if successful
|
||||
if: steps.check_success.outputs.success == 'true'
|
||||
run: |
|
||||
curl -X POST \
|
||||
-H "Accept: application/vnd.github.v3+json" \
|
||||
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
|
||||
-d '{"event_type": "tag-creation-success"}' \
|
||||
https://api.github.com/repos/${{ github.repository }}/dispatches
|
||||
```
|
||||
|
||||
在 `success.yml` 上监听
|
||||
|
||||
```yml
|
||||
on:
|
||||
repository_dispatch:
|
||||
types: [tag-creation-success]
|
||||
```
|
||||
|
||||
GitLab CI/CD 迁移到 GitHub Actions
|
||||
---
|
||||
|
||||
|
||||
255
docs/github-cli.md
Normal file
@@ -0,0 +1,255 @@
|
||||
Github CLI
|
||||
===
|
||||
|
||||
GitHub CLI 的快速参考,这是一个开源命令行工具,可在终端上启用 GitHub 功能。
|
||||
|
||||
入门
|
||||
---
|
||||
|
||||
### 安装
|
||||
<!--rehype:wrap-class=col-span-2-->
|
||||
|
||||
#### Windows
|
||||
<!--rehype:style=text-align: left;-->
|
||||
|
||||
| 工具 | 安装 | 升级 |
|
||||
| :----- | :--------------------------- | :--------------------------- |
|
||||
| WinGet | `winget install --id Github.cli` | `winget upgrade --id GitHub.cli` |
|
||||
| Scoop | `scoop install gh` | `scoop update gh` |
|
||||
| Choco | `choco install gh` | `choco upgrade gh` |
|
||||
<!--rehype:className=show-header left-align-->
|
||||
|
||||
#### Mac OS
|
||||
<!--rehype:style=text-align: left;-->
|
||||
|
||||
| 工具 | 安装 | 升级 |
|
||||
| :------- | :-------------------- | :------------------------------------------ |
|
||||
| Brew | `brew install gh` | `brew upgrade gh` |
|
||||
| MacPorts | `sudo port install gh`| `sudo port selfupdate && sudo port upgrade gh` |
|
||||
<!--rehype:className=show-header left-align-->
|
||||
|
||||
#### Linux
|
||||
<!--rehype:style=text-align: left;-->
|
||||
|
||||
请参见 [安装说明](https://github.com/cli/cli/blob/trunk/docs/install_linux.md) 以获取其他 Linux 发行版的信息。安装脚本:
|
||||
|
||||
```bash
|
||||
type -p curl >/dev/null || (sudo apt update && sudo apt install curl -y)
|
||||
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg \
|
||||
&& sudo chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg \
|
||||
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null \
|
||||
&& sudo apt update \
|
||||
&& sudo apt install gh -y
|
||||
```
|
||||
|
||||
### 基本用法
|
||||
|
||||
#### 帮助和文档
|
||||
<!--rehype:style=text-align: left;-->
|
||||
|
||||
显示命令选项:
|
||||
|
||||
| 命令 | 描述 |
|
||||
| :-------------------- | :------------------------------------------------------------------------------------------------------------- |
|
||||
| `gh help [command]` | 帮助提供应用程序中任何命令的帮助。只需键入 `gh help [命令路径]` 以获取完整详细信息。 |
|
||||
<!--rehype:className=style-list-arrow-->
|
||||
|
||||
#### 认证
|
||||
<!--rehype:style=text-align: left;-->
|
||||
|
||||
| 命令 | 描述 |
|
||||
| :-------------------- | :-------------------------------------------------------- |
|
||||
| `gh auth login` | 默认通过基于网页的浏览器进行身份验证 |
|
||||
| `gh auth logout` | 移除主机的身份验证配置 |
|
||||
| `gh auth refresh` | 扩展或修复存储凭据的权限范围 |
|
||||
| `gh auth setup-git` | 配置 Git 使用 GitHub CLI 作为凭据助手 |
|
||||
| `gh auth status` | 验证并显示有关您身份验证状态的信息 |
|
||||
| `gh auth token` | 打印 `gh` 配置使用的身份验证令牌 |
|
||||
<!--rehype:className=style-list-arrow-->
|
||||
|
||||
使用 GitHub 令牌:
|
||||
|
||||
```shell
|
||||
$ gh auth --with-token < token.txt
|
||||
```
|
||||
|
||||
### 仓库管理
|
||||
<!--rehype:wrap-class=col-span-2-->
|
||||
|
||||
#### 常规
|
||||
<!--rehype:style=text-align: left;-->
|
||||
|
||||
| 命令 | 描述 |
|
||||
| :------------------------ | :------------------------------------------ |
|
||||
| `gh repo create` | 创建一个新的 GitHub 仓库 |
|
||||
| `gh repo list [target]` | 列出某个用户或组织拥有的仓库 |
|
||||
<!--rehype:className=code-nowrap left-align-->
|
||||
|
||||
#### 目标
|
||||
<!--rehype:style=text-align: left;-->
|
||||
|
||||
| 命令 | 描述 |
|
||||
| :--------------------------- | :-------------------------------------------------------- |
|
||||
| `gh repo archive [repo]` | 存档一个 GitHub 仓库 |
|
||||
| `gh repo clone [dir]` | 在本地克隆一个 GitHub 仓库 |
|
||||
| `gh repo delete [repo]` | 删除一个 GitHub 仓库 |
|
||||
| `gh repo deploy-key` | 管理仓库中的部署密钥 |
|
||||
| `gh repo edit [repo]` | 编辑仓库设置 |
|
||||
| `gh repo fork [repo]` | 创建一个仓库的分叉 |
|
||||
| `gh repo rename [name]` | 重命名一个 GitHub 仓库 |
|
||||
| `gh repo set-default [repo]` | 设置默认的远程仓库 |
|
||||
| `gh repo sync [dest-repo]` | 从源仓库同步到目标仓库 |
|
||||
| `gh repo view [repo]` | 显示一个 GitHub 仓库的描述和 README |
|
||||
<!--rehype:className=code-nowrap left-align-->
|
||||
|
||||
### 问题
|
||||
|
||||
#### 搜索问题
|
||||
<!--rehype:style=text-align: left;-->
|
||||
|
||||
| 命令 | 描述 |
|
||||
| :------------------------- | :------------------------------- |
|
||||
| `gh search issues [query]` | 在 GitHub 上搜索问题 |
|
||||
|
||||
#### 示例
|
||||
<!--rehype:style=text-align: left;-->
|
||||
|
||||
搜索匹配关键词 "readme" 和 "typo" 的问题
|
||||
|
||||
```shell
|
||||
$ gh search issues readme typo
|
||||
```
|
||||
|
||||
搜索匹配短语 "broken feature" 的问题
|
||||
|
||||
```shell
|
||||
$ gh search issues "broken feature"
|
||||
```
|
||||
|
||||
搜索 cli 组织中的问题和拉取请求
|
||||
|
||||
```shell
|
||||
$ gh search issues --include-prs --owner=cli
|
||||
```
|
||||
|
||||
搜索分配给自己的开放问题
|
||||
|
||||
```shell
|
||||
$ gh search issues --assignee=@me --state=open
|
||||
```
|
||||
|
||||
搜索评论数超过 100 的问题
|
||||
|
||||
```shell
|
||||
$ gh search issues --comments=">100"
|
||||
```
|
||||
|
||||
搜索没有标签 "bug" 的问题
|
||||
|
||||
```shell
|
||||
$ gh search issues -- -label:bug
|
||||
```
|
||||
|
||||
### 拉取请求
|
||||
|
||||
**拉取请求操作**
|
||||
|
||||
| 命令 | 描述 |
|
||||
| :---------------- | :----------------------------------------- |
|
||||
| `gh pr create` | 在 GitHub 上创建拉取请求 |
|
||||
| `gh pr list` | 列出 GitHub 仓库中的拉取请求 |
|
||||
| `gh pr status` | 显示相关拉取请求的状态 |
|
||||
|
||||
**示例**
|
||||
|
||||
```shell
|
||||
$ gh pr status
|
||||
```
|
||||
|
||||
示例输出:
|
||||
|
||||
```
|
||||
Current branch
|
||||
#12 Remove the test feature [user:patch-2]
|
||||
- All checks failing - Review required
|
||||
|
||||
Created by you
|
||||
You have no open pull requests
|
||||
|
||||
Requesting a code review from you
|
||||
#13 Fix tests [branch]
|
||||
- 3/4 checks failing - Review required
|
||||
#15 New feature [branch]
|
||||
- Checks passing - Approved
|
||||
```
|
||||
|
||||
### GitHub Actions
|
||||
<!--rehype:wrap-class=col-span-2-->
|
||||
|
||||
**常规操作**
|
||||
|
||||
| 命令 | 描述 |
|
||||
| :----------------------- | :--------------------------------------------------------------------------- |
|
||||
| `gh workflow disable` | 禁用工作流,防止其运行或在列出工作流时显示 |
|
||||
| `gh workflow enable` | 启用工作流,允许其运行并在列出工作流时显示 |
|
||||
| `gh workflow list` | 列出工作流文件,默认隐藏禁用的工作流 |
|
||||
| `gh workflow run` | 为给定的工作流创建一个 `workflow_dispatch` 事件 |
|
||||
| `gh workflow view` | 查看工作流的摘要 |
|
||||
|
||||
**运行操作**
|
||||
|
||||
| 命令 | 描述 |
|
||||
| :----------------------- | :----------------------------------------------------------- |
|
||||
| `gh run cancel` | 取消一个工作流运行 |
|
||||
| `gh run delete` | 删除一个工作流运行 |
|
||||
| `gh run download` | 下载由 GitHub Actions 工作流运行生成的工件 |
|
||||
| `gh run list` | 列出最近的工作流运行 |
|
||||
| `gh run rerun` | 重新运行整个运行、仅失败的作业或运行中的特定作业 |
|
||||
| `gh run view` | 查看工作流运行的摘要 |
|
||||
| `gh run watch` | 观看一个运行直到其完成,显示其进度 |
|
||||
|
||||
### 别名
|
||||
|
||||
**常规别名设置**
|
||||
|
||||
| 命令 | 描述 |
|
||||
| :----------------------- | :--------------------------------------------------------- |
|
||||
| `gh alias delete` | 删除设置的别名 |
|
||||
| `gh alias import` | 从 YAML 文件的内容中导入别名 |
|
||||
| `gh alias list` | 打印出所有已配置的别名 |
|
||||
| `gh alias set` | 定义一个单词,当调用时会展开为完整的 `gh` 命令 |
|
||||
<!--rehype:className=style-list-->
|
||||
|
||||
### 发布
|
||||
|
||||
**常规操作**
|
||||
|
||||
| 命令 | 描述 |
|
||||
| :----------------------- | :----------------------------------------- |
|
||||
| `gh release create` | 为一个仓库创建新的 GitHub 发布 |
|
||||
| `gh release list` | 列出一个仓库中的发布 |
|
||||
<!--rehype:className=code-nowrap-->
|
||||
|
||||
**目标命令**
|
||||
|
||||
| 命令 | 描述 |
|
||||
| :------------------------ | :-------------------------------------- |
|
||||
| `gh release delete` | 删除一个发布 |
|
||||
| `gh release delete-asset` | 从一个发布中删除一个资产 |
|
||||
| `gh release download` | 从 GitHub 发布中下载资产 |
|
||||
| `gh release edit` | 编辑一个发布 |
|
||||
| `gh release upload` | 上传资产文件到一个 GitHub 发布 |
|
||||
| `gh release view` | 查看有关一个 GitHub 发布的信息 |
|
||||
<!--rehype:className=code-nowrap-->
|
||||
|
||||
### 配置
|
||||
|
||||
**目标设置**
|
||||
|
||||
| 命令 | 描述 |
|
||||
| :------------------------ | :--------------------------------------------- |
|
||||
| `gh config clear-cache` | 清除 CLI 缓存 |
|
||||
| `gh config get` | 打印给定配置键的值 |
|
||||
| `gh config list` | 打印配置键及其值的列表 |
|
||||
| `gh config set` | 用给定键的值更新配置 |
|
||||
<!--rehype:className=style-list-->
|
||||
@@ -3,12 +3,12 @@ Github Copilot 备忘清单
|
||||
|
||||
这是开始使用 [Github Copilot](https://code.visualstudio.com/docs/editor/github-copilot) 的快速参考指南
|
||||
|
||||
一、准备工作
|
||||
入门
|
||||
----
|
||||
|
||||
### 1、账号注册
|
||||
|
||||
> 需要先拥有一个Github账号,并订阅Copilot。
|
||||
需要先拥有一个Github账号,并订阅Copilot。
|
||||
|
||||
事项 | 说明
|
||||
:-|-
|
||||
@@ -18,7 +18,7 @@ Github 账号 | [注册地址](https://github.com/signup)
|
||||
### 2、安装Vscode插件
|
||||
<!--rehype:wrap-class=col-span-1 row-span-1-->
|
||||
|
||||
> 在扩展商店中搜索安装下面插件
|
||||
在扩展商店中搜索安装下面插件
|
||||
|
||||
插件名称 | 功能
|
||||
:-|-
|
||||
@@ -44,22 +44,23 @@ Copilot Enterprise| 39美元/人/月 | Business 特性 + 私有代码库的个
|
||||
<!--rehype:wrap-class=col-span-1 row-span-1-->
|
||||
|名称 | 描述 |
|
||||
|-|-|
|
||||
Inline Suggestions| 在编辑器中紧邻光标所在位置显示建议
|
||||
Completions Panel| 在编辑器中展示完整的建议列表
|
||||
Inline Chat| 在编辑器中紧邻光标所在位置发起对话
|
||||
Editor Chat| 在编辑器中打开完整的对话界面
|
||||
Silde Chat| 在编辑器的侧边栏打开对话界面
|
||||
Quick Chat| 在顶部唤起对话界面
|
||||
`Inline Suggestions` | 在编辑器中紧邻光标所在位置显示建议
|
||||
`Completions Panel` | 在编辑器中展示完整的建议列表
|
||||
`Inline Chat` | 在编辑器中紧邻光标所在位置发起对话
|
||||
`Editor Chat` | 在编辑器中打开完整的对话界面
|
||||
`Silde Chat` | 在编辑器的侧边栏打开对话界面
|
||||
`Quick Chat` | 在顶部唤起对话界面
|
||||
<!--rehype:className=left-align-->
|
||||
|
||||
二、提示技巧
|
||||
提示技巧
|
||||
----
|
||||
|
||||
### 提示之禅
|
||||
<!--rehype:wrap-class=col-span-1 row-span-1-->
|
||||
|
||||
> 你与 `copilot` 之间的关系,就是作家和插画师的关系。
|
||||
> 你只有尽可能的全面、干练、清晰的描述你的故事(即 `上下文`)。
|
||||
> `copilot` 才能根据你的故事画出精美的插画 (即 `代码` )。
|
||||
- 你的关系与 `copilot` 的关系,就像作家与插画师的关系。
|
||||
- 为了让 `copilot` 能够绘制出精美的插画(即代码),你需要尽可能全面、干练、清晰地描述你的故事(即上下文)。
|
||||
<!--rehype:className=style-round-->
|
||||
|
||||
### 提示技巧
|
||||
<!--rehype:wrap-class=col-span-1 row-span-1-->
|
||||
@@ -69,9 +70,9 @@ Quick Chat| 在顶部唤起对话界面
|
||||
|
||||
### 实战教程
|
||||
|
||||
- [Youtube GitHub Copilot Series](https://www.youtube.com/playlist?list=PLj6YeMhvp2S5_hvBl2SE-7YCHYlLQ0bPt)
|
||||
- [Pragmatic techniques to get the most out of GitHub Copilot](https://www.youtube.com/watch?v=CwAzIpc4AnA)
|
||||
- [How I used GitHub Copilot to build a browser extension](https://github.blog/2023-05-12-how-i-used-github-copilot-to-build-a-browser-extension/)
|
||||
- [Youtube GitHub Copilot 系列](https://www.youtube.com/playlist?list=PLj6YeMhvp2S5_hvBl2SE-7YCHYlLQ0bPt)
|
||||
- [实用技巧:充分利用 GitHub Copilot](https://www.youtube.com/watch?v=CwAzIpc4AnA)
|
||||
- [我如何使用 GitHub Copilot 构建浏览器扩展](https://github.blog/2023-05-12-how-i-used-github-copilot-to-build-a-browser-extension/)
|
||||
|
||||
### 上下文信息的种类
|
||||
<!--rehype:wrap-class=col-span-2 row-span-1-->
|
||||
@@ -86,13 +87,13 @@ Quick Chat| 在顶部唤起对话界面
|
||||
|
||||
### 上下文:文件
|
||||
|
||||
> Copilot会查看编辑器中当前和紧邻打开的文件,以分析上下文并提供适当的建议。
|
||||
Copilot会查看编辑器中当前和紧邻打开的文件,以分析上下文并提供适当的建议。
|
||||
|
||||
---
|
||||
|
||||
> - 1、避免打开过多的文件,以便Copilot能够更好地理解你的代码。
|
||||
> - 2、打开的文件尽量相关且有共性。
|
||||
> - 3、如果是新项目,可以打开一些模版代码、数据文件以及参考文档等相关示例文件。以便Copilot能够更好地理解你的期望。等已经开发了一些代码后,这些示例文件就可以删除了。
|
||||
- 1、避免打开过多的文件,以便Copilot能够更好地理解你的代码。
|
||||
- 2、打开的文件尽量相关且有共性。
|
||||
- 3、如果是新项目,可以打开一些模版代码、数据文件以及参考文档等相关示例文件。以便Copilot能够更好地理解你的期望。等已经开发了一些代码后,这些示例文件就可以删除了。
|
||||
|
||||
### 上下文: 注释: 顶部注释
|
||||
|
||||
@@ -275,7 +276,7 @@ dailogs = [
|
||||
...
|
||||
```
|
||||
|
||||
三、快捷键
|
||||
快捷键
|
||||
----
|
||||
<!--rehype:body-class=cols-2-->
|
||||
|
||||
@@ -287,6 +288,7 @@ dailogs = [
|
||||
<!--rehype:wrap-class=col-span-2 row-span-1-->
|
||||
|
||||
#### Copilot 中 Inline Suggestions 相关命令
|
||||
<!--rehype:style=text-align: left;-->
|
||||
|
||||
| 命令 |说明 | 快捷键 | Mac 快捷键 |
|
||||
|-|:-|:-|:-|
|
||||
@@ -300,6 +302,7 @@ dailogs = [
|
||||
<!--rehype:className=show-header wrap-text left-align-->
|
||||
|
||||
#### Copilot 中 Completions Panel 相关命令
|
||||
<!--rehype:style=text-align: left;-->
|
||||
|
||||
| 命令 |说明 | 快捷键 | Mac 快捷键 |
|
||||
|-|:-|:-|:-|
|
||||
@@ -310,6 +313,7 @@ dailogs = [
|
||||
<!--rehype:className=show-header wrap-text left-align-->
|
||||
|
||||
#### Copilot 中 其他命令
|
||||
<!--rehype:style=text-align: left;-->
|
||||
|
||||
| 命令 |说明 | 快捷键 | Mac 快捷键 |
|
||||
|-|:-|:-|:-|
|
||||
@@ -324,6 +328,7 @@ dailogs = [
|
||||
<!--rehype:wrap-class=col-span-2 row-span-1-->
|
||||
|
||||
#### Copilot Chat 中 Chat 相关命令
|
||||
<!--rehype:style=text-align: left;-->
|
||||
|
||||
| 命令 |说明 | 快捷键 | Mac 快捷键 |
|
||||
|-|:-|:-|:-|
|
||||
@@ -334,6 +339,7 @@ dailogs = [
|
||||
<!--rehype:className=show-header wrap-text left-align-->
|
||||
|
||||
#### Copilot Chat 中 Inline Chat 相关命令
|
||||
<!--rehype:style=text-align: left;-->
|
||||
|
||||
| 命令 |说明 | 快捷键 | Mac 快捷键 |
|
||||
|-|:-|:-|:-|
|
||||
@@ -345,6 +351,7 @@ dailogs = [
|
||||
<!--rehype:className=show-header wrap-text left-align-->
|
||||
|
||||
#### Copilot Chat 中 Quick Chat 相关命令
|
||||
<!--rehype:style=text-align: left;-->
|
||||
|
||||
| 命令 |说明 | 快捷键 | Mac 快捷键 |
|
||||
|-|:-|:-|:-|
|
||||
@@ -353,6 +360,7 @@ dailogs = [
|
||||
<!--rehype:className=show-header wrap-text left-align-->
|
||||
|
||||
#### Copilot Chat 中 Editor Chat 相关命令
|
||||
<!--rehype:style=text-align: left;-->
|
||||
|
||||
| 命令 |说明 | 快捷键 | Mac 快捷键 |
|
||||
|-|:-|:-|:-|
|
||||
@@ -360,6 +368,7 @@ dailogs = [
|
||||
<!--rehype:className=show-header wrap-text left-align-->
|
||||
|
||||
#### Copilot Chat 其他命令
|
||||
<!--rehype:style=text-align: left;-->
|
||||
|
||||
| 命令 |说明 | 快捷键 | Mac 快捷键 |
|
||||
|-|:-|:-|:-|
|
||||
@@ -368,10 +377,10 @@ dailogs = [
|
||||
`github.copilot.ghpr.applySuggestion`|为Github Pull Request提供代码建议|-|-
|
||||
<!--rehype:className=show-header wrap-text left-align-->
|
||||
|
||||
四、Copilot Chat 的 Slash Commands 使用技巧
|
||||
Copilot Chat 的 Slash Commands 使用技巧
|
||||
----
|
||||
|
||||
> 在聊天对话框中可以通过`/`开头的命令来与Copilot Chat进行交互。
|
||||
在聊天对话框中可以通过`/`开头的命令来与Copilot Chat进行交互。
|
||||
|
||||
### Slash Commands 示例
|
||||
<!--rehype:wrap-class=col-span-1 row-span-1-->
|
||||
@@ -393,9 +402,9 @@ dailogs = [
|
||||
@vscode /api 请解释 inlineChat.start 的作用
|
||||
|
||||
@workspace /explain def helloworld():...
|
||||
```
|
||||
|
||||
在每一行代码末尾添加注释进行解释
|
||||
```
|
||||
|
||||
#### Agent
|
||||
|
||||
@@ -420,7 +429,7 @@ dailogs = [
|
||||
|
||||
---
|
||||
|
||||
> 通过命令 `github.copilot.interactiveEditor.generate` 触发
|
||||
通过命令 "github.copilot.interactiveEditor.generate" 触发
|
||||
|
||||
|命令 |说明 |
|
||||
|- |:-|
|
||||
@@ -430,32 +439,34 @@ dailogs = [
|
||||
|
||||
> 当然也可以直接选中区域,然后在inline chat中输入指令执行 copilot会对选中区域进行指令操作
|
||||
|
||||
|常用指令|
|
||||
| - |
|
||||
|在每一行代码末尾添加注释进行解释|
|
||||
|使代码满足PEP484要求|
|
||||
<!--rehype:className=show-header wrap-text left-align-->
|
||||
#### 常用指令
|
||||
|
||||
- 在每一行代码末尾添加注释进行解释
|
||||
- 使代码满足PEP484要求
|
||||
<!--rehype:className=style-round-->
|
||||
|
||||
### Silde Chat 的 Slash Commands
|
||||
<!--rehype:wrap-class=col-span-1 row-span-2-->
|
||||
|
||||
> 通过命令 `workbench.action.chat.openInSidebar` 触发 `chat` 后使用
|
||||
> 或点击侧边栏上的Copilot聊天按钮
|
||||
> 在Chat输入框中还允许指定Agent(即环境)
|
||||
- 通过命令 `workbench.action.chat.openInSidebar` 触发 `chat` 后使用
|
||||
- 或点击侧边栏上的Copilot聊天按钮
|
||||
- 在Chat输入框中还允许指定Agent(即环境)
|
||||
<!--rehype:className=style-round-->
|
||||
|
||||
#### Slash Commands
|
||||
|
||||
|命令 |说明 |
|
||||
|- |:-|
|
||||
/api |回答vscode扩展插件开发的问题
|
||||
/explain |对选中的代码进行解释
|
||||
/fix |修复此选中的代码
|
||||
/new |创建新项目workspace
|
||||
/newNotebook |创建新的Jupyter Notebook
|
||||
/terminal |解释命令行里的命令
|
||||
/tests |为选中的代码生成单元测试
|
||||
/help |帮助说明
|
||||
/clear |清除会话
|
||||
`/api` |回答vscode扩展插件开发的问题
|
||||
`/explain` |对选中的代码进行解释
|
||||
`/fix` |修复此选中的代码
|
||||
`/new` |创建新项目workspace
|
||||
`/newNotebook` |创建新的Jupyter Notebook
|
||||
`/terminal` |解释命令行里的命令
|
||||
`/tests` |为选中的代码生成单元测试
|
||||
`/help` |帮助说明
|
||||
`/clear` |清除会话
|
||||
<!--rehype:className=left-align-->
|
||||
|
||||
### `/terminal`特有的变量, 以`#`号开头
|
||||
|
||||
@@ -471,13 +482,12 @@ dailogs = [
|
||||
|
||||
- Quick Chat 与 Chat 的 Slash Commands相同
|
||||
- Editor Chat 与 Chat 的 Slash Commands相同
|
||||
<!--rehype:className=style-round-->
|
||||
|
||||
五、参数设置
|
||||
参数设置
|
||||
----
|
||||
|
||||
打开vscode 命令面板, 输入`Preferences:Open Settings` 打开配置文件,在文件模式下配置相关参数.
|
||||
|
||||
完整参数说明可以查看 `copilot` 与 `copilot chat` 两个[插件目录](https://code.visualstudio.com/docs/editor/extension-marketplace#_where-are-extensions-installed)下的 `package.json` 文件获知。
|
||||
打开 VSCode 命令面板,输入 `Preferences: Open Settings` 来打开配置文件。在文件模式下,您可以配置相关参数。要获取完整的参数说明,请查看 `copilot` 和 `copilot chat` 两个插件目录下的 `package.json` 文件,具体位置可以参考 [VSCode 扩展市场](https://code.visualstudio.com/docs/editor/extension-marketplace#_where-are-extensions-installed)。
|
||||
|
||||
### 完整配置参考
|
||||
|
||||
@@ -532,49 +542,59 @@ dailogs = [
|
||||
|
||||
### 参数说明
|
||||
<!--rehype:wrap-class=col-span-2 row-span-1-->
|
||||
|
||||
#### 代理参数
|
||||
<!--rehype:style=text-align: left;-->
|
||||
|
||||
|设置参数 |值类型|说明 |
|
||||
|:--|:--|:--|
|
||||
`"http.proxy"`| string |配置网络代理地址
|
||||
<!--rehype:className=left-align-->
|
||||
|
||||
#### Copilot Chat 参数
|
||||
<!--rehype:style=text-align: left;-->
|
||||
|
||||
|设置参数 |值类型|说明 |
|
||||
|:--|:--|:--|
|
||||
`"github.copilot.chat.localeOverride"`| string | 设置Copilot本地语言
|
||||
`"github.copilot.chat.welcomeMessage"`| string |Copilot Chat 是否显示欢迎语<br>`first`: 仅第一次启动时, `always`: 总是, `never`: 从不
|
||||
<!--rehype:className=left-align-->
|
||||
|
||||
#### Copilot 基本参数
|
||||
<!--rehype:style=text-align: left;-->
|
||||
|
||||
|设置参数 |值类型|说明 |
|
||||
|:--|:--|:--|
|
||||
`"editor.inlineSuggest.enabled"`| boolean |启用内联建议
|
||||
`"github.copilot.editor.iterativeFixing"`| boolean| 允许 Copilot 提供迭代修复建议
|
||||
`"github.copilot.editor.enableAutoCompletions"`| boolean |允许 Copilot 提供自动补全
|
||||
`"github.copilot.editor.enableCodeActions"`| boolean|允许 Copilot 代码操作建议,这些操作可能包括重构代码、优化代码结构、修复可错误等
|
||||
| `"editor.inlineSuggest.enabled"` | boolean | 启用内联建议 |
|
||||
| `"github.copilot.editor.iterativeFixing"` | boolean | 允许 Copilot 提供迭代修复建议 |
|
||||
| `"github.copilot.editor.enableAutoCompletions"` | boolean | 允许 Copilot 提供自动补全 |
|
||||
| `"github.copilot.editor.enableCodeActions"` | boolean | 允许 Copilot 提供代码操作建议,包括重构和优化代码结构、修复错误等 |
|
||||
<!--rehype:className=left-align-->
|
||||
|
||||
#### 设置 Copilot 生效的文件类型
|
||||
<!--rehype:style=text-align: left;-->
|
||||
|
||||
|设置参数 |值类型|说明 |
|
||||
|:--|:--|:--|
|
||||
`"github.copilot.enable"`| json |请将 `"*": true` 放到末尾 <br>[语言](https://code.visualstudio.com/docs/languages/identifiers)后设置 `false` 表示禁用copilot, 设置 `true` 表示启用
|
||||
<!--rehype:className=left-align-->
|
||||
|
||||
#### Copilot 高级参数
|
||||
<!--rehype:style=text-align: left;-->
|
||||
|
||||
> github.copilot.advanced 可以控制模型参数,最终影响到代码生成. 其值为json
|
||||
`github.copilot.advanced` 可以控制模型参数,最终影响到代码生成。其值为json
|
||||
|
||||
|设置参数 |值类型|说明 |
|
||||
|:--|:--|:--|
|
||||
`"length"`| integer | 生成的代码字数, 默认为 `500`
|
||||
`"top_p"`| number | 控制模型候选范围,默认值为 `1`,值范围为`0.0~1.0`
|
||||
`"temperature"`| string | 控制模型的创造性,默认值为 `""`,值越大越不可预测,值范围为`0.0~1.0`
|
||||
`"inlineSuggestCount"`| integer | 内联提示的个数, 默认为`3`
|
||||
`"listCount"`| integer | 控制`Completions Panel`中建议个数,默认为 `10`
|
||||
`"stops"`| json | 控制模型代码生成时停止的标志,可以按[语言](https://code.visualstudio.com/docs/languages/identifiers)来控制
|
||||
`"indentationMode"`| json | 指定[语言](https://code.visualstudio.com/docs/languages/identifiers)是否采用该语言的缩近模式,由此可能会与stops冲突,比如采用`\{\}`缩近时,设置该参数时需要综合考虑
|
||||
`"debug.showScores"`| boolean | 在代码建议列表中显示每个建议的分数
|
||||
<!--rehype:className=wrap-text -->
|
||||
| 设置参数 | 值类型 | 说明 |
|
||||
|----------|----------|----------|
|
||||
| `"length"` | 整数 integer | 生成代码的字数,默认为 `500` |
|
||||
| `"top_p"` | 数字 number | 控制模型候选范围,默认值为 `1`,范围为 `0.0~1.0` |
|
||||
| `"temperature"` | 字符串 string | 控制模型创造性,默认值为空,值越大越不可预测,范围为 `0.0~1.0` |
|
||||
| `"inlineSuggestCount"` | 整数 integer | 内联提示的个数,默认为 `3` |
|
||||
| `"listCount"` | 整数 integer | `Completions Panel` 中建议的个数,默认为 `10` |
|
||||
| `"stops"` | JSON | 控制模型代码生成时的停止标志,可按[语言](https://code.visualstudio.com/docs/languages/identifiers)控制 |
|
||||
| `"indentationMode"` | JSON | 指定[语言](https://code.visualstudio.com/docs/languages/identifiers)是否使用该语言的缩进模式,可能与 stops 冲突 |
|
||||
| `"debug.showScores"` | 布尔值 boolean | 在代码建议列表中显示每个建议的分数 |
|
||||
<!--rehype:className=left-align-->
|
||||
|
||||
END... ENJOY YOURSELF
|
||||
----
|
||||
|
||||
828
docs/glances.md
Normal file
@@ -0,0 +1,828 @@
|
||||
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 # 设置刷新间隔(以秒为单位)
|
||||
|
||||
[alert]
|
||||
enable = True
|
||||
|
||||
# 邮件告警配置(放在 alert 下)
|
||||
mail = True
|
||||
mail_from =
|
||||
mail_to =
|
||||
mail_server =
|
||||
mail_port = 465
|
||||
mail_user =
|
||||
mail_password =
|
||||
mail_tls = True
|
||||
|
||||
[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
|
||||
# 历史大小(最大值数)
|
||||
# 默认值为28800:1天,每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_
|
||||
@@ -279,13 +279,26 @@ u := uint(i)
|
||||
s := string(i)
|
||||
```
|
||||
|
||||
#### 如何获取int字符串?
|
||||
#### 字符串与其他类型的相互转换
|
||||
|
||||
```go
|
||||
i := 90
|
||||
// 需要导入“strconv”
|
||||
s := strconv.Itoa(i)
|
||||
fmt.Println(s) // Outputs: 90
|
||||
// 字符串转其他类型
|
||||
str := "90"
|
||||
// 整数类型
|
||||
i, err := strconv.Atoi(str)
|
||||
if err != nil {
|
||||
fmt.Println("转换错误:", err)
|
||||
} else {
|
||||
fmt.Println(i)
|
||||
}
|
||||
// 浮点类型
|
||||
f, err := strconv.ParseFloat(str, 64)
|
||||
// []byte 类型
|
||||
bytes := []byte(str)
|
||||
// 其他类型转字符串
|
||||
str = strconv.Itoa(i)
|
||||
str = strconv.FormatFloat(f, 'f', 2, 64)
|
||||
str = string(bytes[:])
|
||||
```
|
||||
|
||||
Golang 字符串
|
||||
@@ -838,6 +851,54 @@ ch <- 3
|
||||
|
||||
参见:[缓冲通道](https://tour.golang.org/concurrency/3)
|
||||
|
||||
### Context
|
||||
|
||||
<!--rehype:wrap-class=col-span-2 row-span-2-->
|
||||
|
||||
```go
|
||||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"time"
|
||||
)
|
||||
|
||||
func main() {
|
||||
// 创建根 context
|
||||
ctx := context.Background() // 空 context,通常作为根 context
|
||||
todo := context.TODO() // 当不确定使用哪个 context 时使用
|
||||
|
||||
// 创建带取消功能的 context
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
defer cancel() // 确保所有路径都调用取消函数
|
||||
|
||||
// 创建带超时的 context
|
||||
ctx, cancel = context.WithTimeout(context.Background(), 100*time.Millisecond)
|
||||
defer cancel()
|
||||
|
||||
// 创建带截止时间的 context
|
||||
deadline := time.Now().Add(200 * time.Millisecond)
|
||||
ctx, cancel = context.WithDeadline(context.Background(), deadline)
|
||||
defer cancel()
|
||||
|
||||
// 创建带值的 context
|
||||
ctx = context.WithValue(context.Background(), "key", "value")
|
||||
|
||||
// 从 context 获取值
|
||||
value := ctx.Value("key")
|
||||
fmt.Println(value)
|
||||
|
||||
// 检查 context 是否已取消
|
||||
select {
|
||||
case <-ctx.Done():
|
||||
fmt.Println("Context canceled:", ctx.Err())
|
||||
default:
|
||||
fmt.Println("Context still valid")
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Golang 错误控制
|
||||
--------
|
||||
|
||||
|
||||
1025
docs/hook.md
Normal file
19
docs/htmx.md
@@ -18,7 +18,9 @@
|
||||
|
||||
```html
|
||||
<script
|
||||
src="https://unpkg.com/htmx.org@1.8.4"
|
||||
src="https://unpkg.com/htmx.org@2.0.6"
|
||||
integrity="sha384-Akqfrbj/HpNVo8k11SXBb6TlBWmXXlYQrCSqEWmyKJe+hDm3Z/B2WVG4smwBkRVm"
|
||||
crossorigin="anonymous"
|
||||
>
|
||||
</script>
|
||||
<!-- 有一个按钮POST,通过AJAX点击 -->
|
||||
@@ -206,11 +208,9 @@ API 参考
|
||||
`hx-put` | 向指定的 URL 发出 PUT
|
||||
`hx-replace-url` | 替换浏览器地址栏中的 URL
|
||||
`hx-request` | 配置请求的各个方面
|
||||
`hx-sse` | 已移至分机。 [旧版本的文档](https://htmx.org/attributes/hx-sse)
|
||||
`hx-sync` | 控制不同元素发出的请求如何同步
|
||||
`hx-validate` | 强制元素在请求之前验证自己
|
||||
~~`hx-vars`~~ | 将值动态添加到参数以随请求提交(已弃用,请使用 `hx-vals`)
|
||||
`hx-ws` | 已移至分机。[旧版本的文档](https://htmx.org/attributes/hx-ws)
|
||||
`hx-disabled-elt` | 禁用触发元素和指定的元素,在发出请求期间
|
||||
<!--rehype:className=left-align-->
|
||||
|
||||
列出了 htmx 中可用的所有其他属性
|
||||
@@ -323,6 +323,11 @@ Class | 说明
|
||||
[`HX-Replace-Url`](https://htmx.org/headers/hx-replace-url) | 替换地址栏中的当前 `URL`
|
||||
`HX-Reswap` | 允许您指定如何交换响应<br /> _有关可能的值,请参阅 [`hx-swap`](https://htmx.org/attributes/hx-swap)_
|
||||
`HX-Retarget` | 将内容更新的目标更新为页面上不同元素的 CSS 选择器
|
||||
[`HX-Trigger`](https://htmx.org/headers/hx-trigger) | 允许您触发客户端事件<br /> _请[参阅文档](https://htmx.org/headers/hx-trigger)以获取更多信息_
|
||||
[`HX-Trigger-After-Settle`](https://htmx.org/headers/hx-trigger) | 允许您触发客户端事件<br /> _请[参阅文档](https://htmx.org/headers/hx-trigger)以获取更多信息_
|
||||
[`HX-Trigger-After-Swap`](https://htmx.org/headers/hx-trigger) | 允许您触发客户端事件<br /> _请[参阅文档](https://htmx.org/headers/hx-trigger)以获取更多信息_
|
||||
[`HX-Trigger`](https://htmx.org/headers/hx-trigger) | 响应接收后立即触发事件<br /> _请[参阅文档](https://htmx.org/headers/hx-trigger)以获取更多信息_
|
||||
[`HX-Trigger-After-Settle`](https://htmx.org/headers/hx-trigger) | 在 settle 阶段之后触发事件<br /> _请[参阅文档](https://htmx.org/headers/hx-trigger)以获取更多信息_
|
||||
[`HX-Trigger-After-Swap`](https://htmx.org/headers/hx-trigger) | 在 swap 阶段之后触发事件<br /> _请[参阅文档](https://htmx.org/headers/hx-trigger)以获取更多信息_
|
||||
|
||||
参考资料
|
||||
---
|
||||
|
||||
- [HTMX 官方文档](https://htmx.org/docs/) _(htmx.org)_
|
||||
|
||||
786
docs/huawei-devices.md
Normal file
@@ -0,0 +1,786 @@
|
||||
Huawei 网络设备备忘清单
|
||||
===
|
||||
|
||||
本清单提供了对 Huawei 网络设备的入门简要概述,以及 Huawei 网络设备常用命令示例
|
||||
|
||||
基本知识
|
||||
---
|
||||
|
||||
### VRP
|
||||
|
||||
- 华为数据通信产品的通用网络操作平台,可用于设备管理和配置
|
||||
- 支持命令简写,输入命令时可通过提示获取完整写法
|
||||
- 例如:`undo in en` 取消系统信息显示,完整命令为 `undo info-center enable`
|
||||
- 如果简写存在歧义,则需要输入更完整的命令
|
||||
|
||||
### 视图
|
||||
<!--rehype:wrap-class=col-span-2-->
|
||||
|
||||
视图(View)是指命令行界面(CLI)的操作层级,不同视图可执行不同范围的命令。
|
||||
|
||||
| 视图 | 进入方式 | 说明 |
|
||||
| :-----: | :-------------------------------------------------- | :--------------------------------- |
|
||||
| 用户视图 | 登录设备后默认进入 | 可执行监控、查看信息等命令(如 `display version`) |
|
||||
| 系统视图 | `system-view` | 可执行全局配置命令 |
|
||||
| 接口视图 | `interface 接口名`(如 `interface GigabitEthernet0/0/1`) | 用于配置接口相关参数(IP、速率、VLAN等) |
|
||||
| ACL 视图 | `acl 编号`(如 `acl 3000`) | 用于定义访问控制规则 |
|
||||
| VLAN 视图 | `vlan VLAN_ID`(如 `vlan 10`) | 用于创建、修改或删除 VLAN |
|
||||
| OSPF 视图 | `ospf 进程号`(如 `ospf 1`) | 用于配置 OSPF 动态路由 |
|
||||
| AAA 视图 | `aaa` | 用于配置认证、授权与计费 |
|
||||
<!--rehype:className=show-header-->
|
||||
|
||||
---
|
||||
|
||||
```txt
|
||||
用户视图
|
||||
└── system-view (系统视图)
|
||||
├── interface GigabitEthernet0/0/1 (接口视图)
|
||||
├── vlan 10 (VLAN视图)
|
||||
├── acl 3000 (ACL视图)
|
||||
├── ospf 1 (OSPF视图)
|
||||
└── aaa (AAA视图)
|
||||
```
|
||||
|
||||
基本操作
|
||||
---
|
||||
|
||||
### 系统信息
|
||||
<!--rehype:wrap-class=row-span-3-->
|
||||
|
||||
#### 查看信息
|
||||
|
||||
```shell
|
||||
display version # 查看版本信息
|
||||
display current-configuration # 查看当前配置
|
||||
display mac-address # 查看 mac 地址
|
||||
```
|
||||
|
||||
#### 重命名设备
|
||||
|
||||
在系统视图下:`sysname RENAME`
|
||||
|
||||
#### 切换语言
|
||||
|
||||
```sh
|
||||
# 用户视图下
|
||||
language-mode [English, Chinese]
|
||||
```
|
||||
|
||||
#### 设置标题
|
||||
|
||||
```shell
|
||||
header login information 信息 # 载入时信息
|
||||
header shell information 信息 # 远程时信息
|
||||
```
|
||||
|
||||
#### 取消调试信息
|
||||
|
||||
```shell
|
||||
undo terminal monitor
|
||||
```
|
||||
|
||||
|
||||
|
||||
### 撤销操作
|
||||
<!--rehype:wrap-class=row-span-2-->
|
||||
|
||||
- 可用于恢复默认配置
|
||||
- 可用于禁用某些功能
|
||||
- 可用于删除某些配置
|
||||
|
||||
```shell
|
||||
# 恢复默认名称
|
||||
undo sysname
|
||||
# 禁用信息显示
|
||||
undo in en
|
||||
# 删除接口配置
|
||||
undo ip address
|
||||
```
|
||||
|
||||
#### 恢复出厂设置
|
||||
|
||||
`reset saved-configuration`
|
||||
|
||||
### 历史命令
|
||||
<!--rehype:wrap-class=row-span-1-->
|
||||
|
||||
使用上箭头或 ctrl+p 可访问上一命令
|
||||
|
||||
使用下箭头或 ctrl+n 可访问下一命令
|
||||
|
||||
默认保存10条命令
|
||||
|
||||
#### 显示历史命令
|
||||
|
||||
`display history-command`
|
||||
|
||||
### 设置系统时钟
|
||||
|
||||
```shell
|
||||
# 在用户视图下
|
||||
# 为保证与其他设备协调工作需要配置系统时钟
|
||||
clock datetime 12:00:00 2020-02-02 # 时间
|
||||
clock timezone BJ add 08:00:00 # 时区
|
||||
```
|
||||
|
||||
### mac 地址
|
||||
<!--rehype:wrap-class=col-span-2-->
|
||||
|
||||
```shell
|
||||
# 添加 mac 地址
|
||||
# MAC-Address mac 地址
|
||||
# e0/0/0 自定义接口
|
||||
# VlanID 自定义 vlanid
|
||||
mac-address static MAC-Address e0/0/0 vlan VlanID
|
||||
|
||||
# 清除
|
||||
reset arp all
|
||||
```
|
||||
|
||||
### 退出
|
||||
|
||||
`quit` 命令用于从任意视图退回上一个视图
|
||||
|
||||
`return` 这是立刻退回至用户视图
|
||||
|
||||
### 保存配置
|
||||
|
||||
`save`
|
||||
|
||||
### 重启
|
||||
|
||||
```shell
|
||||
reboot
|
||||
```
|
||||
|
||||
登录管理
|
||||
---
|
||||
|
||||
### STelnet 方式
|
||||
<!--rehype:wrap-class=col-span-2 row-span-3-->
|
||||
|
||||
```shell
|
||||
# 开启 ssh 服务
|
||||
stelnet server enable
|
||||
|
||||
# 配置远程管理ip
|
||||
int vlanif 1
|
||||
ip add 192.168.1.254 24
|
||||
|
||||
# 生成本地 rsa 秘钥对
|
||||
rsa local-key-pair create
|
||||
|
||||
# ssh 首次认证
|
||||
ssh cl fi en
|
||||
# ssh 用户验证类型 password
|
||||
ssh user admin authentication-type password
|
||||
# ssh 用户服务类型 stelnet
|
||||
ssh user admin service-type stelnet
|
||||
```
|
||||
|
||||
#### AAA 登录
|
||||
|
||||
```shell
|
||||
aaa
|
||||
# 本地用户 admin 密码密文 123456 等级 2
|
||||
local-user admin password cipher 123456 privilege level 2
|
||||
# 本地用户 admin 登录方式 ssh
|
||||
local-user admin service-type ssh
|
||||
quit
|
||||
user-interface vty 0 4
|
||||
authentication-mode aaa # 认证模式 aaa
|
||||
protocol inbound ssh # 仅支持 ssh 协议
|
||||
quit
|
||||
|
||||
# ssh用户端首次认证
|
||||
ssh client first-time enable
|
||||
```
|
||||
|
||||
#### 命令级别
|
||||
|
||||
- 0 参观级 只能进行如诊断工具命令(ping,tracert),部分 display 命令
|
||||
- 1 监控级 主要用于系统维护,业务故障诊断,包括部分display,debugging命令
|
||||
- 2 配置级 主要用于业务配置,包括路由,各个网络层次命令,可向用户提供直接网络服务
|
||||
- 3 - 15 为管理级,涉及系统基本运行,系统支撑模块等
|
||||
|
||||
### Console 接口登录
|
||||
|
||||
#### 永不超时
|
||||
|
||||
```shell
|
||||
user-interface console 0 # 进入 console 接口
|
||||
idle-timeout 0 # 超时时间为 0 即 永不超时
|
||||
```
|
||||
|
||||
#### 密码认证
|
||||
|
||||
```shell
|
||||
user-interface console 0
|
||||
authentication-mode password # 验证模式 密码认证
|
||||
set authentication password simple 123456 # 设置验证密码 简单密码 123456
|
||||
```
|
||||
|
||||
#### AAA认证
|
||||
|
||||
```shell
|
||||
user-interface console 0
|
||||
authentication-mode aaa # 验证模式 AAA认证
|
||||
quit
|
||||
aaa # 进入 aaa 模式
|
||||
local-user admin password simple 123456 # 本地用户 admin 密码 简单密码 123456
|
||||
local-user admin password cipher 123456 # 本地用户 admin 密码 密文密码 123456
|
||||
local-user admin service-type terminal # 本地用户 admin 服务类型 终端
|
||||
```
|
||||
|
||||
### Telnet 方式
|
||||
|
||||
```shell
|
||||
# 开启 Telnet
|
||||
telnet server enable
|
||||
```
|
||||
|
||||
#### password 登录
|
||||
|
||||
```shell
|
||||
user-interface vty 0 4
|
||||
authentication-mode password # 认证模式 password
|
||||
set authentication password simple 123456 # 设置 认证 密码 简单密码 123456
|
||||
user privilege level 2 # 用户等级 2
|
||||
idle-timeout 15 # 断连时间 15 分
|
||||
```
|
||||
|
||||
#### AAA 登录
|
||||
|
||||
```shell
|
||||
aaa
|
||||
# 本地用户 admin 密码密文 123456 等级 2
|
||||
local-user admin password cipher 123456 privilege level 2
|
||||
# 本地用户 admin 登录方式 telnet
|
||||
local-user admin service-type telnet
|
||||
quit
|
||||
user-interface vty 0 4
|
||||
authentication-mode aaa # 认证模式 aaa
|
||||
quit
|
||||
```
|
||||
|
||||
### 远程 IP
|
||||
|
||||
```shell
|
||||
# 远程管理 ip
|
||||
int vlanif 1
|
||||
ip add 192.168.1.254 24
|
||||
# pc
|
||||
192.168.1.1 24
|
||||
```
|
||||
|
||||
接口配置
|
||||
---
|
||||
|
||||
### 接口组
|
||||
<!--rehype:wrap-class=col-span-2-->
|
||||
|
||||
```sh
|
||||
# 组内配置会自动为组成员配置
|
||||
port-group 1 # 创建接口组 1
|
||||
group-member e0/0/2 to e0/0/8 # 划分组成员为 e0/0/2 - e0/0/8 即 2,3,4,5,6,7,8 接口
|
||||
```
|
||||
|
||||
#### 接口模式
|
||||
|
||||
```shell
|
||||
# access 普通模式 只能在某个 vlan 中通信
|
||||
# trunk 中继器模式 可在任意 vlan 中通信
|
||||
int e0/0/1
|
||||
port link-type access # 接口模式为 access
|
||||
port link-type trunk # 接口模式为 trunk
|
||||
```
|
||||
|
||||
#### 接口带宽
|
||||
|
||||
```shell
|
||||
# 接口每秒传输数据量
|
||||
int e0/0/1
|
||||
# 10Mbit/s
|
||||
# 100Mbit/s
|
||||
# Auto 自协商
|
||||
speed 10 | 100 | Auto
|
||||
# 关闭自协商
|
||||
# 先关闭自协商再手动指定接口速率
|
||||
undo negotiation auto
|
||||
```
|
||||
|
||||
#### 接口双工模式
|
||||
|
||||
```shell
|
||||
# 接口协商模式不一致会导致异常
|
||||
int e0/0/1
|
||||
# full 全双工 同时收发数据
|
||||
# half 半双工 同时只能接收或发送数据一个操作
|
||||
duplex full | half
|
||||
# 先关闭自协商再手动指定
|
||||
```
|
||||
|
||||
#### 配置 trunk
|
||||
|
||||
```sh
|
||||
interface g0/0/1 # 进入接口
|
||||
port link-type trunk # 接口模式为 trunk
|
||||
```
|
||||
|
||||
`all` 为通过所有 `vlan`, VlanId 为指定 vlan,多个vlan以空格隔开
|
||||
|
||||
```sh
|
||||
port trunk allow-pass vlan VlanId | all
|
||||
```
|
||||
|
||||
### vlan 配置
|
||||
|
||||
#### 查看 vlan
|
||||
|
||||
`display vlan`
|
||||
|
||||
#### 创建 vlan
|
||||
|
||||
```sh
|
||||
# VlanId 自定义vlanid 1 ~ 4094
|
||||
vlan VlanId
|
||||
# VLANNAME 自定义的 vlan 名称
|
||||
description VLANNAME
|
||||
|
||||
# 删除vlan
|
||||
undo vlan VlanId
|
||||
|
||||
# 创建 10,20,30 vlan
|
||||
vlan batch 10 20 30
|
||||
# 创建 10 ~ 30 vlan
|
||||
vlan batch 10 to 30
|
||||
```
|
||||
|
||||
#### 分配 vlan
|
||||
|
||||
```sh
|
||||
# 进入接口
|
||||
interface E0/0/1
|
||||
# 接口模式设为 access
|
||||
port link-type access
|
||||
# 划分到 vlan 10 中
|
||||
port default vlan 10
|
||||
|
||||
# 创建接口组 1
|
||||
port-group 1
|
||||
# 组成员为 e0/0/5 - e0/0/8 .... 5,6,7,8
|
||||
group-member e0/0/5 to e0/0/8
|
||||
# 组成员接口模式设为 access
|
||||
port link-type access
|
||||
# 组成员划分到 vlan 10 中
|
||||
port default vlan 10
|
||||
```
|
||||
|
||||
交换机配置
|
||||
---
|
||||
|
||||
### STP (Spanning Tree Protocol)
|
||||
<!--rehype:wrap-class=col-span-2 row-span-2-->
|
||||
|
||||
即生成树协议
|
||||
|
||||
可将有环路的物理拓扑变为无环路的逻辑拓扑,从而为网络提供安全机制,使得冗余拓扑中不会产生交换环路问题
|
||||
|
||||
```shell
|
||||
# 三层交换机
|
||||
# 首先需要创建 vlan
|
||||
# 划分接口给 vlan
|
||||
# 所有与其他交换机相连接口需要做 trunk 放通划分 vlan
|
||||
|
||||
# 二层交换机
|
||||
# 建立 vlan
|
||||
# 客户机接口划分默认 vlan
|
||||
# 与三层交换机相连接口做 trunk 放通 vlan
|
||||
|
||||
# 开启 STP
|
||||
# 系统视图下
|
||||
# 交换机都要配置
|
||||
# stp 开启
|
||||
stp enable
|
||||
# stp 模式 stp
|
||||
stp mode stp
|
||||
|
||||
# # 指定根交换机
|
||||
# 配置优先级
|
||||
# 系统视图下
|
||||
# 优先级为 0
|
||||
# 优先级值在 0 ~ 65535 默认 32768
|
||||
# 要求设为 4096 倍数
|
||||
stp priority 0
|
||||
|
||||
# 使用命令
|
||||
# 系统视图下
|
||||
# 需要先删除配置优先级
|
||||
# 根交换机
|
||||
stp root primary
|
||||
# 备用根交换机
|
||||
stp root secondary
|
||||
```
|
||||
|
||||
### 链路聚合
|
||||
|
||||
```shell
|
||||
# 创建 id 为 1 的 eth-trunk 聚合接口
|
||||
interface eth-trunk 1
|
||||
quit
|
||||
interface g0/0/1
|
||||
eth-trunk 1 # 加入 g/0/01 到 eth-trunk 1 中
|
||||
# 添加完毕成员后
|
||||
# eth-trunk 接口下
|
||||
# 设置接口链路类型为 trunk
|
||||
port link-type trunk
|
||||
```
|
||||
|
||||
在聚合接口下添加成员
|
||||
|
||||
```sh
|
||||
trunkport g0/0/1
|
||||
trunkport g0/0/1 to g0/0/2
|
||||
# 删除用 undo
|
||||
```
|
||||
|
||||
`接口汇聚`是将交换机间的多条物理链路合并为一条逻辑链路,以提升带宽并实现链路冗余备份。
|
||||
|
||||
### RSTP(Rapid Spanning Tree Protocol)
|
||||
|
||||
- RSTP(快速生成树协议)是对 STP 的改进版
|
||||
- 当网络故障发生时,STP 的拓扑结构需要较长时间收敛,而 RSTP 可在 1 秒内完成
|
||||
- 配置方式与 STP 基本一致
|
||||
|
||||
不同点:
|
||||
|
||||
```shell
|
||||
# 系统视图下
|
||||
stp enable
|
||||
# stp mode stp 变更
|
||||
stp mode rstp
|
||||
|
||||
# 配置边缘接口
|
||||
# 接口视图下
|
||||
# 将该接口设置为边缘接口
|
||||
# 节省接口从初始启动到转发状态的时间间隔
|
||||
# 默认不参与生成树计算
|
||||
# 不经历转发延迟
|
||||
# 关闭或激活不触发 RSTP 拓扑变更
|
||||
# 通常将与终端设备连接的接口设置
|
||||
stp edged-port enable
|
||||
```
|
||||
|
||||
### DHCP(Dynamic Host Configuration Protocol)
|
||||
<!--rehype:wrap-class=col-span-2-->
|
||||
|
||||
即动态主机配置协议
|
||||
|
||||
可有规划的划分 IP 地址,也可避免用户私设 IP 引起的地址冲突
|
||||
|
||||
三层交换机可充当 DHCP 服务器,能动态分配 IP 地址及 DNS 服务地址等网络参数
|
||||
|
||||
可以使得用户零配置上网
|
||||
|
||||
```sh
|
||||
# 二层交换机
|
||||
# 首先创建 vlan
|
||||
# 一个 vlan 代表一个地址池范围
|
||||
# 然后划分接口配置默认 vlan
|
||||
# 进入与三层交换机相连的接口做 trunk 并放通 vlan
|
||||
|
||||
# # 三层交换机
|
||||
# 创建 vlan
|
||||
# 进入与二层交换机相连的接口做 trunk 并放通 vlan
|
||||
|
||||
# 开启 DHCP
|
||||
# 系统视图下
|
||||
dhcp enable
|
||||
|
||||
# 系统视图下
|
||||
# 建立地址池 V10 V10 为自定义的合法地址池名称
|
||||
ip pool V10
|
||||
# 发布网段 10.10.10
|
||||
# 掩码 255.0.0.0
|
||||
network 10.10.10.0 mask 255.0.0.0
|
||||
# 配置网关
|
||||
gateway-list 10.10.10.254
|
||||
# 设置租期为 8 天
|
||||
lease 8
|
||||
# dns 服务器 5.5.5.5
|
||||
dns-list 5.5.5.5
|
||||
# 进入 vlan 视图
|
||||
# 为 vlan 配置对应的网关地址及掩码
|
||||
# 配置设备指定接口采取全局地址
|
||||
# vlan 视图下
|
||||
# dhcp 配置选择 全局配置
|
||||
dhcp select global
|
||||
# dhcp 配置选择 接口配置
|
||||
# 接口配置与全局配置基本相同
|
||||
# 此 dhcp 配置在接口中
|
||||
dhcp select interface
|
||||
# #
|
||||
|
||||
# 保留地址
|
||||
# 保留了 5 - 15 这个范围的 IP 地址
|
||||
excluded-ip-address 10.10.10.5 10.10.10.15
|
||||
```
|
||||
|
||||
路由配置
|
||||
---
|
||||
|
||||
### 查看路由
|
||||
<!--rehype:wrap-class=col-span-3-->
|
||||
|
||||
```sh
|
||||
# 查看路由表
|
||||
display ip routing-table
|
||||
```
|
||||
|
||||
### VRRP (Virtual Router Redundancy Protocol)
|
||||
<!--rehype:wrap-class=col-span-2 row-span-4-->
|
||||
|
||||
即虚拟路由器冗余协议
|
||||
|
||||
是一种选择协议,可将虚拟路由器责任动态分配至局域网内的一台 VRRP 路由器
|
||||
|
||||
控制虚拟路由器 IP 地址的 VRRP 路由器为 Master 路由器,负责将数据包进行分发
|
||||
|
||||
一旦 Master 不可用,可提供动态的故障转移机制
|
||||
|
||||
由 Backup 路由器代替 Master路由器故障时的工作
|
||||
|
||||
允许虚拟路由器的 IP 地址作为 终端主机的默认第一跳路由
|
||||
|
||||
优势为更高的默认路由的可用性,无须在终端主机上配置动态路由或路由发现协议
|
||||
|
||||
```sh
|
||||
# 二层交换机
|
||||
# 创建 vlan
|
||||
# 划分接口默认 vlan
|
||||
# 与 三层交换机 相连的接口配置 trunk 放通 vlan
|
||||
|
||||
# # 三层交换机
|
||||
# 创建 vlan
|
||||
# 与 二层交换机 相连的接口配置 trunk 放通 vlan
|
||||
# 配置 vlan 的 IP 地址
|
||||
|
||||
# 配置 VRRP
|
||||
# vlan 视图下
|
||||
# 配置虚拟接口 IP
|
||||
# 与当前 vlan ip 同段
|
||||
# 一台虚拟路由器可拥有多个 IP 地址
|
||||
# vrid 虚拟路由器的标识,相同的 vrid 的路由器组成一台虚拟 Master 路由器
|
||||
vrrp vrid 1 virtual-ip 192.168.100.254
|
||||
# 配置优先级
|
||||
# 根据优先级确定虚拟路由器中每台路由器的地位
|
||||
vrrp vrid 1 priority 150
|
||||
# 配置抢占模式和延迟时间
|
||||
# 非抢占模式
|
||||
# Master 无故障, Backup 即使优先级比 Master 高也不会成为 Master
|
||||
# 抢占模式
|
||||
# Backup 优先级比 Master 高,则代替 Master
|
||||
vrrp vrid 1 preempt-mode timer delay 5
|
||||
# 将 g/0/23 配置为跟踪接口
|
||||
vrrp vrid 1 track interface g0/0/23
|
||||
|
||||
# 查看 VRRP 服务
|
||||
display vrrp brief
|
||||
# 1 为 vrrp id
|
||||
display vrrp 1
|
||||
# #
|
||||
```
|
||||
|
||||
### 单臂路由
|
||||
|
||||
划分 vlan 之后,vlan 是无法互通的,但是使用单臂路由可以解决此问题。
|
||||
|
||||
```sh
|
||||
# 首先交换机划分 vlan
|
||||
# 划分接口默认 vlan
|
||||
# 与路由器相连接口进行 trunk 放通 vlan
|
||||
|
||||
# 假设路由器与交换机连接的接口是 g0/0/0
|
||||
# 创建子接口
|
||||
int g0/0/0.1
|
||||
# 配置 ip 地址
|
||||
# 封装 802.1Q 协议
|
||||
# 假设当前接口对应的 vlan 是 vlan 10
|
||||
dot1q termination vid 10
|
||||
# 开启 arp 广播
|
||||
# 不配置会导致子接口不主动发送 arp 报文
|
||||
# 以及对外转发 ip 报文
|
||||
arp broadcast enable
|
||||
```
|
||||
|
||||
### 静态路由
|
||||
|
||||
适用于规模较小,不经常变动,简单的网络环境
|
||||
|
||||
```sh
|
||||
# 首先配置交换机
|
||||
# 创建 vlan 并划分接口默认 vlan
|
||||
# 配置 vlan 的 ip 地址
|
||||
|
||||
# 路由器配置相连接口 ip
|
||||
# 添加 静态路由
|
||||
# 所有不能直达的网络都需要添加静态路由
|
||||
ip route-static 目标网段 掩码 下一跳地址
|
||||
```
|
||||
|
||||
### 默认路由
|
||||
|
||||
默认路由与静态路由配置基本相同。
|
||||
|
||||
唯一不同的就是路由的配置。
|
||||
|
||||
```bash
|
||||
ip rou 0.0.0.0 0.0.0.0 下一跳地址
|
||||
```
|
||||
|
||||
### 浮动路由
|
||||
|
||||
就是路由器之间多个接口相连,并配置接口优先级。
|
||||
|
||||
配置与静态,默认路由基本相同。
|
||||
|
||||
```bash
|
||||
ip rou 目标网段 掩码 下一跳地址
|
||||
ip rou 目标网段 掩码 下一跳地址 pr 权重
|
||||
```
|
||||
|
||||
### OSPF
|
||||
<!--rehype:wrap-class=row-span-2 col-span-2-->
|
||||
|
||||
首先配置完毕相关接口及IP。
|
||||
|
||||
#### 单域
|
||||
|
||||
```bash
|
||||
# 系统视图下
|
||||
# 1 是 ospf 进程号
|
||||
ospf 1
|
||||
# 0 是区域号 0 是骨干区域
|
||||
area 0
|
||||
# 发布网段
|
||||
# 网段需要根据掩码
|
||||
net x.x.x.x 反码
|
||||
```
|
||||
|
||||
#### 多域
|
||||
|
||||
与单域配置基本相同,只是需要划分多个 OSPF 区域。
|
||||
|
||||
需要注意,路由器相连接口需要划分到一个区域。
|
||||
|
||||
```bash
|
||||
# 系统视图下
|
||||
ospf 1
|
||||
area 0
|
||||
# 发布当前区域的网段
|
||||
net x.x.x.x 反码
|
||||
# 切换区域
|
||||
area 1
|
||||
# 发布当前区域的网段
|
||||
net x.x.x.x 反码
|
||||
```
|
||||
|
||||
### 动态路由 RIP
|
||||
|
||||
配置基本相同。
|
||||
|
||||
```bash
|
||||
# 系统视图下
|
||||
# 进入 rip 视图
|
||||
rip
|
||||
# 切换版本 2
|
||||
v 2
|
||||
# 自动汇总
|
||||
summary always
|
||||
# 发布网段 (需要根据掩码)
|
||||
# 如 掩码 255.0.0.0
|
||||
# 则 发布 x.0.0.0
|
||||
net x.x.x.x
|
||||
```
|
||||
|
||||
### 路由重分发
|
||||
|
||||
大型网络中,有时有多种路由协议共存,此时需要进行路由重分发。
|
||||
|
||||
```bash
|
||||
# 首先完成相关路由配置
|
||||
# 假设 Router 左侧为 RIP 协议
|
||||
# 右侧为 OSPF 协议
|
||||
# 左右路由分别是 1.1.1.1 和 2.2.2.2
|
||||
# 因为 左侧为 RIP 协议
|
||||
# 因此需要先配置 RIP 发布 1.1.1.0 的网段
|
||||
# 右侧 OSPF 协议相同
|
||||
|
||||
# Router 中
|
||||
# 进入 rip 中
|
||||
# 导入 ospf 1 的路由
|
||||
import-route ospf 1
|
||||
# 进入 ospf
|
||||
# 导入 rip 1 的路由
|
||||
import-route rip 1
|
||||
```
|
||||
|
||||
网络安全
|
||||
---
|
||||
|
||||
### 接口安全
|
||||
<!--rehype:wrap-class=col-span-2-->
|
||||
|
||||
```shell
|
||||
# 接口视图下
|
||||
# 开启接口安全
|
||||
port-security enable
|
||||
# 设置当前接口只能由 MAC 地址 MAC-ADDRESS 的设备访问
|
||||
port-security mac-address sticky MAC-ADDRESS
|
||||
# 设置安全 MAC 地址最大数为 1
|
||||
port-security max-mac-num 1
|
||||
# 设置其他非安全 MAC 地址数据帧处理动作为 关闭接口
|
||||
port-security protect-action shutdown
|
||||
# 设置安全 MAC 地址老化时间为 300s
|
||||
port-security aging-time 300
|
||||
```
|
||||
|
||||
### 访问控制列表(Access Control List)
|
||||
|
||||
- 由一系列规则组成的集合,通过规则对报文分类处理。
|
||||
- 通常由若干条 <red>deny</red>(拒绝) | <code>permit</code>(允许) 语句组成。
|
||||
|
||||
### 基本访问控制列表
|
||||
|
||||
范围只能在 2000 - 2999。
|
||||
|
||||
```shell
|
||||
# 系统视图下
|
||||
acl 2000
|
||||
# 规则 拒绝 源 IP地址 反码
|
||||
# deny 拒绝 permit 允许
|
||||
rule deny source IP-ADDRESS MASK
|
||||
# 接口视图下
|
||||
# 传输过滤 输出 规则 2000
|
||||
# outbound 输出
|
||||
# inbound 输入
|
||||
traffic-filter outbound acl 2000
|
||||
```
|
||||
|
||||
### 高级访问控制列表
|
||||
<!--rehype:wrap-class=col-span-2-->
|
||||
|
||||
范围 3000 - 3999。
|
||||
|
||||
```shell
|
||||
# 系统视图下
|
||||
acl 3000
|
||||
# 规则 id5 拒绝 tcp 源 IP-ADDRESS 反码 访问目标 IP-ADDRESS 反码 目标端口 范围 20 21
|
||||
rule 5 deny tcp source IP-ADDRESS MASK destination IP-ADDRESS MASK destination-port range 20 21
|
||||
#规则 id10 允许 tcp 源 IP-ADDRESS 反码 访问目标 IP-ADDRESS 反码 目标端口 等于 80
|
||||
# gt 大于
|
||||
# lt 小于
|
||||
rule 10 permit tcp source IP-ADDRESS MASK destination IP-ADDRESS MASK destination-port eq 80
|
||||
```
|
||||
|
||||
应尽量在靠近源地址的接口上应用;允许某个网段后,应拒绝其他网段。对于 FTP,需要同时指定 FTP(21)和 FTP-DATA(20)端口。
|
||||
465
docs/java.md
@@ -80,8 +80,8 @@ for (char c: word.toCharArray()) {
|
||||
|
||||
```java
|
||||
char[] chars = new char[10];
|
||||
chars[0] = 'a'
|
||||
chars[1] = 'b'
|
||||
chars[0] = 'a';
|
||||
chars[1] = 'b';
|
||||
String[] letters = {"A", "B", "C"};
|
||||
int[] mylist = {100, 200};
|
||||
boolean[] answers = {true, false};
|
||||
@@ -242,10 +242,12 @@ sb.append("!");
|
||||
### 比较
|
||||
|
||||
```java
|
||||
String s1 = new String("QuickRef");
|
||||
String s1 = "QuickRef";
|
||||
String s2 = new String("QuickRef");
|
||||
s1 == s2 // false
|
||||
s1.equals(s2) // true
|
||||
s1 == s2 // false
|
||||
s1.equals(s2) // true
|
||||
// intern 方法获得字符串常量池中的惟一引用
|
||||
s1 == s2.intern() // true
|
||||
"AB".equalsIgnoreCase("ab") // true
|
||||
```
|
||||
|
||||
@@ -309,8 +311,9 @@ int[] a2 = {1, 2, 3};
|
||||
int[] a3 = new int[]{1, 2, 3};
|
||||
int[] a4 = new int[3];
|
||||
a4[0] = 1;
|
||||
a4[2] = 2;
|
||||
a4[3] = 3;
|
||||
a4[1] = 2;
|
||||
a4[2] = 3; // 正常赋值
|
||||
a4[3] = 4; // 会出现索引越界异常 ArrayIndexOutOfBoundsException
|
||||
```
|
||||
|
||||
### 修改 Modify
|
||||
@@ -338,7 +341,7 @@ for (int i=0; i < arr.length; i++) {
|
||||
|
||||
```java
|
||||
String[] arr = {"a", "b", "c"};
|
||||
for (int a: arr) {
|
||||
for (String a: arr) {
|
||||
System.out.print(a + " ");
|
||||
}
|
||||
// 输出: a b c
|
||||
@@ -347,16 +350,16 @@ for (int a: arr) {
|
||||
### 二维数组 Multidimensional Arrays
|
||||
|
||||
```java
|
||||
int[][] matrix = { {1, 2, 3}, {4, 5} };
|
||||
int[][] matrix = {{1, 2, 3}, {4, 5}, {6}};
|
||||
int x = matrix[1][0]; // 4
|
||||
// [[1, 2, 3], [4, 5]]
|
||||
Arrays.deepToString(matrix)
|
||||
for (int i = 0; i < a.length; ++i) {
|
||||
for(int j = 0; j < a[i].length; ++j) {
|
||||
System.out.println(a[i][j]);
|
||||
}
|
||||
System.out.println(Arrays.deepToString(matrix));
|
||||
// 输出: [[1, 2, 3], [4, 5], [6]]
|
||||
for (int i = 0; i < matrix.length; ++i) {
|
||||
for(int j = 0; j < matrix[i].length; ++j) {
|
||||
System.out.println(matrix[i][j]);
|
||||
}
|
||||
}
|
||||
// 输出: 1 2 3 4 5 6 7
|
||||
// 输出: 1 2 3 4 5 6
|
||||
```
|
||||
|
||||
### 排序 Sort
|
||||
@@ -561,7 +564,7 @@ do {
|
||||
// 输出: 01234
|
||||
```
|
||||
|
||||
### 继续声明
|
||||
### 继续语句
|
||||
|
||||
```java
|
||||
for (int i = 0; i < 5; i++) {
|
||||
@@ -570,7 +573,7 @@ for (int i = 0; i < 5; i++) {
|
||||
}
|
||||
System.out.print(i);
|
||||
}
|
||||
// 输出: 01245
|
||||
// 输出: 0124
|
||||
```
|
||||
|
||||
### 中断语句
|
||||
@@ -585,6 +588,255 @@ for (int i = 0; i < 5; i++) {
|
||||
// 输出: 0123
|
||||
```
|
||||
|
||||
Java 面向对象
|
||||
---
|
||||
|
||||
### 类的定义
|
||||
|
||||
```java
|
||||
public class Dog {
|
||||
private String name;
|
||||
|
||||
// 构造方法无无返回值,方法名与类名相同
|
||||
// 一个类可以有多个构造方法
|
||||
// Java 默认提供一个无参构造方法(只有在没有显式定义任何构造方法时)
|
||||
public Dog() {
|
||||
}
|
||||
|
||||
public Dog(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### 类中的变量
|
||||
|
||||
```java
|
||||
public class Dog {
|
||||
// 成员变量
|
||||
private String name;
|
||||
|
||||
// 类变量
|
||||
// 多对象将会共享同一个类变量
|
||||
static int val = 10;
|
||||
|
||||
public void Say() {
|
||||
// 局部变量
|
||||
String sentence = "hello";
|
||||
System.out.println(sentence);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### 对象的创建
|
||||
|
||||
```java
|
||||
Dog myDog = new Dog(); // 调用无参构造函数
|
||||
Dog myDog2 = new Dog("aaa"); // 调用对应参数列表的构造函数
|
||||
|
||||
// 调用方法
|
||||
myDog.Say();
|
||||
```
|
||||
|
||||
### 对象的继承
|
||||
|
||||
```java
|
||||
public Animal {
|
||||
|
||||
public String name;
|
||||
|
||||
public Animal(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public void eat() {
|
||||
System.out.println("eat something");
|
||||
}
|
||||
}
|
||||
|
||||
// Dog类继承Animal类
|
||||
public Dog extends Animal {
|
||||
// 调用父类的构造函数
|
||||
public Dog(String name){
|
||||
super(name);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
请注意Java不支持多继承,只能够单继承,但支持多重继承
|
||||
即,一个类最多只有一个父类,但可以有爷爷类和太爷爷类
|
||||
|
||||
#### Java继承的特点
|
||||
|
||||
- 子类拥有父类中可访问的属性和方法(public、protected 以及同包访问权限的成员)
|
||||
- 子类可以有自己的属性、方法
|
||||
- 子类可以重写父类的方法
|
||||
|
||||
#### super 与 this
|
||||
|
||||
super引用当前类的父类
|
||||
this引用自身
|
||||
|
||||
```java
|
||||
class Animal {
|
||||
void eat() {
|
||||
System.out.println("animal : eat");
|
||||
}
|
||||
}
|
||||
|
||||
class Dog extends Animal {
|
||||
void eat() {
|
||||
System.out.println("dog : eat");
|
||||
}
|
||||
void eatTest() {
|
||||
this.eat(); // this 调用自己的方法
|
||||
super.eat(); // super 调用父类方法
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### final 关键字
|
||||
|
||||
被final 关键字修饰的类不能够被继承
|
||||
被final 关键字修饰的方法不能被子类重写
|
||||
|
||||
### Java的重写(Override)与重载(Overload)
|
||||
|
||||
#### 重写(Override)
|
||||
|
||||
重写者位于被重写者的子类中
|
||||
重写者的签名必须与被重写者的签名相同
|
||||
|
||||
```java
|
||||
class Animal {
|
||||
// 被重写者
|
||||
void say(String sentence) {
|
||||
System.out.println("Animal say: " + sentence);
|
||||
}
|
||||
}
|
||||
|
||||
class Dog extends Animal {
|
||||
// 重写者
|
||||
// 重写者位于被重写者的子类 重写一般需要添加 @Override 注解
|
||||
@Override
|
||||
void say(String sentence) { // 签名与被重写者相同
|
||||
System.out.println("Dog say: " + sentence);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### 重载(Overload)
|
||||
|
||||
重载位于同一类内部
|
||||
签名必须不同
|
||||
|
||||
```java
|
||||
public class Overloading {
|
||||
public int test(){
|
||||
System.out.println("test1");
|
||||
return 1;
|
||||
}
|
||||
|
||||
public void test(int a) {
|
||||
System.out.println("test2");
|
||||
}
|
||||
|
||||
//以下两个参数类型顺序不同
|
||||
public String test(int a,String s){
|
||||
System.out.println("test3");
|
||||
return "returntest3";
|
||||
}
|
||||
|
||||
public String test(String s,int a){
|
||||
System.out.println("test4");
|
||||
return "returntest4";
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Java 抽象类
|
||||
|
||||
抽象类不能被实例化为对象,因此,抽象类必须被继承才能够使用
|
||||
抽象类使用abstract 关键字进行修饰
|
||||
|
||||
```java
|
||||
public abstract class Animal {
|
||||
String name;
|
||||
|
||||
public Animal(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
}
|
||||
|
||||
public class Dog extends Animal {
|
||||
public Dog(String name) {
|
||||
super(name);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
使用abstract 关键字修饰的方法是抽象方法
|
||||
抽象方法必须包含在抽象类中
|
||||
子类必须重写父类中的所有抽象方法,除非子类也是抽象类
|
||||
|
||||
```java
|
||||
public abstract class Animal {
|
||||
String name;
|
||||
|
||||
public Animal(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public abstract void say();
|
||||
}
|
||||
|
||||
public class Dog extends Animal {
|
||||
public Dog(String name) {
|
||||
super(name);
|
||||
}
|
||||
|
||||
public void say(){
|
||||
System.out.println("Dog");
|
||||
}
|
||||
|
||||
}
|
||||
```
|
||||
|
||||
### Java 接口
|
||||
|
||||
#### 接口的定义
|
||||
|
||||
与类的继承不同,接口可以继承多个接口
|
||||
|
||||
```java
|
||||
[可见性修饰符] interface 接口名称 [extends 其他接口名列表] {
|
||||
// 声明变量
|
||||
// 抽象方法
|
||||
}
|
||||
```
|
||||
|
||||
#### 接口的实现
|
||||
|
||||
一个类可以实现多个接口
|
||||
类必须实现接口的所有方法,除非该类是抽象类
|
||||
|
||||
```java
|
||||
public interface Animal {
|
||||
public void eat();
|
||||
public void say();
|
||||
}
|
||||
|
||||
public class Dog implements Animal {
|
||||
public void eat() {
|
||||
System.out.println("Dog eat something");
|
||||
}
|
||||
|
||||
public void say() {
|
||||
System.out.println("Dog say something");
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Java 多线程
|
||||
---
|
||||
|
||||
@@ -629,7 +881,7 @@ public class ExtendsThread extends Thread {
|
||||
```java
|
||||
public static void main(String[] args) throws ExecutionException, InterruptedException {
|
||||
new Thread(new RunnableThread()).start();
|
||||
new ExtendsThread2().start();
|
||||
new ExtendsThread().start();
|
||||
FutureTask<Integer> integerFutureTask = new FutureTask<>(new CallableTask());
|
||||
integerFutureTask.run();
|
||||
}
|
||||
@@ -641,7 +893,7 @@ public static void main(String[] args) throws ExecutionException, InterruptedExc
|
||||
- corePoolSize: 核心线程数
|
||||
- maximumPoolSize: 最大线程数
|
||||
- keepAliveTime: 线程空闲时间
|
||||
- timeUni: 线程空闲时间单位
|
||||
- TimeUnit: 线程空闲时间单位
|
||||
- workQueue: 线程等待队列
|
||||
- threadFactory: 线程创建工厂
|
||||
- handler: 拒绝策略
|
||||
@@ -671,9 +923,13 @@ synchronized(obj) {
|
||||
...
|
||||
}
|
||||
|
||||
// (静态)方法
|
||||
public synchronized
|
||||
(static) void methodName() {
|
||||
// 实例方法同步
|
||||
public synchronized void methodName() {
|
||||
...
|
||||
}
|
||||
|
||||
// 静态方法同步
|
||||
public static synchronized void methodName() {
|
||||
...
|
||||
}
|
||||
```
|
||||
@@ -747,7 +1003,7 @@ try{
|
||||
condition.signal();
|
||||
condition.signalAll();
|
||||
} finally {
|
||||
lock.unlock
|
||||
lock.unlock();
|
||||
}
|
||||
|
||||
// LockSupport,可以先unpark,后续park不会阻塞线程
|
||||
@@ -773,7 +1029,7 @@ Java 框架搜集
|
||||
[CopyOnWriteArraySet](https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/CopyOnWriteArraySet.html) | Set | Y | _N_ | Y | _N_ | One `null`
|
||||
[ConcurrentSkipListSet](https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ConcurrentSkipListSet.html) | Set | Y | Y | Y | _N_ | _N_
|
||||
[HashMap](https://docs.oracle.com/javase/8/docs/api/java/util/HashMap.html) | Map | _N_ | _N_ | _N_ | _N (key)_ | One `null` _(key)_
|
||||
[HashTable](https://docs.oracle.com/javase/8/docs/api/java/util/Hashtable.html) | Map | _N_ | _N_ | Y | _N (key)_ | _N (key)_
|
||||
[Hashtable](https://docs.oracle.com/javase/8/docs/api/java/util/Hashtable.html) | Map | _N_ | _N_ | Y | _N (key)_ | _N (key)_
|
||||
[LinkedHashMap](https://docs.oracle.com/javase/8/docs/api/java/util/LinkedHashMap.html) | Map | Y | _N_ | _N_ | _N (key)_ | One `null` _(key)_
|
||||
[TreeMap](https://docs.oracle.com/javase/8/docs/api/java/util/TreeMap.html) | Map | Y | Y | _N_ | _N (key)_ | _N (key)_
|
||||
[ConcurrentHashMap](https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ConcurrentHashMap.html) | Map | _N_ | _N_ | Y | _N (key)_ | _N_
|
||||
@@ -802,7 +1058,7 @@ for (int i = 0; i < nums.size(); i++) {
|
||||
System.out.println(nums.get(i));
|
||||
}
|
||||
nums.remove(nums.size() - 1);
|
||||
nums.remove(0); // 非常慢
|
||||
nums.remove(0); // 较慢,因为需要移动后续元素
|
||||
for (Integer value : nums) {
|
||||
System.out.println(value);
|
||||
}
|
||||
@@ -955,11 +1211,11 @@ Java I/O流
|
||||
### 字节流
|
||||
|
||||
```java
|
||||
// 文件输入流
|
||||
// 文件输入流 (注意:需要手动关闭或使用 try-with-resources)
|
||||
InputStream inputStream
|
||||
= new FileInputStream("input.txt");
|
||||
|
||||
// 文件输出流
|
||||
// 文件输出流 (注意:需要手动关闭或使用 try-with-resources)
|
||||
OutputStream outputStream
|
||||
= new FileOutputStream("output.txt");
|
||||
|
||||
@@ -1244,8 +1500,8 @@ Class<?>[] interfaces = clazz.getInterfaces();
|
||||
<!--rehype:wrap-class=col-span-2-->
|
||||
|
||||
```java
|
||||
// 使用默认构造函数创建对象
|
||||
MyClass instance = (MyClass) clazz.newInstance();
|
||||
// 使用默认构造函数创建对象(注意:newInstance() 已废弃)
|
||||
MyClass instance = (MyClass) clazz.getDeclaredConstructor().newInstance();
|
||||
|
||||
// 使用带参数的构造函数创建对象
|
||||
Constructor<?> constructor = clazz.getConstructor(String.class, int.class);
|
||||
@@ -1344,7 +1600,11 @@ Consumer<String> test = System.out::println;
|
||||
```java
|
||||
Comparator<Integer> comparator = Math::max;
|
||||
|
||||
int result = comparator.compare(1, 2);
|
||||
int result = comparator.compare(1, 2);
|
||||
// 返回 -1
|
||||
|
||||
BinaryOperator<Integer> maxOperator = Math::max;
|
||||
int result = maxOperator.apply(1, 2);
|
||||
// 返回 2
|
||||
```
|
||||
|
||||
@@ -1352,8 +1612,8 @@ int result = comparator.compare(1, 2);
|
||||
|
||||
```java
|
||||
String str = "HELLO";
|
||||
|
||||
String lowerCase = str::toLowerCase;
|
||||
Supplier<String> lowerCaseSupplier = str::toLowerCase;
|
||||
String lowerCase = lowerCaseSupplier.get();
|
||||
// 返回 "hello"
|
||||
```
|
||||
|
||||
@@ -1362,7 +1622,7 @@ String lowerCase = str::toLowerCase;
|
||||
```java
|
||||
Supplier<String> supplier = String::new;
|
||||
|
||||
String str = supplier.get();
|
||||
String str = supplier.get();
|
||||
// 返回一个空字符串
|
||||
```
|
||||
|
||||
@@ -1372,8 +1632,8 @@ String str = supplier.get();
|
||||
Function<Integer, String[]> function = String[]::new;
|
||||
|
||||
|
||||
String[] array = function.apply(5);
|
||||
// 返回 5 个空字符串的数组
|
||||
String[] array = function.apply(5);
|
||||
// 返回长度为 5 的空字符串数组
|
||||
```
|
||||
<!--rehype:className=wrap-text-->
|
||||
|
||||
@@ -1382,7 +1642,8 @@ String[] array = function.apply(5);
|
||||
```java
|
||||
String someStr = "HELLO";
|
||||
|
||||
String lowerCase = someStr::toLowerCase;
|
||||
Supplier<String> lowerCaseSupplier = someStr::toLowerCase;
|
||||
String lowerCase = lowerCaseSupplier.get();
|
||||
// 返回 "hello"
|
||||
```
|
||||
|
||||
@@ -1391,7 +1652,8 @@ String lowerCase = someStr::toLowerCase;
|
||||
```java
|
||||
SomeClass someObject = new SomeClass();
|
||||
|
||||
int result = someObject::staticMethod;
|
||||
Supplier<Integer> methodSupplier = someObject::staticMethod;
|
||||
int result = methodSupplier.get();
|
||||
// 调用静态方法
|
||||
```
|
||||
|
||||
@@ -1501,7 +1763,7 @@ text.split(Pattern.quote("|"));
|
||||
:-|:-
|
||||
`Math.max(a,b)` | `a` 和 `b` 的最大值
|
||||
`Math.min(a,b)` | `a` 和 `b` 的最小值
|
||||
`Math.abs(a)` | 绝对值
|
||||
`Math.abs(a)` | `a` 的绝对值
|
||||
`Math.sqrt(a)` | `a` 的平方根
|
||||
`Math.pow(a,b)` | `b` 的幂
|
||||
`Math.round(a)` | 最接近的整数
|
||||
@@ -1510,8 +1772,8 @@ text.split(Pattern.quote("|"));
|
||||
`Math.tan(ang)` | `ang` 的切线
|
||||
`Math.asin(ang)` | `ang` 的反正弦
|
||||
`Math.log(a)` | `a` 的自然对数
|
||||
`Math.toDegrees(rad)` | 以度为单位的角度弧度
|
||||
`Math.toRadians(deg)` | 以弧度为单位的角度度
|
||||
`Math.toDegrees(rad)` | 弧度转角度
|
||||
`Math.toRadians(deg)` | 角度转弧度
|
||||
|
||||
### 异常 Try/Catch/Finally
|
||||
|
||||
@@ -1519,9 +1781,12 @@ text.split(Pattern.quote("|"));
|
||||
try {
|
||||
// something
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
// 建议使用日志框架记录异常
|
||||
logger.error("发生异常", e);
|
||||
// 或者至少使用标准错误流
|
||||
// e.printStackTrace();
|
||||
} finally {
|
||||
System.out.println("always printed");
|
||||
System.out.println("总是执行");
|
||||
}
|
||||
```
|
||||
|
||||
@@ -1529,7 +1794,7 @@ try {
|
||||
<!--rehype:wrap-class=row-span-2-->
|
||||
|
||||
- `ArrayDeque`: 可调整大小的数组双端队列,实现了Deque接口
|
||||
- `Arrays`: 提供静态工厂,允许将数组视为列表
|
||||
- `Arrays`: 提供操作数组的静态方法,如排序、搜索、比较等
|
||||
- `Collections`: 包含操作集合或返回集合的静态方法
|
||||
- `Date`: 表示特定时间瞬间,精度为毫秒
|
||||
- `Dictionary`: 抽象父类,可用于键值对映射,例如Hashtable
|
||||
@@ -1558,6 +1823,118 @@ int frequency = Collections
|
||||
.frequency(list, 2); // frequency = 2
|
||||
```
|
||||
|
||||
操纵数据库
|
||||
----
|
||||
|
||||
### JDBC
|
||||
|
||||
```java
|
||||
String url = "jdbc:mysql://localhost:3306/test?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=UTC";
|
||||
String user = "root";
|
||||
String password = "123456";
|
||||
String sql = "SELECT 1 as a, '2' as b";
|
||||
String preparedSql = "SELECT * FROM t_user WHERE id = ?";
|
||||
|
||||
Connection conn = null;
|
||||
Statement sm = null;
|
||||
ResultSet rs = null;
|
||||
try {
|
||||
// 1.注册驱动
|
||||
Class.forName("com.mysql.cj.jdbc.Driver");
|
||||
} catch (ClassNotFoundException e) {
|
||||
// 驱动找不到
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
// 2.建立连接
|
||||
try (Connection connection = DriverManager.getConnection(url, user, password)) {
|
||||
|
||||
conn = connection;
|
||||
|
||||
// 3.创建Statement对象
|
||||
try (Statement statement = connection.createStatement()) {
|
||||
|
||||
sm = statement;
|
||||
|
||||
// 4.执行SQL语句
|
||||
try (ResultSet resultSet = statement.executeQuery(sql)) {
|
||||
|
||||
rs = resultSet;
|
||||
|
||||
// 5.处理结果集
|
||||
while (resultSet.next()) {
|
||||
// 按照列名取值
|
||||
System.out.println(resultSet.getLong("a"));
|
||||
// 按照索引取值
|
||||
System.out.println(resultSet.getString(2));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 3.创建PreparedStatement对象
|
||||
try (PreparedStatement preparedStatement = connection.prepareStatement(preparedSql)) {
|
||||
|
||||
sm = preparedStatement;
|
||||
|
||||
preparedStatement.setLong(1, 1_000L);
|
||||
// 4.执行SQL语句
|
||||
try (ResultSet resultSet = preparedStatement.executeQuery()) {
|
||||
|
||||
rs = resultSet;
|
||||
|
||||
// 5.处理结果集
|
||||
while (resultSet.next()) {
|
||||
System.out.println(resultSet.getLong("id"));
|
||||
System.out.println(resultSet.getString(2));
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (SQLException e) {
|
||||
// 数据库异常
|
||||
throw new RuntimeException(e);
|
||||
} finally {
|
||||
// 6.关闭资源
|
||||
// 上面的try块里已经自动关闭,否则(JDK 7以前)按照以下顺序关闭
|
||||
// 先打开的后关闭,后打开的先关闭
|
||||
if (null != rs) {
|
||||
try {
|
||||
rs.close();
|
||||
} catch (SQLException ignored) {
|
||||
}
|
||||
}
|
||||
|
||||
if (null != sm) {
|
||||
try {
|
||||
sm.close();
|
||||
} catch (SQLException ignored) {
|
||||
}
|
||||
}
|
||||
|
||||
if (null != conn) {
|
||||
try {
|
||||
conn.close();
|
||||
} catch (SQLException ignored) {
|
||||
}
|
||||
}
|
||||
|
||||
// 也可以直接工具类, 注意顺序
|
||||
IOUtils.close(rs);
|
||||
IOUtils.close(sm);
|
||||
IOUtils.close(conn);
|
||||
}
|
||||
```
|
||||
|
||||
### JDBC注册驱动
|
||||
|
||||
```java
|
||||
Class.forName("com.mysql.cj.jdbc.Driver");
|
||||
|
||||
DriverManager.registerDriver(new org.postgresql.Driver());
|
||||
|
||||
// 支持多个同时注册
|
||||
System.setProperty("jdbc.drivers", "com.mysql.cj.jdbc.Driver:org.postgresql.Driver");
|
||||
```
|
||||
|
||||
另见
|
||||
---
|
||||
|
||||
|
||||
@@ -315,7 +315,7 @@ if (isMailSent) {
|
||||
```javascript
|
||||
var age = 1;
|
||||
|
||||
// => true
|
||||
// => false
|
||||
var status = (age >= 18) ? true : false;
|
||||
```
|
||||
|
||||
@@ -886,7 +886,6 @@ for (let index in fruits) {
|
||||
```
|
||||
|
||||
### label 语句
|
||||
<!--rehype:wrap-class= row-span-2-->
|
||||
|
||||
```js
|
||||
var num = 0;
|
||||
@@ -916,10 +915,16 @@ for (let fruit of fruits) {
|
||||
// => apple
|
||||
// => orange
|
||||
// => banana
|
||||
|
||||
for (let [index, value] of fruits.entries()) {
|
||||
console.log(index, value);
|
||||
}
|
||||
// => 0 apple
|
||||
// => 1 orange
|
||||
// => 2 banana
|
||||
```
|
||||
|
||||
### for await...of
|
||||
<!--rehype:wrap-class= row-span-2-->
|
||||
|
||||
```javascript
|
||||
async function* asyncGenerator() {
|
||||
|
||||
124
docs/json.md
@@ -27,8 +27,8 @@ JSON 备忘清单
|
||||
"salary": 70000,
|
||||
"married": true,
|
||||
"children": [
|
||||
{"name": "Tom", "age": 9, "gender":"M"},
|
||||
{"name": "Ava", "age": 7, "gender":"F"}
|
||||
{"name": "Tom", "age": 9},
|
||||
{"name": "Ava", "age": 7}
|
||||
]
|
||||
}
|
||||
```
|
||||
@@ -66,7 +66,7 @@ JSON 备忘清单
|
||||
{
|
||||
"url": "https://jaywcjlove.github.io",
|
||||
"msg" : "Hi,\n\"Quick Reference\"",
|
||||
"intro": "Share quick reference and cheat sheet for developers."
|
||||
"intro": "为开发人员分享快速参考和备忘单"
|
||||
}
|
||||
```
|
||||
|
||||
@@ -198,6 +198,124 @@ Have to be delimited by double quotes
|
||||
}
|
||||
```
|
||||
|
||||
JSON 5
|
||||
----
|
||||
|
||||
### Objects
|
||||
|
||||
对象键可以是 ECMAScript 5.1 [IdentifierName](https://www.ecma-international.org/ecma-262/5.1/#sec-7.6)
|
||||
|
||||
```json
|
||||
{
|
||||
width: 1920,
|
||||
height: 1080,
|
||||
}
|
||||
```
|
||||
|
||||
数组可以有一个尾随逗号
|
||||
|
||||
```json
|
||||
[
|
||||
1,
|
||||
true,
|
||||
'three',
|
||||
]
|
||||
```
|
||||
|
||||
### 允许单行和多行注释
|
||||
|
||||
```js
|
||||
{
|
||||
// 一行注释
|
||||
"name": "Kenny"
|
||||
}
|
||||
```
|
||||
|
||||
多行注释
|
||||
|
||||
```js
|
||||
{
|
||||
/* 这是一个
|
||||
多行注释 */
|
||||
"name": "Kenny"
|
||||
}
|
||||
```
|
||||
|
||||
### 允许附加空白字符
|
||||
|
||||
代码点 | 描述
|
||||
:-- | ---
|
||||
`U+0009` | 水平制表符
|
||||
`U+000A` | 换行符
|
||||
`U+000B` | 垂直制表符
|
||||
`U+000C` | 换页符
|
||||
`U+000D` | 回车符
|
||||
`U+0020` | 空格
|
||||
`U+00A0` | 不间断空格
|
||||
`U+2028` | 行分隔符
|
||||
`U+2029` | 段落分隔符
|
||||
`U+FEFF` | 字节顺序标记
|
||||
Unicode Zs 类别 | 空格分隔符 Unicode 类别中的任何其他字符
|
||||
<!--rehype:className=left-align-->
|
||||
|
||||
### 数字
|
||||
|
||||
数字可能有前导或尾随小数点
|
||||
|
||||
```json
|
||||
{
|
||||
integer: 123,
|
||||
withFractionPart: 123.456,
|
||||
onlyFractionPart: .456,
|
||||
withExponent: 123e-456,
|
||||
}
|
||||
```
|
||||
|
||||
数字可以是十六进制
|
||||
|
||||
```json
|
||||
{
|
||||
positiveHex: 0xdecaf,
|
||||
negativeHex: -0xC0FFEE,
|
||||
}
|
||||
```
|
||||
|
||||
数字可以是正无穷大、负无穷大和 NaN。
|
||||
|
||||
```json
|
||||
{
|
||||
positiveInfinity: Infinity,
|
||||
negativeInfinity: -Infinity,
|
||||
notANumber: NaN,
|
||||
}
|
||||
```
|
||||
|
||||
数字可以以明确的加号开头
|
||||
|
||||
### 字符串
|
||||
<!--rehype:wrap-class=col-span-2-->
|
||||
|
||||
```js
|
||||
'Lorem ipsum dolor sit amet, \
|
||||
consectetur adipiscing elit.'
|
||||
```
|
||||
|
||||
以下是代表相同的意思
|
||||
|
||||
```js
|
||||
'Lorem ipsum dolor sit amet, consectetur adipiscing elit.'
|
||||
```
|
||||
|
||||
```json
|
||||
'\A\C\/\D\C'
|
||||
```
|
||||
|
||||
以下是代表相同的意思
|
||||
|
||||
```json
|
||||
'AC/DC'
|
||||
```
|
||||
|
||||
在 JavaScript 中访问 JSON
|
||||
----
|
||||
|
||||
|
||||
149
docs/jupyter.md
Normal file
@@ -0,0 +1,149 @@
|
||||
Jupyter 备忘清单
|
||||
===
|
||||
|
||||
Jupyter 备忘清单是 [Jupyter](http://jupyter.org) 编程工具的单页参考表
|
||||
|
||||
入门
|
||||
----
|
||||
|
||||
### Jupyter 简介
|
||||
|
||||
Jupyter(/ˈdʒuːpɪtər/)是一个非营利组织,致力于为多种编程语言的交互式计算开发开源软件、开放标准和服务。Jupyter 于 2014 年由 Fernando Pérez 从 `IPython` 衍生出来,支持几十种编程语言的执行环境。Jupyter 项目主要开发并支持 `Jupyter Notebook`(.ipynb 文件格式)、`JupyterHub` 和 `JupyterLab` 等交互式计算产品。
|
||||
|
||||
### 安装 Jupyter
|
||||
|
||||
安装 Jupyter 可以通过 pip 或 conda 来完成。
|
||||
|
||||
`pip install jupyter` or `conda install jupyter`
|
||||
|
||||
mamba 安装
|
||||
|
||||
`mamba install -c conda-forge jupyterlab`
|
||||
|
||||
### 启动 Jupyter Notebook
|
||||
|
||||
在命令行中输入
|
||||
|
||||
`jupyter notebook`
|
||||
|
||||
`jupyter lab` (如果使用 `Jupyter Lab`)来启动服务。
|
||||
|
||||
### 创建新的 Notebook
|
||||
<!--rehype:wrap-class=col-span-2-->
|
||||
|
||||
- 打开浏览器,访问本地服务器地址(通常是 <http://localhost:8888/tree> or <http://localhost:8888/lab/tree> )
|
||||
- 右击文件夹,选择 `New` -> `Python 3` (或你安装的其他内核)。
|
||||
- 保存 `Notebook`
|
||||
- 使用菜单栏中的 `File` -> `Save and Checkpoint` 或者按快捷键 Ctrl+S (Cmd+S on Mac)。
|
||||
|
||||
### 关闭 Notebook
|
||||
|
||||
使用菜单栏中的 `File` -> `Close and Halt`。
|
||||
|
||||
Jupyter Notebook 快捷键
|
||||
---
|
||||
|
||||
### 命令模式 (按键 Esc 开启)
|
||||
|
||||
| 按键 | 操作 |
|
||||
| ----------- | ---------------------------- |
|
||||
| `Enter` | 转入编辑模式 |
|
||||
| `Shift` `Enter` | 运行本单元,选中下个单元 |
|
||||
| `Ctrl` `Enter` | 运行本单元 |
|
||||
| `Alt` `Enter` | 运行本单元,在其下插入新单元 |
|
||||
| `y` | 单元转入代码状态 |
|
||||
| `m` | 单元转入markdown状态 |
|
||||
| `R` | 单元转入raw状态 |
|
||||
| `1` | 设定 1 级标题 |
|
||||
| `2` | 设定 2 级标题 |
|
||||
| `3` | 设定 3 级标题 |
|
||||
| `4` | 设定 4 级标题 |
|
||||
| `5` | 设定 5 级标题 |
|
||||
| `6` | 设定 6 级标题 |
|
||||
| `Up` | 选中上方单元 |
|
||||
| `k` | 选中上方单元 |
|
||||
| `Down` | 选中下方单元 |
|
||||
| `j` | 选中下方单元 |
|
||||
| `Shift` `K` | 扩大选中上方单元 |
|
||||
| `Shift` `J` | 扩大选中下方单元 |
|
||||
| `a` | 在上方插入新单元 |
|
||||
| `b` | 在下方插入新单元 |
|
||||
| `x` | 剪切选中的单元 |
|
||||
| `c` | 复制选中的单元 |
|
||||
| `Shift` `V` | 粘贴到上方单元 |
|
||||
| `zz` | 恢复删除的最后一个单元 |
|
||||
| `dd` | 删除选中的单元 |
|
||||
| `Shift` `M` | 合并选中的单元 |
|
||||
| `Ctrl` `S` | 文件存盘 |
|
||||
| `L` | 转换行号 |
|
||||
| `O` | 转换输出 |
|
||||
| `Shift` `O` | 转换输出滚动 |
|
||||
| `Esc` | 关闭页面 |
|
||||
| `Q` | 关闭页面 |
|
||||
| `H` | 显示快捷键帮助 |
|
||||
| `0,0` | 重启Notebook内核 |
|
||||
| `I,I` | 中断Notebook内核 |
|
||||
| `Shift` | 忽略 |
|
||||
| `Shift` `Space` | 向上滚动 |
|
||||
| `Space` | 向下滚动 |
|
||||
<!--rehype:className=shortcuts-->
|
||||
|
||||
### 编辑模式 ( Enter 键启动)
|
||||
|
||||
| 按键 | 操作 |
|
||||
| ------------------- | ---------------------------- |
|
||||
| `Tab` | 代码补全或缩进 |
|
||||
| `Shift` `Tab` | 提示 |
|
||||
| `Ctrl` `]` | 缩进 |
|
||||
| `Ctrl` `[` | 解除缩进 |
|
||||
| `Ctrl` `A` | 全选 |
|
||||
| `Ctrl` `Z` | 复原 |
|
||||
| `Ctrl` `Shift` `Z` | 再做 |
|
||||
| `Ctrl` `Y` | 再做 |
|
||||
| `Ctrl` `Home` | 跳到单元开头 |
|
||||
| `Ctrl` `Up` | 跳到单元开头 |
|
||||
| `Ctrl` `End` | 跳到单元末尾 |
|
||||
| `Ctrl` `Down` | 跳到单元末尾 |
|
||||
| `Ctrl` `Left` | 跳到左边一个字首 |
|
||||
| `Ctrl` `Right` | 跳到右边一个字首 |
|
||||
| `Ctrl` `Backspace` | 删除前面一个字 |
|
||||
| `Ctrl` `Delete` | 删除后面一个字 |
|
||||
| `Esc` | 进入命令模式 |
|
||||
| `Ctrl` `M` | 进入命令模式 |
|
||||
| `Shift` `Enter` | 运行本单元,选中下一单元 |
|
||||
| `Ctrl` `Enter` | 运行本单元 |
|
||||
| `Alt` `Enter` | 运行本单元,在下面插入一单元 |
|
||||
| `Ctrl` `Shift` `-` | 分割单元 |
|
||||
| `Ctrl` `Shift` `Subtract` | 分割单元 |
|
||||
| `Ctrl` `S` | 文件存盘 |
|
||||
| `Shift` | 忽略 |
|
||||
| `Up` | 光标上移或转入上一单元 |
|
||||
| `Down` | 光标下移或转入下一单元 |
|
||||
<!--rehype:className=shortcuts-->
|
||||
|
||||
高级功能
|
||||
---
|
||||
|
||||
### 魔法命令
|
||||
|
||||
`Jupyter Notebook` 支持一系列以 `%` 或 `%%`开头的魔法命令,这些命令可以提供特殊功能。例如,`%matplotlib inline` 可以在 `Notebook` 中内嵌绘图;`%%time` 可以测量代码执行时间。
|
||||
|
||||
调用 `python` 文件,可以使用 `%run` 命令来调用 `python` 文件。例如,`%run my_script.py` 可以运行当前目录下名为 `my_script.py` 的 python 文件。
|
||||
|
||||
### 环境管理
|
||||
|
||||
`Jupyter Notebook` 支持使用虚拟环境来隔离不同的项目依赖。你可以使用 `conda` 或 `venv`(`Python 3` 自带的虚拟环境管理工具)来创建和管理虚拟环境,并在 `Notebook` 中选择使用哪个环境。
|
||||
|
||||
### 扩展插件
|
||||
|
||||
`JupyterLab` 支持通过安装扩展插件来增强功能。你可以通过 `JupyterLab` 的扩展管理器搜索和安装扩展插件,例如代码格式化、主题更改、`Git` 集成等。
|
||||
|
||||
Jupyter 资源
|
||||
---
|
||||
|
||||
### 参考资料
|
||||
|
||||
- [Jupyter 官方文档](https://docs.jupyter.org/)
|
||||
- [Jupyter 社区](https://jupyter.org/)
|
||||
- [Jupyter github](https://github.com/jupyter/jupyter)
|
||||
- [Jupyterlab github](https://github.com/jupyterlab/jupyterlab)
|
||||
@@ -217,10 +217,10 @@ if (age < 18 ) {
|
||||
} else if (age < 60) {
|
||||
println("您被视为成年人")
|
||||
} else {
|
||||
println("你被认为是高级")
|
||||
println("您被视为老年人")
|
||||
}
|
||||
|
||||
// 打印: 你被认为是高级
|
||||
// 打印: 您被视为老年人
|
||||
```
|
||||
|
||||
### 比较运算符
|
||||
|
||||
@@ -11,17 +11,18 @@ LaTeX 备忘清单
|
||||
[LaTeX](https://www.latex-project.org/) 基于 TEX 的排版系统,适用于生成高印刷质量的科技和数学、物理文档。
|
||||
|
||||
- [LaTeX 官网](https://www.latex-project.org/) _(latex-project.org)_
|
||||
- [KaTeX 官网](https://katex.org/) _(katex.org)_
|
||||
|
||||
而 [KaTeX](https://katex.org/) 只处理 LaTeX 的数学符号的一个更小的子集,用于 web 上展示
|
||||
|
||||
- [KaTeX 官网](https://katex.org/) _(katex.org)_
|
||||
|
||||
### 示例
|
||||
|
||||
```KaTeX
|
||||
% \f is defined as #1f(#2) using the macro
|
||||
f\relax(x) = \int_{-\infty}^\infty
|
||||
f\hat\xi\,e^{2 \pi i \xi x}
|
||||
\,d\xi
|
||||
\,\mathrm{d}\xi
|
||||
```
|
||||
|
||||
---
|
||||
@@ -30,7 +31,7 @@ f\relax(x) = \int_{-\infty}^\infty
|
||||
% \f is defined as #1f(#2) using the macro
|
||||
f\relax(x) = \int_{-\infty}^\infty
|
||||
f\hat\xi\,e^{2 \pi i \xi x}
|
||||
\,d\xi
|
||||
\,\mathrm{d}\xi
|
||||
```
|
||||
|
||||
### 行内展示
|
||||
@@ -42,10 +43,10 @@ f\relax(x) = \int_{-\infty}^\infty
|
||||
|
||||
基于 KaTeX 在一行展示示例: `KaTeX:\int_0^\infty x^2 dx`
|
||||
|
||||
Supported Functions
|
||||
支持的语法
|
||||
---
|
||||
|
||||
### Accents
|
||||
### 标注符号
|
||||
<!--rehype:wrap-class=col-span-2 row-span-2-->
|
||||
|
||||
:- | :- | :-
|
||||
@@ -74,7 +75,7 @@ Supported Functions
|
||||
`KaTeX:\^{a}` <pur>`\^{a}`</pur> | `KaTeX:\u{a}` <pur>`\u{a}`</pur> |
|
||||
`KaTeX:\r{a}` <pur>`\r{a}`</pur> |
|
||||
|
||||
### Delimiter Sizing
|
||||
### 定界符大小调整
|
||||
|
||||
:- | :-
|
||||
:- | :-
|
||||
@@ -90,7 +91,7 @@ Supported Functions
|
||||
`\right` | `\bigg` | `\biggl` | `\biggm` | `\biggr`
|
||||
`\` | `\Bigg` | `\Biggl` | `\Biggm` | `\Biggr`
|
||||
|
||||
### 希腊和希伯来字母 Greek and Hebrew letters
|
||||
### 希腊和希伯来字母
|
||||
<!--rehype:wrap-class=col-span-3-->
|
||||
|
||||
预览 | 方法 | 预览 | 方法 | 预览 | 方法 | 预览| 方法 | 预览 | 方法 | 预览 | 方法
|
||||
@@ -193,7 +194,7 @@ Supported Functions
|
||||
\sum_{\mathclap{1\le i\le j\le n}} x_{ij}
|
||||
```
|
||||
|
||||
### `KaTex:\LaTeX` math constructs
|
||||
### `KaTex:\LaTeX` 数学结构
|
||||
<!--rehype:wrap-class=col-span-3-->
|
||||
|
||||
预览 | 方法 | 预览 | 方法 | 预览 | 方法
|
||||
@@ -203,7 +204,7 @@ Supported Functions
|
||||
| `KaTex:\sqrt{abc}` | <pur>`\sqrt{abc}`</pur> | `KaTex:\widehat{abc}` | <pur>`\widehat{abc}`</pur> | `KaTex:\overbrace{abc}` | <pur>`\overbrace{abc}`</pur> |
|
||||
| `KaTex:\sqrt[n]{abc}` | <pur>`\sqrt[n]{abc}`</pur> | `KaTex:\widetilde{abc}` | <pur>`\widetilde{abc}`</pur> | `KaTex:\underbrace{abc}` | <pur>`\underbrace{abc}`</pur> |
|
||||
|
||||
### 分隔符 Delimiters
|
||||
### 分隔符
|
||||
<!--rehype:wrap-class=col-span-3-->
|
||||
|
||||
预览 | 方法 | 预览 | 方法 | 预览 | 方法 | 预览| 方法 | 预览 | 方法
|
||||
@@ -547,10 +548,10 @@ Supported Functions
|
||||
`KaTex:\circledS` | <pur>`\circledS`</pur> | `KaTex:\spadesuit` | <pur>`\spadesuit`</pur> | `KaTex:\spades` | <pur>`\spades`</pur> |
|
||||
`KaTex:\text{\textcircled a}` | <pur>`\text{\textcircled a}`</pur> | `KaTex:\maltese` | <pur>`\maltese`</pur> | `KaTex:\minuso` | <pur>`\minuso`</pur> |
|
||||
|
||||
Environments
|
||||
环境
|
||||
---
|
||||
|
||||
### Environments 1
|
||||
### 环境 1
|
||||
<!--rehype:body-style=display: flex;flex-direction: row;justify-content: flex-start;-->
|
||||
|
||||
```KaTeX
|
||||
@@ -569,7 +570,7 @@ Environments
|
||||
```
|
||||
<!--rehype:style=flex:1;-->
|
||||
|
||||
### Environments 2
|
||||
### 环境 2
|
||||
<!--rehype:body-style=display: flex;flex-direction: row;justify-content: flex-start;-->
|
||||
|
||||
```KaTeX
|
||||
@@ -587,7 +588,7 @@ Environments
|
||||
\end{array}
|
||||
```
|
||||
|
||||
### Environments 3
|
||||
### 环境 3
|
||||
<!--rehype:body-style=display: flex;flex-direction: row;justify-content: flex-start;-->
|
||||
|
||||
```KaTeX
|
||||
@@ -606,7 +607,7 @@ Environments
|
||||
```
|
||||
<!--rehype:style=flex:1;-->
|
||||
|
||||
### Environments 4
|
||||
### 环境 4
|
||||
<!--rehype:body-style=display: flex;flex-direction: row;justify-content: flex-start;-->
|
||||
|
||||
```KaTeX
|
||||
@@ -623,7 +624,7 @@ Environments
|
||||
\end{bmatrix}
|
||||
```
|
||||
|
||||
### Environments 5
|
||||
### 环境 5
|
||||
<!--rehype:body-style=display: flex;flex-direction: row;justify-content: flex-start;-->
|
||||
|
||||
```KaTeX
|
||||
@@ -642,7 +643,7 @@ Environments
|
||||
```
|
||||
<!--rehype:style=flex:1;-->
|
||||
|
||||
### Environments 6
|
||||
### 环境 6
|
||||
<!--rehype:body-style=display: flex;flex-direction: row;justify-content: flex-start;-->
|
||||
|
||||
```KaTeX
|
||||
@@ -661,7 +662,7 @@ Environments
|
||||
```
|
||||
<!--rehype:style=flex:1;-->
|
||||
|
||||
### Environments 7
|
||||
### 环境 7
|
||||
<!--rehype:body-style=display: flex;flex-direction: row;justify-content: flex-start;-->
|
||||
|
||||
```KaTeX
|
||||
@@ -678,7 +679,7 @@ Environments
|
||||
\end{Bmatrix}
|
||||
```
|
||||
|
||||
### Environments 8
|
||||
### 环境 8
|
||||
<!--rehype:body-style=display: flex;flex-direction: row;justify-content: flex-start;-->
|
||||
|
||||
```KaTeX
|
||||
@@ -702,7 +703,7 @@ Environments
|
||||
\end{array}
|
||||
```
|
||||
|
||||
### Environments 9
|
||||
### 环境 9
|
||||
<!--rehype:body-style=display: flex;flex-direction: row;justify-content: flex-start;-->
|
||||
|
||||
```KaTeX
|
||||
@@ -719,7 +720,7 @@ x = \begin{cases}
|
||||
\end{cases}
|
||||
```
|
||||
|
||||
### Environments 10
|
||||
### 环境 10
|
||||
<!--rehype:body-style=display: flex;flex-direction: row;justify-content: flex-start;-->
|
||||
|
||||
```KaTeX
|
||||
@@ -736,7 +737,7 @@ x = \begin{cases}
|
||||
\end{rcases}⇒…
|
||||
```
|
||||
|
||||
### Environments 11
|
||||
### 环境 11
|
||||
<!--rehype:body-style=display: flex;flex-direction: row;justify-content: flex-start;-->
|
||||
|
||||
```KaTeX
|
||||
@@ -754,7 +755,7 @@ x = \begin{cases}
|
||||
\end{smallmatrix}
|
||||
```
|
||||
|
||||
### Environments 12
|
||||
### 环境 12
|
||||
<!--rehype:body-style=display: flex;flex-direction: row;justify-content: flex-start;-->
|
||||
|
||||
```KaTeX
|
||||
@@ -774,7 +775,7 @@ x = \begin{cases}
|
||||
\end{subarray}}
|
||||
```
|
||||
|
||||
### Environments 13
|
||||
### 环境 13
|
||||
<!--rehype:body-style=display: flex;flex-direction: row;justify-content: flex-start;-->
|
||||
|
||||
```KaTeX
|
||||
@@ -794,7 +795,7 @@ x = \begin{cases}
|
||||
\end{equation}
|
||||
```
|
||||
|
||||
### Environments 14
|
||||
### 环境 14
|
||||
<!--rehype:body-style=display: flex;flex-direction: row;justify-content: flex-start;-->
|
||||
|
||||
```KaTeX
|
||||
@@ -812,7 +813,7 @@ x = \begin{cases}
|
||||
\end{align}
|
||||
```
|
||||
|
||||
### Environments 15
|
||||
### 环境 15
|
||||
<!--rehype:body-style=display: flex;flex-direction: row;justify-content: flex-start;-->
|
||||
|
||||
```KaTeX
|
||||
@@ -830,7 +831,7 @@ x = \begin{cases}
|
||||
\end{gather}
|
||||
```
|
||||
|
||||
### Environments 16
|
||||
### 环境 16
|
||||
<!--rehype:body-style=display: flex;flex-direction: row;justify-content: flex-start;-->
|
||||
|
||||
```KaTeX
|
||||
@@ -848,7 +849,7 @@ x = \begin{cases}
|
||||
\end{alignat}
|
||||
```
|
||||
|
||||
### Environments 17
|
||||
### 环境 17
|
||||
<!--rehype:body-style=display: flex;flex-direction: row;justify-content: flex-start;-->
|
||||
|
||||
```KaTeX
|
||||
@@ -881,7 +882,7 @@ x = \begin{cases}
|
||||
`KaTex:\colorbox{aqua}{$F=ma$}` | <pur>`\colorbox{aqua}{$F=ma$}`</pur>
|
||||
`KaTex:\fcolorbox{red}{aqua}{$F=ma$}` | <pur>`\fcolorbox{red}{aqua}{$F=ma$}`</pur>
|
||||
|
||||
### Font 字体
|
||||
### 字体
|
||||
<!--rehype:wrap-class=col-span-2-->
|
||||
|
||||
:- | :- | :- | :- | :- | :-
|
||||
@@ -892,7 +893,7 @@ x = \begin{cases}
|
||||
`KaTex:\Large AB` | <pur>`\Large AB`</pur> | `KaTex:\Large AB` | <pur>`\Large AB`</pur> | `KaTex:\scriptsize AB` | <pur>\scriptsize AB</pur>
|
||||
`KaTex:\large AB` | <pur>`\large AB`</pur> | `KaTex:\large AB` | <pur>`\large AB`</pur> | `KaTex:\tiny AB` | <pur>\tiny AB</pur>
|
||||
|
||||
### Style 样式
|
||||
### 样式
|
||||
<!--rehype:wrap-class=col-span-3-->
|
||||
|
||||
:- | :- | :- | :-
|
||||
|
||||
539
docs/leaf.md
Normal file
@@ -0,0 +1,539 @@
|
||||
Leaf 备忘清单
|
||||
====
|
||||
|
||||
[Leaf](https://github.com/vapor/leaf) 是 [Vapor](https://github.com/vapor/vapor) 的轻量级模板引擎,用于在服务端生成动态 HTML 页面。
|
||||
|
||||
入门
|
||||
----
|
||||
|
||||
### Leaf
|
||||
|
||||
`Leaf` 是一种强大的模板语言,其语法受 `Swift` 启发。
|
||||
|
||||
- [Leaf 模板语言官方文档](https://docs.vapor.codes/zh/leaf/getting-started/) _(vapor.codes)_
|
||||
- [**LeafKit**:Swift 模板引擎库](https://github.com/vapor/leaf-kit) _(github.com)_
|
||||
- [**Leaf**:LeafKit 的 Vapor 集成模板系统](https://github.com/vapor/leaf) _(github.com)_
|
||||
|
||||
### Package
|
||||
<!--rehype:wrap-class=col-span-2-->
|
||||
|
||||
```swift
|
||||
// swift-tools-version:5.2
|
||||
import PackageDescription
|
||||
|
||||
let package = Package(
|
||||
name: "MyApp",
|
||||
platforms: [ .macOS(.v10_15) ],
|
||||
dependencies: [ /// 添加其它依赖
|
||||
.package(url: "https://github.com/vapor/leaf.git", from: "4.0.0"),
|
||||
],
|
||||
targets: [
|
||||
.target(name: "App", dependencies: [ .product(name: "Leaf", package: "leaf") ]),
|
||||
]
|
||||
)
|
||||
```
|
||||
|
||||
### 配置
|
||||
|
||||
```swift
|
||||
import Vapor
|
||||
import Leaf
|
||||
```
|
||||
|
||||
设置工作目录
|
||||
|
||||
```swift
|
||||
app.directory.workingDirectory = "...."
|
||||
```
|
||||
|
||||
设置模板目录
|
||||
|
||||
```swift
|
||||
app.directory.viewsDirectory = "...."
|
||||
```
|
||||
|
||||
设置模板引擎
|
||||
|
||||
```swift
|
||||
app.views.use(.leaf)
|
||||
```
|
||||
|
||||
配置自定义标签
|
||||
|
||||
```swift
|
||||
app.leaf.tags["relative"] = CustomTag()
|
||||
```
|
||||
|
||||
### 目录结构
|
||||
|
||||
```
|
||||
VaporApp
|
||||
├── Package.swift
|
||||
├── Resources
|
||||
│ ├── Views
|
||||
│ │ └── hello.leaf
|
||||
├── Public
|
||||
│ ├── images (images 资源)
|
||||
│ ├── styles (css 资源)
|
||||
└── Sources
|
||||
└── ...
|
||||
```
|
||||
|
||||
- Views 文件夹来存储 `.leaf` 文件
|
||||
- 配置 [`FileMiddleware`](https://api.vapor.codes/vapor/documentation/vapor/filemiddleware/) 提供静态文件
|
||||
|
||||
```swift
|
||||
app.middleware.use(FileMiddleware(
|
||||
publicDirectory:
|
||||
app.directory.publicDirectory
|
||||
))
|
||||
```
|
||||
|
||||
### 渲染视图
|
||||
|
||||
```swift
|
||||
app.get("hello") {
|
||||
req -> EventLoopFuture<View> in
|
||||
return req.view.render("hello", [
|
||||
"name": "Leaf"
|
||||
])
|
||||
}
|
||||
// 或
|
||||
app.get("hello") {
|
||||
req async throws -> View in
|
||||
return try await req.view.render(
|
||||
"hello", ["name": "Leaf"]
|
||||
)
|
||||
}
|
||||
```
|
||||
|
||||
在 `hello.leaf` 模板中使用 `name`
|
||||
|
||||
```
|
||||
Hello, #(name)!
|
||||
```
|
||||
|
||||
打开浏览器访问 `/hello` 显示 `Hello, Leaf!`。
|
||||
|
||||
## Leaf 概述
|
||||
|
||||
### 模板语法
|
||||
|
||||
一个基本的 `Leaf` 标签使用示例
|
||||
|
||||
```swift
|
||||
There are #count(users) users.
|
||||
```
|
||||
|
||||
可以使用冒号和结束标签为某些标签提供可选的正文。
|
||||
|
||||
- 标记 `#`:这表示 leaf 解析器开始寻找的标记。
|
||||
- 名称 `count`:标签的标识符。
|
||||
- 参数列表 (`users`):可以接受零个或多个参数。
|
||||
|
||||
### 内置标签示例
|
||||
|
||||
```html
|
||||
#(variable)
|
||||
#extend("template"): 添加到模板中!#endextend
|
||||
#export("title"): 欢迎使用 Vapor #endexport
|
||||
#import("body")
|
||||
#count(friends)
|
||||
#for(friend in friends):
|
||||
<li>#(friend.name)</li>
|
||||
#endfor
|
||||
```
|
||||
|
||||
文件夹中的模板
|
||||
|
||||
```html
|
||||
#extend("partials/detail-layout"):
|
||||
#export("body"): 详情页面 #endexport
|
||||
#endextend
|
||||
```
|
||||
|
||||
### 表达式
|
||||
|
||||
- `+`
|
||||
- `%`
|
||||
- `>`
|
||||
- `==`
|
||||
- `||`
|
||||
<!--rehype:className=cols-3 style-none-->
|
||||
|
||||
```leaf
|
||||
#if(1 + 1 == 2):
|
||||
Hello!
|
||||
#endif
|
||||
|
||||
#if(index % 2 == 0):
|
||||
This is even index.
|
||||
#else:
|
||||
This is odd index.
|
||||
#endif
|
||||
```
|
||||
|
||||
### 上下文
|
||||
<!--rehype:wrap-class=row-span-2-->
|
||||
|
||||
Leaf 推荐用 `Encodable` 结构体传数据,数组需包装,`[String: Any]` 不支持。
|
||||
|
||||
```swift
|
||||
struct WelcomeContext: Encodable {
|
||||
var title: String
|
||||
var numbers: [Int]
|
||||
}
|
||||
return req.view.render("home",
|
||||
WelcomeContext(
|
||||
title: "Hello!",
|
||||
numbers: [42, 9001]
|
||||
)
|
||||
)
|
||||
```
|
||||
|
||||
`title` 和 `numbers` 将暴露给 `Leaf` 模板,就可以在标签中使用这些变量。
|
||||
|
||||
```html
|
||||
<h1>#(title)</h1>
|
||||
#for(number in numbers):
|
||||
<p>#(number)</p>
|
||||
#endfor
|
||||
```
|
||||
|
||||
### 条件
|
||||
<!--rehype:wrap-class=row-span-2-->
|
||||
|
||||
变量是否存在
|
||||
|
||||
```html
|
||||
#if(title):
|
||||
The title is #(title)
|
||||
#endif
|
||||
```
|
||||
|
||||
比较
|
||||
|
||||
```html
|
||||
#if(title == "Welcome"):
|
||||
This is a friendly web page.
|
||||
#endif
|
||||
```
|
||||
|
||||
使用另一个标签作为判断条件的一部分,内部标签应该省略 `#`
|
||||
|
||||
```html
|
||||
#if(count(users) > 0):
|
||||
You have users!
|
||||
#else:
|
||||
There are no users yet :(
|
||||
#endif
|
||||
```
|
||||
|
||||
多个条件满足时才渲染内容的模板
|
||||
|
||||
```html
|
||||
#if(title == "user" && count(users) > 0):
|
||||
You have users!
|
||||
#endif
|
||||
```
|
||||
|
||||
### #elseif
|
||||
|
||||
```html
|
||||
#if(title == "Welcome"):
|
||||
Hello new user!
|
||||
#elseif(title == "Welcome back!"):
|
||||
Hello old user
|
||||
#else:
|
||||
Unexpected page!
|
||||
#endif
|
||||
```
|
||||
|
||||
### 循环
|
||||
|
||||
```swift
|
||||
struct SolarSystem: Codable {
|
||||
let planets = ["Venus", "Earth", "Mars"]
|
||||
}
|
||||
return req.view.render(
|
||||
"solarSystem", SolarSystem()
|
||||
)
|
||||
```
|
||||
|
||||
在 `Leaf` 中循环它们:
|
||||
|
||||
```html
|
||||
<ul>
|
||||
#for(planet in planets):
|
||||
<li>#(planet)</li>
|
||||
#endfor
|
||||
</ul>
|
||||
```
|
||||
|
||||
### 模板示例
|
||||
<!--rehype:wrap-class=row-span-4-->
|
||||
|
||||
入口页面,通过 `#extend("main")` 将 `mainleaf` 模板的内容复制到当前模板中使用
|
||||
|
||||
```html
|
||||
#extend("main"):
|
||||
#export("body"):
|
||||
<p>Welcome to Vapor!</p>
|
||||
#endexport
|
||||
#endextend
|
||||
```
|
||||
|
||||
在公共模板 `main.leaf` 中
|
||||
|
||||
```html
|
||||
<html>
|
||||
<head>
|
||||
<title>#(name)</title>
|
||||
</head>
|
||||
<body>#import("body")</body>
|
||||
</html>
|
||||
```
|
||||
|
||||
呈现如下内容:
|
||||
|
||||
```html
|
||||
<html>
|
||||
<head>
|
||||
<title>Leaf</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Welcome to Vapor!</p>
|
||||
</body>
|
||||
</html>
|
||||
```
|
||||
|
||||
### 扩展模板
|
||||
<!--rehype:wrap-class=row-span-3-->
|
||||
|
||||
在模板中使用 `#export` 存储名为 `body` 的一些 HTML
|
||||
|
||||
```html
|
||||
#export("body"):
|
||||
<p>Welcome to Vapor!</p>
|
||||
#endexport
|
||||
```
|
||||
|
||||
使用 `#import` 获取传递给 `#extend` 标签的内容
|
||||
|
||||
```html
|
||||
<body>
|
||||
#import("body")
|
||||
</body>
|
||||
```
|
||||
|
||||
### #count
|
||||
|
||||
```html
|
||||
Your search matched #count(matches) pages.
|
||||
```
|
||||
|
||||
`#count` 标签返回数组中的项目数量
|
||||
|
||||
### #lowercased
|
||||
|
||||
```html
|
||||
#lowercased(name)
|
||||
```
|
||||
|
||||
`#lowercased` 标签将字符串转成小写字母。
|
||||
|
||||
### #capitalized
|
||||
|
||||
```html
|
||||
#capitalized(name)
|
||||
```
|
||||
|
||||
`#capitalized` 标签将字符串中每个单词的首字母大写,其他字母小写。
|
||||
|
||||
### #contains
|
||||
|
||||
```html
|
||||
#if(contains(planets, "Earth")):
|
||||
Earth is here!
|
||||
#else:
|
||||
Earth is not in this array.
|
||||
#endif
|
||||
```
|
||||
|
||||
`#contains` 标签接受一个数组和一个值作为其两个参数,如果参数一中的数组包含参数二中的值,则返回 true。
|
||||
|
||||
### #date
|
||||
<!--rehype:wrap-class=row-span-2-->
|
||||
|
||||
`#date` 标签将日期格式化为可读的字符串。默认情况下,它使用 ISO8601 格式。
|
||||
|
||||
```swift
|
||||
render(..., ["now": Date()])
|
||||
```
|
||||
|
||||
模板中使用
|
||||
|
||||
```
|
||||
The time is #date(now)
|
||||
```
|
||||
|
||||
你可以传自定义日期格式作为第二参数,详见 [Swift DateFormatter](https://developer.apple.com/documentation/foundation/dateformatter)。
|
||||
|
||||
```
|
||||
The date is #date(now, "yyyy-MM-dd")
|
||||
```
|
||||
|
||||
### #unsafeHTML
|
||||
|
||||
标签就像一个变量标签 - 例如 `#(variable)`。
|
||||
|
||||
```
|
||||
The time is #unsafeHTML(styledTitle)
|
||||
```
|
||||
|
||||
它不会转义任何 `variable` 可能包含的 HTML 标签
|
||||
|
||||
### #dumpContext
|
||||
|
||||
`#dumpContext` 标签将整个上下文渲染为可读的字符串。使用此标记来调试作为上下文提供给当前渲染的内容。
|
||||
|
||||
```
|
||||
Hello, world!
|
||||
#dumpContext
|
||||
```
|
||||
|
||||
自定义标签
|
||||
---
|
||||
|
||||
### LeafTag
|
||||
<!--rehype:wrap-class=col-span-2 row-span-2-->
|
||||
|
||||
创建一个名为 `NowTag` 的类并遵循 `LeafTag` 协议
|
||||
|
||||
```swift
|
||||
struct NowTag: LeafTag {
|
||||
func render(_ ctx: LeafContext) throws -> LeafData {
|
||||
...
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
实现 `render(_:)` 方法。传递给该方法的 `LeafContext` 参数包含了我们需要的所有内容。
|
||||
|
||||
```swift
|
||||
enum NowTagError: Error {
|
||||
case invalidFormatParameter
|
||||
case tooManyParameters
|
||||
}
|
||||
|
||||
struct NowTag: LeafTag {
|
||||
func render(_ ctx: LeafContext) throws -> LeafData {
|
||||
let formatter = DateFormatter()
|
||||
switch ctx.parameters.count {
|
||||
case 0: formatter.dateFormat = "yyyy-MM-dd HH:mm:ss"
|
||||
case 1:
|
||||
guard let string = ctx.parameters[0].string else {
|
||||
throw NowTagError.invalidFormatParameter
|
||||
}
|
||||
|
||||
formatter.dateFormat = string
|
||||
default:
|
||||
throw NowTagError.tooManyParameters
|
||||
}
|
||||
|
||||
let dateAsString = formatter.string(from: Date())
|
||||
return LeafData.string(dateAsString)
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### 配置标签
|
||||
|
||||
实现了 `NowTag`,告诉 `Leaf` 并设置标签名称为 `#now`
|
||||
|
||||
```swift
|
||||
app.leaf.tags["now"] = NowTag()
|
||||
```
|
||||
|
||||
现在可以在 Leaf 中使用我们的自定义标签 `#now` 了
|
||||
|
||||
```html
|
||||
The time is #now()
|
||||
```
|
||||
|
||||
### 上下文属性
|
||||
|
||||
#### `parameters`: 包含标签参数的数组
|
||||
|
||||
```swift
|
||||
struct NowTag: LeafTag {
|
||||
func render(
|
||||
_ ctx: LeafContext
|
||||
) throws -> LeafData {
|
||||
/// ctx.parameters
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### 使用 Data,`render(_:_:)` 方法作为上下文视图的数据
|
||||
|
||||
```swift
|
||||
return try await req.view.render(
|
||||
"home", ["name": "John"]
|
||||
)
|
||||
```
|
||||
|
||||
自定义标签使用 `Data`
|
||||
|
||||
```swift
|
||||
struct NowTag: LeafTag {
|
||||
func render(
|
||||
_ ctx: LeafContext
|
||||
) throws -> LeafData {
|
||||
let name = ctx.data["name"]?.string
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
`LeafContext` 包含两个重要的属性
|
||||
|
||||
### 相对路径拼接标签
|
||||
<!--rehype:wrap-class=col-span-2-->
|
||||
|
||||
```swift
|
||||
struct RelativePathTag: LeafTag {
|
||||
func render(_ ctx: LeafContext) throws -> LeafData {
|
||||
guard ctx.parameters.count == 1, let filename = ctx.parameters[0].string else {
|
||||
throw "Missing #relative parameters"
|
||||
}
|
||||
if let filepath = ctx.request?.url.path, filename.hasPrefix("/") == false {
|
||||
return .string("\(relativePrefix(for: filepath, targetFile: filename))")
|
||||
}
|
||||
return .string("\(filename)")
|
||||
}
|
||||
private func relativePrefix(for pagePath: String, targetFile: String) -> String {
|
||||
var components = pagePath
|
||||
.trimmingCharacters(in: CharacterSet(charactersIn: "/"))
|
||||
.split(separator: "/")
|
||||
if let last = components.last, last.contains(".") {
|
||||
components = components.dropLast()
|
||||
}
|
||||
let cleanTarget = targetFile.hasPrefix("./")
|
||||
? String(targetFile.dropFirst(2))
|
||||
: targetFile
|
||||
return String(repeating: "../", count: components.count) + cleanTarget
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
配置标签
|
||||
|
||||
```swift
|
||||
app.leaf.tags["relative"] = RelativePathTag()
|
||||
```
|
||||
|
||||
现在可以在 Leaf 中使用我们的自定义标签了
|
||||
|
||||
```html
|
||||
<link rel="stylesheet" href="#relative("main.css")" />
|
||||
```
|
||||