Compare commits

..

91 Commits

Author SHA1 Message Date
c5f5f0cd19 released v1.31.0 2022-12-06 21:31:38 +08:00
0b704fd5e3 doc: add badges. 2022-12-06 21:30:53 +08:00
d7503afff2 doc: update jest.md #212. 2022-12-06 21:30:53 +08:00
381a23490e docs: add makefile (#209) #200 2022-12-06 11:57:44 +08:00
c1fbb99393 doc: update css.md 2022-12-06 11:49:53 +08:00
3dd01e372c doc: update README.md. 2022-12-06 03:35:04 +00:00
033709eb8d doc: update CONTRIBUTING.md. 2022-12-06 03:35:03 +00:00
260f1ec438 doc: add mirror ref.eryajf.net (#208)
添加 ref.eryajf.net 镜像
2022-12-06 11:33:41 +08:00
b104ca8bfd doc: update css.md 2022-12-05 16:16:19 +08:00
b3d7fb1ea1 docs: add makefile var (#207) 2022-12-05 13:17:26 +08:00
cd599f7798 doc: Update README.md #206 #102 2022-12-05 09:51:09 +08:00
5b649147ca doc: Update README.md 2022-12-04 19:10:29 +08:00
aa539136fc doc: update README.md #102 2022-12-04 19:00:20 +08:00
e57f03ce8d feat: add aspect-ratio.md cheatsheet. 2022-12-04 17:58:12 +08:00
cb33da466e doc: update vue.md #10 add typescript example 2022-12-04 17:44:56 +08:00
d2b583fc68 doc: update README.md. 2022-12-04 03:11:11 +00:00
6cde7a1b6f doc: update CONTRIBUTING.md. 2022-12-04 03:11:10 +00:00
57fb87d021 doc: Update README.md (#204)
Co-authored-by: 小弟调调™ <kennyiseeyou@gmail.com>
2022-12-04 11:09:52 +08:00
55f4a35a1a doc: update make.md (#203) 2022-12-04 11:02:51 +08:00
c5f73221f4 doc: update README.md. 2022-12-04 03:02:40 +00:00
6d8d80c68e doc: update CONTRIBUTING.md. 2022-12-04 03:02:39 +00:00
7efa3c1fca doc: change domain (#205)
我换域名了,麻烦重新推送一下
2022-12-04 11:01:15 +08:00
fbcd7edf78 doc: update typescript.md 2022-12-03 17:55:09 +08:00
33328e5987 doc: update make.md #200 2022-12-03 17:54:36 +08:00
3f191de637 doc: Update typescript.md 2022-12-03 17:44:57 +08:00
d75cda78f5 docs: add make cheatsheet (#202) #200 2022-12-03 17:41:21 +08:00
b5467ec1c2 doc: Update Home page. 2022-12-03 15:04:56 +08:00
51c4d2a719 doc: add badges. 2022-12-03 14:54:19 +08:00
ca80355477 feat: add htmx.md cheatsheet. 2022-12-03 11:30:46 +08:00
a24330243f doc: update README.md. 2022-12-03 01:04:23 +00:00
acaccae376 doc: update CONTRIBUTING.md. 2022-12-03 01:04:22 +00:00
0e2da4158f doc: add mirror (#199)
quick.hestudio.xyz
2022-12-03 09:03:12 +08:00
a26f95a1be doc: update README.md. 2022-12-02 16:26:27 +00:00
53b56623a4 doc: update CONTRIBUTING.md. 2022-12-02 16:26:26 +00:00
b58db5cc58 doc: add mirror (#197) 2022-12-03 00:25:08 +08:00
f00a647c3e feat: add iptables cheatsheet. #192 2022-12-02 14:30:50 +08:00
869fbc6b40 docs: update rust range (#194)
* docs: update rust range

* update

* update
2022-12-01 22:53:17 +08:00
5910a3f924 doc: update README.md 2022-12-01 20:29:52 +08:00
fadc13ae70 doc: Update README.md 2022-12-01 18:11:25 +08:00
36b984bb21 doc: Update README.md 2022-12-01 17:52:54 +08:00
f778b3c28e feat: add adobe-xd.md cheatsheet. 2022-12-01 17:49:31 +08:00
1c0bb6a9a5 feat: add adobe-lightroom.md cheatsheet. 2022-12-01 17:07:28 +08:00
b390eaca59 doc: update react-native.md 2022-12-01 16:37:01 +08:00
0e9d9ac16d doc: update redis.md #191 2022-12-01 10:18:10 +08:00
b117f3eab7 doc: update redis.md #191 2022-12-01 09:47:29 +08:00
8fddbda70d doc: update README.md. 2022-12-01 01:28:38 +00:00
0d236303a7 doc: update CONTRIBUTING.md. 2022-12-01 01:28:37 +00:00
d1c0ded4f7 doc: Add quickref.pipecraft.net to the home page. #102 2022-12-01 09:27:07 +08:00
kim
4f705878b6 feat: add redis.md cheatsheet. (#191)
* feat: add redis.md cheatsheet.

* feat: add a redis.md cheatsheet.
2022-12-01 09:06:44 +08:00
63e5cd5109 released v1.30.0 2022-11-30 23:45:57 +08:00
f21715f172 chore: update workflows config. 2022-11-30 23:38:34 +08:00
2bd72b4c05 feat: add firefox.md cheatsheet. 2022-11-30 23:36:34 +08:00
10a4fe3f5b feat: add gitlab.md cheatsheet. 2022-11-30 23:24:23 +08:00
0a5373796d doc: Update README.md 2022-11-30 23:14:30 +08:00
64a2fba903 feat: add google-chrome.md cheatsheet. 2022-11-30 23:01:01 +08:00
a9f661f87f doc: update sublime-text.md 2022-11-30 22:42:12 +08:00
dcd6d5bdbe doc: update android-studio.md 2022-11-30 22:37:58 +08:00
d25eaebcd2 doc: update sublime-text.md 2022-11-30 22:37:43 +08:00
501c7d757e feat: add github.md cheatsheet. 2022-11-30 22:29:41 +08:00
8db7257b7a doc: update README.md. 2022-11-30 10:13:26 +00:00
4c0c1c95e8 doc: update CONTRIBUTING.md. 2022-11-30 10:13:26 +00:00
7e263a21e7 feat: add android-studio.md cheatsheet. 2022-11-30 18:02:28 +08:00
54eba6ebd8 doc: update README.md. 2022-11-30 09:52:12 +00:00
97cda7ec9f doc: update CONTRIBUTING.md. 2022-11-30 09:52:11 +00:00
746a387005 feat: add adobe-photoshop.md cheatsheet. 2022-11-30 17:50:39 +08:00
93e23d581f feat: add pm2.md cheatsheet. 2022-11-30 01:00:42 +08:00
44711bf9a1 doc: Update READMe.md #102 2022-11-29 21:53:14 +08:00
e251179751 released v1.29.0 2022-11-29 21:51:36 +08:00
bf114d2ccf doc: update quickreference.md. 2022-11-29 12:33:53 +08:00
5877c04e57 doc: update quickreference.md #189 2022-11-29 12:09:28 +08:00
cb64b52cda doc: update react-native.md 2022-11-29 11:34:05 +08:00
396037f90a doc: Update README.md 2022-11-29 09:03:47 +08:00
3ad1e261c2 doc: modify README.md. 2022-11-28 17:12:51 +00:00
915a802060 doc: modify CONTRIBUTING.md. 2022-11-28 17:12:50 +00:00
b9ca744978 feat: add react-native.md cheatsheet. 2022-11-29 01:11:15 +08:00
c514341b29 doc: update typescript.md (#186) 2022-11-28 23:47:57 +08:00
9562c34876 doc: update cocoapods.md 2022-11-28 22:04:14 +08:00
91190ec29a doc: modify README.md. 2022-11-28 13:51:07 +00:00
7b5e77dd30 doc: modify CONTRIBUTING.md. 2022-11-28 13:51:06 +00:00
a41ec2693e doc: update github-action.md (#184) 2022-11-28 21:49:44 +08:00
f915f4c155 fix: webstorm.md (#182) 2022-11-28 17:42:25 +08:00
e1bf0f9655 doc: modify README.md. 2022-11-28 08:22:14 +00:00
5728ac71f9 doc: modify CONTRIBUTING.md. 2022-11-28 08:22:13 +00:00
39fef5e856 doc: update rust.md (#181) (#20) 2022-11-28 16:20:56 +08:00
d1b87b9de9 doc: Update ffmpeg.md (#180)
增加ffmpeg流处理
2022-11-28 10:27:14 +08:00
026dc585a8 released v1.28.0 2022-11-27 22:44:27 +08:00
d09737fcda doc: update flutter.md #179 #58 2022-11-27 22:42:25 +08:00
029e2751c4 feat: add nextjs.md cheatsheet. 2022-11-27 22:33:24 +08:00
0a4bd03900 doc: update flutter.md (#179)
* doc: update flutter.md

* doc: update flutter.md
2022-11-27 17:17:10 +08:00
fe7782a0c4 doc: update github-actions.md #170 2022-11-27 10:22:20 +08:00
9751df06b9 doc: update rust.md (#178)
* doc: match let

* update
2022-11-27 01:52:50 +08:00
55 changed files with 12611 additions and 74 deletions

View File

@ -6,6 +6,7 @@ on:
jobs:
build:
if: github.repository == 'jaywcjlove/reference'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
@ -44,6 +45,13 @@ jobs:
with:
package-path: ./package.json
- name: gh-pages README.md
working-directory: dist
run: |
cat > README.md << EOF
Website: https://jaywcjlove.github.io/reference
EOF
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
@ -58,7 +66,6 @@ jobs:
filter-author: (小弟调调™)
filter: (^[\s]+?[R|r]elease)|(^[R|r]elease)
- name: Create Release
uses: ncipollo/release-action@v1
if: steps.create_tag.outputs.successful
@ -69,26 +76,26 @@ jobs:
body: |
Documentation ${{ needs.build.outputs.create_tag_version }}: https://raw.githack.com/jaywcjlove/reference/${{ steps.changelog.outputs.gh-pages-short-hash }}/index.html
Comparing Changes: ${{ steps.changelog.outputs.compareurl }}
${{ steps.changelog.outputs.changelog }}
## Docker
[![Docker Image Version (latest by date)](https://img.shields.io/docker/v/wcjiang/reference)](https://hub.docker.com/r/wcjiang/reference) [![Docker Image Size (latest by date)](https://img.shields.io/docker/image-size/wcjiang/reference)](https://hub.docker.com/r/wcjiang/reference) [![Docker Pulls](https://img.shields.io/docker/pulls/wcjiang/reference)](https://hub.docker.com/r/wcjiang/reference)
轻松通过 `docker` 部署 `Quick Reference` 网站。
```bash
docker pull wcjiang/reference
```
```bash
docker run --name reference --rm -d -p 9667:3000 wcjiang/reference:latest
# Or
docker run --name reference -itd -p 9667:3000 wcjiang/reference:latest
```
在浏览器中访问以下 URL
```bash
http://localhost:9667/
```
@ -144,8 +151,6 @@ jobs:
platforms: linux/amd64,linux/arm64
tags: ghcr.io/jaywcjlove/reference:${{steps.changelog.outputs.version}}
# # Create Docker Image in Github
# - name: Login to GitHub registry
# run: echo ${{ github.token }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin
@ -166,7 +171,7 @@ jobs:
# # Create Docker Image
# - name: Docker login
# run: docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_PASSWORD }}
# - name: Build reference image
# run: docker image build -t reference .
@ -181,4 +186,4 @@ jobs:
# run: |
# echo "outputs.tag - ${{ steps.changelog.outputs.version }}"
# docker tag reference ${{ secrets.DOCKER_USER }}/reference:${{steps.changelog.outputs.version}}
# docker push ${{ secrets.DOCKER_USER }}/reference:${{steps.changelog.outputs.version}}
# docker push ${{ secrets.DOCKER_USER }}/reference:${{steps.changelog.outputs.version}}

View File

@ -6,6 +6,7 @@ on:
jobs:
build:
if: github.repository == 'jaywcjlove/reference'
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
@ -24,4 +25,4 @@ jobs:
- uses: actions/upload-artifact@v3
with:
name: dist
path: ${{ github.workspace }}\dist\**\*
path: ${{ github.workspace }}\dist\**\*

View File

@ -148,7 +148,7 @@ REF_LABEL=网站首页
<!--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/Jack-Zhang-1314" title="fw_qaq">
<a href="https://github.com/fwqaaq" title="fw_qaq">
<img src="https://avatars.githubusercontent.com/u/82551626?v=4" width="42;" alt="fw_qaq"/>
</a>
<a href="https://github.com/mofelee" title="mofelee">
@ -166,6 +166,9 @@ REF_LABEL=网站首页
<a href="https://github.com/sjh42" title="42:p">
<img src="https://avatars.githubusercontent.com/u/34529275?v=4" width="42;" alt="42:p"/>
</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/partoneplay" title="partoneplay">
<img src="https://avatars.githubusercontent.com/u/5189132?v=4" width="42;" alt="partoneplay"/>
</a>
@ -175,6 +178,9 @@ REF_LABEL=网站首页
<a href="https://github.com/catcto" title="喵仙人">
<img src="https://avatars.githubusercontent.com/u/5467932?v=4" width="42;" alt="喵仙人"/>
</a>
<a href="https://github.com/heStudio-Network" title="醉、倾城">
<img src="https://avatars.githubusercontent.com/u/119711513?v=4" width="42;" alt="醉、倾城"/>
</a>
<a href="https://github.com/13812700839" title="花殇">
<img src="https://avatars.githubusercontent.com/u/58072506?v=4" width="42;" alt="花殇"/>
</a>
@ -184,8 +190,8 @@ REF_LABEL=网站首页
<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/CharlotteZeng" title="Chart">
<img src="https://avatars.githubusercontent.com/u/19461184?v=4" width="42;" alt="Chart"/>
<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/DaiNing810" title="DaiN">
<img src="https://avatars.githubusercontent.com/u/94962339?v=4" width="42;" alt="DaiN"/>
@ -193,6 +199,9 @@ REF_LABEL=网站首页
<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/eeeeeio" title="EEEEE">
<img src="https://avatars.githubusercontent.com/u/20723545?v=4" width="42;" alt="EEEEE"/>
</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>
@ -202,9 +211,6 @@ REF_LABEL=网站首页
<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/LufsX" title="LufsX">
<img src="https://avatars.githubusercontent.com/u/33221883?v=4" width="42;" alt="LufsX"/>
</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>
@ -214,6 +220,9 @@ REF_LABEL=网站首页
<a href="https://github.com/whb1998a" title="WHB">
<img src="https://avatars.githubusercontent.com/u/44045064?v=4" width="42;" alt="WHB"/>
</a>
<a href="https://github.com/hi-liyan" title="Yan Li">
<img src="https://avatars.githubusercontent.com/u/40056492?v=4" width="42;" alt="Yan Li"/>
</a>
<a href="https://github.com/y52y" title="Zyj">
<img src="https://avatars.githubusercontent.com/u/51304324?v=4" width="42;" alt="Zyj"/>
</a>
@ -244,6 +253,9 @@ REF_LABEL=网站首页
<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/genius-kim" title="kim">
<img src="https://avatars.githubusercontent.com/u/119488561?v=4" width="42;" alt="kim"/>
</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>
@ -259,6 +271,9 @@ REF_LABEL=网站首页
<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/Mowmowj" title="shelton">
<img src="https://avatars.githubusercontent.com/u/24759562?v=4" width="42;" alt="shelton"/>
</a>
<a href="https://github.com/wjjwkwindy" title="wjjwkwindy">
<img src="https://avatars.githubusercontent.com/u/9508591?v=4" width="42;" alt="wjjwkwindy"/>
</a>
@ -268,6 +283,9 @@ REF_LABEL=网站首页
<a href="https://github.com/zxx-457" title="zxx-457">
<img src="https://avatars.githubusercontent.com/u/114141362?v=4" width="42;" alt="zxx-457"/>
</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/lvzhenbo" title="吕振波">
<img src="https://avatars.githubusercontent.com/u/32427677?v=4" width="42;" alt="吕振波"/>
</a>

117
README.md
View File

@ -16,7 +16,7 @@ Quick Reference
## 正在建设中...
坑已挖,需要您的参与完善和贡献!🙏
坑已挖,需要您的参与完善和[贡献](./docs/quickreference.md)!🙏
<!--rehype:style=padding-bottom: 23px;-->
[Ansible](./docs/ansible.md)<!--rehype:style=background: rgb(238 0 0);&class=contributing tag&data-lang=RedHat&data-info=👆看看还缺点儿什么?-->
@ -27,7 +27,7 @@ Quick Reference
[Flutter](./docs/flutter.md)<!--rehype:style=background: rgb(150 220 254);&class=contributing tag&data-lang=Dart-->
[Gitlab CI/CD](./docs/gitlab-ci.md)<!--rehype:style=background: rgb(226 67 41);&class=contributing-->
[LaTeX](./docs/latex.md)<!--rehype:style=background: rgb(0 128 128);&class=contributing-->
[Lua](./docs/lua.md)<!--rehype:style=background: rgb(3 3 128);-->
[Lua](./docs/lua.md)<!--rehype:style=background: rgb(3 3 128);&class=contributing-->
[NestJS](./docs/nestjs.md)<!--rehype:style=background: rgb(237 21 67);&class=contributing-->
[MATLAB](./docs/matlab.md)<!--rehype:style=background: rgb(0 118 168);&class=contributing-->
[Oracle](./docs/oracle.md)<!--rehype:style=background: rgb(255 0 0);&class=contributing tag&data-lang=SQL-->
@ -56,12 +56,9 @@ Quick Reference
[LaTeX](./docs/latex.md)<!--rehype:style=background: rgb(0 128 128);&class=contributing-->
[Laravel 8](./docs/laravel.md)<!--rehype:style=background: rgb(249 50 44);&class=contributing tag&data-lang=PHP-->
[Markdown](./docs/markdown.md)<!--rehype:style=background: rgb(103 61 156);-->
[MySQL](./docs/mysql.md)<!--rehype:style=background: rgb(1 117 143);&class=tag&data-lang=SQL-->
[MATLAB](./docs/matlab.md)<!--rehype:style=background: rgb(0 118 168);&class=contributing-->
[Oracle](./docs/oracle.md)<!--rehype:style=background: rgb(255 0 0);-->
[PHP](./docs/php.md)<!--rehype:style=background: rgb(79 91 147);-->
[Python](./docs/python.md)<!--rehype:style=background: rgb(43 91 132);-->
[PostgreSQL](./docs/postgres.md)<!--rehype:style=background: rgb(43 109 163);&class=tag&data-lang=SQL-->
[Ruby](./docs/ruby.md)<!--rehype:style=background: rgb(204 52 45);-->
[Rust](./docs/rust.md)<!--rehype:style=background: rgb(71 71 71);-->
[Swift](./docs/swift.md)<!--rehype:style=background: rgb(240 81 57);-->
@ -84,11 +81,14 @@ Quick Reference
[HTML](./docs/html.md)<!--rehype:style=background: rgb(228 77 39);-->
[JavaScript](./docs/javascript.md)<!--rehype:style=background: rgb(203 183 31);-->
[Less.js](./docs/lessjs.md)<!--rehype:style=background: rgb(29 54 93);&class=tag&data-lang=CSS-->
[Next.js](./docs/nextjs.md)<!--rehype:style=background: rgb(0 0 0);&class=tag&data-lang=React-->
[React](./docs/react.md)<!--rehype:style=background: rgb(34 143 173);-->
[React Native](./docs/react-native.md)<!--rehype:style=background: rgb(34 143 173);&class=tag&data-lang=React-->
[RegEx 正则表达式](./docs/regex.md)<!--rehype:style=background: rgb(149 36 155);-->
[TypeScript](./docs/typescript.md)<!--rehype:style=background: rgb(49 120 198);-->
[Vue 2](./docs/vue2.md)<!--rehype:style=background: rgb(64 184 131);-->
[Vue 3](./docs/vue.md)<!--rehype:style=background: rgb(64 184 131);&class=contributing-->
[</> htmx](./docs/htmx.md)<!--rehype:style=background: rgb(52 101 164);&class=contributing-->
<!--rehype:class=home-card-->
## Nodejs
@ -99,6 +99,7 @@ Quick Reference
[Lerna](./docs/lerna.md)<!--rehype:style=background: rgb(192 132 252);-->
[npm](./docs/npm.md)<!--rehype:style=background: rgb(203 2 0);-->
[NestJS](./docs/nestjs.md)<!--rehype:style=background: rgb(237 21 67);&class=contributing-->
[PM2](./docs/pm2.md)<!--rehype:style=background: rgb(73 117 241);&class=contributing-->
[package.json](./docs/package.json.md)<!--rehype:style=background: rgb(132 132 132);-->
[Yarn](./docs/yarn.md)<!--rehype:style=background: rgb(33 136 182);-->
<!--rehype:class=home-card-->
@ -106,16 +107,11 @@ Quick Reference
## 工具
[Emacs](./docs/emacs.md)<!--rehype:style=background: rgb(98 36 134);-->
[Gmail](./docs/gmail.md)<!--rehype:style=background: rgb(234 67 54);-->
[Github](./docs/github.md)<!--rehype:style=background: rgb(36 41 47);-->
[nginx](./docs/nginx.md)<!--rehype:style=background: rgb(0 153 0);-->
[Semver](./docs/semver.md)<!--rehype:style=background: rgb(106 111 141);-->
[Sketch](./docs/sketch.md)<!--rehype:style=background: rgb(223 148 0);&class=tag&data-lang=macOS-->
[Sublime Text](./docs/sublime-text.md)<!--rehype:style=background: rgb(223 148 0);-->
[VSCode](./docs/vscode.md)<!--rehype:style=background: rgb(91 163 230);-->
[Vim](./docs/vim.md)<!--rehype:style=background: rgb(9 150 8);-->
[WebStorm](./docs/webstorm.md)<!--rehype:style=background: rgb(32 148 220);-->
[XPath](./docs/xpath.md)<!--rehype:style=background: rgb(91 163 230);-->
[Xcode](./docs/xcode.md)<!--rehype:style=background: rgb(24 151 233);&class=tag&data-lang=macOS-->
<!--rehype:class=home-card-->
## 命令
@ -129,6 +125,7 @@ Quick Reference
[Chmod](./docs/chmod.md)<!--rehype:style=background: rgb(16 185 129);-->
[Cron](./docs/cron.md)<!--rehype:style=background: rgb(239 68 68);-->
[CMake](./docs/cmake.md)<!--rehype:style=background: rgb(92 107 192);&class=contributing-->
[Make](./docs/make.md)<!--rehype:style=background: rgb(99 99 99);&class=contributing-->
[Git](./docs/git.md)<!--rehype:style=background: rgb(215 89 62);-->
[Grep](./docs/grep.md)<!--rehype:style=background: rgb(16 185 129);-->
[Find](./docs/find.md)<!--rehype:style=background: rgb(16 185 129);-->
@ -136,6 +133,7 @@ Quick Reference
[Htop](./docs/htop.md)<!--rehype:style=background: rgb(16 185 129);-->
[Homebrew](./docs/homebrew.md)<!--rehype:style=background: rgb(252 185 87);&class=tag&data-lang=macOS-->
[Netstat](./docs/netstat.md)<!--rehype:style=background: rgb(16 185 129);-->
[iptables](./docs/iptables.md)<!--rehype:style=background: rgb(32 74 135);-->
[jq](./docs/jq.md)<!--rehype:style=background: rgb(16 185 129);&class=tag&data-lang=JSON-->
[Lsof](./docs/lsof.md)<!--rehype:style=background: rgb(16 185 129);-->
[Mitmproxy](./docs/mitmproxy.md)<!--rehype:style=background: rgb(4 92 135);-->
@ -153,9 +151,35 @@ Quick Reference
[tar](./docs/tar.md)<!--rehype:style=background: rgb(215 89 62);-->
<!--rehype:class=home-card-->
## 数据库
[MySQL](./docs/mysql.md)<!--rehype:style=background: rgb(1 117 143);&class=tag&data-lang=SQL-->
[Oracle](./docs/oracle.md)<!--rehype:style=background: rgb(255 0 0);&class=tag&data-lang=SQL-->
[PostgreSQL](./docs/postgres.md)<!--rehype:style=background: rgb(43 109 163);&class=tag&data-lang=SQL-->
[Redis](./docs/redis.md)<!--rehype:style=background: rgb(198 47 44);-->
<!--rehype:class=home-card-->
## 快捷键
[Adobe Lightroom](./docs/adobe-lightroom.md)<!--rehype:style=background: rgb(49 168 255);-->
[Adobe Photoshop](./docs/adobe-photoshop.md)<!--rehype:style=background: rgb(49 168 255);-->
[Adobe XD](./docs/adobe-xd.md)<!--rehype:style=background: rgb(255 97 246);-->
[Android Studio](./docs/android-studio.md)<!--rehype:style=background: rgb(16 185 129);-->
[Firefox](./docs/firefox.md)<!--rehype:style=background: rgb(253 53 76);-->
[Gmail](./docs/gmail.md)<!--rehype:style=background: rgb(234 67 54);-->
[Gitlab](./docs/gitlab.md)<!--rehype:style=background: rgb(226 67 41);-->
[Google Chrome](./docs/google-chrome.md)<!--rehype:style=background: rgb(29 116 232);-->
[Sketch](./docs/sketch.md)<!--rehype:style=background: rgb(223 148 0);&class=tag&data-lang=macOS-->
[Sublime Text](./docs/sublime-text.md)<!--rehype:style=background: rgb(223 148 0);-->
[VSCode](./docs/vscode.md)<!--rehype:style=background: rgb(91 163 230);-->
[WebStorm](./docs/webstorm.md)<!--rehype:style=background: rgb(32 148 220);-->
[Xcode](./docs/xcode.md)<!--rehype:style=background: rgb(24 151 233);&class=tag&data-lang=macOS-->
<!--rehype:class=home-card-->
## 其它
[Quick Reference](./docs/quickreference.md)<!--rehype:style=background: rgb(16 185 129);&class=tag&data-lang=排版说明-->
[Aspect Ratio](./docs/aspect-ratio.md)<!--rehype:style=background: rgb(16 185 129);-->
[Github Actions](./docs/github-actions.md)<!--rehype:style=background: rgb(121 184 255);-->
[Gitlab CI/CD](./docs/gitlab-ci.md)<!--rehype:style=background: rgb(226 67 41);&class=contributing-->
[Colors Named](./docs/colors-named.md)<!--rehype:style=background: rgb(16 185 129);&class=tag&data-lang=CSS-->
@ -179,13 +203,13 @@ Quick Reference
## 感谢所有贡献者
<!--rehype:wrap-style=text-align: center;max-width: 650px;margin: 0 auto;&class=home-title-reset-->
请参阅 [Quick Reference](./docs/quickreference.md) 了解如何开始。一如既往,感谢我们出色的贡献者!
请参阅 [Quick Reference](./docs/quickreference.md) 了解如何开始。一如既往,感谢我们出色的[贡献者](https://github.com/jaywcjlove/reference/graphs/contributors)
<!--rehype:style=padding-bottom:1rem;-->
<!--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/Jack-Zhang-1314" title="fw_qaq">
<a href="https://github.com/fwqaaq" title="fw_qaq">
<img src="https://avatars.githubusercontent.com/u/82551626?v=4" width="42;" alt="fw_qaq"/>
</a>
<a href="https://github.com/mofelee" title="mofelee">
@ -203,6 +227,9 @@ Quick Reference
<a href="https://github.com/sjh42" title="42:p">
<img src="https://avatars.githubusercontent.com/u/34529275?v=4" width="42;" alt="42:p"/>
</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/partoneplay" title="partoneplay">
<img src="https://avatars.githubusercontent.com/u/5189132?v=4" width="42;" alt="partoneplay"/>
</a>
@ -212,6 +239,9 @@ Quick Reference
<a href="https://github.com/catcto" title="喵仙人">
<img src="https://avatars.githubusercontent.com/u/5467932?v=4" width="42;" alt="喵仙人"/>
</a>
<a href="https://github.com/heStudio-Network" title="醉、倾城">
<img src="https://avatars.githubusercontent.com/u/119711513?v=4" width="42;" alt="醉、倾城"/>
</a>
<a href="https://github.com/13812700839" title="花殇">
<img src="https://avatars.githubusercontent.com/u/58072506?v=4" width="42;" alt="花殇"/>
</a>
@ -221,8 +251,8 @@ Quick Reference
<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/CharlotteZeng" title="Chart">
<img src="https://avatars.githubusercontent.com/u/19461184?v=4" width="42;" alt="Chart"/>
<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/DaiNing810" title="DaiN">
<img src="https://avatars.githubusercontent.com/u/94962339?v=4" width="42;" alt="DaiN"/>
@ -230,6 +260,9 @@ Quick Reference
<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/eeeeeio" title="EEEEE">
<img src="https://avatars.githubusercontent.com/u/20723545?v=4" width="42;" alt="EEEEE"/>
</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>
@ -239,9 +272,6 @@ Quick Reference
<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/LufsX" title="LufsX">
<img src="https://avatars.githubusercontent.com/u/33221883?v=4" width="42;" alt="LufsX"/>
</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>
@ -251,6 +281,9 @@ Quick Reference
<a href="https://github.com/whb1998a" title="WHB">
<img src="https://avatars.githubusercontent.com/u/44045064?v=4" width="42;" alt="WHB"/>
</a>
<a href="https://github.com/hi-liyan" title="Yan Li">
<img src="https://avatars.githubusercontent.com/u/40056492?v=4" width="42;" alt="Yan Li"/>
</a>
<a href="https://github.com/y52y" title="Zyj">
<img src="https://avatars.githubusercontent.com/u/51304324?v=4" width="42;" alt="Zyj"/>
</a>
@ -281,6 +314,9 @@ Quick Reference
<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/genius-kim" title="kim">
<img src="https://avatars.githubusercontent.com/u/119488561?v=4" width="42;" alt="kim"/>
</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>
@ -296,6 +332,9 @@ Quick Reference
<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/Mowmowj" title="shelton">
<img src="https://avatars.githubusercontent.com/u/24759562?v=4" width="42;" alt="shelton"/>
</a>
<a href="https://github.com/wjjwkwindy" title="wjjwkwindy">
<img src="https://avatars.githubusercontent.com/u/9508591?v=4" width="42;" alt="wjjwkwindy"/>
</a>
@ -305,6 +344,9 @@ Quick Reference
<a href="https://github.com/zxx-457" title="zxx-457">
<img src="https://avatars.githubusercontent.com/u/114141362?v=4" width="42;" alt="zxx-457"/>
</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/lvzhenbo" title="吕振波">
<img src="https://avatars.githubusercontent.com/u/32427677?v=4" width="42;" alt="吕振波"/>
</a>
@ -315,25 +357,40 @@ Quick Reference
<img src="https://avatars.githubusercontent.com/u/53617305?v=4" width="42;" alt="芦荟柚子茶"/>
</a><!--GAMFC-END-->
贡献者列表,由 [contributors](https://github.com/jaywcjlove/github-action-contributors) 自动生成
[贡献者](https://github.com/jaywcjlove/reference/graphs/contributors)列表,由 [contributors](https://github.com/jaywcjlove/github-action-contributors) 根据提交次数的先后顺序自动生成
<!--rehype:style=padding-top:1rem;-->
## 国内镜像网站
<!--rehype:wrap-style=text-align: center;max-width: 650px;margin: 0 auto;&class=home-title-reset-->
由于中国国内访问,时常打不开,你可以访问下面镜像网站。推荐自己的[镜像网站](https://github.com/jaywcjlove/reference/issues/102#issue-1451649637)
由于中国国内访问,时常打不开,你可以访问下面镜像网站。推荐自己的[镜像网站](https://github.com/jaywcjlove/reference/discussions/206#discussion-4625735)
[quickref.cn](https://quickref.cn)<!--rehype:target=_blank&style=background: rgb(16 185 129);height: 2.6rem;border-radius: 2rem;font-weight: bold;-->
[ecdata.cn](http://ref.ecdata.cn)<!--rehype:target=_blank&style=background: rgb(16 185 129);height: 2.6rem;border-radius: 2rem;font-weight: bold;-->
[aibk.cn](https://quickref.aibk.cn)<!--rehype:target=_blank&style=background: rgb(16 185 129);height: 2.6rem;border-radius: 2rem;font-weight: bold;-->
[jgeek.cn](http://reference.jgeek.cn/)<!--rehype:target=_blank&style=background: rgb(16 185 129);height: 2.6rem;border-radius: 2rem;font-weight: bold;-->
[laoleng.vip](http://bbs.laoleng.vip/reference/)<!--rehype:target=_blank&style=background: rgb(16 185 129);height: 2.6rem;border-radius: 2rem;font-weight: bold;-->
[liujiapeng.com](https://www.liujiapeng.com/)<!--rehype:target=_blank&style=background: rgb(16 185 129);height: 2.6rem;border-radius: 2rem;font-weight: bold;-->
[dbyun.net](https://www.dbyun.net/reference/index.html)<!--rehype:target=_blank&style=background: rgb(16 185 129);height: 2.6rem;border-radius: 2rem;font-weight: bold;-->
[dc6.fun](https://dc6.fun/reference/)<!--rehype:target=_blank&style=background: rgb(16 185 129);height: 2.6rem;border-radius: 2rem;font-weight: bold;-->
<!--rehype:class=home-card&style=margin:2.2rem 0;display: flex;justify-content: center;gap: 1rem;flex-wrap: wrap;-->
[quickref.cn](https://quickref.cn)<!--rehype:target=_blank-->
[ecdata.cn](http://ref.ecdata.cn)<!--rehype:target=_blank-->
[aibk.cn](https://quickref.aibk.cn)<!--rehype:target=_blank-->
[jgeek.cn](http://reference.jgeek.cn/)<!--rehype:target=_blank-->
[laoleng.vip](http://bbs.laoleng.vip/reference/)<!--rehype:target=_blank-->
[liujiapeng.com](https://www.liujiapeng.com/)<!--rehype:target=_blank-->
[dbyun.net](https://www.dbyun.net/reference/index.html)<!--rehype:target=_blank-->
[dc6.fun](https://dc6.fun/reference/)<!--rehype:target=_blank-->
[if010.com](https://quickref.if010.com/)<!--rehype:target=_blank-->
[pipecraft.net](https://quickref.pipecraft.net/)<!--rehype:target=_blank&class=contributing&data-info=👆需要梯子-->
[isteed.cc](https://ref.isteed.cc/)<!--rehype:target=_blank-->
[cas-air.cn](https://www.ccommunity.cas-air.cn/index.html)<!--rehype:target=_blank&class=contributing&data-info=👆非镜像,另起炉灶-->
[1han.wiki](https://code.1han.wiki/)<!--rehype:target=_blank-->
[linzhe.top](https://linzhe.top/)<!--rehype:target=_blank-->
[xushanxiang.com](https://xushanxiang.com/ref/)<!--rehype:target=_blank-->
[winnerzr01.github.io](https://winnerzr01.github.io/Quick-Reference/index.html)<!--rehype:target=_blank&class=contributing&data-info=👆需要梯子-->
[isteed.cc](https://ref.isteed.cc/)<!--rehype:target=_blank-->
[hestudio.org](https://quickref.hestudio.org)<!--rehype:target=_blank-->
[surcode.cn](https://ref.surcode.cn)<!--rehype:target=_blank-->
[hestudio.org](https://quickref.hestudio.org)<!--rehype:target=_blank-->
[cms.im](https://quickref.cms.im/)<!--rehype:target=_blank-->
[nuomiphp.com](https://reference.tool.nuomiphp.com/)<!--rehype:target=_blank-->
[eryajf.net](https://ref.eryajf.net/)<!--rehype:target=_blank-->
<!--rehype:class=home-card home-links-->
如果你有资源,可以很方便部署 web 版,这非常简单,只需要克隆 gh-pages 分支代码到你的静态服务就可以了,还可以使用 [docker](https://hub.docker.com/r/wcjiang/reference) 快捷部署 web 版。
如果你有资源,可以很方便部署 web 版,这非常简单,只需要克隆 [gh-pages](https://github.com/jaywcjlove/reference/tree/gh-pages) 分支代码到你的静态服务就可以了,还可以使用 [docker](https://hub.docker.com/r/wcjiang/reference) 快捷部署 web 版。
<!--rehype:ignore:start-->
## License

View File

@ -0,0 +1,3 @@
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill="currentColor" height="1em" width="1em">
<path d="M19.75.3H4.25C1.9.3 0 2.2 0 4.55v14.9c0 2.35 1.9 4.25 4.25 4.25h15.5c2.35 0 4.25-1.9 4.25-4.25V4.55C24 2.2 22.1.3 19.75.3zm-6.99 16.389c0 .051-.029.09-.06.121a.17.17 0 0 1-.101.029H6.26c-.11 0-.16-.061-.16-.18V6.44c-.01-.07.04-.13.11-.14h2c.05-.01.11.03.11.08v8.43h4.62c.101 0 .131.049.11.14l-.29 1.739zm6.25-7.859v1.95c0 .08-.05.11-.16.11-.649-.04-1.3.08-1.89.34-.2.09-.39.21-.54.37v5.1c0 .1-.04.14-.13.14h-1.95c-.08.01-.15-.04-.16-.119V11.14c0-.24 0-.49-.01-.75s-.01-.52-.02-.78c-.01-.22-.03-.44-.061-.66-.01-.05.02-.1.07-.11.01-.01.02-.01.04 0h1.75c.1 0 .18.07.21.16.04.07.07.15.08.23.02.1.039.21.05.31.01.11.021.23.021.36.299-.35.66-.64 1.069-.86.46-.25.97-.37 1.49-.36.069-.01.13.04.14.11l.001.04z"/>
</svg>

After

Width:  |  Height:  |  Size: 830 B

View File

@ -0,0 +1,3 @@
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill="currentColor" height="1em" width="1em">
<path d="M9.85 8.42c-.37-.15-.77-.21-1.18-.2-.26 0-.49 0-.68.01-.2-.01-.34 0-.41.01v3.36c.14.01.27.02.39.02h.53c.39 0 .78-.06 1.15-.18.32-.09.6-.28.82-.53.21-.25.31-.59.31-1.03.01-.31-.07-.62-.23-.89a1.45 1.45 0 0 0-.7-.57zM19.75.3H4.25C1.9.3 0 2.2 0 4.55v14.899c0 2.35 1.9 4.25 4.25 4.25h15.5c2.35 0 4.25-1.9 4.25-4.25V4.55C24 2.2 22.1.3 19.75.3zm-7.391 11.65c-.399.56-.959.98-1.609 1.22-.68.25-1.43.34-2.25.34-.24 0-.4 0-.5-.01s-.24-.01-.43-.01v3.209c.01.07-.04.131-.11.141H5.52c-.08 0-.12-.041-.12-.131V6.42c0-.07.03-.11.1-.11.17 0 .33 0 .56-.01.24-.01.49-.01.76-.02s.56-.01.87-.02c.31-.01.61-.01.91-.01.82 0 1.5.1 2.06.31.5.17.96.45 1.34.82.32.32.57.71.73 1.14.149.42.229.85.229 1.3.001.86-.199 1.57-.6 2.13zm7.091 3.89c-.28.4-.671.709-1.12.891-.49.209-1.09.318-1.811.318-.459 0-.91-.039-1.359-.129-.35-.061-.7-.17-1.02-.32-.07-.039-.121-.109-.111-.189v-1.74c0-.029.011-.07.041-.09.029-.02.06-.01.09.01.39.23.8.391 1.24.49.379.1.779.15 1.18.15.38 0 .65-.051.83-.141.16-.07.27-.24.27-.42 0-.141-.08-.27-.24-.4-.16-.129-.489-.279-.979-.471-.51-.18-.979-.42-1.42-.719a2.625 2.625 0 0 1-.761-.85 2.158 2.158 0 0 1-.229-1.021c0-.43.12-.84.341-1.21.25-.4.619-.72 1.049-.92.469-.239 1.059-.349 1.769-.349.41 0 .83.03 1.24.09.3.04.59.12.86.23.039.01.08.05.1.09.01.04.02.08.02.12v1.63c0 .04-.02.08-.05.1-.09.02-.14.02-.18 0-.3-.16-.62-.27-.96-.34-.37-.08-.74-.13-1.12-.13-.2-.01-.41.02-.601.07-.129.03-.24.1-.31.2-.05.08-.08.18-.08.27s.04.18.101.26c.09.11.209.2.34.27.229.12.47.23.709.33.541.18 1.061.43 1.541.73.33.209.6.49.789.83.16.318.24.67.23 1.029.011.471-.129.94-.389 1.331z"/>
</svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

2
assets/adobe-xd.svg Normal file
View File

@ -0,0 +1,2 @@
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 230 225">
<path fill="currentColor" d="M191.816406,0 C212.904623,-3.87384253e-15 230,17.0953772 230,38.1835938 L230,186.066406 C230,207.154623 212.904623,224.25 191.816406,224.25 L38.1835938,224.25 C17.0953772,224.25 2.58256169e-15,207.154623 0,186.066406 L0,38.1835938 C-2.58256169e-15,17.0953772 17.0953772,3.87384253e-15 38.1835938,0 L191.816406,0 Z M195.077284,49.091346 L194.968125,49.0996094 L175.526836,49.0996094 C174.910508,49.0996094 174.601445,49.4607813 174.601445,50.1795313 L174.601445,80.5754688 L173.781172,80.5035938 L172.659922,80.41375 L171.669844,80.3436719 L171.080469,80.3095313 L170.550391,80.2861719 L170.077813,80.2708984 L169.664531,80.2664063 C160.200391,80.2664063 152.125234,82.1180859 145.440859,85.8214453 L144.91168,86.1089453 C138.763421,89.5141795 133.664216,94.5369517 130.166523,100.633086 C126.671624,106.792265 124.861878,113.763817 124.919648,120.845234 L124.923242,121.532539 C125.011289,129.971563 126.759648,137.020703 130.165625,142.677266 C133.543408,148.383655 138.57396,152.930169 144.591836,155.715391 C151.05183,158.667646 158.088508,160.143302 165.190313,160.035078 L166.254063,160.023398 C170.866829,159.944136 175.465136,159.483464 180.001953,158.646094 C185.345985,157.661087 190.569912,156.10972 195.585352,154.018242 C196.182744,153.743842 196.550536,153.130974 196.511641,152.474727 L196.358906,150.159453 L196.071406,146.156914 C195.952813,144.392383 195.893516,142.742852 195.893516,141.211914 L195.893516,50.025 C195.930082,49.7701021 195.844423,49.5128727 195.662338,49.3307875 C195.480252,49.1487023 195.223023,49.0630429 194.968125,49.0996094 Z M121.116289,57.8451797 C120.918558,57.505081 120.519883,57.3365583 120.138164,57.4317187 L99.9260156,57.4317187 C99.5008674,57.3901695 99.0726792,57.4705716 98.6915625,57.6635156 C98.4049609,57.9411328 98.1929297,58.2861328 98.0743359,58.6670703 C95.989605,62.7301089 93.855056,66.7673925 91.6711719,70.7780078 C89.4592187,74.8407422 87.2984766,78.8792187 85.1916406,82.8907422 C83.046362,86.9730975 80.9632439,91.0878173 78.9430078,95.2334766 L78.7884766,95.2334766 C76.817187,91.0868307 74.6810973,87.0205574 72.3853125,83.044375 C70.0538061,79.0056478 67.7650584,74.9423869 65.5194531,70.8552734 C63.2562891,66.7422266 61.1988672,62.6273828 59.3471875,58.5125391 C59.1073047,58.1630469 58.7901562,57.8728516 58.4217969,57.6635156 C57.9815263,57.4848886 57.5072287,57.4053935 57.0328125,57.4317187 L35.2780469,57.4317187 C34.9257161,57.4076934 34.5826053,57.5507949 34.3517578,57.8180469 C34.1469141,58.0767969 34.198125,58.4110156 34.5062891,58.8207031 L63.5132422,107.884375 L33.7354297,156.795312 C33.5281595,157.114603 33.4456497,157.499009 33.5036328,157.875234 C33.5359766,158.128594 33.6366016,158.164531 33.8046094,158.154648 L34.1064844,158.127695 L34.198125,158.125 L55.3356641,158.125 L55.6860547,158.119609 C56.5278906,158.091758 57.1325391,157.921055 57.4964062,157.103477 C59.7587305,153.094326 61.9702615,149.056724 64.1304687,144.991641 C66.2894141,140.929805 68.4753125,136.840117 70.6881641,132.725273 C72.8822374,128.642268 75.0168509,124.527589 77.0913281,120.382539 L77.2458594,120.382539 C79.492198,124.571384 81.7809354,128.737353 84.1117187,132.879805 L84.9724219,134.419727 C86.9211424,137.916516 88.8200324,141.440844 90.6685156,144.991641 C92.7350026,148.972723 94.7924298,152.958502 96.8407813,156.948945 C97.3645703,157.824023 98.224375,157.994727 99.4175,158.026172 L99.8523438,158.033359 L121.989844,158.033359 C122.132695,158.01 122.261172,158.004609 122.376172,158.004609 L122.588203,158.01 L122.7625,158.012695 C122.919727,158.006406 123.022148,157.965078 123.069766,157.797969 C123.167695,157.40625 123.112891,156.992969 122.915234,156.640781 L92.2111328,106.341758 L120.909922,58.9734375 L120.99168,58.8997656 C121.263231,58.6151174 121.314021,58.1852783 121.116289,57.8451797 Z M168.892773,98.1641797 C169.949193,98.1613542 171.005057,98.212933 172.056172,98.3187109 C172.916134,98.4008331 173.7676,98.5556177 174.601445,98.7814063 L174.601445,140.902852 L174.125273,141.034922 C173.169038,141.283616 172.192412,141.445986 171.207148,141.520078 C169.971797,141.623398 168.634922,141.675787 167.195625,141.675787 C164.498244,141.68816 161.81606,141.271154 159.249844,140.440156 C156.820509,139.673501 154.602403,138.353156 152.770312,136.583164 C150.855907,134.659039 149.381532,132.342646 148.448828,129.793672 C147.303124,126.630834 146.753878,123.282959 146.828945,119.919844 L146.832539,119.401445 C146.901719,114.600195 147.955586,110.709961 149.992344,107.730742 C152.03261,104.703627 154.823739,102.257983 158.092656,100.633086 C161.448702,98.9729615 165.148754,98.1271298 168.892773,98.1641797 Z"/></svg>

After

Width:  |  Height:  |  Size: 4.6 KiB

View File

@ -0,0 +1,3 @@
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill="currentColor" height="1em" width="1em">
<path d="M19.27 10.337a.604.604 0 0 0-.603.603v9.832h-1.738l-3.336-6.94c.476-.538.68-1.285.525-2a2.286 2.286 0 0 0-1.29-1.625v-.812a.847.847 0 0 0-.844-.864.848.848 0 0 0-.432.118.86.86 0 0 0-.412.766v.72a2.3 2.3 0 0 0-1.487 2.52 2.282 2.282 0 0 0 .591 1.21l-3.21 6.907h-2.94a1.996 1.996 0 0 1-1.983-1.99V5.017c-.006 1.102.883 2 1.986 2.006a2.024 2.024 0 0 0 .132-.004h14.745s2.535-.218 2.862 1.54a.495.495 0 0 0-.445.489c0 .711-.579 1.29-1.302 1.29h-.819zm-2.048 12.2a.973.973 0 0 1-.45 1.3.965.965 0 0 1-.402.093.974.974 0 0 1-.32-.045c-.024-.008-.046-.021-.07-.031a.97.97 0 0 1-.227-.132c-.025-.02-.05-.038-.072-.06a.96.96 0 0 1-.21-.276l-1.256-2.614-1.558-3.245a.772.772 0 0 0-.7-.444h-.002a.792.792 0 0 0-.709.444l-1.51 3.245-1.233 2.646a.972.972 0 0 1-.798.58c-.063.005-.124-.002-.185-.009-.034-.003-.069-.005-.103-.012-.048-.01-.095-.028-.142-.045-.03-.012-.06-.02-.09-.034a.987.987 0 0 1-.14-.09c-.021-.015-.045-.027-.066-.044a.986.986 0 0 1-.169-.185.979.979 0 0 1-.07-.985l.846-1.822 3.268-7.031a1.796 1.796 0 0 1-.708-1.164c-.155-.98.513-1.9 1.493-2.056V9.395a.354.354 0 0 1 .168-.316.347.347 0 0 1 .354 0 .354.354 0 0 1 .167.316v1.159l.013.006a1.803 1.803 0 0 1 1.288 1.378 1.784 1.784 0 0 1-.644 1.784l3.389 7.05.848 1.765zm-4.238-10.231a1.1 1.1 0 0 0-1.093-1.109 1.12 1.12 0 0 0-.786.322 1.101 1.101 0 0 0-.323.772 1.1 1.1 0 0 0 1.093 1.108h.008a1.1 1.1 0 0 0 1.101-1.093zm-1.027 5.277a.287.287 0 0 0-.257.155l-1.413 3.034h3.374l-1.457-3.033a.274.274 0 0 0-.247-.156zm8.143-6.746h-.83a.103.103 0 0 0-.103.103v12.91a.103.103 0 0 0 .096.103h.844a1.79 1.79 0 0 0 1.783-1.79V9.047a1.79 1.79 0 0 1-1.79 1.79zM2.61 5.017v.018a1.5 1.5 0 0 0 1.487 1.487 12.061 12.061 0 0 1 .131-.003h1.129a6.598 6.598 0 0 1 1.638-3.486H4.099A1.992 1.992 0 0 0 2.18 4.53c.242.036.43.235.43.486zm6.338-2.899L7.91.328a.219.219 0 0 1 0-.218.238.238 0 0 1 .187-.11.219.219 0 0 1 .187.11l1.05 1.815a6.49 6.49 0 0 1 5.318 0L15.696.11a.219.219 0 0 1 .373.22l-1.03 1.79a6.122 6.122 0 0 1 3.098 4.401L5.85 6.52a6.122 6.122 0 0 1 3.097-4.4zm5.377 2.62a.515.515 0 0 0 .527.503.515.515 0 0 0 .516-.515.521.521 0 0 0-.889-.367.515.515 0 0 0-.154.38zm-5.717-.006a.515.515 0 0 0 .52.51.509.509 0 0 0 .367-.149.521.521 0 1 0-.734-.734.515.515 0 0 0-.153.373z"/>
</svg>

After

Width:  |  Height:  |  Size: 2.3 KiB

3
assets/firefox.svg Normal file
View File

@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="currentColor" height="1em" width="1em">
<path d="M503.52 241.48c-.12-1.56-.24-3.12-.24-4.68v-.12l-.36-4.68v-.12a245.86 245.86 0 0 0-7.32-41.15c0-.12 0-.12-.12-.24l-1.08-4c-.12-.24-.12-.48-.24-.6-.36-1.2-.72-2.52-1.08-3.72-.12-.24-.12-.6-.24-.84-.36-1.2-.72-2.4-1.08-3.48-.12-.36-.24-.6-.36-1-.36-1.2-.72-2.28-1.2-3.48l-.36-1.08c-.36-1.08-.84-2.28-1.2-3.36a8.27 8.27 0 0 0-.36-1c-.48-1.08-.84-2.28-1.32-3.36-.12-.24-.24-.6-.36-.84-.48-1.2-1-2.28-1.44-3.48 0-.12-.12-.24-.12-.36-1.56-3.84-3.24-7.68-5-11.4l-.36-.72c-.48-1-.84-1.8-1.32-2.64-.24-.48-.48-1.08-.72-1.56-.36-.84-.84-1.56-1.2-2.4-.36-.6-.6-1.2-1-1.8s-.84-1.44-1.2-2.28c-.36-.6-.72-1.32-1.08-1.92s-.84-1.44-1.2-2.16a18.07 18.07 0 0 0-1.2-2c-.36-.72-.84-1.32-1.2-2s-.84-1.32-1.2-2-.84-1.32-1.2-1.92-.84-1.44-1.32-2.16a15.63 15.63 0 0 0-1.2-1.8L463.2 119a15.63 15.63 0 0 0-1.2-1.8c-.48-.72-1.08-1.56-1.56-2.28-.36-.48-.72-1.08-1.08-1.56l-1.8-2.52c-.36-.48-.6-.84-1-1.32-1-1.32-1.8-2.52-2.76-3.72a248.76 248.76 0 0 0-23.51-26.64A186.82 186.82 0 0 0 412 62.46c-4-3.48-8.16-6.72-12.48-9.84a162.49 162.49 0 0 0-24.6-15.12c-2.4-1.32-4.8-2.52-7.2-3.72a254 254 0 0 0-55.43-19.56c-1.92-.36-3.84-.84-5.64-1.2h-.12c-1-.12-1.8-.36-2.76-.48a236.35 236.35 0 0 0-38-4h-10.63a234.62 234.62 0 0 0-45.48 5c-33.59 7.08-63.23 21.24-82.91 39-1.08 1-1.92 1.68-2.4 2.16l-.48.48h.13l-.12.12.12-.12a.12.12 0 0 0 .12-.12l-.12.12a.42.42 0 0 1 .24-.12c14.64-8.76 34.92-16 49.44-19.56l5.88-1.44c.36-.12.84-.12 1.2-.24 1.68-.36 3.36-.72 5.16-1.08.24 0 .6-.12.84-.12C250.94 20.94 319.34 40.14 367 85.61a171.49 171.49 0 0 1 26.88 32.76c30.36 49.2 27.48 111.11 3.84 147.59-34.44 53-111.35 71.27-159 24.84a84.19 84.19 0 0 1-25.56-59 74.05 74.05 0 0 1 6.24-31c1.68-3.84 13.08-25.67 18.24-24.59-13.08-2.76-37.55 2.64-54.71 28.19-15.36 22.92-14.52 58.2-5 83.28a132.85 132.85 0 0 1-12.12-39.24c-12.24-82.55 43.31-153 94.31-170.51-27.48-24-96.47-22.31-147.71 15.36-29.88 22-51.23 53.16-62.51 90.36 1.68-20.88 9.6-52.08 25.8-83.88-17.16 8.88-39 37-49.8 62.88-15.6 37.43-21 82.19-16.08 124.79.36 3.24.72 6.36 1.08 9.6 19.92 117.11 122 206.38 244.78 206.38C392.77 503.42 504 392.19 504 255c-.12-4.52-.24-9.08-.48-13.52Z"/>
</svg>

After

Width:  |  Height:  |  Size: 2.2 KiB

3
assets/github.svg Normal file
View 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

9
assets/gitlab.svg Normal file
View File

@ -0,0 +1,9 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 236" height="1em" width="1em">
<path d="m128.075 236.075 47.104-144.97H80.97l47.104 144.97z" fill="#E24329"/>
<path d="M128.075 236.074 80.97 91.104H14.956l113.119 144.97z" fill="#FC6D26"/>
<path d="M14.956 91.104.642 135.16a9.752 9.752 0 0 0 3.542 10.903l123.891 90.012-113.12-144.97z" fill="#FCA326"/>
<path d="M14.956 91.105H80.97L52.601 3.79c-1.46-4.493-7.816-4.492-9.275 0l-28.37 87.315z" fill="#E24329"/>
<path d="m128.075 236.074 47.104-144.97h66.015l-113.12 144.97z" fill="#FC6D26"/>
<path d="m241.194 91.104 14.314 44.056a9.752 9.752 0 0 1-3.543 10.903l-123.89 90.012 113.119-144.97z" fill="#FCA326"/>
<path d="M241.194 91.105h-66.015l28.37-87.315c1.46-4.493 7.816-4.492 9.275 0l28.37 87.315z" fill="#E24329"/>
</svg>

After

Width:  |  Height:  |  Size: 798 B

3
assets/google-chrome.svg Normal file
View File

@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 512 512" height="1em" width="1em">
<path d="M0 256c0-46.6 12.47-90.4 34.27-128.9L144.1 318.3C166 357.5 207.9 384 256 384c14.3 0 27.1-2.3 40.8-6.6l-76.3 132.2C95.9 492.3 0 385.3 0 256zm365.1 65.6c12.3-19.2 18.9-42.5 18.9-65.6 0-38.2-16.8-72.5-43.3-96h152.7c12 29.6 18.6 62.1 18.6 96 0 141.4-114.6 255.1-256 256l109.1-190.4zM477.8 128H256c-62.9 0-113.7 44.1-125.5 102.7L54.19 98.47C101 38.53 174 0 256 0c94.8 0 177.5 51.48 221.8 128zM168 256c0-48.6 39.4-88 88-88s88 39.4 88 88-39.4 88-88 88-88-39.4-88-88z"/>
</svg>

After

Width:  |  Height:  |  Size: 589 B

3
assets/nextjs.svg Normal file
View File

@ -0,0 +1,3 @@
<svg viewBox="0 0 15 15" fill="none" xmlns="http://www.w3.org/2000/svg" height="1em" width="1em">
<path fill-rule="evenodd" clip-rule="evenodd" d="M0 7.5a7.5 7.5 0 1 1 11.697 6.216L4.907 4.21A.5.5 0 0 0 4 4.5V12h1V6.06l5.83 8.162A7.5 7.5 0 0 1 0 7.5ZM10 10V4h1v6h-1Z" fill="currentColor"/>
</svg>

After

Width:  |  Height:  |  Size: 299 B

3
assets/pm2.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 5.7 KiB

7
assets/react-native.svg Normal file
View File

@ -0,0 +1,7 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" height="1em" width="1em">
<circle cx="12" cy="11.245" r="1.785"/>
<path d="m7.002 14.794-.395-.101c-2.934-.741-4.617-2.001-4.617-3.452 0-1.452 1.684-2.711 4.617-3.452l.395-.1.111.391a19.507 19.507 0 0 0 1.136 2.983l.085.178-.085.178c-.46.963-.841 1.961-1.136 2.985l-.111.39zm-.577-6.095c-2.229.628-3.598 1.586-3.598 2.542 0 .954 1.368 1.913 3.598 2.54.273-.868.603-1.717.985-2.54a20.356 20.356 0 0 1-.985-2.542zm10.572 6.095-.11-.392a19.628 19.628 0 0 0-1.137-2.984l-.085-.177.085-.179c.46-.961.839-1.96 1.137-2.984l.11-.39.395.1c2.935.741 4.617 2 4.617 3.453 0 1.452-1.683 2.711-4.617 3.452l-.395.101zm-.41-3.553c.4.866.733 1.718.987 2.54 2.23-.627 3.599-1.586 3.599-2.54 0-.956-1.368-1.913-3.599-2.542a20.683 20.683 0 0 1-.987 2.542z"/>
<path d="m6.419 8.695-.11-.39c-.826-2.908-.576-4.991.687-5.717 1.235-.715 3.222.13 5.303 2.265l.284.292-.284.291a19.718 19.718 0 0 0-2.02 2.474l-.113.162-.196.016a19.646 19.646 0 0 0-3.157.509l-.394.098zm1.582-5.529c-.224 0-.422.049-.589.145-.828.477-.974 2.138-.404 4.38.891-.197 1.79-.338 2.696-.417a21.058 21.058 0 0 1 1.713-2.123c-1.303-1.267-2.533-1.985-3.416-1.985zm7.997 16.984c-1.188 0-2.714-.896-4.298-2.522l-.283-.291.283-.29a19.827 19.827 0 0 0 2.021-2.477l.112-.16.194-.019a19.473 19.473 0 0 0 3.158-.507l.395-.1.111.391c.822 2.906.573 4.992-.688 5.718a1.978 1.978 0 0 1-1.005.257zm-3.415-2.82c1.302 1.267 2.533 1.986 3.415 1.986.225 0 .423-.05.589-.145.829-.478.976-2.142.404-4.384-.89.198-1.79.34-2.698.419a20.526 20.526 0 0 1-1.71 2.124z"/>
<path d="m17.58 8.695-.395-.099a19.477 19.477 0 0 0-3.158-.509l-.194-.017-.112-.162A19.551 19.551 0 0 0 11.7 5.434l-.283-.291.283-.29c2.08-2.134 4.066-2.979 5.303-2.265 1.262.727 1.513 2.81.688 5.717l-.111.39zm-3.287-1.421c.954.085 1.858.228 2.698.417.571-2.242.425-3.903-.404-4.381-.824-.477-2.375.253-4.004 1.841.616.67 1.188 1.378 1.71 2.123zM8.001 20.15a1.983 1.983 0 0 1-1.005-.257c-1.263-.726-1.513-2.811-.688-5.718l.108-.391.395.1c.964.243 2.026.414 3.158.507l.194.019.113.16c.604.878 1.28 1.707 2.02 2.477l.284.29-.284.291c-1.583 1.627-3.109 2.522-4.295 2.522zm-.993-5.362c-.57 2.242-.424 3.906.404 4.384.825.47 2.371-.255 4.005-1.842a21.17 21.17 0 0 1-1.713-2.123 20.692 20.692 0 0 1-2.696-.419z"/>
<path d="M12 15.313c-.687 0-1.392-.029-2.1-.088l-.196-.017-.113-.162a25.697 25.697 0 0 1-1.126-1.769 26.028 26.028 0 0 1-.971-1.859l-.084-.177.084-.179c.299-.632.622-1.252.971-1.858.347-.596.726-1.192 1.126-1.77l.113-.16.196-.018a25.148 25.148 0 0 1 4.198 0l.194.019.113.16a25.136 25.136 0 0 1 2.1 3.628l.083.179-.083.177a24.742 24.742 0 0 1-2.1 3.628l-.113.162-.194.017c-.706.057-1.412.087-2.098.087zm-1.834-.904c1.235.093 2.433.093 3.667 0a24.469 24.469 0 0 0 1.832-3.168 23.916 23.916 0 0 0-1.832-3.168 23.877 23.877 0 0 0-3.667 0 23.743 23.743 0 0 0-1.832 3.168 24.82 24.82 0 0 0 1.832 3.168z"/>
</svg>

After

Width:  |  Height:  |  Size: 2.8 KiB

11
assets/redis.svg Normal file
View File

@ -0,0 +1,11 @@
<svg viewBox="0 0 256 220" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid" height="1em" width="1em">
<path d="M245.97 168.943c-13.662 7.121-84.434 36.22-99.501 44.075-15.067 7.856-23.437 7.78-35.34 2.09-11.902-5.69-87.216-36.112-100.783-42.597C3.566 169.271 0 166.535 0 163.951v-25.876s98.05-21.345 113.879-27.024c15.828-5.679 21.32-5.884 34.79-.95 13.472 4.936 94.018 19.468 107.331 24.344l-.006 25.51c.002 2.558-3.07 5.364-10.024 8.988" fill="#912626"/>
<path d="M245.965 143.22c-13.661 7.118-84.431 36.218-99.498 44.072-15.066 7.857-23.436 7.78-35.338 2.09-11.903-5.686-87.214-36.113-100.78-42.594-13.566-6.485-13.85-10.948-.524-16.166 13.326-5.22 88.224-34.605 104.055-40.284 15.828-5.677 21.319-5.884 34.789-.948 13.471 4.934 83.819 32.935 97.13 37.81 13.316 4.881 13.827 8.9.166 16.02" fill="#C6302B"/>
<path d="M245.97 127.074c-13.662 7.122-84.434 36.22-99.501 44.078-15.067 7.853-23.437 7.777-35.34 2.087-11.903-5.687-87.216-36.112-100.783-42.597C3.566 127.402 0 124.67 0 122.085V96.206s98.05-21.344 113.879-27.023c15.828-5.679 21.32-5.885 34.79-.95C162.142 73.168 242.688 87.697 256 92.574l-.006 25.513c.002 2.557-3.07 5.363-10.024 8.987" fill="#912626"/>
<path d="M245.965 101.351c-13.661 7.12-84.431 36.218-99.498 44.075-15.066 7.854-23.436 7.777-35.338 2.087-11.903-5.686-87.214-36.112-100.78-42.594-13.566-6.483-13.85-10.947-.524-16.167C23.151 83.535 98.05 54.148 113.88 48.47c15.828-5.678 21.319-5.884 34.789-.949 13.471 4.934 83.819 32.933 97.13 37.81 13.316 4.88 13.827 8.9.166 16.02" fill="#C6302B"/>
<path d="M245.97 83.653c-13.662 7.12-84.434 36.22-99.501 44.078-15.067 7.854-23.437 7.777-35.34 2.087-11.903-5.687-87.216-36.113-100.783-42.595C3.566 83.98 0 81.247 0 78.665v-25.88s98.05-21.343 113.879-27.021c15.828-5.68 21.32-5.884 34.79-.95C162.142 29.749 242.688 44.278 256 49.155l-.006 25.512c.002 2.555-3.07 5.361-10.024 8.986" fill="#912626"/>
<path d="M245.965 57.93c-13.661 7.12-84.431 36.22-99.498 44.074-15.066 7.854-23.436 7.777-35.338 2.09C99.227 98.404 23.915 67.98 10.35 61.497-3.217 55.015-3.5 50.55 9.825 45.331 23.151 40.113 98.05 10.73 113.88 5.05c15.828-5.679 21.319-5.883 34.789-.948 13.471 4.935 83.819 32.934 97.13 37.811 13.316 4.876 13.827 8.897.166 16.017" fill="#C6302B"/>
<path d="m159.283 32.757-22.01 2.285-4.927 11.856-7.958-13.23-25.415-2.284 18.964-6.839-5.69-10.498 17.755 6.944 16.738-5.48-4.524 10.855 17.067 6.391m-28.251 57.518L89.955 73.238l58.86-9.035-17.783 26.072m-56.95-50.928c17.375 0 31.46 5.46 31.46 12.194 0 6.736-14.085 12.195-31.46 12.195s-31.46-5.46-31.46-12.195c0-6.734 14.085-12.194 31.46-12.194" fill="#FFF"/>
<path d="m185.295 35.998 34.836 13.766-34.806 13.753-.03-27.52" fill="#621B1C"/>
<path d="m146.755 51.243 38.54-15.245.03 27.519-3.779 1.478-34.791-13.752" fill="#9A2928"/>
</svg>

After

Width:  |  Height:  |  Size: 2.7 KiB

354
docs/adobe-lightroom.md Normal file
View File

@ -0,0 +1,354 @@
Adobe Lightroom 键盘快捷键
===
Adobe Lightroom CC 中 251 个键盘快捷键的可视化备忘单
键盘快捷键
--------
### 使用面板
<!--rehype:wrap-class=row-span-2-->
快捷键 | 说明
:- | -
`Tab` | 显示/隐藏侧面板
`Shift` `Tab` | 显示/隐藏所有面板
`T` | 显示/隐藏工具栏
`F5` | 显示/隐藏模块选择器
`F6` | 显示/隐藏胶片
`F7` | 显示/隐藏左侧面板
`F8` | 显示/隐藏右侧面板
`Alt` `(click a panel)` | 切换独奏模式
`Shift` `(click a panel)` | 在不关闭单独面板的情况下打开一个新面板
`Ctrl` `(click a panel)` | 打开/关闭所有面板
`Ctrl` `Shift` `0-5` | 打开/关闭左侧面板,从上到下
`Ctrl` `0-9` | 打开/关闭右侧面板、库和开发模块,从上到下
`Ctrl` `1-7` | 从上到下打开/关闭右面板、幻灯片、打印和 Web 模块
<!--rehype:className=shortcuts-->
### 导航模块
快捷键 | 说明
:- | -
`Ctrl` `Alt` `1` | 转到库模块
`Ctrl` `Alt` `2` | 转到开发模块
`Ctrl` `Alt` `3` | 转到幻灯片模块
`Ctrl` `Alt` `4` | 转到打印模块
`Ctrl` `Alt` `5` | 转到网络模块
`Ctrl` `Alt` `Left/Right` | 返回/前进
`Ctrl` `Alt` `Up` | 返回上一个模块
<!--rehype:className=shortcuts-->
### 使用辅助窗口
快捷键 | 说明
:- | -
`F11` | 打开辅助窗口
`Shift` `G` | 进入网格视图
`Shift` `E` | 进入正常的放大镜视图
`Ctrl` `Shift` `Enter` | 进入锁定的放大镜视图
`Shift` `C` | 进入比较视图
`Shift` `N` | 进入调查视图
`Ctrl` `Alt` `Shift` `Enter` | 进入幻灯片视图
`Shift` `F11` | 进入全屏模式(需要第二台显示器)
`Shift` `\` | 显示/隐藏过滤栏
`Ctrl` `Shift` `+/-` | 放大/缩小
<!--rehype:className=shortcuts-->
### 在开发模块中工作
<!--rehype:wrap-class=row-span-5-->
快捷键 | 说明
:- | -
`V` | 转换为灰度
`Ctrl` `U` | 自动音调
`Ctrl` `Shift` `U` | 自动白平衡
`Ctrl` `E` | 在 Photoshop 中编辑
`Ctrl` `Shift` `C/V` | 复制/粘贴开发设置
`Ctrl` `Alt` `V` | 粘贴上一张照片的设置
`Ctrl` `Alt` `Shift` `Left` | 将之后的设置复制到之前
`Ctrl` `Alt` `Shift` `Right` | 将之前的设置复制到之后
`Ctrl` `Alt` `Shift` `Up` | 交换前后设置
`Up/Down` | 以小增量增加/减少选定的滑块
`Shift` `Up/Down` | 以较大的增量增加/减少选定的滑块
`./,` | 循环浏览基本面板设置(向前/向后)
`(double-click slider name)` | 重置滑块
`Alt` `(click group name)` | 重置一组滑块
`Ctrl` `Shift` `R` | 重置所有设置
`Ctrl` `Shift` `S` | 同步设置
`Ctrl` `Alt` `S` | 绕过同步设置对话框同步设置
`Ctrl` `(click Sync button)` | 切换自动同步
`Ctrl` `Alt` `Shift` `A` | 启用自动同步
`Ctrl` `Alt` `Shift` `M` | 匹配总曝光量
`W` | 选择白平衡工具(来自任何模块)
`R` | 选择裁剪工具(来自任何模块)
`A` | 选择裁剪工具时限制纵横比
`Shift` `A` | 裁剪为与上一次裁剪相同的纵横比
`Alt` `(drag)` | 从照片中心裁剪
`O` | 循环作物网格覆盖
`Shift` `O` | 循环裁剪网格叠加方向
`X` | 在纵向和横向之间切换裁剪
`Ctrl` `Alt` `R` | 重置作物
`Shift` `T` | 选择 Guided Upright 工具
`Q` | 选择 Sopt 删除工具
`Shift` `T` | 选择污点去除工具时在克隆和修复模式之间切换笔刷
`K` | 选择调整画笔工具(来自任何模块)
`M` | 选择渐变滤镜工具
`Shift` `T` | 选择渐变/径向滤镜时在编辑和画笔模式之间切换蒙版
`]/[` | 增大/减小画笔大小
`Shift` `]/[` | 增加/减少笔刷羽化
`/` | 在局部调整刷A和B之间切换
`Alt` `(drag)` | 暂时从画笔 A 或 B 切换到橡皮擦
`Shift` `(drag)` | 绘制水平线或垂直线
`H` | 显示/隐藏局部调整引脚
`O` | 显示/隐藏局部调整蒙版覆盖
`Shift` `O` | 循环局部调整蒙版叠加颜色
`Ctrl` `Alt` `Shift` `T` | 选择目标调整工具以应用色调曲线调整
`Ctrl` `Alt` `Shift` `H` | 选择目标调整工具以应用色相调整
`Ctrl` `Alt` `Shift` `S` | 选择目标调整工具以应用饱和度调整
`Ctrl` `Alt` `Shift` `L` | 选择目标调整工具以应用亮度调整
`Ctrl` `Alt` `Shift` `G` | 选择目标调整工具以应用灰度混合调整
`Ctrl` `Alt` `Shift` `N` | 取消选择目标调整工具
`J` | 显示剪辑
`Ctrl` `]` | 向右旋转照片(顺时针)
`Ctrl` `[` | 向左旋转照片(逆时针)
`Space/Z` | 在放大镜和 1:1 缩放预览之间切换
`Ctrl` `+/-` | 放大/缩小
`Ctrl` `Enter` | 播放即兴幻灯片
`Y` | 查看左/右之前和之后
`Alt` `Y` | 查看顶部/底部之前和之后
`Shift` `Y` | 在分屏中查看之前和之后
`\` | 仅查看之前
`Ctrl` `N` | 创建新快照
`Ctrl` `Shift` `N` | 创建新预设
`Ctrl` `Alt` `N` | 创建一个新的预设文件夹
`Ctrl` `J` | 打开开发视图选项
<!--rehype:className=shortcuts-->
### 更改视图和屏幕模式
<!--rehype:wrap-class=row-span-2-->
快捷键 | 说明
:- | -
`E` | 进入图书馆放大镜视图
`G` | 进入库网格视图
`C` | 进入图书馆比较视图
`N` | 进入图书馆调查视图
`D` | 在修改照片模块中打开选定的照片
`L` | 通过 Lights Out 模式向前循环
`Shift` `L` | 通过 Lights Out 模式向后循环
`Ctrl` `Shift` `L` | 切换灯光昏暗模式
`F` | 循环屏幕模式
`Ctrl` `Shift` `F` | 在普通和全屏之间切换,隐藏面板
`Ctrl` `Alt` `F` | 进入普通屏幕模式
`I` | 循环信息叠加
`Ctrl` `I` | 显示/隐藏信息覆盖
<!--rehype:className=shortcuts-->
### 管理照片和目录
<!--rehype:wrap-class=row-span-2-->
快捷键 | 说明
:- | -
`Ctrl` `Shift` `I` | 从磁盘导入照片
`Ctrl` `O` | 打开目录
`Ctrl` `,` | 打开首选项
`Ctrl` `Alt` `,` | 打开目录设置
`Ctrl` `Shift` `T` | 创建新的子文件夹(分段联机捕获)
`Ctrl` `T` | 隐藏/显示系绳捕获栏
`Ctrl` `Shift` `N` | 在库模块中创建一个新文件夹
`Ctrl` `'` | 创建虚拟副本(仅限库和开发模块)
`Ctrl` `R` | 在资源管理器/Finder 中显示(仅限库和开发模块)
`Right/Left` | 转到胶片中的下一张/上一张照片
`Shift/Ctrl` `Click` | 选择多个文件夹或集合(在库、幻灯片、打印和 Web 模块中)
`F2` | 重命名照片(在图库模块中)
`Delete` | 删除所选照片
`Alt` `Backspace` | 从目录中删除所选照片
`Ctrl` `Alt` `Shift` `Backspace` | 删除所选照片并移至废纸篓
`Ctrl` `Backspace` | 删除被拒绝的照片
`Ctrl` `E` | 在 Photoshop 中编辑
`Ctrl` `Alt` `E` | 在其他编辑器中打开
`Ctrl` `Shift` `E` | 导出所选照片
`Ctrl` `Alt` `Shift` `E` | 使用以前的设置导出
`Ctrl` `Alt` `Shift` `,` | 打开插件管理器
`Ctrl` `P` | 打印所选照片
`Ctrl` `Shift` `P` | 打开页面设置对话框
<!--rehype:className=shortcuts-->
### 比较图库模块中的照片
<!--rehype:wrap-class=row-span-2-->
快捷键 | 说明
:- | -
`E/Enter` | 切换到放大视图
`G/Esc` | 切换到网格视图
`C` | 切换到比较视图
`N` | 切换到调查视图
`Space/E` | 从网格切换到放大视图
`Down` | 在比较视图中交换选择和候选照片
`Up` | 在比较视图中选择下一张照片和候选照片
`Z` | 切换缩放视图
`Ctrl` `+/-` | 在放大镜视图中放大/缩小
`PgUp/PgDown` | 在放大视图中向上/向下滚动放大的照片
`Home/End` | 转到网格视图的开头/结尾
`Ctrl` `Enter` | 播放即兴幻灯片
`Ctrl` `]` | 向右旋转照片(顺时针)
`Ctrl` `[` | 向左旋转照片(逆时针)
`=/-` | 增加/减少网格缩略图大小
`PgUp/PgDown` | 向上/向下滚动网格缩略图
`Ctrl` `Shift` `H` | 切换单元格附加功能
`Ctrl` `Alt` `Shift` `H` | 显示/隐藏徽章
`J` | 循环网格视图
`Ctrl` `J` | 打开库视图选项
`Ctrl` `(click)` | 选择多张离散照片
`Shift` `(click)` | 选择多张连续照片
`Ctrl` `A` | 选择所有照片
`Ctrl` `D` | 取消选择所有照片
`Ctrl` `Shift` `D` | 仅选择活动照片
`/` | 取消选择现用照片
`Shift` `Left/Right` | 将上一张/下一张照片添加到选择
`Ctrl` `Alt` `A` | 选择标记的照片
`Ctrl` `Alt` `Shift` `D` | 取消选择未标记的照片
`Ctrl` `G` | 分组入栈
`Ctrl` `Shift` `G` | 拆叠
`S` | 切换堆栈
`Shift` `S` | 移动到堆栈顶部
`Shift` `[` | 在堆栈中向上移动
`Shift` `]` | 在堆栈中向下移动
<!--rehype:className=shortcuts-->
### 评级和过滤照片
<!--rehype:wrap-class=row-span-2-->
快捷键 | 说明
:- | -
`1-5` | 设置星级
`Shift` `1-5` | 设置星级并转到下一张照片
`0` | 删除星级
`Shift` `0` | 删除星级并转到下一张照片
`]/[` | 将评分提高/降低一颗星
`6` | 分配一个红色标签
`7` | 分配黄色标签
`8` | 分配一个绿色标签
`9` | 分配一个蓝色标签
`Shift` `6-9` | 分配颜色标签并转到下一张照片
`P` | 将照片标记为精选
`Shift` `P` | 将照片标记为精选并转到下一张照片
`X` | 将照片标记为拒绝
`Shift` `X` | 将照片标记为拒绝并转到下一张照片
`U` | 取消标记照片
`Shift` `U` | 取消标记照片并转到下一张照片
`Ctrl` `Up/Down` | 增加/减少标志状态
<code>\`</code> | 循环标志设置
`Ctrl` `Alt` `R` | 优化照片
`\` | 显示/隐藏库过滤器栏
`Shift` `(click filter labels)` | 在过滤器栏中打开多个过滤器
`Shift` `L` | 打开/关闭过滤器
`Ctrl` `F` | 在图库模块中查找照片
<!--rehype:className=shortcuts-->
### 使用集合
快捷键 | 说明
:- | -
`Ctrl` `N` | 在 Library 模块中创建一个新的集合
`B` | 添加到快速收藏
`Shift` `B` | 添加到快速收藏并转到下一张照片
`Ctrl` `B` | 显示快速收藏
`Ctrl` `Alt` `B` | 保存快速收藏
`Ctrl` `Shift` `B` | 清除快速收藏
`Ctrl` `Alt` `Shift` `B` | 设为目标集合
<!--rehype:className=shortcuts-->
### 在库模块中使用元数据和关键字
快捷键 | 说明
:- | -
`Ctrl` `K` | 添加关键字
`Ctrl` `Shift` `K` | 修改关键字
`Ctrl` `Alt` `Shift` `K` | 设置关键字快捷方式
`Shift` `K` | 从所选照片中添加/删除关键字快捷方式
`Ctrl` `Alt` `K` | 启用绘画
`Alt` `1-9` | 将关键字集中的关键字添加到所选照片
`Alt` `0` | 通过关键字集向前循环
`Alt` `Shift` `0` | 通过关键字集循环反向词
`Ctrl` `Alt` `Shift` `C/V` | 复制/粘贴元数据
`Ctrl` `S` | 将元数据保存到文件
<!--rehype:className=shortcuts-->
### 在幻灯片模块中工作
快捷键 | 说明
:- | -
`Enter` | 播放幻灯片
`Ctrl` `Enter` | 播放即兴幻灯片
`Space` | 暂停幻灯片放映
`Alt` `Enter` | 预览幻灯片
`Esc` | 结束幻灯片放映
`Right` | 转到下一张幻灯片
`Left` | 转到上一张幻灯片
`Ctrl` `]` | 向右旋转照片(顺时针)
`Ctrl` `[` | 向左旋转照片(逆时针)
`Ctrl` `Shift` `H` | 显示/隐藏指南
`Ctrl` `J` | 导出 PDF 幻灯片放映
`Ctrl` `Shift` `J` | 导出 JPEG 幻灯片放映
`Ctrl` `Alt` `J` | 导出视频幻灯片
`Ctrl` `N` | 创建新的幻灯片放映模板
`Ctrl` `Shift` `N` | 创建新的幻灯片放映模板文件夹
`Ctrl` `S` | 保存幻灯片放映设置
<!--rehype:className=shortcuts-->
### 在打印模块中工作
<!--rehype:wrap-class=row-span-2-->
快捷键 | 说明
:- | -
`Ctrl` `P` | 打印
`Ctrl` `Alt` `P` | 打印一份
`Ctrl` `Shift` `P` | 打开页面设置对话框
`Ctrl` `Alt` `Shift` `P` | 打开打印设置对话框
`Ctrl` `Shift` `Left` | 转到第一页
`Ctrl` `Shift` `Right` | 转到最后一页
`Ctrl` `Left` | 转到上一页
`Ctrl` `Right` | 转到下一页
`Ctrl` `Shift` `H` | 显示/隐藏指南
`Ctrl` `R` | 显示/隐藏标尺
`Ctrl` `Shift` `J` | 显示/隐藏页面出血
`Ctrl` `Shift` `M` | 显示/隐藏边距和装订线
`Ctrl` `Shift` `K` | 显示/隐藏图像单元格
`Ctrl` `Shift` `U` | 显示/隐藏尺寸
`Ctrl` `Enter` | 播放即兴幻灯片
`Ctrl` `]` | 向右旋转照片(顺时针)
`Ctrl` `[` | 向左旋转照片(逆时针)
`Ctrl` `N` | 创建一个新的打印模板
`Ctrl` `Shift` `N` | 创建一个新的打印模板文件夹
`Ctrl` `S` | 保存打印设置
<!--rehype:className=shortcuts-->
### 在 Web 模块中工作
快捷键 | 说明
:- | -
`Ctrl` `R` | 重新加载网络画廊
`Ctrl` `Alt` `P` | 在浏览器中预览
`Ctrl` `Enter` | 播放即兴幻灯片
`Ctrl` `J` | 导出网络画廊
`Ctrl` `N` | 创建新的 Web 画廊模板
`Ctrl` `Shift` `N` | 创建新的 Web 画廊模板文件夹
`Ctrl` `S` | 保存 Web 画廊设置
<!--rehype:className=shortcuts-->
### 使用帮助
快捷键 | 说明
:- | -
`Ctrl` `/` | 显示当前模块快捷方式
`(click)` | 隐藏当前模块快捷方式
`Ctrl` `Alt` `/` | 转到当前模块帮助
`F1` | 打开社区帮助
<!--rehype:className=shortcuts-->
另见
--------
- [Keyboard shortcuts for Adobe Lightroom CC](https://helpx.adobe.com/lightroom/help/keyboard-shortcuts.html) _(helpx.adobe.com)_

433
docs/adobe-photoshop.md Normal file
View File

@ -0,0 +1,433 @@
Adobe Photoshop 键盘快捷键 备忘清单
===
Adobe Photoshop 中 283 个[键盘快捷键](https://helpx.adobe.com/photoshop/using/default-keyboard-shortcuts.html)的可视化备忘单
键盘快捷键
---------
### 热门快捷方式
快捷键 | 说明
:- | -
`Ctrl` `T` | 自由变换
`[` | 减小画笔大小
`]` | 增加画笔大小
`Shift` `[` | 降低画笔硬度
`Shift` `]` | 增加笔刷硬度
`D` | 默认前景/背景颜色
`X` | 切换前景/背景颜色
`Ctrl` `J` | 通过复制新建图层
`Ctrl` `Shift` `J` | 通过剪切新建图层
`Esc` | 取消任何模态对话框窗口(包括启动工作区)
`Enter` | 选择工具栏的第一个编辑字段
`Tab` | 在字段之间导航
`Shift` `Tab` | 在相反方向的字段之间导航
`Alt` | 更改取消重置
`Ctrl` `F` | 调用搜索体验
<!--rehype:className=shortcuts-->
### 使用功能键
快捷键 | 说明
:- | -
`F1` | 开始帮助
`F2` | 剪切
`F3` | 复制
`F4` | 粘贴
`F5` | 显示/隐藏笔刷面板
`F6` | 显示/隐藏颜色面板
`F7` | 显示/隐藏图层面板
`F8` | 显示/隐藏信息面板
`F9` | 显示/隐藏操作面板
`F12` | 恢复
`Shift` `F5` | 充满
`Shift` `F6` | 羽毛选择
`Shift` `F7` | 反向选择
<!--rehype:className=shortcuts-->
### 选择工具
<!--rehype:wrap-class=row-span-3-->
快捷键 | 说明
:- | -
`V` | 移动工具
`M` | 矩形选框工具
`L` | 套索工具
`W` | 魔棒工具 > 快速选择工具
`C` | 裁剪工具 > 切片工具 > 切片选择工具
`I` | 吸管工具 > 标尺工具 > 注释工具
`J` | 斑点修复笔刷工具 > 修复笔刷工具 > 补丁工具 > 红眼工具
`B` | 画笔工具 > 铅笔工具 > 颜色替换工具 > 混合器画笔工具
`S` | 克隆图章工具 > 图案图章工具
`Y` | 历史画笔工具 > 艺术史画笔工具
`E` | 橡皮擦工具 > 背景橡皮擦工具 > 魔术橡皮擦工具
`G` | 渐变工具>油漆桶工具
`O` | 减淡工具 > 加深工具 > 海绵工具
`P` | 钢笔工具 > 自由钢笔工具
`T` | 横版工具 > 竖版工具 > 横版蒙版工具 > 竖版蒙版工具
`A` | 路径选择工具 > 直接选择工具
`U` | 矩形工具 > 圆角矩形工具 > 椭圆工具 > 多边形工具 > 直线工具
`H` | 手工具
`R` | 旋转视图工具
`Z` | 缩放工具
`D` | 默认前景/背景颜色
`X` | 切换前景/背景颜色
`Q` | 切换标准/快速蒙版模式
`J` | 内容感知移动工具
`C` | 透视裁剪工具
`V` | 画板工具
`R` | 旋转视图工具
`/` | 切换保持透明度
`,` | 上一刷
`.` | 下一刷
`Shift` `,` | 先刷
`Shift` `.` | 最后刷
<!--rehype:className=shortcuts-->
### 查看图片
<!--rehype:wrap-class=row-span-2-->
快捷键 | 说明
:- | -
`Ctrl` `Tab` | 循环浏览打开的文档
`Ctrl` `Shift` `Tab` | 切换到上一个文档
`Ctrl` `Shift` `W` | 在 Photoshop 中关闭文件并打开 Bridge
`F` | 在标准屏幕 > 带菜单栏的全屏 > 全屏模式之间向前切换
`Shift` `F` | 在标准屏幕 > 带菜单栏的全屏 > 全屏模式之间向后切换
`Space` `F` | 向前切换画布颜色
`Shift` `Space` `F` | 向后切换画布颜色
`Space` | 切换到手动工具(当不在文本编辑模式时)
`Ctrl` `Space` | 切换到放大工具
`Alt` `Space` | 切换到缩小工具
`Shift` `Enter` | 应用缩放百分比,并保持缩放百分比框处于活动状态
`PgUp/PgDn` | 向上或向下滚动 1 屏
`Shift` `PgUp/PgDn` | 向上或向下滚动 10 个单位
`Home` | 将视图移动到左上角
`End` | 将视图移动到右下角
`\` | 将图层蒙版打开/关闭为红宝石(必须选择图层蒙版)
<!--rehype:className=shortcuts-->
### 使用木偶变形
快捷键 | 说明
:- | -
`Esc` | 完全取消
`Ctrl` `Z` | 撤消最后一次引脚调整
`Ctrl` `A` | 选择所有引脚
`Ctrl` `D` | 取消选择所有引脚
`H` | 暂时隐藏图钉
<!--rehype:className=shortcuts-->
### 使用优化边缘
快捷键 | 说明
:- | -
`Ctrl` `Alt` `R` | 打开优化边缘对话框
`F` | 通过预览模式向前循环
`Shift` `F` | 通过预览模式向后循环
`X` | 在原始图像和选区预览之间切换
`P` | 在原始选择和优化版本之间切换
`J` | 打开和关闭半径预览
`Shift` `E` | 在 Refine Radius 和 Erase Refinement 工具之间切换
<!--rehype:className=shortcuts-->
### 使用滤镜库
快捷键 | 说明
:- | -
`Ctrl` `Alt` `F` | 重新应用上次使用的过滤器
`Ctrl` | 将取消按钮更改为默认值
`Alt` | 将取消按钮更改为重置
`Ctrl` `Z` | 撤销重做
`Ctrl` `Shift` `Z` | 向前一步
`Ctrl` `Alt` `Z` | 向后退一步
<!--rehype:className=shortcuts-->
### 使用液化滤镜
<!--rehype:wrap-class=row-span-2-->
快捷键 | 说明
:- | -
`W` | 向前扭曲工具
`R` | 重构工具
`C` | 顺时针旋转工具
`S` | 皱褶工具
`B` | 膨胀工具
`O` | 向左推工具
`M` | 镜像工具
`T` | 湍流工具
`F` | 冻结蒙版工具
`D` | 解冻蒙版工具
`Alt` `(tool)` | 反转膨胀、褶皱、向左推和镜像工具的方向
`Tab` | 从右上角循环浏览控件
`Shift` `Tab` | 从右下角循环浏览控件
`Alt` | 更改取消重置
<!--rehype:className=shortcuts-->
### 使用消失点
<!--rehype:wrap-class=row-span-2-->
快捷键 | 说明
:- | -
`X` | 缩放 2 倍(临时)
`Ctrl` `+` | 放大
`Ctrl` `-` | 缩小
`Ctrl` `0` | 适合视图
`Ctrl` `Z` | 撤消上次操作
`Ctrl` `Shift` `Z` | 重做上一个动作
`Ctrl` `D` | 取消全选
`Ctrl` `H` | 隐藏选择和窗格
`Arrows` | 将选区移动 1 个像素
`Shift` `Arrows` | 将选区移动 10 个像素
`Ctrl` `C` | 复制
`Ctrl` `V` | 粘贴
`Ctrl` `Shift` `T` | 重复最后一个副本并移动
`Ctrl` `Alt` `T` | 从当前选区创建浮动选区
`Alt` `Shift` | 将选择限制为 15 度旋转
`Backspace` | 创建平面时删除最后一个节点
<!--rehype:className=shortcuts-->
### 使用 Camera Raw 对话框
<!--rehype:wrap-class=row-span-5-->
快捷键 | 说明
:- | -
`Z` | 缩放工具
`H` | 手工具
`I` | 白平衡工具
`S` | 颜色取样器工具
`C` | 裁剪工具
`A` | 拉直工具
`B` | 污点去除工具
`E` | 红眼消除工具
`Ctrl` `Alt` `1` | 基本面板
`Ctrl` `Alt` `2` | 色调曲线面板
`Ctrl` `Alt` `3` | 详情面板
`Ctrl` `Alt` `4` | HSL/灰度面板
`Ctrl` `Alt` `5` | 分离调色板
`Ctrl` `Alt` `6` | 镜头校正面板
`Ctrl` `Alt` `7` | 相机校准面板
`Ctrl` `Alt` `8` | 预设面板
`Ctrl` `Alt` `9` | 打开快照面板
`Ctrl` `Alt` `Shift` `T` | 参数化曲线针对性调整工具
`Ctrl` `Alt` `Shift` `H` | 色相针对性调整工具
`Ctrl` `Alt` `Shift` `S` | 饱和度针对性调整工具
`Ctrl` `Alt` `Shift` `L` | 亮度针对性调整工具
`Ctrl` `Alt` `Shift` `G` | 灰度混合针对性调整工具
`T` | 最后使用的针对性调整工具
`K` | 调整笔刷工具
`G` | 分级过滤工具
`Alt` | 暂时从调整画笔工具的添加模式切换到擦除模式,或从擦除模式切换到添加模式
`Alt` `]/[` | 增加/减少临时调整画笔工具大小
`Alt` `Shift` `]/[` | 增加/减少临时调整笔刷工具羽化
`Alt` `=/-` | 以 10 为增量增加/减少临时调整画笔工具大小流
`N` | 从调整画笔工具或渐变滤镜的添加或擦除模式切换到新建模式
`M` | 为调整画笔工具切换自动蒙版
`Y` | 切换调整画笔工具的显示蒙版
`V` | 调整画笔工具的切换销
`L` | 向左旋转图像
`R` | 向右旋转图像
`Ctrl` | 暂时切换到放大工具
`Alt` | 暂时切换为缩小工具,图片打开按钮改为打开复制
`P` | 切换预览
`F` | 全屏模式
`Shift` | 暂时激活白平衡工具并将打开图像按钮更改为打开对象
`Arrows` | 将曲线面板中的选定点移动 1 个像素
`Shift` `Arrows` | 将曲线面板中的选定点移动 10 像素
`Ctrl` `R` | 从 Bridge 打开 Camera Raw 对话框中的选定图像
`O` | 高亮剪裁警告
`U` | 阴影剪切警告
`Ctrl` `1-5` | 添加 1-5 星级(幻灯片模式)
`Ctrl` `./,` | 增加/减少评分(幻灯片模式)
`Ctrl` `6` | 添加红色标签(幻灯片模式)
`Ctrl` `7` | 添加黄色标签(幻灯片模式)
`Ctrl` `8` | 添加绿色标签(幻灯片模式)
`Ctrl` `9` | 添加蓝色标签(幻灯片模式)
`Ctrl` `Shift` `0` | 添加紫色标签(幻灯片模式)
`Ctrl` `K` | Camera Raw 首选项
`Ctrl` `Alt` | 删除 Adobe Camera Raw 首选项(打开时)
<!--rehype:className=shortcuts-->
### 使用黑白对话框
快捷键 | 说明
:- | -
`Ctrl` `Shift` `Alt` `B` | 打开黑白对话框
`Up/Down` | 将所选值增加/减少 1%
`Shift` `Up/Down` | 将所选值增加/减少 10%
<!--rehype:className=shortcuts-->
### 编辑路径
快捷键 | 说明
:- | -
`Ctrl` | 从路径选择、笔、添加锚点、删除锚点或将点工具转换为直接选择工具
`Alt` | 当指针位于锚点或方向点上时,从钢笔工具切换到自由钢笔工具以转换点工具
<!--rehype:className=shortcuts-->
### 变换选区、选区边框和路径
快捷键 | 说明
:- | -
`Alt` | 从中心变换或反射
`Shift` | 约束
`Ctrl` | 歪曲
`Enter` | 申请
`Ctrl` `.` | 取消
`Ctrl` `Alt` `T` | 具有重复数据的自由变换
`Ctrl` `Shift` `Alt` `T` | 用重复数据再次转换
<!--rehype:className=shortcuts-->
### 使用曲线
快捷键 | 说明
:- | -
`Ctrl` `M` | 打开曲线对话框
`+` | 选择曲线上的下一个点
`-` | 选择曲线上的前一点
`Ctrl` `D` | 取消选择一个点
`Del` | 删除曲线上的一个点
`Arrows` | 将所选点移动 1 个像素
`Shift` `Arrows` | 将所选点移动 10 个像素
<!--rehype:className=shortcuts-->
### 用于绘画
快捷键 | 说明
:- | -
`Alt` `Shift` `0-9` | 混合器画笔更改混合设置
`0-9` | 混合刷改变湿设置
`00` | 搅拌刷变湿并混合至零
`Shift` `+/-` | 循环混合模式
`Backspace` | 在背景或标准图层上打开填充对话框
`Alt` `Backspace` | 填充前景色
`Ctrl` `Backspace` | 填充背景色
`Ctrl` `Alt` `Backspace` | 从历史中填充
`Shift` `Backspace` | 显示填充对话框
`/` | 打开/关闭锁定透明像素
<!--rehype:className=shortcuts-->
### 用于混合模式
<!--rehype:wrap-class=row-span-2-->
快捷键 | 说明
:- | -
`Ctrl` `-/+` | 循环混合模式
`Shift` `Alt` `N` | 普通的
`Shift` `Alt` `I` | 溶解
`Shift` `Alt` `Q` | 背后(仅限画笔工具)
`Shift` `Alt` `R` | 清除(仅限画笔工具)
`Shift` `Alt` `K` | 变暗
`Shift` `Alt` `M` | 乘
`Shift` `Alt` `B` | 烧色
`Shift` `Alt` `A` | 线性燃烧
`Shift` `Alt` `G` | 减轻
`Shift` `Alt` `S` | 屏幕
`Shift` `Alt` `D` | 颜色减淡
`Shift` `Alt` `W` | 直线闪避
`Shift` `Alt` `O` | 覆盖
`Shift` `Alt` `F` | 柔光
`Shift` `Alt` `H` | 强光
`Shift` `Alt` `V` | 鲜艳的光
`Shift` `Alt` `J` | 线性光
`Shift` `Alt` `Z` | 针灯
`Shift` `Alt` `L` | 硬混
`Shift` `Alt` `E` | 区别
`Shift` `Alt` `X` | 排除
`Shift` `Alt` `U` | 色调
`Shift` `Alt` `T` | 饱和
`Shift` `Alt` `C` | 颜色
`Shift` `Alt` `Y` | 亮度
`Shift` `Alt` `N` | 将位图图像的混合模式设置为阈值<br/>所有其他图像的混合模式设置为正常
<!--rehype:className=shortcuts-->
### 格式类型
快捷键 | 说明
:- | -
`Ctrl` `Shift` `L/C/R` | 左对齐、居中或右对齐
`Ctrl` `Shift` `X` | 选择 100% 水平比例
`Ctrl` `Shift` `Alt` `X` | 选择 100% 垂直比例
`Ctrl` `Shift` `Alt` `A` | 选择自动行进
`Ctrl` `Shift` `Q` | 选择 0 进行跟踪
`Ctrl` `Shift` `J` | 对齐段落,左对齐最后一行
`Ctrl` `Shift` `F` | 证明段落,证明所有
`Ctrl` `Shift` `Alt` `H` | 打开/关闭段落断字
`Ctrl` `Shift` `Alt` `T` | 打开/关闭单个/每行作曲家
`Ctrl` `Shift` `</>` | 将所选文本的字号减小或增大 2 磅或像素
`Alt` `Up/Down` | 减少或增加前导 2 点或像素
`Shift` `Alt` `Up/Down` | 减少或增加基线偏移 2 个点或像素
`Alt` `Left/Right` | 减少或增加字距调整/字距调整 20/1000 em
<!--rehype:className=shortcuts-->
### 使用面板
快捷键 | 说明
:- | -
`Shift` `Enter` | 应用值并保持文本框处于活动状态
`Tab` | 显示/隐藏所有面板
`Shift` `Tab` | 显示/隐藏除工具箱和选项栏之外的所有面板
`Enter` | 高亮选项栏(先选择工具)
`Shift` `Up/Down` | 将所选值增加/减少 10
<!--rehype:className=shortcuts-->
### 使用调整图层
快捷键 | 说明
:- | -
`Alt` `3` | 选择红色通道进行调整
`Alt` `4` | 选择绿色通道进行调整
`Alt` `5` | 选择蓝色通道进行调整
`Alt` `2` | 选择复合通道进行调整
`Backspace` | 删除调整图层
<!--rehype:className=shortcuts-->
### 使用画笔面板
快捷键 | 说明
:- | -
`,/.` | 选择上一个/下一个画笔大小
`Shift` `,/.` | 选择第一个/最后一个画笔
`Caps Lock` | 显示画笔的精确十字线
`Shift` `Alt` `P` | 切换喷枪选项
<!--rehype:className=shortcuts-->
### 使用克隆源面板
快捷键 | 说明
:- | -
`Alt` `Shift` | 显示克隆源(覆盖 iamge)
`Alt` `Shift` `(arrows)` | 轻推克隆源
`Alt` `Shift` `</>` | 旋转克隆源
`Alt` `Shift` `[/]` | 缩放(增加或减小大小)克隆源
<!--rehype:className=shortcuts-->
### 使用图层面板
快捷键 | 说明
:- | -
`Ctrl` `Shift` `N` | 新层
`Ctrl` `J` | 通过复制新建图层
`Ctrl` `Shift` `J` | 通过剪切新建图层
`Ctrl` `G` | 图层组
`Ctrl` `Shift` `G` | 取消组合图层
`Ctrl` `Alt` `G` | 创建/释放剪贴蒙版
`Ctrl` `Alt` `A` | 选择所有图层
`Ctrl` `Shift` `E` | 合并可见层
`Alt` `.` | 选择顶层
`Alt` `.` | 选择底层
`Shift` `Alt` `[/]` | 添加到图层面板中的图层选择
`Alt` `[/]` | 向下/向上选择下一层
`Ctrl` `[/]` | 向下/向上移动目标图层
`Ctrl` `Shift` `Alt` `E` | 将所有可见图层的副本合并到目标图层中
`Ctrl` `E` | 合并图层(当图层突出显示时)
`Ctrl` `Shift` `[/]` | 将层移动到底部或顶部
`/` | 切换目标图层的锁定透明度或上次应用的锁定
`\` | 打开/关闭图层蒙版的 rubylith 模式
<!--rehype:className=shortcuts-->
另见
--------
- [Keyboard shortcuts for Adobe Photoshop](https://helpx.adobe.com/photoshop/using/default-keyboard-shortcuts.html) _(helpx.adobe.com)_

194
docs/adobe-xd.md Normal file
View File

@ -0,0 +1,194 @@
Adobe XD 键盘快捷键
===
Adobe XD 中 97 个键盘快捷键的可视化备忘单
键盘快捷键
--------
### 编辑菜单键
快捷键 | 说明
:- | -
`Ctrl` `Z` | 撤消
`Ctrl` `Shift` `Z` | 重做
`Ctrl` `X` | 剪切
`Ctrl` `C` | 复制
`Ctrl` `V` | 粘贴
`Ctrl` `Alt` `V` | 粘贴外观(设计模式)或粘贴交互(原型模式)
`Ctrl` `D` | 复制
`Del` | 删除
`Ctrl` `A` | 全选
`Ctrl` `Shift` `A` | 取消全选
<!--rehype:className=shortcuts-->
### 文件菜单键
快捷键 | 说明
:- | -
`Ctrl` `N` | 新的
`Ctrl` `Shift` `O` | 打开...
`Alt` `F4` | 关闭
`Ctrl` `S` | 节省...
`Ctrl` `Shift` `S` | 另存为...
`Ctrl` `Shift` `E` | 出口批量
`Ctrl` `E` | 导出选择
`Ctrl` `Shift` `I` | 进口
<!--rehype:className=shortcuts-->
### 笔/路径键
快捷键 | 说明
:- | -
`P` | 切换到钢笔工具
`Alt` | 不对称控制点
`Shift` | 捕捉控制点角度
`Shift` | 捕捉锚点角度
`Ctrl` `Alt` `U` | 添加
`Ctrl` `Alt` `S` | 减去
`Ctrl` `Alt` `I` | 相交
`Ctrl` `Alt` `X` | 排除重叠
`Ctrl` `8` | 转换为路径
<!--rehype:className=shortcuts-->
### 图层(对象)、组和画板的键
<!--rehype:wrap-class=row-span-2-->
快捷键 | 说明
:- | -
`Ctrl` `G` | 图层组
`Ctrl` `Shift` `G` | 取消组合图层
`Ctrl` `K` | 制作组件
`Ctrl` `L` | 锁定/解锁图层
`Ctrl` `,` | 隐藏/显示图层
`Ctrl` `Shift` `M` | 有形状的面具
`Ctrl` `R` | 制作重复网格
`1-9` | 更改图层不透明度
`Ctrl` `;` | 显示/隐藏画板指南
`Ctrl` `Shift` `;` | 锁定画板指南
<!--rehype:className=shortcuts-->
### 对齐键
快捷键 | 说明
:- | -
`Ctrl` `Shift` `Left` | 左边
`Shift` `C` | 中心(水平)
`Ctrl` `Shift` `Right` | 正确的
`Ctrl` `Shift` `Up` | 顶部
`Shift` `M` | 中间(垂直)
`Ctrl` `Shift` `Down` | 底部
<!--rehype:className=shortcuts-->
### 排列键
快捷键 | 说明
:- | -
`Ctrl` `Shift` `]` | 置于最前面
`Ctrl` `]` | 向前进
`Ctrl` `[` | 向后发送
`Ctrl` `Shift` `[` | 发送到后台
<!--rehype:className=shortcuts-->
### 分发键
快捷键 | 说明
:- | -
`Ctrl` `Shift` `H` | 水平的
`Ctrl` `Shift` `V` | 竖的
<!--rehype:className=shortcuts-->
### 文本键
快捷键 | 说明
:- | -
`Ctrl` `B` | 粗体
`Ctrl` `I` | 斜体
`Ctrl` `Shift` `.` | 增加字体大小
`Ctrl` `Shift` `,` | 减小字体大小
<!--rehype:className=shortcuts-->
### 操作菜单键
快捷键 | 说明
:- | -
`Alt` | 从中心
`Shift` | 约束
`Enter` | 编辑文字
`Shift` | 约束旋转15 度)
`Shift` | 线约束旋转45 度)
`Shift` `Alt` | 从中心约束
`Ctrl` | 直接选择
`Ctrl` `Tab` | 在设计和原型模式之间切换
<!--rehype:className=shortcuts-->
### 工具菜单键
快捷键 | 说明
:- | -
`V` | 选择
`R` | 长方形
`E` | 椭圆
`Y` | 多边形
`L` | 线
`P` | 笔
`T` | 文本
`A` | 画板
`Z` | 快速移动
`Ctrl` `3` | 缩放到所选内容
`I` | 滴管
<!--rehype:className=shortcuts-->
### 界面和查看选项的键
快捷键 | 说明
:- | -
`Ctrl` `+` | 放大
`Ctrl` `-` | 缩小
`Ctrl` `0` | 缩放以适合
`Ctrl` `1` | 缩放至 `100%`
`Ctrl` `2` | 缩放至 `200%`
`Space` | 平底锅
`Ctrl` `Shift` `Y` | 资产
`Ctrl` `Y` | 图层
`Ctrl` `Shift` `'` | 显示布局网格
`Ctrl` `'` | 显示方形网格
`Ctrl` `Tab` | 在设计和原型模式之间切换
`Up/Down` | 将字段中的值增加或减少 `1`
`Shift` `Up/Down` | 将字段中的值增加或减少 `10`
<!--rehype:className=shortcuts-->
### 设计规范要点
快捷键 | 说明
:- | -
`Ctrl` `+/-` | 快速移动
`Ctrl` `0` | 重置缩放
`(arrows)` | 平底锅
`Shift` `(arrows)` | 更快的锅
`Esc` | 从规范视图转到用户体验流程视图
`Esc` | 在 UX 流视图中从画板上移除焦点
<!--rehype:className=shortcuts-->
### 矢量编辑键
快捷键 | 说明
:- | -
`Enter` | 开始编辑选定的矢量对象
`Esc` | 停止编辑选定的矢量对象
<!--rehype:className=shortcuts-->
### 原型制作的关键
快捷键 | 说明
:- | -
`Ctrl` `A` | 查看原型模式下的所有连接
`Ctrl` `Enter` | 预览
`Ctrl` `Shift` `E` | 在线分享原型
`Left/Right` | 在预览或共享原型中浏览画板
<!--rehype:className=shortcuts-->
另见
--------
- [Keyboard shortcuts for Adobe XD](https://helpx.adobe.com/xd/help/keyboard-shortcuts.html) _(helpx.adobe.com)_

205
docs/android-studio.md Normal file
View File

@ -0,0 +1,205 @@
Android Studio 键盘快捷键
====
Android Studio 软件中 130 个键盘快捷键的可视化备忘单
键盘快捷键
--------
### 一般的
快捷键 | 说明
---|---
`Ctrl` `S` | 保存全部
`Ctrl` `Alt` `Y` | 同步
`Ctrl` `Shift` `F12` | 最小化或最大化编辑器
`Alt` `Shift` `F` | 添加到收藏夹
`Alt` `Shift` `I` | 使用当前配置文件检查当前文件
`Ctrl` <code>\`</code> | 快速切换方案
`Ctrl` `Alt` `S` | 打开设置对话框
`Ctrl` `Alt` `Shift` `S` | 打开项目结构对话框
`Ctrl` `Tab` | 在选项卡和工具窗口之间切换
<!--rehype:className=shortcuts-->
### 导航和搜索
<!--rehype:wrap-class=row-span-3-->
快捷键 | 说明
---|---
`Shift` `Shift` | 搜索所有内容,包括代码和菜单
`Ctrl` `F` | 寻找
`F3` | 找下一个
`Shift` `F3` | 查找上一个
`Ctrl` `R` | 代替
`Ctrl` `Shift` `A` | 查找操作
`Ctrl` `Alt` `Shift` `N` | 按交易品种名称搜索
`Ctrl` `N` | 查找班级
`Ctrl` `Shift` `N` | 查找文件,而不是类
`Ctrl` `Shift` `F` | 在路径中查找
`Ctrl` `F12` | 打开文件结构弹出窗口
`Alt` `Right/Left` | 在打开的编辑器选项卡之间导航
`Ctrl` `Enter` | 跳转到源
`Shift` `F4` | 在新窗口中打开当前编辑器选项卡
`Ctrl` `E` | 最近打开的文件弹出窗口
`Ctrl` `Shift` `E` | 最近编辑的文件弹出窗口
`Ctrl` `Shift` `Backspace` | 转到上次编辑位置
`Ctrl` `F4` | 关闭活动编辑器选项卡
`Esc` | 从工具窗口返回到编辑器窗口
`Shift` `Esc` | 隐藏活动或最后活动的工具窗口
`Ctrl` `G` | 去线
`Ctrl` `H` | 开放式层次结构
`Ctrl` `Shift` `H` | 打开方法层次结构
`Ctrl` `Alt` `H` | 开放调用层级
<!--rehype:className=shortcuts-->
### 编写代码
<!--rehype:wrap-class=row-span-6-->
快捷键 | 说明
---|---
`Alt` `Insert` | 生成代码例如getters、setters、构造函数、新类
`Ctrl` `O` | 覆盖方法
`Ctrl` `I` | 实现方法
`Ctrl` `Alt` `T` | 用 if...else、try...catch 等包围
`Ctrl` `Y` | 删除插入符处的行
`Ctrl` `-` | 折叠当前代码块
`Ctrl` `+` | 展开当前代码块
`Ctrl` `Shift` `-` | 折叠所有代码块
`Ctrl` `Shift` `+` | 展开所有代码块
`Ctrl` `D` | 复制当前行或选择
`Ctrl` `Space` | 基本代码完成
`Ctrl` `Shift` `Space` | 智能代码完成,按预期类型过滤方法和变量列表
`Ctrl` `Shift` `Enter` | 完整声明
`Ctrl` `Q` | 快速文档查找
`Ctrl` `P` | 显示所选方法的参数
`Ctrl` `B` | 直接去报关
`Ctrl` `Alt` `B` | 转到实施
`Ctrl` `U` | 转到超方法或超类
`Ctrl` `Shift` `I` | 打开快速定义查找
`Alt` `1` | 切换项目工具窗口可见性
`F11` | 切换书签
`Ctrl` `F11` | 使用助记符切换书签
`Ctrl` `/` | 注释或取消注释行注释
`Ctrl` `Shift` `/` | 使用块评论评论或取消评论
`Ctrl` `W` | 选择连续递增的代码块
`Ctrl` `Shift` `W` | 将当前选择减少到以前的状态
`Ctrl` `[` | 移动到代码块开始
`Ctrl` `]` | 移动到代码块末尾
`Ctrl` `Shift` `[` | 选择到代码块开始
`Ctrl` `Shift` `]` | 选择到代码块结束
`Ctrl` `Del` | 删除到一个词的末尾
`Ctrl` `Backspace` | 删除到单词的开头
`Ctrl` `Alt` `O` | 优化导入
`Alt` `Enter` | 项目快速修复、显示意图操作和快速修复
`Ctrl` `Alt` `L` | 重新格式化代码
`Ctrl` `Alt` `I` | 自动缩进行
`Tab` | 缩进线
`Shift` `Tab` | 不缩进线
`Ctrl` `Shift` `J` | 智能线路加入
`Ctrl` `Enter` | 智能分线
`Shift` `Enter` | 开始新行
`F2` | 下一个突出显示的错误
`Shift` `F2` | 上一个突出显示的错误
<!--rehype:className=shortcuts-->
### 查看布局
快捷键 | 说明
---|---
`Ctrl` `+` | 放大
`Ctrl` `-` | 缩小
`Ctrl` `0` | 适应屏幕
`Ctrl` `Shift` `1` | 实际尺寸
<!--rehype:className=shortcuts-->
### 布局编辑器
快捷键 | 说明
---|---
`B` | 在设计和蓝图模式之间切换
`O` | 在人像和风景模式之间切换
`D` | 切换设备
`R` | 强制刷新
`E` | 切换渲染错误面板
`Del` | 删除约束
`Ctrl` `+` | 放大
`Ctrl` `-` | 缩小
`Ctrl` `0` | 缩放以适合
`Ctrl` `B` | 转到 XML
`Ctrl` `A` | 选择所有组件
`Shift` `(click)` | 选择多个组件
<!--rehype:className=shortcuts-->
### 导航编辑器
<!--rehype:wrap-class=row-span-2-->
快捷键 | 说明
---|---
`Ctrl` `+` | 放大
`Ctrl` `-` | 缩小
`Ctrl` `0` | 缩放以适合
`Ctrl` `B` | 转到 XML
`E` | 切换渲染错误面板
`Ctrl` `G` | 分组为嵌套图
`Tab` | 循环浏览目的地
`Ctrl` `A` | 选择所有目的地
`Ctrl` `(click)` | 选择多个目的地
<!--rehype:className=shortcuts-->
### 构建并运行
快捷键 | 说明
---|---
`Ctrl` `F9` | 建造
`Shift` `F10` | 构建并运行
`Ctrl` `F10` | 应用更改并重新启动活动
`Ctrl` `Alt` `F10` | 应用代码更改
<!--rehype:className=shortcuts-->
### 版本控制
快捷键 | 说明
---|---
`Ctrl` `K` | 提交项目到 VCS
`Ctrl` `T` | 从 VCS 更新项目
`Alt` `Shift` `C` | 查看最近的更改
`Alt` <code>\`</code> | 打开 VCS 弹出窗口
<!--rehype:className=shortcuts-->
### 调试
快捷键 | 说明
---|---
`Shift` `F9` | 调试
`F8` | 跨过
`F7` | 踏入
`Shift` `F7` | 智能步入
`Shift` `F8` | 走出去
`Alt` `F9` | 运行到光标处
`Alt` `F8` | 评估表达
`F9` | 恢复程序
`Ctrl` `F8` | 切换断点
`Ctrl` `Shift` `F8` | 查看断点
<!--rehype:className=shortcuts-->
### 重构
快捷键 | 说明
---|---
`F5` | 复制
`F6` | 移动
`Alt` `Del` | 安全删除
`Shift` `F6` | 改名
`Ctrl` `F6` | 更改签名
`Ctrl` `Alt` `N` | 排队
`Ctrl` `Alt` `M` | 提取方法
`Ctrl` `Alt` `V` | 提取变量
`Ctrl` `Alt` `F` | 提取字段
`Ctrl` `Alt` `C` | 提取常量
`Ctrl` `Alt` `P` | 提取参数
<!--rehype:className=shortcuts-->
另见
--------
- [Keyboard shortcuts for Android Studio](https://developer.android.com/studio/intro/keyboard-shortcuts) _(developer.android.com)_

249
docs/aspect-ratio.md Normal file
View File

@ -0,0 +1,249 @@
Aspect Ratio 备忘清单
===
此备忘单列出了一些常见的宽高比及其像素分辨率
入门
----
<!--rehype:body-class=cols-2-->
### 介绍
<!--rehype:wrap-class=col-span-2-->
- 宽高比是屏幕或图像的宽度和高度之间的比率
- 它通常写成由冒号或“x”分隔的两个数字例如16:9 或 16x9
- 这被解释为宽度为 W 像素,高度为每个 H 像素。
- 分辨率是像素数(颜色的各个点)
<!--rehype:className=style-round-->
宽高比列表
--------
### 1080p
<!--rehype:wrap-class=row-span-2-->
纵横比 | 分辨率
:-- | --
0.80 (4:5) | 864 x 1080
1.25 (5:4) | 1350 x 1080
1.33 (4:3) | 1440 x 1080
1.66 (5:3) | 1800 x 1080
1.78 (16:9) | 1920 x 1080
1.85 | 1920 x 1038
1.90 | 1920 x 1011
2.00 | 1920 x 960
2.35 | 1920 x 817
2.37 | 1920 x 810
2.39 | 1920 x 803
2.40 | 1920 x 800
2.44 | 1920 x 787
<!--rehype:className=show-header-->
### 720p
<!--rehype:wrap-class=row-span-2-->
纵横比 | 分辨率
:-- | --
0.80 (4:5) | 576 x 720
1.25 (5:4) | 900 x 720
1.33 (4:3) | 960 x 720
1.66 (5:3) | 1200 x 720
1.78 (16:9) | 1280 x 720
1.85 | 1280 x 692
1.90 | 1280 x 674
2.00 | 1280 x 640
2.35 | 1280 x 545
2.37 | 1280 x 540
2.39 | 1280 x 536
2.40 | 1280 x 533
2.44 | 1280 x 525
<!--rehype:className=show-header-->
### Cinema DCP 4K
纵横比 | 分辨率
:-- | --
Flat (1.85) | 3996 x 2160
Scope (2.39) | 4096 x 1716
Full Container (1.90) | 4096 x 2160
<!--rehype:className=show-header-->
### Cinema DCP 2K
纵横比 | 分辨率
:-- | --
Flat (1.85) | 1998 x 1080
Scope (2.39) | 2048 x 858
Full Container (1.90) | 2048 x 1080
<!--rehype:className=show-header-->
### 8K
纵横比 | 分辨率
:-- | --
0.80 (4:5) | 3686 x 4608
1.25 (5:4) | 5760 x 4608
1.33 (4:3) | 6144 x 4608
1.66 (5:3) | 7680 x 4608
1.78 (16:9) | 8192 x 4608
1.85 | 8192 x 4428
1.90 | 8192 x 4320
2.00 | 8192 x 4096
2.35 | 8192 x 3486
2.37 | 8192 x 3456
2.39 | 8192 x 3428
2.40 | 8192 x 3413
2.44 | 8192 x 3357
<!--rehype:className=show-header-->
### 6K
纵横比 | 分辨率
:-- | --
0.80 (4:5) | 2765 x 3456
1.25 (5:4) | 4320 x 3456
1.33 (4:3) | 4608 x 3456
1.66 (5:3) | 5760 x 3456
1.78 (16:9) | 6144 x 3456
1.85 | 6144 x 3321
1.90 | 6144 x 3234
2.00 | 6144 x 3072
2.35 | 6144 x 2614
2.37 | 6144 x 2592
2.39 | 6144 x 2571
2.40 | 6144 x 2560
2.44 | 6144 x 2518
<!--rehype:className=show-header-->
### 4K
纵横比 | 分辨率
:-- | --
0.80 (4:5) | 2765 x 3456
1.25 (5:4) | 4320 x 3456
1.33 (4:3) | 4608 x 3456
1.66 (5:3) | 5760 x 3456
1.78 (16:9) | 6144 x 3456
1.85 | 6144 x 3321
1.90 | 6144 x 3234
2.00 | 6144 x 3072
2.35 | 6144 x 2614
2.37 | 6144 x 2592
2.39 | 6144 x 2571
2.40 | 6144 x 2560
2.44 | 6144 x 2518
<!--rehype:className=show-header-->
### 3K
纵横比 | 分辨率
:-- | --
0.80 (4:5) | 1382 x 1728
1.25 (5:4) | 2160 x 1728
1.33 (4:3) | 2304 x 1728
1.66 (5:3) | 2880 x 1728
1.78 (16:9) | 3072 x 1728
1.85 | 3072 x 1661
1.90 | 3072 x 1620
2.00 | 3072 x 1536
2.35 | 3072 x 1307
2.37 | 3072 x 1296
2.39 | 3072 x 1285
2.40 | 3072 x 1280
2.44 | 3072 x 1259
<!--rehype:className=show-header-->
### 2K
纵横比 | 分辨率
:-- | --
0.80 (4:5) | 922 x 1152
1.25 (5:4) | 1440 x 1152
1.33 (4:3) | 1536 x 1152
1.66 (5:3) | 1920 x 1152
1.78 (16:9) | 2048 x 1152
1.85 | 2048 x 1107
1.90 | 2048 x 1078
2.00 | 2048 x 1024
2.35 | 2048 x 871
2.37 | 2048 x 864
2.39 | 2048 x 858
2.40 | 2048 x 853
2.44 | 2048 x 838
<!--rehype:className=show-header-->
### 8K UHD
纵横比 | 分辨率
:-- | --
0.80 (4:5) | 2765 x 3456
1.25 (5:4) | 5400 x 3456
1.33 (4:3) | 5760 x 3456
1.66 (5:3) | 7200 x 3456
1.78 (16:9) | 7680 x 4320
1.85 | 7680 x 4151
1.90 | 7680 x 4042
2.00 | 7680 x 3840
2.35 | 7680 x 3268
2.37 | 7680 x 3240
2.39 | 7680 x 3213
2.40 | 7680 x 3200
2.44 | 7680 x 3148
<!--rehype:className=show-header-->
### 5K
纵横比 | 分辨率
:-- | --
0.80 (4:5) | 2304 x 2880
1.25 (5:4) | 3600 x 2880
1.33 (4:3) | 3840 x 2880
1.66 (5:3) | 4800 x 2880
1.78 (16:9) | 5120 x 2880
1.85 | 5120 x 2768
1.90 | 5120 x 2700
2.00 | 5120 x 2560
2.35 | 5120 x 2179
2.37 | 5120 x 2160
2.39 | 5120 x 2142
2.40 | 5120 x 2133
2.44 | 5120 x 2098
<!--rehype:className=show-header-->
### 4K UHD
纵横比 | 分辨率
:-- | --
0.80 (4:5) | 1728 x 2160
1.25 (5:4) | 2700 x 2160
1.33 (4:3) | 2880 x 2160
1.66 (5:3) | 3600 x 2160
1.78 (16:9) | 3840 x 2160
1.85 | 3840 x 2076
1.90 | 3840 x 2021
2.00 | 3840 x 1920
2.35 | 3840 x 1634
2.37 | 3840 x 1620
2.39 | 3840 x 1607
2.40 | 3840 x 1600
2.44 | 3840 x 1574
<!--rehype:className=show-header-->
### 3K UHD
纵横比 | 分辨率
:-- | --
0.80 (4:5) | 1296 x 1620
1.25 (5:4) | 2025 x 1620
1.33 (4:3) | 2160 x 1620
1.66 (5:3) | 2700 x 1620
1.78 (16:9) | 2880 x 1620
1.85 | 2880 x 1557
1.90 | 2880 x 1516
2.00 | 2880 x 1440
2.35 | 2880 x 1226
2.37 | 2880 x 1215
2.39 | 2880 x 1205
2.40 | 2880 x 1200
2.44 | 2880 x 1180
<!--rehype:className=show-header-->

View File

@ -11,6 +11,8 @@ CocoaPods 备忘清单
```bash
$ sudo gem install cocoapods
# OR
$ brew install cocoapods
```
无 Sudo 安装,不想为此过程授予 `RubyGems` 管理员权限

View File

@ -1487,6 +1487,7 @@ br + br {
```
### CSS 重置
<!--rehype:wrap-class=row-span-2-->
```css
html {
@ -1501,6 +1502,25 @@ html {
有助于在不同的浏览器之间强制样式一致性,并为样式元素提供干净的盒子
### 设置光标样式
```css
body {
caret-color: red;
}
```
### 设置整个页面灰色
<!--rehype:wrap-style=-webkit-filter: grayscale(.95);-->
```css
html {
-webkit-filter: grayscale(.95);
}
```
上面示例设置了当前卡片灰色
### 使用图像作为光标
```css
@ -1624,7 +1644,7 @@ div {
### 定义容器的长宽比
```
```css
div {
aspect-ratio: 1/1
}

View File

@ -1,7 +1,13 @@
Electron 备忘清单
====
此快速参考备忘单提供了 Electron v21 API 说明和使用示例。
[![NPM version](https://img.shields.io/npm/v/electron.svg?style=flat)](https://www.npmjs.com/package/electron)
[![Downloads](https://img.shields.io/npm/dm/electron.svg?style=flat)](https://www.npmjs.com/package/electron)
[![Repo Dependents](https://badgen.net/github/dependents-repo/electron/electron)](https://github.com/electron/electron/network/dependents)
[![Github repo](https://badgen.net/badge/icon/Github?icon=github&label)](https://github.com/electron/electron)
此快速参考备忘单提供了 Electron v21 API 说明和使用示例
<!--rehype:style=padding-top: 12px;-->
入门
----

View File

@ -1,7 +1,13 @@
Express 备忘清单
===
这是用于 Node.js 的快速、不拘一格、极简主义的 Web 框架,包含 [Express.js](http://expressjs.com/) 的 API 参考列表和一些示例。
[![NPM version](https://img.shields.io/npm/v/express.svg?style=flat)](https://npmjs.org/package/express)
[![Downloads](https://img.shields.io/npm/dm/express.svg?style=flat)](https://www.npmjs.com/package/express)
[![Repo Dependents](https://badgen.net/github/dependents-repo/expressjs/express)](https://github.com/expressjs/express/network/dependents)
[![Github repo](https://badgen.net/badge/icon/Github?icon=github&label)](https://github.com/expressjs/express)
这是用于 Node.js 的快速、不拘一格、极简主义的 Web 框架,包含 [Express.js](http://expressjs.com/) 的 API 参考列表和一些示例
<!--rehype:style=padding-top: 12px;-->
入门
---

View File

@ -718,6 +718,30 @@ $ ffmpeg -i test.mp4 -af "loudnorm=I=-5:LRA=1" out.mp4
$ ffmpeg -i input.mp3 -af "channelmap=1-0|1-1" output.mp3
```
流处理
---
### 拉流
```bash
# 拉取rtmp流并存储到本地
$ ffmpeg -i "rtsp://127.0.0.1/test" test.mp4
```
### 推流
```bash
# 推送test.mp4到远程
$ ffmpeg -re -i test.mp4 -f flv rtmp://127.0.0.1/test
```
### 转发
```bash
# 拉取流并转发
$ ffmpeg -i "rtsp://127.0.0.1/test" -f mpegts -codec:v mpeg1video http://127.0.0.1/demo
```
另见
---

197
docs/firefox.md Normal file
View File

@ -0,0 +1,197 @@
Firefox 键盘快捷键备忘清单
===
Firefox 中 116 个键盘快捷键的可视化备忘单
火狐浏览器键盘快捷键
------------------
### 导航
快捷键 | 说明
:- | -
`Ctrl` `Left` | 后退
`Ctrl` `Right` | 向前
`Alt` `Home` | 家
`Ctrl` `O` | 打开文件
`Ctrl` `R` | 重新加载
`Ctrl` `Shift` `R` | 重新加载(覆盖缓存)
`Ctrl` `.` | 停止
<!--rehype:className=shortcuts-->
### 当前页面
<!--rehype:wrap-class=row-span-2-->
快捷键 | 说明
:- | -
`Tab` | 聚焦下一个链接或输入字段
`Shift` `Tab` | 聚焦上一个链接或输入字段
`Space` | 下一个屏幕
`Shift` `Space` | 上一个屏幕
`Ctrl` `Down` | 转到页面底部
`Ctrl` `Up` | 转到页面顶部
`F6` | 移动到下一帧
`Shift` `F6` | 移至上一帧
`Ctrl` `P` | 打印
`Ctrl` `S` | 将页面另存为
`Ctrl` `+` | 放大
`Ctrl` `-` | 缩小
`Ctrl` `0` | 缩放重置
<!--rehype:className=shortcuts-->
### 编辑
<!--rehype:wrap-class=row-span-2-->
快捷键 | 说明
:- | -
`Ctrl` `C` | 复制
`Ctrl` `X` | 剪切
`Backspace` | 删除
`Home` | 转到行首
`End` | 转到行尾
`Ctrl` `V` | 粘贴
`Ctrl` `Shift` `V` | 粘贴(作为纯文本)
`Ctrl` `Shift` `Z` | 重做
`Ctrl` `A` | 全选
`Ctrl` `Z` | 撤消
<!--rehype:className=shortcuts-->
### 历史
快捷键 | 说明
:- | -
`Ctrl` `Shift` `H` | 历史边栏
`Ctrl` `Shift` `Delete` | 最近清除历史记录
<!--rehype:className=shortcuts-->
### 搜索
快捷键 | 说明
:- | -
`Ctrl` `F` | 查询
`Ctrl` `G` | 再找
`Ctrl` `Shift` `G` | 查找上一个
`'` | 仅在链接文本中快速查找
`/` | 快速查找
`Esc` | 关闭查找或快速查找栏
`Ctrl` `K` | 焦点搜索栏
`Ctrl` `Up/Down` | 更改默认搜索引擎
`Alt` `Up/Down` | 查看菜单以切换、添加或管理搜索引擎
<!--rehype:className=shortcuts-->
### 窗口和选项卡
<!--rehype:wrap-class=row-span-2-->
快捷键 | 说明
:- | -
`Ctrl` `W` | 关闭标签
`Ctrl` `Shift` `W` | 关闭窗口
`Ctrl` `Tab` | 按最近使用的顺序循环浏览选项卡
`Ctrl` `Q` | 退出
`Ctrl` `Alt` `Left` | 向左移动一个标签
`Ctrl` `Alt` `Right` | 向右移动一个标签
`Ctrl` `Shift` `PgUp` | 向左移动制表符
`Ctrl` `Shift` `PgDown` | 向右移动选项卡
`Ctrl` `Shift` `Home` | 将 Tab 移动到焦点以开始
`Ctrl` `Shift` `End` | 将 Tab 移动到焦点结束
`Ctrl` `M` | 静音/取消静音音频
`Ctrl` `T` | 新标签
`Ctrl` `N` | 新窗户
`Ctrl` `Shift` `P` | 新建私人窗口
`Alt` `Enter` | 在新前台选项卡中打开地址
`Enter` | 在当前选项卡中打开重点书签或链接
`Ctrl` `Enter` | 在新的前景选项卡中打开重点书签
`Ctrl` `Shift` `Enter` | 在新背景选项卡中打开重点书签
`Ctrl` `Enter` | 在新背景选项卡中打开焦点链接
`Shift` `Enter` | 在新窗口中打开重点书签或链接
`Ctrl` `Shift` `T` | 撤消关闭选项卡
`Ctrl` `Shift` `N` | 撤消关闭窗口
`Ctrl` `1-8` | 选择选项卡 1-8
`Ctrl` `9` | 选择最后一个标签
`Ctrl` `Shift` `X` | 向左或向右移动 URL
<!--rehype:className=shortcuts-->
### 书签
快捷键 | 说明
:- | -
`Ctrl` `Shift` `D` | 为所有标签添加书签
`Ctrl` `D` | 收藏此页
`Ctrl` `B` | 书签侧边栏
`Ctrl` `Shift` `S` | 库窗口(书签)
`(search field in Library)` `Space` | 搜索所有书签
<!--rehype:className=shortcuts-->
### 工具
快捷键 | 说明
:- | -
`Ctrl` `J` | 下载
`Ctrl` `Shift` `A` | 插件
`Ctrl` `Alt` `I` | 切换开发者工具
`Ctrl` `Alt` `K` | 网络控制台
`Ctrl` `Alt` `C` | 检查员
`Ctrl` `Alt` `S` | 调试器
`Shift` `F7` | 样式编辑器
`Shift` `F5` | 剖析器
`Ctrl` `Alt` `E` | 网络
`Shift` `F2` | 开发者工具栏
`Ctrl` `Alt` `M` | 响应式设计视图
`Shift` `F4` | 便笺
`Ctrl` `U` | 页面源
`Ctrl` `Shift` `J` | 浏览器控制台
`Ctrl` `I` | 页面信息
<!--rehype:className=shortcuts-->
### PDF 查看器
快捷键 | 说明
:- | -
`N/J/Right` | 下一页
`P/K/Left` | 上一页
`Ctrl` `+` | 放大
`Ctrl` `-` | 缩小
`Ctrl` `0` | 自动缩放
`R` | 顺时针旋转文档
`Ctrl` `R` | 逆时针旋转
`Ctrl` `Alt` `P` | 切换到演示模式
`S` | 选择文本选择工具
`H` | 选择手形工具
`Ctrl` `Alt` `G` | 聚焦页码输入框
<!--rehype:className=shortcuts-->
### 各种各样的
快捷键 | 说明
:- | -
`Ctrl` `Enter` | 完整的 .com 地址
`Shift` `Enter` | 完整的 .net 地址
`Ctrl` `Shift` `Enter` | 完整的 .org 地址
`Shift` `Delete` | 删除选定的自动完成条目
`Ctrl` `Shift` `F` | 切换全屏
`Ctrl` `Alt` `R` | 切换阅读器模式
`F7` | 插入符浏览
`Ctrl` `L` | 选择地址栏
<!--rehype:className=shortcuts-->
### 媒体快捷方式
快捷键 | 说明
:- | -
`Space` | 切换播放/暂停
`Down` | 降低音量
`Up` | 增加音量
`Ctrl` `Down` | 静音
`Ctrl` `Up` | 取消静音
`Left` | 后退 15 秒
`Ctrl` `Left` | 追回 10%
`Right` | 快进 15 秒
`Ctrl` `Right` | 向前寻求 10%
`Home` | 追寻至始
`End` | 求到底
<!--rehype:className=shortcuts-->
另见
--------
- [Keyboard shortcuts for Firefox](https://support.mozilla.org/en-US/kb/keyboard-shortcuts-perform-firefox-tasks-quickly) _(support.mozilla.org)_

View File

@ -421,8 +421,6 @@ SizedBox(
在实际开发中Container常常用于对一个组件进行包装修饰。
```dart
// 将Contianer大小固定为100 * 100 背景色为蓝色。
// 把Text包裹在Container中并将其居中
Container(
width: 100,
height: 100,
@ -430,9 +428,10 @@ Container(
alignment: Alignment.center,
child: Text('Hello world'),
),
```
将 `Contianer` 大小固定为 `100 * 100` 背景色为蓝色。把 `Text` 包裹在 `Container` 中,并将其居中
### Column
列布局(Column),可以将多个子组件沿着垂直的方向摆放(竖的摆放)
@ -461,7 +460,6 @@ Column(
行布局(Row),可以将多个组件沿水平的方向摆放。
```dart
// 在同一行摆放3个Button
Row(
children: [
ElevatedButton(
@ -480,12 +478,13 @@ Row(
),
```
在同一行摆放 3 个 `Button`
### Wrap
将子组件从左到右依次排列,当空间不足时自动换行。
```dart
// 显示多个Flutter 的logo并自动换行
Wrap(
children: [
FlutterLogo(),
@ -498,14 +497,14 @@ Wrap(
),
```
显示多个 `Flutter` 的 `logo` 并自动换行
### Stack
Stack 可以将一多个子组件叠在一起显示。堆叠顺序按照children属性中的列表依次堆叠摆放默认将子控件沿左上角对齐。
需要控制子控件位置可以嵌套`Positoned`控件。
```dart
// 依次堆叠300*300的蓝色色块、200*200的黑色色块、
// 100*100的黄色色块
Stack(
children: [
Container(
@ -527,6 +526,8 @@ Stack(
),
```
依次堆叠 `300*300` 的蓝色色块、`200*200` 的黑色色块、`100*100` 的黄色色块
### Positioned
<!--rehype:wrap-class=row-span-2-->
若需要控制Stack中子控件的位置则可以嵌套改控件。
@ -603,6 +604,131 @@ Container(
),
```
### Flex
Flex 的用法与 `Row` 或 `Column` 类似,但只需要额外传入 `direction` 参数
- `Row` 和 `Column` 组件都继承 `Flex` 组件
- 设置 `direction` 为 `Axis.horizontal` 表示水平方向(`Row`),为 `Axis.vertical`则为垂直方向(`Column`)
垂直方向依次摆放3个flutter logo
```dart
Flex(
direction: Axis.vertiacl,
children[
Fluterlogo(),
Fluterlogo(),
Fluterlogo(),
],
),
```
水平方向依次摆放 3 个 flutter logo
```dart
Flex(
dirction: Axis.horizontal,
children: [
Flutterlogo(),
Flutterlogo(),
Flutterlogo(),
],
),
```
### Expaneded
<!--rehype:wrap-class=row-span-2-->
Expanded 用于扩张一个子组件。可以通过 `flex` 属性,用于表示该组件相对其他弹性组件放大的倍数(可以理解为一个权重)。
```dart
// Container 会占满剩余的全部空用空间
Row(
children: [
FlutterLogo(),
Expanded(
child: Container(
child: FlutterLogo(),
color: Colors.green,
),
),
FlutterLogo(),
],
),
// 按照1:2 的比例分配一整行的空间
Row(
children: [
Expanded(
flex: 1,
child: Container(
child: FlutterLogo(),
color: Colors.green,
),
),
Expanded(
flex: 2,
child: Container(
child: FlutterLogo(),
color: Colors.blue,
),
),
],
),
```
### Flexible
<!--rehype:wrap-class=row-span-2-->
`Flexible` 是 `Expanded` 组件的父类。
与 `Expanded` 不同的是,`Flexible` 可以通过 `fit` 属性设置子控件是否必须占满 `Flexibal` 扩展的空间。而 `Expaned` 默认子控件必须占满
```dart
// 如果将fit设置为tight
// 则绿色Container 和蓝色Container大小一样。
// 如果将fit设置为loose
// 则两个Flexible扩展的空间大小是一样的
// 但绿色Container并不会填充整个扩展的空间。
Row(
children: [
Flexible(
flex: 2,
// fit: FlexFit.tight,
child: Container(
child: FlutterLogo(),
color: Colors.green,
),
),
Expanded(
flex: 2,
child: Container(
child: FlutterLogo(),
color: Colors.blue,
),
),
],
),
```
将 `Flexible` 的 `fit` 属性设置为 `tingt`,就等价于使用 `Expanded`
### Spacer
Spacer 用于在布局中留白
```dart
Row(
children: [
Text('Item'),
Spacer(),
FlutterLogo(),
],
),
```
例如,需要文本和图标位于一个行的两端,而中间留白时。就可以使用 `Spacer`
另见
---

View File

@ -414,7 +414,7 @@ toJSON(job)
```yml
steps:
...
- name: The job has succeeded
- name: 作业已成功
if: ${{ success() }}
```
@ -423,7 +423,7 @@ steps:
```yml
steps:
...
- name: The job has failed
- name: 作业失败
if: ${{ failure() }}
```
@ -829,6 +829,7 @@ steps:
[`coverage-badges-cli`](https://github.com/jaywcjlove/coverage-badges-cli) | 生成覆盖率徽章(Badges)图片
[`action-ejs`](https://github.com/jaywcjlove/action-ejs) | 基于 ejs 生成 HTML
[`github-action-package`](https://github.com/jaywcjlove/github-action-package) | 修改 JSON 文件内容
[`github-action-read-file`](https://github.com/jaywcjlove/github-action-read-file) | 读取文件内容
[`markdown-to-html-cli`](https://github.com/jaywcjlove/markdown-to-html-cli) | Markdown 转换成 HTML
[`ncipollo/release-action`](https://github.com/ncipollo/release-action) | 创建 `Release`
[`peaceiris/actions-gh-pages`](https://github.com/peaceiris/actions-gh-pages) | 将文件或文件夹内容提交到 `gh-pages` 分支
@ -924,8 +925,273 @@ steps:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
```
当 `npm` 推送包失败不影响整个流程,可用于自动发包
GitLab CI/CD 迁移到 GitHub Actions
---
### 语法示例
<yel>GitLab CI/CD</yel>
```yml
job1:
variables:
GIT_CHECKOUT: "true"
script:
- echo "Run your script here"
```
GitHub Actions
```yml
jobs:
job1:
steps:
- uses: actions/checkout@v3
- run: echo "Run your script here"
```
### 运行程序
<!--rehype:wrap-class=row-span-2-->
<yel>GitLab CI/CD</yel>
```yml
windows_job:
tags:
- windows
script:
- echo Hello, %USERNAME%!
linux_job: tags:
- linux script:
- echo "Hello, $USER!"
```
GitHub Actions
```yml
windows_job:
runs-on: windows-latest
steps:
- run: echo Hello, %USERNAME%!
linux_job:
runs-on: ubuntu-latest
steps:
- run: echo "Hello, $USER!"
```
在不同的平台上运行作业
### Docker 映像
<yel>GitLab CI/CD</yel>
```yml
my_job:
image: node:10.16-jessie
```
GitHub Actions
```yml
jobs:
my_job:
container: node:10.16-jessie
```
### 条件和表达式语法
<yel>GitLab CI/CD</yel>
```yml
deploy_prod:
stage: deploy
script:
- echo "部署到生产服务器"
rules:
- if: '$CI_COMMIT_BRANCH == "master"'
```
GitHub Actions
```yml
jobs:
deploy_prod:
if: contains( github.ref, 'master')
runs-on: ubuntu-latest
steps:
- run: echo "部署到生产服务器"
```
### Artifacts
<yel>GitLab CI/CD</yel>
```yml
script:
artifacts:
paths:
- math-homework.txt
```
GitHub Actions
```yml
- name: Upload math result for job 1
uses: actions/upload-artifact@v3
with:
name: homework
path: math-homework.txt
```
### 作业之间的依赖关系
<yel>GitLab CI/CD</yel>
```yml
stages:
- build
- test
- deploy
build_a: stage: build script:
- echo "该作业将首先运行"
build_b: stage: build script:
- echo "该作业将首先运行,与 build_a 并行"
test_ab: stage: test script:
- echo "此作业将在 build_a 和 build_b 完成后运行"
deploy_ab: stage: deploy script:
- echo "此作业将在 test_ab 完成后运行"
```
GitHub Actions
```yml
jobs:
build_a:
runs-on: ubuntu-latest
steps:
- run: echo "该作业将首先运行"
build_b:
runs-on: ubuntu-latest
steps:
- run: echo "该作业将首先运行,与 build_a 并行"
test_ab:
runs-on: ubuntu-latest
needs: [build_a,build_b]
steps:
- run: echo "此作业将在 build_a 和 build_b 完成后运行"
deploy_ab:
runs-on: ubuntu-latest
needs: [test_ab]
steps:
- run: echo "此作业将在 test_ab 完成后运行"
```
### 缓存
<yel>GitLab CI/CD</yel>
```yml
image: node:latest
cache: key: $CI_COMMIT_REF_SLUG paths:
- .npm/
before_script:
- npm ci --cache .npm --prefer-offline
test_async: script:
- node ./specs/start.js ./specs/async.spec.js
```
GitHub Actions
```yml
jobs:
test_async:
runs-on: ubuntu-latest
steps:
- name: Cache node modules
uses: actions/cache@v3
with:
path: ~/.npm
key: v1-npm-deps-${{ hashFiles('**/package-lock.json') }}
restore-keys: v1-npm-deps-
```
### 数据库和服务容器
<yel>GitLab CI/CD</yel>
```yml
container-job:
variables:
POSTGRES_PASSWORD: postgres
# PostgreSQL 服务容器通信的主机名
POSTGRES_HOST: postgres
# 默认的 PostgreSQL 端口
POSTGRES_PORT: 5432
image: node:10.18-jessie
services:
- postgres
script:
# 执行 package.json 文件中
# 所有依赖项的全新安装
- npm ci
# 运行创建 PostgreSQL 客户端的脚本,
# 用数据填充客户端,并检索数据
- node client.js
tags:
- docker
```
GitHub Actions
```yml
jobs:
container-job:
runs-on: ubuntu-latest
container: node:10.18-jessie
services:
postgres:
image: postgres
env:
POSTGRES_PASSWORD: postgres
steps:
- name: Check out repository code
uses: actions/checkout@v3
# 执行 package.json 文件中
# 所有依赖项的全新安装
- name: Install dependencies
run: npm ci
- name: Connect to PostgreSQL
# 运行创建 PostgreSQL 客户端的脚本,
# 用数据填充客户端,并检索数据
run: node client.js
env:
# PostgreSQL 服务容器通信的主机名
POSTGRES_HOST: postgres
# 默认的 PostgreSQL 端口
POSTGRES_PORT: 5432
```
另见
---
- [Github Actions 学习笔记](https://jaywcjlove.github.io/github-actions) _(jaywcjlove.github.io)_
- [了解 GitHub Actions](https://docs.github.com/cn/actions/learn-github-actions) _(docs.github.com)_
- [从 GitLab CI/CD 迁移到 GitHub Actions](https://docs.github.com/cn/actions/migrating-to-github-actions/migrating-from-gitlab-cicd-to-github-actions) _(docs.github.com)_

232
docs/github.md Normal file
View File

@ -0,0 +1,232 @@
Github 备忘清单
===
Github.com 上 80 个键盘快捷键和一些搜索技巧的备忘清单
键盘快捷键
--------
### 站点范围的快捷方式
快捷键 | 说明
:- | -
`S` | 聚焦搜索栏
`G` `N` | 转到您的通知
`H` | 打开并关注用户、问题或拉取请求悬浮卡
`Esc` | 当专注于上面时,关闭 hovercard
<!--rehype:className=shortcuts-->
### 资料库
快捷键 | 说明
:- | -
`G` `C` | 转到 `Code` 选项卡
`G` `I` | 转到 `Issues` 选项卡
`G` `P` | 转到拉取请求选项卡
`G` `B` | 转到 `Projects` 选项卡
`G` `W` | 转到 `Wiki` 选项卡
<!--rehype:className=shortcuts-->
### 源代码编辑
快捷键 | 说明
:- | -
`Ctrl` `F` | 开始在文件编辑器中搜索
`Ctrl` `G` | 找下一个
`Ctrl` `Shift` `G` | 查找上一个
`Ctrl` `Shift` `F` | 代替
`Ctrl` `Shift` `R` | 全部替换
`Alt` `G` | 跳转到行
`Ctrl` `Z` | 撤消
`Ctrl` `Y` | 重做
<!--rehype:className=shortcuts-->
### 源码浏览
快捷键 | 说明
:- | -
`T` | 激活文件查找器
`L` | 跳转到代码中的一行
`W` | 切换到新的分支或标签
`Y` | 将 URL 扩展为其规范形式
`I` | 显示或隐藏对差异的评论
`B` | 打开责备视图
<!--rehype:className=shortcuts-->
### 注释
快捷键 | 说明
:- | -
`Ctrl` `B` | 为粗体文本插入 Markdown 格式
`Ctrl` `I` | 插入斜体文本的 Markdown 格式
`Ctrl` `K` | 插入 Markdown 格式以创建链接
`Ctrl` `Shift` `P` | 在编写和预览评论选项卡之间切换
`Ctrl` `Enter` | 提交评论
`Ctrl` `.` | 打开已保存的回复菜单,然后使用已保存的回复自动填充评论字段
`Ctrl` `G` | 插入一个建议
`R` | 在回复中引用所选文字
<!--rehype:className=shortcuts-->
### 问题和拉取请求列表
快捷键 | 说明
:- | -
`C` | 创建问题
`Ctrl` `/` | 将光标聚焦在问题或拉取请求搜索栏上
`U` | 按作者过滤
`L` | 按标签过滤或编辑标签
`M` | 按里程碑过滤或编辑里程碑
`A` | 按受让人过滤或编辑受让人
`O` | 打开问题
<!--rehype:className=shortcuts-->
### 问题和拉取请求
快捷键 | 说明
:- | -
`Q` | 请求审稿人
`M` | 设定一个里程碑
`L` | 应用标签
`A` | 设置受让人
<!--rehype:className=shortcuts-->
### 拉取请求的变化
快捷键 | 说明
:- | -
`C` | 打开拉取请求中的提交列表
`T` | 打开拉取请求中已更改文件的列表
`J` | 在列表中向下移动选择
`K` | 在列表中向上移动选择
`Ctrl` `Shift` `Enter` | 在拉取请求差异上添加单个评论
`Alt` `(click)` | 在拉取请求中折叠和展开所有过时的审阅评论之间切换
<!--rehype:className=shortcuts-->
### 项目板
<!--rehype:wrap-class=row-span-2-->
快捷键 | 说明
:- | -
`Enter/Space` | 开始移动焦点列
`Esc` | 取消正在进行的移动
`Enter` | 完成正在进行的移动
`Left/H` | 向左移动列
`Ctrl` `Left/H` | 将列移动到最左边的位置
`Right/L` | 向右移动列
`Ctrl` `Right/L` | 将列移动到最右边的位置
`Enter/Space` | 开始移动聚焦卡
`Esc` | 取消正在进行的移动
`Enter` | 完成正在进行的移动
`Down/J` | 向下移动卡片
`Ctrl` `Down/J` | 将卡片移动到列的底部
`Up/K` | 向上移动卡片
`Ctrl` `Up/K` | 将卡片移动到列的顶部
`Left/H` | 将卡片移动到左侧列的底部
`Shift` `Left/H` | 将卡片移动到左侧列的顶部
`Ctrl` `Left/H` | 将卡片移动到最左边一列的底部
`Ctrl` `Shift` `Left/H` | 将卡片移至最左侧列的顶部
`Right` | 将卡片移动到右侧列的底部
`Shift` `Right/L` | 将卡片移动到右侧列的顶部
`Ctrl` `Right/L` | 将卡片移动到最右侧列的底部
`Ctrl` `Shift` `Right/L` | 将卡片移至最右侧列的顶部
<!--rehype:className=shortcuts-->
### 通知
快捷键 | 说明
:- | -
`E/L/Y` | 标记为已读
`Shift` `M` | 静音线程
<!--rehype:className=shortcuts-->
### 网络图
快捷键 | 说明
:- | -
`Left/H` | 向左滚动
`Right/L` | 向右滚动
`Up/K` | 向上滑动
`Down/J` | 向下滚动
`Shift` `Left/H` | 一直向左滚动
`Shift` `Right/L` | 一直向右滚动
`Shift` `Up/K` | 一直向上滚动
`Shift` `Down/J` | 一直向下滚动
<!--rehype:className=shortcuts-->
搜索技巧
---
### 范围搜索
<!--rehype:wrap-class=row-span-2-->
:-- | --
:-- | --
`org:rails language:ruby` | 指定组织 <pur>`rails`</pur> 和编程语言 <pur>`ruby`</pur>
`repo:torvalds/linux io_uring` | 指定仓库 <pur>`torvalds/linux`</pur> 搜索 <pur>`io_uring`</pur>
`owner:tpope path:*.vim` | 指定拥有者 <pur>`tpope`</pur> 和文件后缀为 <pur>`*.vim`</pur>
`created:"> 2022-10-22" language:C#` | 创建于 <pur>`2022-10-22`</pur> 以后,语言为 <pur>`C#`</pur> 的条件
<!--rehype:className=style-list-->
### 文件路径
<!--rehype:wrap-class=row-span-2-->
:-- | --
:-- | --
`path:__init__.py` | 文件为 <pur>`__init__.py`</pur> 里面的内容搜索
`path:/.*shrc$/` | 文件路径包含 <pur>`.*shrc`</pur> 结尾的文件中搜索内容
`path:/src/*.js` | <pur>`src`</pur> 目录中的 <pur>`.js`</pur> 后缀的文件中搜索内容
<!--rehype:className=style-list-->
### 完全符合
:-- | --
:-- | --
`out of memory` | 文本匹配 <pur>`out of memory`</pur>
### 布尔运算符
:-- | --
:-- | --
`io_uring (language:c OR language:cpp)` | 语言为 <pur>`c`</pur> 或者 <pur>`cpp`</pur> 的文件中搜索 <pur>`io_uring`</pur>
`org:kubernetes NOT repo:kubernetes/api` | 组织为 <pur>`kubernetes`</pur> 排除里面的 <pur>`api`</pur> 仓库进行搜索
<!--rehype:className=style-list-->
### 基于仓库的条件
:-- | --
:-- | --
`stars:100..8000 stars:>10000` | 星星为 <pur>100 ~ 8000</pur><pur>10000</pur> 以上的
`forks:50..100 forks:200 forks:<5` | fork 为 <pur>50 ~ 100</pur> 或者 <pur>200</pur> 或者小于 <pur>5</pur>
`size:35` | 大小为 `35kb`
`pushed:<2022-11-23` | 推送代码时间 <pur>2022-11-23</pur> 之前
`fork:true`, `fork:only` |
`license:mit` | 基于协议 <pur>`mit`</pur> 条件
<!--rehype:className=style-list-->
### 基于 issue 的条件
:-- | --
:-- | --
`state:open`, `state:closed` | <pur>`关闭`</pur> / <pur>`打开`</pur>`issue`
`reason:completed` | <pur>`"not planned"`</pur>, <pur>`reopened`</pur>, <pur>`completed`</pur>
`label:bug` | 标签为 `bug` 的条件
`author:jaywcjlove` | 作者 <pur>`jaywcjlove`</pur> 打开
`mentions:jaywcjlove` | 提及 <pur>`jaywcjlove`</pur> 用户
`assignee:jaywcjlove` | 分配给 <pur>`jaywcjlove`</pur> 用户
`updated:<2022-11-23` | 更新日期之前
<!--rehype:className=style-list-->
### 基于用户的条件
:-- | --
:-- | --
`fullname:jaywcjlove` | 全名 <pur>jaywcjlove</pur>
`location:China` | 位置 <pur>China</pur>
`followers:20..50 followers:>200 followers:<2` | 追随者
`repos:0 repos:<40 repos:>5` | 仓库数量
<!--rehype:className=style-list-->
另见
-----
- [Keyboard shortcuts for Github](https://help.github.com/articles/using-keyboard-shortcuts/) _(help.github.com)_

126
docs/gitlab.md Normal file
View File

@ -0,0 +1,126 @@
GitLab 键盘快捷键 备忘清单
===
GitLab 中 58 个键盘快捷键的可视化备忘单
键盘快捷键
---------
### 全局的
快捷键 | 说明
:- | -
`?` | 显示或隐藏快捷方式参考表
`Shift` `P` | 转到您的项目页面
`Shift` `G` | 转到您的群组页面
`Shift` `A` | 前往您的活动页面
`Shift` `L` | 转到您的里程碑页面
`Shift` `S` | 转到您的摘要页面
`S` | 将光标放在问题或合并请求搜索中
`Shift` `I` | 转到您的问题页面
`Shift` `T` | 转到您的合并请求页面
`P` `B` | 显示或隐藏性能栏
`Up` | 编辑您的最后一条评论,您必须在主题下方的空白文本字段中
`Ctrl` `Shift` `P` | 在文本字段中编辑文本时切换降价预览
<!--rehype:className=shortcuts-->
### 项目
<!--rehype:wrap-class=row-span-2-->
快捷键 | 说明
:- | -
`G` `P` | 进入项目主页
`G` `V` | 转到项目活动提要
`G` `R` | 转到项目发布列表
`G` `F` | 转到项目文件列表
`T` | 进入项目文件搜索页面
`G` `C` | 转到项目提交列表
`G` `N` | 转到存储库图页面
`G` `D` | 转到存储库图表
`G` `I` | 转到项目问题列表
`I` | 转到新问题页面
`G` `B` | 转到项目问题板列表
`G` `M` | 转到项目合并请求列表
`G` `J` | 转到 CI/CD 作业列表
`G` `L` | 转到项目指标
`G` `E` | 转到项目环境
`G` `K` | 进入项目Kubernetes集群集成页面
`G` `S` | 转到项目片段列表
`G` `W` | 转到项目 wiki如果启用
<!--rehype:className=shortcuts-->
### 问题和合并请求
快捷键 | 说明
:- | -
`E` | 编辑说明
`A` | 变更受让人
`M` | 改变里程碑
`L` | 更改标签
`R` | 开始写评论,如果选择了任何文本,它将被引用
`N` | 移至下一个未解决的讨论,仅合并请求
`P` | 移至先前未解决的讨论,仅合并请求
`]` | 移动到下一个文件,仅合并请求
`[` | 移动到上一个文件,仅合并请求
<!--rehype:className=shortcuts-->
### 项目文件
快捷键 | 说明
:- | -
`Up` | 向上移动选择
`Down` | 向下移动选择
`Enter` | 开放选择
`Esc` | 返回文件列表屏幕,仅在搜索文件时
`Y` | 仅在查看文件时转到文件永久链接
<!--rehype:className=shortcuts-->
### 网络集成开发环境
快捷键 | 说明
:- | -
`Ctrl` `P` | 搜索并打开另一个文件进行编辑
`Ctrl` `Enter` | 提交,在编辑提交消息时
<!--rehype:className=shortcuts-->
### 存储库
<!--rehype:wrap-class=row-span-2-->
快捷键 | 说明
:- | -
`Left` | 向左滚动
`Right` | 向右滚动
`Up` | 向上滑动
`Down` | 向下滚动
`Shift` `Up` | 滚动到顶部
`Shift` `Down` | 滚动到底部
<!--rehype:className=shortcuts-->
### 维基页面
快捷键 | 说明
:- | -
`E` | 编辑维基页面
<!--rehype:className=shortcuts-->
### 过滤搜索
快捷键 | 说明
:- | -
`Ctrl` `Backspace` | 清除整个搜索过滤器
`Alt` `Backspace` | 一次清除一个标记
<!--rehype:className=shortcuts-->
### 史诗
快捷键 | 说明
:- | -
`R` | 开始写评论,如果选择了任何文本,它将被引用
`E` | 编辑说明
`L` | 更改标签
<!--rehype:className=shortcuts-->
另见
----
- [Keyboard shortcuts for GitLab](https://docs.gitlab.com/ee/user/shortcuts.html) _(docs.gitlab.com)_

212
docs/google-chrome.md Normal file
View File

@ -0,0 +1,212 @@
Google Chrome 键盘快捷键备忘清单
===
谷歌浏览器中 65 个键盘快捷键和 Chrome 开发者工具中 56 个键盘快捷键的可视化备忘单
谷歌浏览器键盘快捷键
---------
<!--rehype:body-class=cols-2-->
### 选项卡和窗口
快捷键 | 说明
:- | -
`Ctrl` `N` | 打开一个新窗口
`Ctrl` `Shift` `N` | 以隐身模式打开新窗口
`Ctrl` `T` | 打开一个新标签,然后跳转到它
`Ctrl` `Shift` `T` | 重新打开上次关闭的选项卡,并跳转到它
`Ctrl` `Tab` | 跳转到下一个打开的标签页
`Ctrl` `Shift` `Tab` | 跳转到上一个打开的标签页
`Ctrl` `1-8` | 跳转到特定选项卡
`Ctrl` `9` | 跳转到最后一个标签
`Alt` `Home` | 在当前选项卡中打开您的主页
`Alt` `Left` | 在当前选项卡中打开历史记录中的上一页
`Alt` `Right` | 在当前选项卡中打开历史记录的下一页
`Ctrl` `W` | 关闭当前标签
`Ctrl` `Shift` `W` | 关闭当前窗口
`Alt` `Space` `N` | 最小化当前窗口
`Alt` `Space` `X` | 最大化当前窗口
`Alt` `F4` | 关闭当前窗口
`Ctrl` `Shift` `Q` | 相当谷歌浏览器
<!--rehype:className=shortcuts-->
### 谷歌浏览器功能
快捷键 | 说明
:- | -
`Alt` `F` | 打开 Chrome 菜单
`Ctrl` `Shift` `B` | 显示或隐藏书签栏
`Ctrl` `Shift` `O` | 打开书签管理器
`Ctrl` `H` | 在新标签页中打开历史记录页面
`Ctrl` `J` | 在新标签页中打开下载页面
`Shift` `Esc` | 打开 Chrome 任务管理器
`Shift` `Alt` `T` | 将焦点置于 Chrome 工具栏中的第一项
`F10` | 将焦点置于 Chrome 工具栏中的最后一项
`F6` | 将焦点切换到未聚焦的对话框(如果显示)
`Ctrl` `F` | 打开查找栏以搜索当前页面
`Ctrl` `G` | 跳转到查找栏搜索的下一个匹配项
`Ctrl` `Shift` `G` | 跳转到查找栏搜索的上一个匹配项
`F12` | 打开开发者工具
`Ctrl` `Shift` `Delete` | 打开清除浏览数据选项
`F1` | 在新标签页中打开 Chrome 帮助中心
`Ctrl` `Shift` `M` | 登录不同的用户或以访客身份浏览
`Alt` `Shift` `I` | 打开反馈表
<!--rehype:className=shortcuts-->
### 地址栏
快捷键 | 说明
:- | -
`(type)` `Enter` | 使用您的默认搜索引擎进行搜索
`(type)` `Tab` | 使用不同的搜索引擎搜索
`Ctrl` `Enter` | 添加 www. 和 .com 到站点名称,并在当前选项卡中打开
`Alt` `Enter` | 打开新标签页并执行 Google 搜索
`Ctrl` `L` | 跳转到地址栏
`Ctrl` `K` | 从页面上的任何位置搜索
`Shift` `Delete` | 从地址栏中删除预测
<!--rehype:className=shortcuts-->
### 网页快捷方式
快捷键 | 说明
:- | -
`Ctrl` `P` | 打开选项以打印当前页面
`Ctrl` `S` | 打开选项以保存当前页面
`Ctrl` `R` | 重新加载当前页面
`Ctrl` `Shift` `R` | 重新加载当前页面,忽略缓存内容
`Esc` | 停止页面加载
`Tab` | 向前浏览可点击的项目
`Shift` `Tab` | 浏览向后移动的可点击项目
`Ctrl` `O` | 在 Chrome 中打开计算机中的文件
`Ctrl` `U` | 显示当前页面不可编辑的 HTML 源代码
`Ctrl` `D` | 将当前网页保存为书签
`Ctrl` `Shift` `D` | 将所有打开的标签保存为新文件夹中的书签
`F11` | 打开或关闭全屏模式
`Ctrl` `+` | 使页面上的所有内容变大
`Ctrl` `-` | 缩小页面上的所有内容
`Ctrl` `0` | 将页面上的所有内容恢复为默认大小
`Space` | 向下滚动网页,一次滚动一个屏幕
`Shift` `Space` | 向上滚动网页,一次滚动一个屏幕
`Home` | 转到页面的顶部
`End` | 转到页面底部
`Shift` `(scroll mouse)` | 在页面上水平滚动
`Ctrl` `Left` | 将光标移动到文本字段中上一个单词的前面
`Ctrl` `Right` | 将光标移动到文本字段中下一个单词的后面
`Ctrl` `Backspace` | 删除文本字段中的前一个词
`Alt` `Home` | 在当前选项卡中打开主页
<!--rehype:className=shortcuts-->
Chrome 开发者工具键盘快捷键
---
### 打开 DevTools
快捷键 | 说明
:- | -
`Ctrl` `Shift` `I` | 打开您上次使用的任何面板
`Ctrl` `Shift` `J` | 打开控制台面板
`Ctrl` `Shift` `C` | 打开元素面板
<!--rehype:className=shortcuts-->
### 全局快捷方式
<!--rehype:wrap-class=row-span-3-->
快捷键 | 说明
:- | -
`F1` | 显示设置
`Ctrl` `]` | 聚焦下一个面板
`Ctrl` `[` | 聚焦上一个面板
`Ctrl` `Shift` `D` | 切换回您上次使用的任何对接位置
`Ctrl` `Shift` `M` | 切换设备模式
`Ctrl` `Shift` `C` | 切换检查元素模式
`Ctrl` `Shift` `P` | 打开命令菜单
`Esc` | 切换抽屉
`Ctrl` `R` | 正常装填
`Ctrl` `Shift` `R` | 硬重载
`Ctrl` `F` | 在当前面板中搜索文本
`Ctrl` `Shift` `F` | 在抽屉中打开“搜索”选项卡
`Ctrl` `P` | 在源面板中打开文件
`Ctrl` `Shift` `+` | 放大
`Ctrl` `-` | 缩小
`Ctrl` `0` | 恢复默认缩放级别
`Ctrl` `O` `!` | 运行片段
<!--rehype:className=shortcuts-->
### 元素面板
<!--rehype:wrap-class=row-span-2-->
快捷键 | 说明
:- | -
`Ctrl` `Z` | 撤消更改
`Ctrl` `Y` | 重做更改
`Up/Down` | 选择当前所选元素上方或下方的元素
`Right` | 展开当前选中的节点
`Left` | 折叠当前选中的节点
`Enter` | 在当前选定的元素上切换编辑属性模式
`Tab` | 进入编辑属性模式后选择下一个属性
`Shift` `Tab` | 进入编辑属性模式后选择上一个属性
`H` | 隐藏当前选中的元素
`F2` | 在当前选定的元素上切换编辑为 HTML 模式
<!--rehype:className=shortcuts-->
### 资源面板
<!--rehype:wrap-class=row-span-2-->
快捷键 | 说明
:- | -
`Ctrl` `\` | 暂停脚本执行(如果正在运行)或恢复(如果暂停)
`Ctrl` `'` | 跳过下一个函数调用
`Ctrl` `;` | 进入下一个函数调用
`Ctrl` `Shift` `;` | 跳出当前函数
`Ctrl` `./,` | 选择当前所选帧下方或上方的调用帧
`Ctrl` `S` | 将更改保存到本地修改
`Ctrl` `Alt` `S` | 保存所有更改
`Ctrl` `G` | 去线
`Alt` `W` | 关闭活动标签
<!--rehype:className=shortcuts-->
### 代码编辑器
快捷键 | 说明
:- | -
`Ctrl` `Del` | 删除最后一个单词中的所有字符,直到光标
`Ctrl` `M` | 转到匹配的括号
`Ctrl` `/` | 切换单行注释
`Ctrl` `D` | 选择光标所在的任何单词的下一个匹配项
`Ctrl` `U` | 取消选择光标所在的任何单词的下一个匹配项
<!--rehype:className=shortcuts-->
### 性能面板
快捷键 | 说明
:- | -
`Ctrl` `E` | 开始或停止录制
`Ctrl` `S` | 保存录音
`Ctrl` `O` | 载入录音
<!--rehype:className=shortcuts-->
### 内存面板
快捷键 | 说明
:- | -
`Ctrl` `E` | 开始或停止录制
<!--rehype:className=shortcuts-->
### 控制台面板
快捷键 | 说明
:- | -
`Tab` | 接受自动完成建议
`Esc` | 拒绝自动完成建议
`Up` | 获取之前的语句
`Down` | 获取下一条语句
`Ctrl` <code>\`</code> | 聚焦控制台
`Ctrl` `L` | 清除控制台
`Shift` `Enter` | 强制多行输入
`Enter` | 执行
<!--rehype:className=shortcuts-->
另见
----
- [Keyboard shortcuts for Google Chrome](https://support.google.com/chrome/answer/157179?hl=en) _(support.google.com)_

308
docs/htmx.md Normal file
View File

@ -0,0 +1,308 @@
\</> htmx 备忘清单
===
[![NPM version](https://img.shields.io/npm/v/htmx.org.svg?style=flat)](https://npmjs.org/package/htmx.org)
[![Downloads](https://img.shields.io/npm/dm/htmx.org.svg?style=flat)](https://www.npmjs.com/package/htmx.org)
[![Repo Dependents](https://badgen.net/github/dependents-repo/bigskysoftware/htmx)](https://github.com/bigskysoftware/htmx/network/dependents)
[![Github repo](https://badgen.net/badge/icon/Github?icon=github&label)](https://github.com/bigskysoftware/htmx)
适合初学者的综合 [htmx](https://htmx.org/) 备忘清单
<!--rehype:style=padding-top: 12px;-->
入门
---
### 快速开始
[htmx](https://htmx.org/) 是 [intercooler.js](http://intercoolerjs.org/) 的继承者
```html
<script src="https://unpkg.com/htmx.org@1.8.4"></script>
<!-- 有一个按钮POST通过AJAX点击 -->
<button hx-post="/clicked" hx-swap="outerHTML">
点击我
</button>
```
<!--rehype:className=wrap-text-->
`hx-post``hx-swap` 属性告诉 `htmx`
> 当用户单击此按钮时,向 `/clicked` 发出 `AJAX` 请求,并用响应替换整个按钮
```bash
$ npm install htmx.org
```
安装 `htmx` 将导入添加到您的 `index.js`
```js
import 'htmx.org';
```
### 点击编辑提交
<!--rehype:wrap-class=col-span-2-->
有一个按钮,可以从 `/contacts/1/edit` 获取联系人的编辑 UI
```html
<div hx-target="this" hx-swap="outerHTML">
<div><label>名字</label>: Joe</div>
<div><label></label>: Blow</div>
<div><label>邮箱</label>: joe@blow.com</div>
<button hx-get="/contact/1/edit" class="btn btn-primary">
点击编辑
</button>
</div>
```
这将返回一个可用于编辑联系人的表单
```html
<form hx-put="/contact/1" hx-target="this" hx-swap="outerHTML">
<div>
<label>名字</label>
<input type="text" name="firstName" value="Joe">
</div>
<div class="form-group">
<label></label>
<input type="text" name="lastName" value="Blow">
</div>
<div class="form-group">
<label>邮箱</label>
<input type="email" name="email" value="joe@blow.com">
</div>
<button class="btn">提交</button>
<button class="btn" hx-get="/contact/1">取消</button>
</form>
```
表单按照通常的 `REST-ful` 模式将 `PUT` 发回 `/contacts/1`
### 删除行
<!--rehype:wrap-class=col-span-2-->
```html
<table class="table delete-row-example">
<thead>
<tr>
<th>Name</th> <th>Email</th> <th>Status</th> <th></th>
</tr>
</thead>
<tbody hx-confirm="Are you sure?" hx-target="closest tr" hx-swap="outerHTML swap:1s">
...
</tbody>
</table>
```
表体有一个 `hx-confirm` 属性来确认删除动作。 它还将所有按钮的目标设置为最近的 `tr`,即最近的表格行(`hx-target` 继承自 DOM 中的父级)`hx-swap` 中的交换规范表示将整个目标换出并收到响应后等待 1 秒。最后一点是为了让我们可以使用以下 CSS
```css
tr.htmx-swapping td {
opacity: 0;
transition: opacity 1s ease-out;
}
```
在交换/删除之前淡出该行。每行都有一个带有 `hx-delete` 属性的按钮,该属性包含发出 `DELETE` 请求以从服务器中删除该行的 `url`。此请求以空内容响应,表明该行应替换为空内容
```html
<tr>
<td>Angie MacDowell</td>
<td>angie@macdowell.org</td>
<td>Active</td>
<td>
<button class="btn btn-danger" hx-delete="/contact/1">
Delete
</button>
</td>
</tr>
```
### 延迟加载
```html
<div hx-get="/graph" hx-trigger="load">
<img
alt="正在加载中..."
class="htmx-indicator"
width="150"
src="/img/bars.svg"/>
</div>
```
当我们加载图表时显示进度指示器。 然后通过稳定的 CSS(`htmx-settling`) 过渡加载图形并逐渐淡入视图
```css
.htmx-settling img {
opacity: 0;
}
img {
transition: opacity 300ms ease-in;
}
```
API 参考
---
<!--rehype:body-class=cols-2-->
### 核心属性参考
属性 | 说明
:- | --
`hx-boost` | 添加或删除链接和表单的[渐进增强](https://en.wikipedia.org/wiki/Progressive_enhancement)
`hx-get` | 向指定的 URL 发出 `GET`
`hx-post` | 向指定的 URL 发出 `POST`
`hx-push-url` | 将 URL 推入浏览器地址栏,创建一个新的历史条目
`hx-select` | 从响应中选择要换入的内容
`hx-select-oob` | 从带外(目标以外的某个地方)的响应中选择要换入的内容
`hx-swap` | 控制内容的交换方式(`outerHTML``beforeEnd``afterend`...)
`hx-swap-oob` | 将响应中的内容标记为带外(应该在目标以外的地方交换)
`hx-target` | 指定要交换的目标元素
`hx-trigger` | 指定触发请求的事件
`hx-vals` | 向参数添加值以随请求一起提交(JSON 格式)
<!--rehype:className=left-align-->
使用 htmx 时最常用的属性
### 附加属性参考
<!--rehype:wrap-class=row-span-2-->
属性 | 说明
:- | --
`hx-confirm` | 在发出请求之前显示一个 `confim()` 对话框
`hx-delete` | 向指定的 URL 发出 `DELETE`
`hx-disable` | 禁用给定节点和任何子节点的 htmx 处理
`hx-disinherit` | 控制和禁用子节点的自动属性继承
`hx-encoding` | 更改请求编码类型
`hx-ext` | 用于此元素的扩展
`hx-headers` | 添加到将与请求一起提交的标头
`hx-history-elt` | 在历史导航期间要快照和恢复的元素
`hx-include` | 在请求中包含额外数据
`hx-indicator` | 在请求期间放置 `htmx-request` 类的元素
`hx-params` | 过滤将与请求一起提交的参数
`hx-patch` | 向指定的 URL 发出 PATCH
`hx-preserve` | 指定在请求之间保持不变的元素
`hx-prompt` | 在提交请求之前显示一个 `prompt()`
`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)
<!--rehype:className=left-align-->
列出了 htmx 中可用的所有其他属性
### CSS 类参考
Class | 说明
:- | --
`htmx-added` | 在交换之前应用于新的内容,在它被解决之后移除
`htmx-indicator` | 一个动态生成的类,当存在 `htmx-request` 类时将切换可见<br /> _(不透明度:`1`)_
`htmx-request` | 在请求进行时应用于元素或使用 `hx-indicator` 指定的元素
`htmx-settling` | 内容交换后应用于目标,内容确定后删除。<br /> _可以通过 `hx-swap` 修改持续时间_
`htmx-swapping` | 在交换任何内容之前应用于目标,在交换之后移除。<br /> _可以通过 `hx-swap` 修改持续时间_
### 事件参考
<!--rehype:wrap-class=row-span-3-->
事件 | 说明
:- | --
`htmx:abort` | 将此事件发送到元素以中止请求
`htmx:afterOnLoad` | AJAX 请求完成处理成功响应后触发
`htmx:afterProcessNode` | 在 htmx 初始化节点后触发
`htmx:afterRequest` | AJAX 请求完成后触发
`htmx:afterSettle` | DOM 稳定后触发
`htmx:afterSwap` | 换入新内容后触发
`htmx:beforeOnLoad` | 在任何响应处理发生之前触发
`htmx:beforeProcessNode` | 在 htmx 初始化节点之前触发
`htmx:beforeRequest` | 在发出 AJAX 请求之前触发
`htmx:beforeSwap` | 在交换完成之前触发,允许您配置交换
`htmx:beforeSend` | 在发送 ajax 请求之前触发
`htmx:configRequest` | 在请求之前触发,允许您自定义参数、标头
`htmx:confirm` | 在元素上发生触发器后触发<br /> _允许您取消(或延迟)发出 AJAX 请求_
`htmx:historyCacheError` | 在缓存写入期间因错误而触发
`htmx:historyCacheMiss` | 在历史子系统中的缓存未命中时触发
`htmx:historyCacheMissError` | 远程检索不成功时触发
`htmx:historyCacheMissLoad` | 在成功的远程检索时触发
`htmx:historyRestore` | 当 htmx 处理历史恢复操作时触发
`htmx:beforeHistorySave` | 在内容保存到历史缓存之前触发
`htmx:load` | 当新内容添加到 DOM 时触发
`htmx:noSSESourceError` | 当元素在其触发器中引用 SSE 事件<br/> _但未定义父 SSE 源时触发_
`htmx:onLoadError` | htmx中onLoad处理异常时触发
`htmx:oobAfterSwap` | 在交换了一个带元素之后触发
`htmx:oobBeforeSwap` | 在带外元素交换完成之前触发,允许您配置交换
`htmx:oobErrorNoTarget` | 当带外元素在当前 DOM 中没有匹配的 ID 时触发
`htmx:prompt` | 显示提示后触发
`htmx:pushedIntoHistory` | 在 url 被推送到历史记录后触发
`htmx:responseError` | 当发生 HTTP 响应错误<br/> _(非 200 或 300 响应代码)时触发_
`htmx:sendError` | 当网络错误阻止 HTTP 请求发生时触发
`htmx:sseError` | 当 SSE 源发生错误时触发
`htmx:swapError` | 在交换阶段发生错误时触发
`htmx:targetError` | 指定无效目标时触发
`htmx:timeout` | 发生请求超时时触发
`htmx:validation:validate` | 在验证元素之前触发
`htmx:validation:failed` | 当元素验证失败时触发
`htmx:validation:halted` | 当请求由于验证错误而停止时触发
`htmx:xhr:abort` | 当 `ajax` 请求中止时触发
`htmx:xhr:loadend` | `ajax` 请求结束时触发
`htmx:xhr:loadstart` | `ajax` 请求开始时触发
`htmx:xhr:progress` | 在支持进度事件的 `ajax` 请求期间定期触发
### JavaScript API 参考
方法 | 说明
:- | --
`htmx.addClass()` | 向给定元素添加一个类
`htmx.ajax()` | 发出一个 htmx 风格的 ajax 请求
`htmx.closest()` | 找到与选择器匹配的给定元素的最近父级
`htmx.config` | 保存当前 htmx 配置对象的属性
`htmx.createEventSource` | 包含为 htmx 创建 SSE EventSource 对象的函数的属性
`htmx.createWebSocket` | 包含为 htmx 创建 WebSocket 对象的函数的属性
`htmx.defineExtension()` | 定义一个 htmx 扩展
`htmx.find()` | 查找与选择器匹配的单个元素
`htmx.findAll()` \| `htmx.findAll(elt, selector)` | 查找与给定选择器匹配的所有元素
`htmx.logAll()` | 安装将记录所有 htmx 事件的记录器
`htmx.logger` | 设置为当前记录器的属性(默认为空)
`htmx.off()` | 从给定元素中删除事件侦听器
`htmx.on()` | 在给定元素上创建事件侦听器,并返回它
`htmx.onLoad()` | 为 htmx:load 事件添加回调处理程序
`htmx.parseInterval()` | 将间隔声明解析为毫秒值
`htmx.process()` | 处理给定元素及其子元素,连接任何 htmx 行为
`htmx.remove()` | 删除给定的元素
`htmx.removeClass()` | 从给定元素中删除一个类
`htmx.removeExtension()` | 删除一个 htmx 扩展
`htmx.takeClass()` | 从给定元素的其他元素中获取一个类
`htmx.toggleClass()` | 从给定元素切换一个类
`htmx.trigger()` | 在元素上触发事件
`htmx.values()` | 返回与给定元素关联的输入值
### 请求标头参考
标头 | 说明
:- | --
`HX-Boosted` | 表示请求是通过使用 `hx-boost` 的元素发出的
`HX-Current-URL` | 浏览器的当前 `URL`
`HX-History-Restore-Request` | 如果请求是在本地历史缓存未命中后进行历史恢复,则为 `true`
`HX-Prompt` | 用户对 `hx` 提示的响应
`HX-Request` | 总是 `true`
`HX-Target` | 目标元素的 id(如果存在)
`HX-Trigger-Name` | 触发元素的名称(如果存在)
`HX-Trigger` | 触发元素的 id(如果存在)
### 响应标头参考
标头 | 说明
:- | --
[`HX-Location`](https://htmx.org/headers/hx-location) | 允许您执行不执行整页重新加载的客户端重定向
[`HX-Push-Url`](https://htmx.org/headers/hx-push-url) | 将一个新的 `url` 推入历史堆栈
`HX-Redirect` | 可用于将客户端重定向到新位置
`HX-Refresh` | 如果设置为 `true`,客户端将完全刷新页面
[`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)以获取更多信息_

779
docs/iptables.md Normal file
View File

@ -0,0 +1,779 @@
iptables 备忘清单
====
iptables 是一个配置 Linux 内核 防火墙(opens new window)的命令行工具,是 [netfilter](https://en.wikipedia.org/wiki/Netfilter)(opens new window)项目的一部分。这个快速参考备忘单显示了它的常用命令使用清单
入门
---
### 介绍
iptables 使用三个不同的链来允许或阻止流量:输入(input)、输出(output)和转发(forward)
- 输入(input) —— 此链用于控制传入连接的行为
- 输出(output) —— 此链用于传出连接
- 转发(forward) —— 这条链用于传入的连接,这些连接实际上不是在本地传递的,比如路由和 NATing
### 安装 iptables
CentOS 7 上默认安装了 firewalld 作为防火墙,使用 iptables 建议关闭并禁用 firewalld。
```bash
$ systemctl stop firewalld
$ systemctl disable firewalld
```
安装 iptables
```bash
$ yum install -y iptables-services
```
### 服务管理
```bash
$ systemctl status iptables # 查看服务状态
$ systemctl enable iptables # 启用服务
$ systemctl disable iptables # 禁用服务
$ systemctl start iptables # 启动服务
$ systemctl restart iptables # 重启服务
$ systemctl stop iptables # 关闭服务
```
### 命令参数
<!--rehype:wrap-class=row-span-3-->
基本语法:
```bash
$ iptables(选项)(参数)
```
---
参数 | 作用
:- | --
`-P` | 设置默认策略: <br/>_iptables -P INPUT (DROP_
`-F` | 清空规则链
`-L` | 查看规则链
`-A` | 在规则链的末尾加入新规则
`-I` | `num` 在规则链的头部加入新规则
`-D` | `num` 删除某一条规则
`-s` | 匹配来源地址 `IP/MASK` <br/>加叹号"!"表示除这个 `IP`
`-d` | 匹配目标地址
`-i` | 网卡名称 匹配从这块网卡流入的数据
`-o` | 网卡名称 匹配从这块网卡流出的数据
`-p` | 匹配协议,如 tcp,udp,icmp
`--dport num` | 匹配目标端口号
`--sport num` | 匹配来源端口号
---
```bash
$ iptables -t 表名 <-A/I/D/R> 规则链名 [规则号] <-i/o 网卡名> -p 协议名 <-s 源IP/源子网> --sport 源端口 <-d 目标IP/目标子网> --dport 目标端口 -j 动作
```
<!--rehype:className=wrap-text-->
### 开始配置规则
默认情况下,所有链都配置为接受规则,因此在强化过程中,建议从拒绝所有配置开始,然后只打开需要的端口:
```bash
$ iptables --policy INPUT DROP
$ iptables --policy OUTPUT DROP
$ iptables --policy FORWARD DROP
```
### 删除/插入规则
<!--rehype:wrap-class=row-span-2-->
按链条和编号删除规则
```bash
$ iptables -D INPUT 10
```
按规范删除规则
```bash
$ iptables -D INPUT -m conntrack --ctstate INVALID -j DROP
```
<!--rehype:className=wrap-text-->
刷新所有规则,删除所有链,并接受所有
```bash
$ iptables -P INPUT ACCEPT
$ iptables -P FORWARD ACCEPT
$ iptables -P OUTPUT ACCEPT
$ iptables -t nat -F
$ iptables -t mangle -F
$ iptables -F
$ iptables -X
```
---
```bash
# 冲洗所有链
$ iptables -F
# 刷新单链
$ iptables -F INPUT
# 插入规则
$ iptables -I INPUT 2 -s 202.54.1.2 -j DROP
```
### 显示规则
详细打印出所有活动的 `iptables` 规则
```bash
$ iptables -n -L -v
```
...具有行号的相同输出:
```bash
$ iptables -n -L -v --line-numbers
```
最后,相同的数据输出但与 `INPUT`/`OUTPUT` 链相关:
```bash
$ iptables -L INPUT -n -viptables -L OUTPUT -n -v --line-numbers
```
<!--rehype:className=wrap-text-->
### 列出特定链的规则
```bash
$ iptables -L INPUT
# 具有规则规范的相同数据:
$ iptables -S INPUT
# 包含数据包计数的规则列表
$ iptables -L INPUT -v
```
### 保存规则
```bash
# 在基于 Debian 的系统上
$ netfilter-persistent save
# 在基于 RedHat 的系统上
$ service iptables save
```
iptables 示例
---
<!--rehype:body-class=cols-2-->
### 清空当前的所有规则和计数
```bash
$ iptables -F # 清空所有的防火墙规则
$ iptables -X # 删除用户自定义的空链
$ iptables -Z # 清空计数
```
### 配置允许 ssh 端口连接
```bash
$ iptables -A INPUT -s 192.168.1.0/24 -p tcp --dport 22 -j ACCEPT
```
`22` 为你的 `ssh` 端口, `-s 192.168.1.0/24` 表示允许这个网段的机器来连接,其它网段的 `ip` 地址是登陆不了你的机器的。`-j ACCEPT` 表示接受这样的请求
### 允许本地回环地址可以正常使用
```shell
$ iptables -A INPUT -i lo -j ACCEPT
# 本地圆环地址就是那个127.0.0.1
# 是本机上使用的,它进与出都设置为允许
$ iptables -A OUTPUT -o lo -j ACCEPT
```
### 设置默认的规则
```shell
# 配置默认的不让进
$ iptables -P INPUT DROP
# 默认的不允许转发
$ iptables -P FORWARD DROP
# 默认的可以出去
$ iptables -P OUTPUT ACCEPT
```
### 配置白名单
```shell
# 允许机房内网机器可以访问
$ iptables -A INPUT -p all -s 192.168.1.0/24 -j ACCEPT
# 允许机房内网机器可以访问
$ iptables -A INPUT -p all -s 192.168.140.0/24 -j ACCEPT
# 允许 183.121.3.7 访问本机的3380端口
$ iptables -A INPUT -p tcp -s 183.121.3.7 --dport 3380 -j ACCEPT
```
### 开启相应的服务端口
```shell
# 开启 80 端口因为web对外都是这个端口
$ iptables -A INPUT -p tcp --dport 80 -j ACCEPT
# 允许被 ping
$ iptables -A INPUT -p icmp --icmp-type 8 -j ACCEPT
# 已经建立的连接得让它进来
$ iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
```
### 保存规则到配置文件中
```shell
# 任何改动之前先备份,请保持这一优秀的习惯
$ cp /etc/sysconfig/iptables /etc/sysconfig/iptables.bak
$ iptables-save > /etc/sysconfig/iptables
$ cat /etc/sysconfig/iptables
```
### 列出已设置的规则
<!--rehype:wrap-class=row-span-2-->
```bash
$ iptables -L [-t 表名][链名]
```
---
- 四个表名 `raw``nat``filter``mangle`
- 五个规则链名 `INPUT``OUTPUT``FORWARD``PREROUTING``POSTROUTING`
- filter 表包含`INPUT``OUTPUT``FORWARD`三个规则链
```shell
# 列出 nat 上面的所有规则
$ iptables -L -t nat
# ^ -t 参数指定,必须是 raw natfiltermangle 中的一个
# 规则带编号
$ iptables -L -t nat --line-numbers
$ iptables -L INPUT
# 查看,这个列表看起来更详细
$ iptables -L -nv
```
### 清除已有规则
```shell
# 清空指定链 INPUT 上面的所有规则
$ iptables -F INPUT
# 删除指定的链,这个链必须没有被其它任何规则引用,
# 而且这条上必须没有任何规则
$ iptables -X INPUT
# 如果没有指定链名,则会删除该表中所有非内置的链
# 把指定链,或者表中的所有链上的所有计数器清零
$ iptables -Z INPUT
```
### 删除已添加的规则
```shell
# 添加一条规则
$ iptables -A INPUT -s 192.168.1.5 -j DROP
```
将所有 iptables 以序号标记显示,执行:
```shell
$ iptables -L -n --line-numbers
```
比如要删除 INPUT 里序号为 8 的规则,执行:
```shell
$ iptables -D INPUT 8
```
### 开放指定的端口
<!--rehype:wrap-class=row-span-2-->
```shell
# 允许本地回环接口(即运行本机访问本机)
$ iptables -A INPUT -s 127.0.0.1 -d 127.0.0.1 -j ACCEPT
# 允许已建立的或相关连的通行
$ iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
# 允许所有本机向外的访问
$ iptables -A OUTPUT -j ACCEPT
# 允许访问22端口
$ iptables -A INPUT -p tcp --dport 22 -j ACCEPT
# 允许访问80端口
$ iptables -A INPUT -p tcp --dport 80 -j ACCEPT
# 允许ftp服务的21端口
$ iptables -A INPUT -p tcp --dport 21 -j ACCEPT
# 允许FTP服务的20端口
$ iptables -A INPUT -p tcp --dport 20 -j ACCEPT
# 禁止其他未允许的规则访问
$ iptables -A INPUT -j reject
# 禁止其他未允许的规则访问
$ iptables -A FORWARD -j REJECT
```
### 屏蔽 IP
<!--rehype:wrap-class=row-span-2-->
```shell
# 屏蔽恶意主机比如192.168.0.8
$ iptables -A INPUT -p tcp -m tcp -s 192.168.0.8 -j DROP
# 屏蔽单个IP的命令
$ iptables -I INPUT -s 123.45.6.7 -j DROP
# 封整个段即从123.0.0.1到123.255.255.254的命令
$ iptables -I INPUT -s 123.0.0.0/8 -j DROP
# 封IP段即从123.45.0.1到123.45.255.254的命令
$ iptables -I INPUT -s 124.45.0.0/16 -j DROP
# 封IP段即从123.45.6.1到123.45.6.254的命令是
$ iptables -I INPUT -s 123.45.6.0/24 -j DROP
```
### 指定数据包出去的网络接口
只对 OUTPUTFORWARDPOSTROUTING 三个链起作用。
```shell
$ iptables -A FORWARD -o eth0
```
### 查看已添加的规则
<!--rehype:wrap-class=row-span-2-->
```shell
$ iptables -L -n -v
Chain INPUT (policy DROP 48106 packets, 2690K bytes)
pkts bytes target prot opt in out source destination
5075 589K ACCEPT all -- lo * 0.0.0.0/0 0.0.0.0/0
191K 90M ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:22
1499K 133M ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:80
4364K 6351M ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
6256 327K ACCEPT icmp -- * * 0.0.0.0/0 0.0.0.0/0
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 3382K packets, 1819M bytes)
pkts bytes target prot opt in out source destination
5075 589K ACCEPT all -- * lo 0.0.0.0/0 0.0.0.0/0
```
### 启动网络转发规则
公网`210.14.67.7`让内网`192.168.188.0/24`上网
```shell
$ iptables -t nat -A POSTROUTING -s 192.168.188.0/24 -j SNAT --to-source 210.14.67.127
```
<!--rehype:className=wrap-text-->
### 端口映射
本机的 2222 端口映射到内网 虚拟机的 22 端口
```shell
$ iptables -t nat -A PREROUTING -d 210.14.67.127 -p tcp --dport 2222 -j DNAT --to-dest 192.168.188.115:22
```
<!--rehype:className=wrap-text-->
### 字符串匹配
<!--rehype:wrap-class=row-span-2-->
比如,我们要过滤所有 TCP 连接中的字符串`test`,一旦出现它我们就终止这个连接,我们可以这么做:
```shell
$ iptables -A INPUT -p tcp -m string --algo kmp --string "test" -j REJECT --reject-with tcp-reset
$ iptables -L
# Chain INPUT (policy ACCEPT)
# target prot opt source destination
# REJECT tcp -- anywhere anywhere STRING match "test" ALGO name kmp TO 65535 reject-with tcp-reset
#
# Chain FORWARD (policy ACCEPT)
# target prot opt source destination
#
# Chain OUTPUT (policy ACCEPT)
# target prot opt source destination
```
### 阻止 Windows 蠕虫的攻击
```shell
$ iptables -I INPUT -j DROP -p tcp -s 0.0.0.0/0 -m string --algo kmp --string "cmd.exe"
```
<!--rehype:className=wrap-text-->
### 防止 SYN 洪水攻击
```shell
$ iptables -A INPUT -p tcp --syn -m limit --limit 5/second -j ACCEPT
```
### 允许环回连接
```bash
$ iptables -A INPUT -i lo -j ACCEPTiptables -A OUTPUT -o lo -j ACCEPT
```
### 允许已建立和相关的传入连接
```bash
$ iptables -A INPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
```
### 允许已建立的传出连接
```bash
$ iptables -A OUTPUT -m conntrack --ctstate ESTABLISHED -j ACCEPT
```
### 内部到外部
```bash
$ iptables -A FORWARD -i eth1 -o eth0 -j ACCEPT
```
### 丢弃无效数据包
```bash
$ iptables -A INPUT -m conntrack --ctstate INVALID -j DROP
```
### 阻止 IP 地址
```bash
$ iptables -A INPUT -s 192.168.1.10 -j DROP
```
### 阻止和 IP 地址并拒绝
```bash
$ iptables -A INPUT -s 192.168.1.10 -j REJECT
```
### 阻止与网络接口的连接
```bash
$ iptables -A INPUT -i eth0 -s 192.168.1.10 -j DROP
```
### 允许所有传入的 SSH
```bash
$ iptables -A INPUT -p tcp --dport 22 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT
$ iptables -A OUTPUT -p tcp --sport 22 -m conntrack --ctstate ESTABLISHED -j ACCEPT
```
### 允许来自特定 IP 地址或子网的传入 SSH
```bash
$ iptables -A INPUT -p tcp -s 192.168.1.0/24 --dport 22 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT
$ iptables -A OUTPUT -p tcp --sport 22 -m conntrack --ctstate ESTABLISHED -j ACCEPT
```
### 允许传出 SSH
```bash
$ iptables -A OUTPUT -p tcp --dport 22 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT
$ iptables -A INPUT -p tcp --sport 22 -m conntrack --ctstate ESTABLISHED -j ACCEPT
```
### 允许来自特定 IP 地址或子网的传入 Rsync
```bash
$ iptables -A INPUT -p tcp -s 192.168.1.0/24 --dport 873 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT
$ iptables -A OUTPUT -p tcp --sport 873 -m conntrack --ctstate ESTABLISHED -j ACCEPT
```
### 允许传入 HTTP
```bash
$ iptables -A INPUT -p tcp --dport 80 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT
$ iptables -A OUTPUT -p tcp --sport 80 -m conntrack --ctstate ESTABLISHED -j ACCEPT
```
### 允许传入 HTTPS
```bash
$ iptables -A INPUT -p tcp --dport 443 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT
$ iptables -A OUTPUT -p tcp --sport 443 -m conntrack --ctstate ESTABLISHED -j ACCEPT
```
### 允许传入 HTTP 和 HTTPS
```bash
$ iptables -A INPUT -p tcp -m multiport --dports 80,443 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT
$ iptables -A OUTPUT -p tcp -m multiport --dports 80,443 -m conntrack --ctstate ESTABLISHED -j ACCEPT
```
### 允许来自特定 IP 地址或子网的 MySQL
```bash
$ iptables -A INPUT -p tcp -s 192.168.1.0/24 --dport 3306 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT
$ iptables -A OUTPUT -p tcp --sport 3306 -m conntrack --ctstate ESTABLISHED -j ACCEPT
```
### 允许 MySQL 到特定的网络接口
```bash
$ iptables -A INPUT -i eth1 -p tcp --dport 3306 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT
$ iptables -A OUTPUT -o eth1 -p tcp --sport 3306 -m conntrack --ctstate ESTABLISHED -j ACCEPT
```
### 允许来自特定 IP 地址或子网的 PostgreSQL
```bash
$ iptables -A INPUT -p tcp -s 192.168.1.0/24 --dport 5432 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT
$ iptables -A OUTPUT -p tcp --sport 5432 -m conntrack --ctstate ESTABLISHED -j ACCEPT
```
### 允许 PostgreSQL 到特定的网络接口
```bash
$ iptables -A INPUT -i eth1 -p tcp --dport 5432 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT
$ iptables -A OUTPUT -o eth1 -p tcp --sport 5432 -m conntrack --ctstate ESTABLISHED -j ACCEPT
```
### 阻止传出 SMTP 邮件
```bash
$ iptables -A OUTPUT -p tcp --dport 25 -j REJECT
```
### 允许所有传入的 SMTP
```bash
$ iptables -A INPUT -p tcp --dport 25 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT
$ iptables -A OUTPUT -p tcp --sport 25 -m conntrack --ctstate ESTABLISHED -j ACCEPT
```
### 允许所有传入的 IMAP
```bash
$ iptables -A INPUT -p tcp --dport 143 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT
$ iptables -A OUTPUT -p tcp --sport 143 -m conntrack --ctstate ESTABLISHED -j ACCEPT
```
### 允许所有传入的 IMAPS
```bash
$ iptables -A INPUT -p tcp --dport 993 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT
$ iptables -A OUTPUT -p tcp --sport 993 -m conntrack --ctstate ESTABLISHED -j ACCEPT
```
### 允许所有传入的 POP3
```bash
$ iptables -A INPUT -p tcp --dport 110 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT
$ iptables -A OUTPUT -p tcp --sport 110 -m conntrack --ctstate ESTABLISHED -j ACCEPT
```
### 允许所有传入的 POP3S
```bash
$ iptables -A INPUT -p tcp --dport 995 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT
$ iptables -A OUTPUT -p tcp --sport 995 -m conntrack --ctstate ESTABLISHED -j ACCEPT
```
### 在公共接口上删除专用网络地址
```bash
$ iptables -A INPUT -i eth1 -s 192.168.1.0/24 -j DROP
$ iptables -A INPUT -i eth1 -s 10.0.0.0/8 -j DROP
```
### 将所有传出到 Facebook 网络
获取 Facebook 作为:
```bash
$ whois -h v4.whois.cymru.com " -v $(host facebook.com | grep "has address" | cut -d " " -f4)" | tail -n1 | awk '{print $1}'
```
降低:
```bash
$ for i in $(whois -h whois.radb.net -- '-i origin AS1273' | grep "^route:" | cut -d ":" -f2 | sed -e 's/^[ \t]*//' | sort -n -t . -k 1,1 -k 2,2 -k 3,3 -k 4,4 | cut -d ":" -f2 | sed 's/$/;/') ; do iptables -A OUTPUT -s "$i" -j REJECTdone
```
### 记录和丢弃数据包
```bash
$ iptables -A INPUT -i eth1 -s 10.0.0.0/8 -j LOG --log-prefix "IP_SPOOF A: "
$ iptables -A INPUT -i eth1 -s 10.0.0.0/8 -j DROP
```
默认情况下,所有内容都记录到 `/var/log/messages` 文件中:
```bash
$ tail -f /var/log/messagesgrep --color 'IP SPOOF' /var/log/messages
```
### 记录和丢弃日志条目数量有限的数据包
```bash
$ iptables -A INPUT -i eth1 -s 10.0.0.0/8 -m limit --limit 5/m --limit-burst 7 -j LOG --log-prefix "IP_SPOOF A: "
$ iptables -A INPUT -i eth1 -s 10.0.0.0/8 -j DROP
```
### 丢弃或接受来自 Mac 地址的流量
```bash
$ iptables -A INPUT -m mac --mac-source 00:0F:EA:91:04:08 -j DROP
$ iptables -A INPUT -p tcp --destination-port 22 -m mac --mac-source 00:0F:EA:91:04:07 -j ACCEPT
```
### 阻止或允许 ICMP Ping 请求
```bash
$ iptables -A INPUT -p icmp --icmp-type echo-request -j DROP
$ iptables -A INPUT -i eth1 -p icmp --icmp-type echo-request -j DROP
```
### 使用 multiport 指定多个端口
```bash
$ iptables -A INPUT -i eth0 -p tcp -m state --state NEW -m multiport --dports ssh,smtp,http,https -j ACCEPT
```
### 使用 `random*` 或 `nth*` 进行负载平衡
```bash
_ips=("172.31.250.10" "172.31.250.11" "172.31.250.12" "172.31.250.13")for ip in "${_ips[@]}" ; do iptables -A PREROUTING -i eth0 -p tcp --dport 80 -m state --state NEW -m nth --counter 0 --every 4 --packet 0 \ -j DNAT --to-destination ${ip}:80done
```
or
```bash
_ips=("172.31.250.10" "172.31.250.11" "172.31.250.12" "172.31.250.13")for ip in "${_ips[@]}" ; do iptables -A PREROUTING -i eth0 -p tcp --dport 80 -m state --state NEW -m random --average 25 \ -j DNAT --to-destination ${ip}:80done
```
### 使用 limit 和 `iplimit*` 限制连接数
```bash
$ iptables -A FORWARD -m state --state NEW -p tcp -m multiport --dport http,https -o eth0 -i eth1 -m limit --limit 20/hour --limit-burst 5 -j ACCEPT
```
or
```bash
$ iptables -A INPUT -p tcp -m state --state NEW --dport http -m iplimit --iplimit-above 5 -j DROP
```
### 维护要匹配的最近连接列表
```bash
$ iptables -A FORWARD -m recent --name portscan --rcheck --seconds 100 -j DROPiptables -A FORWARD -p tcp -i eth0 --dport 443 -m recent --name portscan --set -j DROP
```
### 匹配数据包数据负载中的 “string*”
```bash
$ iptables -A FORWARD -m string --string '.com' -j DROP
$ iptables -A FORWARD -m string --string '.exe' -j DROP
```
### 带有“时间*”的基于时间的规则
```bash
$ iptables -A FORWARD -p tcp -m multiport --dport http,https -o eth0 -i eth1 -m time --timestart 21:30 --timestop 22:30 --days Mon,Tue,Wed,Thu,Fri -j ACCEPT
```
### 基于 TTL 值的数据包匹配
```bash
$ iptables -A INPUT -s 1.2.3.4 -m ttl --ttl-lt 40 -j REJECT
```
### 防止端口扫描
```bash
$ iptables -N port-scanningiptables -A port-scanning -p tcp --tcp-flags SYN,ACK,FIN,RST RST -m limit --limit 1/s --limit-burst 2 -j RETURNiptables -A port-scanning -j DROP
```
### SSH 暴力破解保护
```bash
$ iptables -A INPUT -p tcp --dport ssh -m conntrack --ctstate NEW -m recent --setiptables -A INPUT -p tcp --dport ssh -m conntrack --ctstate NEW -m recent --update --seconds 60 --hitcount 10 -j DROP
```
### 同步泛洪保护
```bash
$ iptables -N syn_floodiptables -A INPUT -p tcp --syn -j syn_floodiptables -A syn_flood -m limit --limit 1/s --limit-burst 3 -j RETURN
$ iptables -A syn_flood -j DROPiptables -A INPUT -p icmp -m limit --limit 1/s --limit-burst 1 -j ACCEPT
$ iptables -A INPUT -p icmp -m limit --limit 1/s --limit-burst 1 -j LOG --log-prefix PING-DROP:
$ iptables -A INPUT -p icmp -j DROPiptables -A OUTPUT -p icmp -j ACCEPT
```
### 使用 SYNPROXY 缓解 SYN 泛洪
```bash
$ iptables -t raw -A PREROUTING -p tcp -m tcp --syn -j CT --notrack
$ iptables -A INPUT -p tcp -m tcp -m conntrack --ctstate INVALID,UNTRACKED -j SYNPROXY --sack-perm --timestamp --wscale 7 --mss 1460
$ iptables -A INPUT -m conntrack --ctstate INVALID -j DROP
```
### 阻止非 SYN 的新数据包
```bash
$ iptables -A INPUT -p tcp ! --syn -m state --state NEW -j DROP
```
```bash
$ iptables -t mangle -A PREROUTING -p tcp ! --syn -m conntrack --ctstate NEW -j DROP
```
### 强制碎片数据包检查
```bash
$ iptables -A INPUT -f -j DROP
```
### XMAS 包
```bash
$ iptables -A INPUT -p tcp --tcp-flags ALL ALL -j DROP
```
### 丢弃所有 NULL 数据包
```bash
$ iptables -A INPUT -p tcp --tcp-flags ALL NONE -j DROP
```
### 阻止不常见的 MSS 值
```bash
$ iptables -t mangle -A PREROUTING -p tcp -m conntrack --ctstate NEW -m tcpmss ! --mss 536:65535 -j DROP
```
### 阻止带有虚假 TCP 标志的数据包
```bash
$ iptables -t mangle -A PREROUTING -p tcp --tcp-flags FIN,SYN,RST,PSH,ACK,URG NONE -j DROP
$ iptables -t mangle -A PREROUTING -p tcp --tcp-flags FIN,SYN FIN,SYN -j DROP
$ iptables -t mangle -A PREROUTING -p tcp --tcp-flags SYN,RST SYN,RST -j DROP
$ iptables -t mangle -A PREROUTING -p tcp --tcp-flags FIN,RST FIN,RST -j DROP
$ iptables -t mangle -A PREROUTING -p tcp --tcp-flags FIN,ACK FIN -j DROP
$ iptables -t mangle -A PREROUTING -p tcp --tcp-flags ACK,URG URG -j DROP
$ iptables -t mangle -A PREROUTING -p tcp --tcp-flags ACK,FIN FIN -j DROP
$ iptables -t mangle -A PREROUTING -p tcp --tcp-flags ACK,PSH PSH -j DROP
$ iptables -t mangle -A PREROUTING -p tcp --tcp-flags ALL ALL -j DROP
$ iptables -t mangle -A PREROUTING -p tcp --tcp-flags ALL NONE -j DROP
$ iptables -t mangle -A PREROUTING -p tcp --tcp-flags ALL FIN,PSH,URG -j DROP
$ iptables -t mangle -A PREROUTING -p tcp --tcp-flags ALL SYN,FIN,PSH,URG -j DROP
$ iptables -t mangle -A PREROUTING -p tcp --tcp-flags ALL SYN,RST,ACK,FIN,URG -j DROP
```
### 阻止来自私有子网的数据包(欺骗)
```bash
_subnets=("224.0.0.0/3" "169.254.0.0/16" "172.16.0.0/12" "192.0.2.0/24" "192.168.0.0/16" "10.0.0.0/8" "0.0.0.0/8" "240.0.0.0/5")for _sub in "${_subnets[@]}" ; do iptables -t mangle -A PREROUTING -s "$_sub" -j DROPdoneiptables -t mangle -A PREROUTING -s 127.0.0.0/8 ! -i lo -j DROP
```
另见
---
- [Iptables 应用](https://dunwu.github.io/linux-tutorial/linux/ops/iptables.html)
- [netfilter 官网](https://netfilter.org/)

View File

@ -1,7 +1,13 @@
Jest 备忘清单
===
Jest 是一款优雅、简洁的 JavaScript 测试框架,这里介绍了它的入门和 一些 API 的索引。
[![NPM version](https://img.shields.io/npm/v/jest.svg?style=flat)](https://www.npmjs.com/package/jest)
[![Downloads](https://img.shields.io/npm/dm/jest.svg?style=flat)](https://www.npmjs.com/package/jest)
[![Repo Dependents](https://badgen.net/github/dependents-repo/facebook/jest)](https://github.com/facebook/jest/network/dependents)
[![Github repo](https://badgen.net/badge/icon/Github?icon=github&label)](https://github.com/facebook/jest)
Jest 是一款优雅、简洁的 JavaScript 测试框架,这里介绍了它的入门和 一些 API 的索引
<!--rehype:style=padding-top: 12px;-->
入门
----
@ -41,6 +47,37 @@ npm test -- --watch
查看: [Getting started](https://jestjs.io/docs/getting-started)
### 常用命令
<!--rehype:wrap-class=col-span-2 row-span-2-->
```bash
# 指定测试文件的名称
$ jest my-test
# 指定测试文件的路径
$ jest path/to/my-test.js
# 仅运行在 hg/git 上有改动但尚未提交的文件
$ jest -o
# 仅运行与 fileA.js 和 fileB.js相关的测试
$ jest --findRelatedTests fileA.js fileB.js
# 仅运行匹配特定名称的测试用例
$ jest -t name-of-spec
# 运行监视模式默认执行 jest -o 监视有改动的测试
$ jest --watch
$ jest --watchAll # 监视所有测试
```
### 支持驼峰和串式命名的参数
<!--rehype:wrap-class=col-span-2-->
```bash
# 下面给出的命令执行的结果是一样的:
$ jest --collect-coverage
$ jest --collectCoverage
# 不同命名形式的参数还可以混用,如:
$ jest --update-snapshot \
--detectOpenHandles
```
### 编写测试
<!--rehype:wrap-class=col-span-2-->
@ -884,6 +921,79 @@ test('第二个文本', () => {
`Node.js` 和 `Jest` 会缓存你需要的模块。 要测试具有副作用的模块,您需要在测试之间重置模块注册表
命令参数参考
---
<!--rehype:body-class=cols-1-->
### 命令参数
:-- | --
:-- | --
`--bail[=<n>]`, `-b` | 在 `n` 个测试套件失败后立即退出测试套件
`--cache` | 是否使用缓存
`--changedFilesWithAncestor` | 运行与当前更改和上次提交中所做更改相关的测试
`--changedSince` | 运行与自提供的分支或提交哈希以来的更改相关的测试
`--ci` | 指定该参数时,`Jest` 会认为正在 `CI` 环境上运行
`--clearCache` | 删除 `Jest` 的缓存目录, 然后不运行测试直接退出
`--clearMocks` | 在每次测试前自动清除模拟的上下文
`--collectCoverageFrom=<glob>` | 相对于 `rootDir` 的 `glob` 模式匹配需要从中收集覆盖信息的文件
`--colors` | 即便 `stdout` 不是 `TTY` 模式,也要强制高亮显示测试结果
`--config=<path>` | 指定配置文件的路径
`--coverage[=<boolean>]`, `--collectCoverage` | 将测试覆盖率信息输出为报告
`--coverageProvider=<provider>` | 指示应该使用哪个提供程序来检测代码的覆盖率
`--debug` | 打印关于 `Jest` 配置的调试信息
`--detectOpenHandles` | 尝试收集并打印打开的句柄以防止 `Jest` 干净地退出
`--env=<environment>` | 所有测试都使用该测试环境设定
`--errorOnDeprecated` | 使调用已弃用的 `API` 抛出有用的错误消息
`--expand`, `-e` | 使用该参数来对比完整的差异和错误,而非修复
`--filter=<file>` | 导出过滤功能的模块的路径
`--findRelatedTests <spaceSeparatedListOfSourceFiles>` | 查找并运行涵盖作为参数传入的以空格分隔的源文件列表的测试
`--forceExit` | 强制 `Jest` 在所有测试运行完后退出
`--help` | 显示帮助信息,类似于本页文档
`--ignoreProjects <project1> ... <projectN>` | 忽略特定的测试项目
`--init` | 生成一个基础配置文件
`--injectGlobals` | 将全局变量(`expect`,`test`,`describe`,`beforeEach`等)插入到全局环境中
`--json` | 以 `JSON` 模式显示测试结果
`--lastCommit` | 运行受上次提交中的文件更改影响的所有测试
`--listTests` | 以 `JSON` 数组的形式列出所有将要运行的测试并退出
`--logHeapUsage` | 记录每个测试后的记录堆使用情况
`--maxConcurrency=<num>` | 防止 `Jest` 同时执行超过指定数量的测试
`--maxWorkers=<num>\|<string>` | 设定运行测试的最大工作池数目
`--noStackTrace` | 禁止栈跟踪信息在测试结果输出中
`--notify` | 激活测试结果通知
`--onlyChanged` `-o` | 尝试确定根据当前存储库中哪些已经更改的文件来运行的测试
`--outputFile=<filename>` | 通过 `——json` 参数可以将测试结果写入到指定文件
`--passWithNoTests` | 允许在没有找到文件的情况下通过测试
`--projects <path1> ... <pathN>` | 从指定路径中找到的一个或多个项目运行测试;也采用路径 `globs`
`--reporters` | 使用指定的记者进行测试
`--resetMocks` | 每次测试前自动重置模拟状态
`--restoreMocks` | 在每次测试前自动恢复模拟状态和实现
`--roots` | `Jest` 应该用来搜索文件的目录路径列表
`--runInBand`, `-i` | 仅在当前的进程中连续运行所有测试,而非通过创建的子进程的工作池来运行测试
`--runTestsByPath` | 仅运行使用其确切路径指定的测试
`--selectProjects <project1> ... <projectN>` | 运行指定的测试项目
`--setupFilesAfterEnv <path1> ... <pathN>` | 运行某些代码以在每次测试之前配置或设置测试框架的模块的路径列表
`--shard` | 测试套件分片以 `(?<shardIndex>\d+)/(?<shardCount>\d+)` 的格式执行
`--showConfig` | 输出 `Jest` 配置,然后退出
`--silent` | 阻止所有测试通过控制台输出信息
`--testEnvironmentOptions=<json string>` | 带有将传递给 `testEnvironment` 的选项的 `JSON` 字符串
`--testLocationInResults` | 向测试结果添加 `location` 字段
`--testMatch glob1 ... globN` | `Jest` 用于检测测试文件的 `glob` 模式
`--testNamePattern=<regex>`, `-t` | 仅运行名称与正则表达式匹配的测试
`--testPathIgnorePatterns=<regex>\|[array]` | 在执行测试之前针对所有测试路径进行测试的单个或一组正则表达式模式字符串
`--testPathPattern=<regex>` | 在运行测试前,匹配的 `regexp` 模式字符串的测试文件路径
`--testRunner=<path>` | 允许你指定自定义测试运行程序
`--testSequencer=<path>` | 允许您指定自定义测试定序器
`--testTimeout=<number>` | 测试的默认超时时间(以毫秒为单位)。默认值:`5000`
`--updateSnapshot`, `-u` | 在运行测试中使用这个参数来重新录制每个失败测试的快照
`--useStderr` | 转移所有输出到 `stderr` (标准错误输出)
`--verbose` | 层次显示测试套件中每个测试的结果
`--version`, `-v` | 打印版本并退出
`--watch` | 监视文件更改,并重新运行与已更改的文件相关的测试
`--watchAll` | 监视文件的更改并在任何更改时重新运行所有测试
`--watchman` | 是否使用 `watchman` 进行文件爬取。 默认为 `true`
<!--rehype:className=left-align-->
另见
----

View File

@ -1,7 +1,13 @@
Koajs 备忘清单
===
基于 Node.js 平台的下一代 web 开发框架,包含 [Koa](https://koajs.com/) 的 API 参考列表和一些示例。
[![NPM version](https://img.shields.io/npm/v/koa.svg?style=flat)](https://npmjs.org/package/koa)
[![Downloads](https://img.shields.io/npm/dm/koa.svg?style=flat)](https://www.npmjs.com/package/koa)
[![Repo Dependents](https://badgen.net/github/dependents-repo/koajs/koa)](https://github.com/koajs/koa/network/dependents)
[![Github repo](https://badgen.net/badge/icon/Github?icon=github&label)](https://github.com/koajs/koa)
基于 Node.js 平台的下一代 web 开发框架,包含 [Koa](https://koajs.com/) 的 API 参考列表和一些示例
<!--rehype:style=padding-top: 12px;-->
入门
---

View File

@ -1,7 +1,13 @@
Lerna 备忘清单
===
本备忘单旨在快速理解 [Lerna v6](https://github.com/lerna/lerna) 所涉及的主要概念,显示了它的常用命令使用清单。
[![NPM version](https://img.shields.io/npm/v/lerna.svg?style=flat)](https://www.npmjs.com/package/lerna)
[![Downloads](https://img.shields.io/npm/dm/lerna.svg?style=flat)](https://www.npmjs.com/package/lerna)
[![Repo Dependents](https://badgen.net/github/dependents-repo/lerna/lerna/nest)](https://github.com/lerna/lerna/nest/network/dependents)
[![Github repo](https://badgen.net/badge/icon/Github?icon=github&label)](https://github.com/lerna/lerna/nest)
本备忘单旨在快速理解 [Lerna v6](https://github.com/lerna/lerna) 所涉及的主要概念,显示了它的常用命令使用清单
<!--rehype:style=padding-top: 12px;-->
入门
----

View File

@ -1,7 +1,13 @@
Less 备忘清单
===
本备忘单旨在快速理解 [Less](https://github.com/less/less.js) 所涉及的主要概念,显示了它的常用方法使用清单。
[![NPM version](https://img.shields.io/npm/v/less.svg?style=flat)](https://npmjs.org/package/less)
[![Downloads](https://img.shields.io/npm/dm/less.svg?style=flat)](https://www.npmjs.com/package/less)
[![Repo Dependents](https://badgen.net/github/dependents-repo/nestjs/nest)](https://github.com/less/less.js/network/dependents)
[![Github repo](https://badgen.net/badge/icon/Github?icon=github&label)](https://github.com/less/less.js)
本备忘单旨在快速理解 [Less](https://github.com/less/less.js) 所涉及的主要概念,显示了它的常用方法使用清单
<!--rehype:style=padding-top: 12px;-->
入门
---

543
docs/make.md Normal file
View File

@ -0,0 +1,543 @@
make 备忘清单
===
包含 最重要概念、函数、方法等的 make 备忘单。 初学者的完整快速参考。
Makefile 入门
---
<!-- markdownlint-disable MD010 -->
### 示例
```makefile
a.txt: b.txt c.txt
cat b.txt c.txt > a.txt
```
#### 工作流程
* 读入所有的 `Makefile`
* 读入被 `include` 的其它 `Makefile`
* 初始化文件中的变量。
* 推导隐晦规则,并分析所有规则。
* 为所有的目标文件创建依赖关系链。
* 根据依赖关系,决定哪些目标要重新生成。
* 执行生成命令。
<!--rehype:className=style-timeline-->
### 文件命令
文件会以 `GNUmakefile`(不推荐使用)、`Makefile``makefile` 查找目录下的名称。
#### 自定义文件名称
```bash
$ make target -f NAME
```
我们可以使用 `-f NAME` 来指定需要编译的文件名
#### 隐式生成
如果文件夹中没有 makefile 文件,只有 main.c 源文件,那么我们可以使用 `make main.o` 隐式生成链接文件
```bash
$ make main.o
# 实际执行: cc -c -o main.o main.c
```
### 规则
```makefile
TARGET: PREREQUISITES
COMMAMD
...
```
* `target`: 规则的目标。目标可以是规则的动作(如 `clean` 等),也可以是目标文件或者最后的可执行文件。
* `prerequisites`: 规则的依赖。生成规则目标文件所需要的文件名列表(通常一个目标依赖于一个或者多个文件)。
* `command`: 规则的命令行。规则要执行的动作(任意的 shell 命令或者在 shell 下执行的程序)。<span style="color:red">命令需要以 tab 键开头</span>
<!--rehype:className=style-round-->
```bash
$ make [TARGET ...]
```
---
```bash
$ make # 没有参数首先运行 TARGET
$ make help # 显示可用目标
$ make dist # 从当前目录制作一个发布存档
$ make check # 无需安装的单元测试
```
### 清空目标文件
```makefile
.PHONY: clean
clean:
rm *.o temp
```
`.PHONY` 内置命令将排除 clean 文件,不会因为当前目录中因为有 clean 文件而不会不执行 clean 伪目标
<span style="color:red">clean 从来都是放在文件的最后</span>
<!--rehype:className=auto-wrap-->
### 注释
makefile 文件的注释与 bash 脚本一致
```makefile
# 这是一个注释
main.o : main.c
cc -c main.c
```
### 换行 `\`
```makefile
# 这是一个注释
main.o : main.c
cc -c \
main.c
```
### 引用其它的 Makefile
`include` 关键字可以把别的 Makefile 包含进来。这样使用 make 运行的时候就会
```makefile
# makefile
include foo.make
```
如果你想让 make 不理那些无法读取的文件,并且继续执行。
```makefile
-include <filename>
```
变量
---
### 赋值符
#### 在执行时扩展,允许递归扩展
```makefile
VARIABLE = value
```
#### 在声明时扩展
可以防止递归,并且只能引用之前声明过的变量
```makefile
VARIABLE := value
```
#### 只有在该变量为空时才设置值
```makefile
VARIABLE ?= value
```
#### 将值追加到变量的尾端
```makefile
VARIABLE += value
```
#### override
如果变量前不指定 `override`,那么命令行中指定的变量可以对 Makefile 中的变量重新定义。
```makefile
# 不会重新定义
override VARIABLE = value
override VARIABLE := value
override VARIABLE ?= value
override VARIABLE += value
override define
#...
endef
```
<!--rehype:className=auto-wrap-->
### 变量
需要使用 `$()` 或者 `${}` 对变量进行引用
```makefile
file = main.c
run:
clang -o hello ${file}
```
#### 避免递归变量
```makefile
# 这样会使变量陷入无穷递归
A = $(B)
B = $(A)
```
---
```makefile
x := foo
y := $(x) bar
x := later
# 等价于
# x = later
# y = foo bar
```
#### Shell 变量
如果要使用 Shell 变量,需要在之前加上 `$`
```makefile
run:
echo $$HOME
```
#### 定义多行变量
```makefile
define foo
echo foo
echo bar
endef
run:
${foo}
```
### 自动变量
<!--rehype:wrap-class=row-span-2-->
#### `$@`
`$@`:指代当前目标,即 Make 命令当前构建的那个目标
```makefile
foo:
touch $@
```
---
```bash
$ make foo
# $@ 就是指的这里的 foo
```
#### `$<`
`$<` 指代第一个前置条件。比如,规则为 t: p1 p2那么 `$<` 就指代 p1
```makefile
a.md: b.md c.md
cp $< $@
```
---
使用 `make a.md`,相当于以下写法
```makefile
a.md: b.md c.md
cp b.md a.md
```
#### `$^`
`$^` 指代所有的前置条件,去除重复项
```makefile
a.md: b.md c.md
echo $^
```
#### `$+`
`$^` 指代所有的前置条件,不会去除重复项
```makefile
a.md: b.md c.md c.md
echo $+
```
#### `$?`
`$?` 指代更新的依赖,只有最近更新过的依赖才会引用
```makefile
a.md: b.md c.md c.md
cat $? > a.md
```
#### `$*`
`$*` 指代匹配符匹配的部分
```makefile
main.o: main.c
clang -o $* $*.c
```
---
```bash
$ make main
# 此时 cc main.c -o main
```
#### `$%`
`$%`: 仅当目标是函数库文件中,表示规则中的目标成员名
* windows 中是 `.lib` 文件
* unix 中是 `.a` 文件
<!--rehype:className=style-round-->
### 内置命名变量的参数
<!--rehype:wrap-class=col-span-2-->
这些变量都是相关下面的命令的参数。如果没有指明其默认值,那么其默认值都是空。
:- | :-
:- | :-
`ARFLAGS` | 函数库打包程序AR命令的参数。默认值是 `rv`
`ASFLAGS` | 汇编语言编译器参数。(当明显地调用 `.s``.S` 文件时)
`CFLAGS` | C 语言编译器参数。
`CXXFLAGS` | C++ 语言编译器参数。
`COFLAGS` | RCS 命令参数。
`CPPFLAGS` | C 预处理器参数。( `C``Fortran` 编译器也会用到)。
`FFLAGS` | Fortran 语言编译器参数。
`GFLAGS` | SCCS `get` 程序参数。
`LDFLAGS` | 链接器参数。(如:`ld`
`PFLAGS` | Pascal 语言编译器参数。
`LFLAGS` | Lex 文法分析器参数。
`RFLAGS` | Ratfor 程序的 Fortran 编译器参数。
`YFLAGS` | Yacc 文法分析器参数。
<!--rehype:className=left-align-->
### 内置已命名的变量
<!--rehype:wrap-class=col-span-2-->
:- | :-
:- | :-
`AR` | 函数库打包程序。默认命令是 `ar`
`AS` | 汇编语言编译程序。默认命令是 `as`
`CC` | C 语言编译程序。默认命令是 `cc`
`CXX` | C++ 语言编译程序。默认命令是 `g++`
`CO` | 从 RCS 文件中扩展文件程序。默认命令是 `co`
`CPP` | C 程序的预处理器(输出是标准输出设备)。默认命令是 `$(CC) E`
`FC` | Fortran 和 Ratfor 的编译器和预处理程序。默认命令是 `f77`
`GET` | 从 SCCS 文件中扩展文件的程序。默认命令是 `get`
`LEX` | Lex 方法分析器程序(针对于 C 或 Ratfor。默认命令是 `lex`
`PC` | Pascal 语言编译程序。默认命令是 `pc`
`YACC` | Yacc 文法分析器(针对于 C 程序)。默认命令是 `yacc`
`YACCR` | Yacc 文法分析器(针对于 Ratfor 程序)。默认命令是 `yacc r`
`MAKEINFO` | 转换 Texinfo 源文件(.texi到 Info 文件程序。默认命令是 `makeinfo`
`TEX` | 从 TeX 源文件创建TeX DVI文件的程序。默认命令是 `tex`
`TEXI2DVI` | 从 Texinfo 源文件创建 TeX DVI 文件的程序。默认命令是 `texi2dvi`
`WEAVE` | 转换 Web 到 TeX 的程序。默认命令是 `weave`
`CWEAVE` | 转换 C Web 到 TeX 的程序。默认命令是 `cweave`
`TANGLE` | 转换 Web 到 Pascal 语言的程序。默认命令是 `tangle`
`CTANGLE` | 转换 C Web 到 C。默认命令是 `ctangle`
`RM` | 删除文件命令。默认命令是 `rm f`
<!--rehype:className=left-align-->
#### 内置的变量
```makefile
run:
${CC} -o main main.c
```
书写规则
---
### 通配符
#### `*`
`*`:与 linux 系统下的一样
```makefile
# 清除所有 .o 结尾的文件
clean:
rm -f *.o
```
#### `~`
`~`:在 linux 或 mac 下表示用户目录win 下表示 `HOME` 环境变量
```makefile
run:
ls ~
```
#### `?`
`?`: 与在 linux 等类似,可以匹配单个字符
```makefile
run:
ls -ll packag?.json
```
### 文件搜寻(`vpath`
如果没有指定 vpath 变量make 只会在当前的目录中去寻找依赖文件和目标文件。否则,如果当前目录没有,就会到指定的目录中去寻找
:- | :-
:- | :-
`vpath <pattern> <directories>` | 为符合模式 \<pattern> 的文件指定搜索目录 \<directories>
`vpath <pattern>` | 清除符合模式<pattern>的文件的搜索目录。
`vpath` | 清除所有已被设置好了的文件搜索目录
#### `%`
* vpath使用方法中的 \<pattern> 需要包含 `%` 字符。
* `%` 的意思是匹配零或若干字符
* 并且引用规则是需要使用**自动变量**
```makefile
vpath %.c dist
TARGET = hello
OBJ = bar.o foo.o
$(TARGET): $(OBJ)
$(CC) -o $@ $^
%.o: $.c
$(CC) -o $< -o #@
```
<!--rehype:className=auto-wrap-->
### 静态模式
```makefile
TARGET: PREREQUISITES :PREREQUISITES
COMMAMD
#...
```
* `target` 定义了一系列的目标文件
* 第一个 `prerequisites` 是指明了 target 的模式,也就是的目标集模式。
* 第二个 `prerequisites` 是目标的依赖模式,它对第一个 `prerequisites` 形成的模式再进行一次依赖目标的定义
```makefile
objects = foo.o main.o
$(objects): %.o: %.c
$(CC) -c $(CFLAGS) $< -o $@
```
---
相当于:
```makefile
foo.o : foo.c
$(CC) -c $(CFLAGS) foo.c -o foo.o
main.o : main.c
$(CC) -c $(CFLAGS) main.c -o main.o
```
### 伪目标
* **伪目标**并不是一个文件,只是一个标签。只有通过显式地指明这个**目标**才能让其生效
* 使用 `.PHONY` 来显式地指明目标是 `伪目标`
```makefile
.PHONY : clean
clean :
rm *.o temp
```
<!--rehype:className=style-round-->
<!--rehype:className=auto-wrap-->
命令
---
### 回声(`@`
正常情况下make会打印每条命令然后再执行这就叫做回声echoing
```makefile
all:
# 会有命令执行显示
echo Hello, world
```
---
```makefile
all:
# 不会有命令执行的显示
@echo Hello, world
```
<!--rehype:className=auto-wrap-->
### 显示命令、禁止命令
#### 显示命令
如果我们只希望显示命令,而不希望执行命令,可以使用 `-n` 或者 `--just-print`
```bash
$ make all --just-print
$ make all -n
```
#### 禁止命令
`-s``--silent``--quiet``@` 一样,用于禁止回声
```bash
$ make all -s
```
<!--rehype:className=auto-wrap-->
### 执行命令
使用 tab 及换行
```makefile
exec:
cd /home/hchen
pwd
```
---
使用 `;`
```makefile
exec:
cd /home/hchen; pwd
```
另见
---
* [make 中文教程](https://seisman.github.io/how-to-write-makefile/overview.html) _(seisman.github.io)_
* [make 手册](https://www.gnu.org/software/make/manual/make.html#toc-Overview-of-make) _(www.gnu.org)_
* [make 官网](https://www.gnu.org/software/make/) _www.gnu.org_

View File

@ -1,7 +1,13 @@
NestJS 备忘清单
===
[![NPM version](https://img.shields.io/npm/v/@nestjs/core.svg?style=flat)](https://www.npmjs.com/package/@nestjs/core)
[![Downloads](https://img.shields.io/npm/dm/@nestjs/core.svg?style=flat)](https://www.npmjs.com/package/@nestjs/core)
[![Repo Dependents](https://badgen.net/github/dependents-repo/nestjs/nest)](https://github.com/nestjs/nest/network/dependents)
[![Github repo](https://badgen.net/badge/icon/Github?icon=github&label)](https://github.com/nestjs/nest)
[NestJS](https://docs.nestjs.com/) 是一个用于构建高效、可扩展的 Node.js 服务器端应用程序的开发框架
<!--rehype:style=padding-top: 12px;-->
创建应用
---

1591
docs/nextjs.md Normal file

File diff suppressed because it is too large Load Diff

317
docs/pm2.md Normal file
View File

@ -0,0 +1,317 @@
PM2 备忘清单
===
[![NPM version](https://img.shields.io/npm/v/pm2.svg?style=flat)](https://npmjs.org/package/pm2)
[![Downloads](https://img.shields.io/npm/dm/pm2.svg?style=flat)](https://www.npmjs.com/package/pm2)
[![Repo Dependents](https://badgen.net/github/dependents-repo/Unitech/pm2)](https://github.com/Unitech/pm2/network/dependents)
[![Github repo](https://badgen.net/badge/icon/Github?icon=github&label)](https://github.com/Unitech/pm2)
[PM2](https://pm2.keymetrics.io/) 是一个守护进程管理器它将帮助您管理和保持您的应用程序在线。PM2 入门非常简单,它以简单直观的 CLI 形式提供
<!--rehype:style=padding-top: 12px;-->
入门
-----
### 安装
最新的 PM2 版本可通过 NPM 或 Yarn 安装
```shell
$ npm install pm2@latest -g
```
或者
```shell
$ yarn global add pm2
```
### 启动应用程序
启动、守护进程和监视应用程序的最简单方法是使用此命令行
```shell
$ pm2 start app.js
```
或者轻松启动任何其他应用程序
```shell
$ pm2 start bashscript.sh
$ pm2 start python-app.py --watch
$ pm2 start binary-file -- --port 1520
```
### 您可以传递给 CLI 的一些选项
<!--rehype:wrap-class=row-span-3-->
指定应用名称
```shell
--name <app_name>
```
文件更改时监视并重新启动应用程序
```shell
--watch
```
设置应用重新加载的内存阈值
```shell
--max-memory-restart <200MB>
```
指定日志文件
```shell
--log <log_path>
```
将额外的参数传递给脚本
```shell
-- arg1 arg2 arg3
```
自动重启之间的延迟
```shell
--restart-delay <delay in ms>
```
带时间的前缀日志
```shell
--time
```
不要自动重启应用程序
```shell
--no-autorestart
```
指定 cron 强制重启
```shell
--cron <cron_pattern>
```
附加到应用程序日志
```shell
--no-daemon
```
### 管理流程
管理应用程序状态很简单,这里是命令
```shell
$ pm2 restart app_name
$ pm2 reload app_name
$ pm2 stop app_name
$ pm2 delete app_name
```
#### 你可以传递而不是 app_name
- `all` 作用于所有进程
- `id` 作用于特定的进程 ID
### 检查状态、日志、指标
<!--rehype:wrap-class=row-span-2-->
现在您已经启动了这个应用程序,您可以检查它的状态、日志、指标,甚至可以使用 [pm2.io](https://pm2.io/) 获取在线仪表板
列出PM2管理的所有应用的状态
```shell
$ pm2 [list|ls|status]
```
实时显示日志
```shell
$ pm2 logs
```
挖掘旧日志
```shell
$ pm2 logs --lines 200
```
这是一个直接适合您的终端的实时仪表板
```shell
$ pm2 monit
```
基于 Web 的仪表板,具有诊断系统的跨服务器
```shell
$ pm2 plus
```
### 集群模式
对于 Node.js 应用程序PM2 包括一个自动负载均衡器,它将在每个衍生进程之间共享所有 HTTP[s]/Websocket/TCP/UDP 连接
以集群模式启动应用程序
```shell
$ pm2 start app.js -i max
```
在 [此处](https://pm2.keymetrics.io/docs/usage/quick-start/) 阅读有关集群模式的更多信息
### 生态系统文件
<!--rehype:wrap-class=row-span-2-->
您还可以创建一个称为生态系统文件的配置文件来管理多个应用程序。生成生态系统文件
```shell
$ pm2 ecosystem
```
这将生成一个 `ecosystem.config.js` 文件
```js
module.exports = {
apps : [{
name: "app",
script: "./app.js",
env: {
NODE_ENV: "development",
},
env_production: {
NODE_ENV: "production",
}
}, {
name: 'worker',
script: 'worker.js'
}]
}
```
并轻松启动
```shell
$ pm2 start ecosystem.config.js
```
在 [此处](https://pm2.keymetrics.io/docs/usage/application-declaration/) 阅读有关应用程序声明的更多信息
### 设置启动脚本
<!--rehype:wrap-class=col-span-2-->
使用您在服务器启动/重新启动时管理的进程重新启动 PM2 至关重要。为了解决这个问题,只需运行这个命令来生成一个活动的启动脚本
```shell
$ pm2 save
```
在 [此处](https://pm2.keymetrics.io/docs/usage/startup/) 阅读有关启动脚本生成器的更多信息
### 重新启动应用程序更改
<!--rehype:wrap-class=col-span-2-->
使用 `--watch` 选项非常简单
```shell
$ cd /path/to/my/app
$ pm2 start env.js --watch --ignore-watch="node_modules"
```
这将在当前目录 `+` 所有子文件夹中的任何文件更改时监视并重新启动应用程序,并且它将忽略 `node_modules` 文件夹中的任何更改 `--ignore-watch="node_modules"`
```bash
$ pm2 logs
```
然后,您可以使用上面命令来检查重新启动的应用程序日志。
PM2 CheatSheet
---
<!--rehype:body-class=cols-2-->
以下是一些值得了解的命令。 只需使用示例应用程序或开发机器上当前的 Web 应用程序来尝试它们
### PM2 分叉模式
```shell
$ pm2 start app.js --name my-api # 名称进程
```
### PM2 集群模式
```shell
$ pm2 start app.js -i 0 # 将根据可用的 CPU 使用 LB 启动最大进程
$ pm2 start app.js -i max # 与上面相同,但已弃用。
$ pm2 scale app +3 # 将 `app` 增加 3 名工人
$ pm2 scale app 2 # 将 `app` 向上或向下扩展到总共 2 个工人
```
### PM2 清单
```shell
$ pm2 list # 显示所有进程状态
$ pm2 jlist # 以原始 JSON 格式打印进程列表
$ pm2 prettylist # 以美化JSON打印进程列表
$ pm2 describe 0 # 显示有关特定进程的所有信息
$ pm2 monit # 监控所有进程
```
### PM2 日志
```shell
$ pm2 logs [--raw] # 在流中显示所有进程日志
$ pm2 flush # 清空所有日志文件
$ pm2 reloadLogs # 重新加载所有日志
```
### PM2 动作
```shell
$ pm2 stop all # 停止所有进程
$ pm2 restart all # 重启所有进程
$ pm2 reload all # 将 0s 停机时间重新加载(对于 NETWORKED 应用程序)
$ pm2 stop 0 # 停止特定进程 ID
$ pm2 restart 0 # 重启特定进程id
$ pm2 delete 0 # 将从 pm2 列表中删除进程
$ pm2 delete all # 将从 pm2 列表中删除所有进程
```
### PM2 杂项
```shell
$ pm2 reset <process> # 重置元数据(重启时间...
$ pm2 updatePM2 # 更新内存 pm2
$ pm2 ping # 确保 pm2 守护进程已经启动
$ pm2 sendSignal SIGUSR2 my-app # 向脚本发送系统信号
$ pm2 start app.js --no-daemon
$ pm2 start app.js --no-vizion
$ pm2 start app.js --no-autorestart
```
### 更新 PM2
我们让它变得简单,版本之间没有重大变化,过程很简单
```shell
$ npm install pm2@latest -g
```
然后更新内存中的PM2
```shell
$ pm2 update
```
另见
--------
- [QUICK START](https://pm2.keymetrics.io/docs/usage/quick-start/) _(pm2.keymetrics.io)_

View File

@ -110,6 +110,84 @@ class=tag&data-info=👆看看还缺点儿什么?
添加 `class=tag&data-lang=Python` 类名和参数,会在卡片右上角标记 _`Python`_
### Command Help
```bash
Usage: refs-cli [output-dir] [--help|h]
显示帮助信息
Options:
--version, -v 显示版本号
--help, -h 显示帮助信息
--watch, -w 观看并编译 Markdown 文件
--output, -o 输出目录。默认(分布)
--force, -f 强制文件重新生成
Example:
$ npx refs-cli
$ refs-cli --watch
$ refs-cli --output website
$ refs-cli
refs-cli@v0.0.1
```
### Config
```json
{
"title": "文档网站名称",
"description": "{{description}} 网站说明",
"keywords": "关键字,refs-cli,refs,cli",
"data-info": "👆需要你的参与",
"search": {
"label": "搜索",
"placeholder": "搜索备忘清单",
"cancel": "取消"
},
"editor": {
"label": "编辑"
},
"github": {
"url": "https://<github url>"
},
"home": {
"label": "首页",
"url": "https://<你的网站>"
},
"footer": "<br />备案号支持HTML字符串",
"license": "支持 HTML 字符串"
}
```
`.refsrc.json` 存放在项目的根目录下
### 环境变量
导航菜单
```ini
REF_URL=http://ref.ecdata.cn/
REF_LABEL=网站首页
```
页脚添加 (支持 HTML 字符串)
```ini
REF_FOOTER=备案号沪ICP备20220000000号-1
```
修改版权信息 (支持 HTML 字符串)
```ini
LICENSE=Copyright (c) <b>2022</b> 小弟调调™
```
在项目根目录中创建 <pur>**.env**</pur> 文件
Markdown 语法注释
---

1647
docs/react-native.md Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,17 +1,24 @@
React 备忘清单
===
适合初学者的综合 React 备忘清单。
[![NPM version](https://img.shields.io/npm/v/react.svg?style=flat)](https://npmjs.org/package/react)
[![Downloads](https://img.shields.io/npm/dm/react.svg?style=flat)](https://www.npmjs.com/package/react)
[![Repo Dependents](https://badgen.net/github/dependents-repo/facebook/react)](https://github.com/facebook/react/network/dependents)
[![Github repo](https://badgen.net/badge/icon/Github?icon=github&label)](https://github.com/facebook/react)
适合初学者的综合 React 备忘清单
<!--rehype:style=padding-top: 12px;-->
入门
----
### 介绍
React 是一个用于构建用户界面的 JavaScript 库
React 是一个用于构建用户界面的 JavaScript 库
- [React 官方文档](https://reactjs.org/) _(reactjs.org)_
- [Styled Components 备忘清单](./styled-components.md) _(jaywcjlove.github.io)_
- [TypeScript JSX 备忘清单](./typescript.md#jsx) _(jaywcjlove.github.io)_
```js
import {createRoot} from 'react-dom/client'

3594
docs/redis.md Normal file

File diff suppressed because it is too large Load Diff

View File

@ -223,6 +223,18 @@ fn main(){
}
```
### 区间表达式
<!--rehype:wrap-class=col-span-2-->
产生式/句法规则 | 句法 | 类型 | 区间语义
:- | :- | :- | :-
RangeExpr | `start..end` | std::ops::Range | start ≤ x < end
RangeFromExpr | `start..` | std::ops::RangeFrom | start x
RangeToExpr | `..end` | std::ops::RangeTo | x < end
RangeFullExpr | `..` | std::ops::RangeFull | -
RangeInclusiveExpr | `start..=end`| std::ops::RangeInclusive | start x end
RangeToInclusiveExpr | `..=end` | std::ops::RangeToInclusive | x end
Rust 类型
--------
@ -354,6 +366,14 @@ rand.capacity() // => 13
以字节为单位计算字符串的容量
### with_capacity()
```rust
let s = String::with_capacity(10);
```
指定一个足够大的容量值,来减少内存拷贝
### .contains()
```rust
@ -484,6 +504,147 @@ let arr = vec![
`drain(range)` | 删除 `vec` 中指定范围的元素,同时返回一个迭代该范围所有元素的迭代器
`split_off(index)` | 切分 `vec`,索引左边的元素保留在原 `vec` 中(含索引),索引右边的元素(不含索引)在返回的 `vec` 中
Rust HashMap\<K,V>
--------
### 使用
```rust
use std::collections::HashMap;
fn main() {
let mut map: HashMap<String, i32> = HashMap::new();
map.insert(String::from("blue"), 100);
// 查询Yellow对应的值若不存在则插入默认值
let v: &mut i32 =
map.entry("Yellow".to_string()).or_insert(5);
let v: &mut i32 =
map.entry("Yellow".to_string()).or_insert(50); // 不会修改值
}
```
### 获取元素
```rust
let mut scores = HashMap::new();
scores.insert(String::from("Blue"), 10);
scores.insert(String::from("Yellow"), 50);
let team_name = String::from("Blue");
let score: Option<&i32> = scores.get(&team_name);
```
### 遍历
```rust
let mut scores = HashMap::new();
scores.insert(String::from("Blue"), 10);
scores.insert(String::from("Yellow"), 50);
for (key, value) in &scores {
println!("{}: {}", key, value);
}
```
### vec -> HashMap
```rust
let teams_list = vec![
("中国队".to_string(), 100),
("美国队".to_string(), 10),
("日本队".to_string(), 50),
];
let teams_map: HashMap<_,_> =
teams_list.into_iter().collect();
```
----
```rust
let teams = vec![String::from("blue"),String::from("red")];
let intial_scores = vec![10,50];
let scores:HashMap<_,_> =
teams.iter().zip(intial_scores.iter()).collect();
```
Option & Result
--------
### Option
```rust
enum Option<T> {
Some(T),
None,
}
```
#### 使用
```rust
fn main(){
let a = Some(5);
// 直接获取原始值
println!("{}", a.unwrap());
// 给出错误信息
let x: Option<&str> = None;
x.expect("fruits are healthy"); // panics 带有 `fruits are healthy`
}
```
### Result
```rust
enum Result<T, E> {
Ok(T),
Err(E),
}
```
#### 使用
```rust
use std::fs::File;
fn main() {
let f: Result<File,Error> = File::open("hello.txt");
let f = match f {
Ok(file) => file,
Err(error) => {
panic!("Problem opening the file: {:?}", error)
},
};
}
```
### 宏 `?`
`?` 只能用于返回结果是 Result 或者 Option 的函数,或者实现了 Try 类型
```rust
use std::fs::File;
use std::io::{self, Read};
fn read_username_from_file() -> Result<String, io::Error> {
let mut s = String::new();
File::open("hello.txt")?.read_to_string(&mut s)?;
Ok(s)
}
```
----
```rust
fn first(arr: &[i32]) -> Option<&i32> {
let v = arr.get(0)?;
Some(v)
}
```
<!--rehype:className=wrap-text -->
枚举
--------
@ -642,7 +803,7 @@ let left_shift = h << 4; // => 32
示例 | 意义
:- | :-
`c && d` | 两者都是真的_(AND)_
`c || d` | 要么是真的_(OR)_
`c \|\| d` | 要么是真的_(OR)_
`!c` | `c` 为假 _(NOT)_
----
@ -853,12 +1014,25 @@ let (x, _, y) = (1, 2, 3);
println!("{x},{y}");
```
----
```rust
fn get_count_item(s: &str) -> (&str, &str) {
let mut it = s.split(' ');
let (Some(str1),Some(str2)) = (it.next(),it.next()) else {
panic!("Can't segment count item pair");
};
(str1, str2)
}
```
### 函数中的模式匹配
```rust
fn add((x, y): (i32, i32)) -> i32 {
x + y
}
fn main(){
let sum = add(1, 2);
println!("{sum}");

View File

@ -1,7 +1,13 @@
Sass
===
这是一份快速参考备忘单,列出了 [SASS](https://sass-lang.com) 最有用的功能。
[![NPM version](https://img.shields.io/npm/v/sass.svg?style=flat)](https://www.npmjs.com/package/sass)
[![Downloads](https://img.shields.io/npm/dm/sass.svg?style=flat)](https://www.npmjs.com/package/sass)
[![Repo Dependents](https://badgen.net/github/dependents-repo/sass/dart-sass)](https://github.com/sass/dart-sass/network/dependents)
[![Github repo](https://badgen.net/badge/icon/Github?icon=github&label)](https://github.com/sass/dart-sass)
这是一份快速参考备忘单,列出了 [SASS](https://sass-lang.com) 最有用的功能
<!--rehype:style=padding-top: 12px;-->
Sass 基础
--------

View File

@ -1,7 +1,13 @@
Styled Components 备忘清单
====
此快速参考备忘单提供了使用 CSS in JS 工具的各种方法。
[![NPM version](https://img.shields.io/npm/v/styled-components.svg?style=flat)](https://npmjs.org/package/styled-components)
[![Downloads](https://img.shields.io/npm/dm/styled-components.svg?style=flat)](https://www.npmjs.com/package/styled-components)
[![Repo Dependents](https://badgen.net/github/dependents-repo/styled-components/styled-components)](https://github.com/styled-components/styled-components/network/dependents)
[![Github repo](https://badgen.net/badge/icon/Github?icon=github&label)](https://github.com/styled-components/styled-components)
此快速参考备忘单提供了使用 CSS in JS 工具的各种方法
<!--rehype:style=padding-top: 12px;-->
入门
----

View File

@ -1,7 +1,13 @@
Stylus 备忘清单
===
本备忘单旨在快速理解 [stylus](https://github.com/stylus/stylus) 所涉及的主要概念,显示了它的常用方法使用清单。
[![NPM version](https://img.shields.io/npm/v/stylus.svg?style=flat)](https://npmjs.org/package/stylus)
[![Downloads](https://img.shields.io/npm/dm/stylus.svg?style=flat)](https://www.npmjs.com/package/stylus)
[![Repo Dependents](https://badgen.net/github/dependents-repo/stylus/stylus)](https://github.com/stylus/stylus/network/dependents)
[![Github repo](https://badgen.net/badge/icon/Github?icon=github&label)](https://github.com/stylus/stylus)
本备忘单旨在快速理解 [stylus](https://github.com/stylus/stylus) 所涉及的主要概念,显示了它的常用方法使用清单
<!--rehype:style=padding-top: 12px;-->
入门
---

View File

@ -114,6 +114,25 @@ Sublime Text 备忘清单
`⇧ ⌃ 2` | 将文件移动到组 2
<!--rehype:className=shortcuts-->
### 书签
快捷键 | 说明
:- | -
`Ctrl` `F2` | 切换书签
`F2` | 下一个书签
`Shift` `F2` | 上一个书签
`Ctrl` `Shift` `F2` | 清除书签
<!--rehype:className=shortcuts-->
### 查找/替换
快捷键 | 说明
:- | -
`Ctrl` `F` | 查找
`Ctrl` `H` | 代替
`Ctrl` `Shift` `F` | 在文件中查找
<!--rehype:className=shortcuts-->
### 文本操作
快捷键 | 说明
@ -148,3 +167,4 @@ $ subl README.md
- [Sublime Text 官网](https://www.sublimetext.com/) _(sublimetext.com)_
- [Sublime 编辑器快捷键](https://jaywcjlove.github.io/handbook/Shortcuts/sublime.html) _(jaywcjlove.github.io)_
- [Keyboard shortcuts for Sublime Text](http://docs.sublimetext.info/en/latest/reference/keyboard_shortcuts_win.html) _(docs.sublimetext.info)_

View File

@ -1,7 +1,13 @@
TypeScript 备忘清单
===
包含最重要基础、泛型、方法、class 等 TypeScript 强类型编程语言语法的快速参考备忘单。初学者的完整快速参考。
[![NPM version](https://img.shields.io/npm/v/typescript.svg?style=flat)](https://www.npmjs.com/package/typescript)
[![Downloads](https://img.shields.io/npm/dm/typescript.svg?style=flat)](https://www.npmjs.com/package/typescript)
[![Repo Dependents](https://badgen.net/github/dependents-repo/Microsoft/TypeScript)](https://github.com/Microsoft/TypeScript/network/dependents)
[![Github repo](https://badgen.net/badge/icon/Github?icon=github&label)](https://github.com/Microsoft/TypeScript)
包含最重要基础、泛型、方法、class 等 TypeScript 强类型编程语言语法的快速参考备忘单。初学者的完整快速参考
<!--rehype:style=padding-top: 12px;-->
入门 Interface
----
@ -1265,6 +1271,24 @@ class Select<T> extends React.Component<SelectProps<T>, any> {}
const Form = () => <Select<string> items={['a', 'b']} />;
```
### 函数组件 ref
<!--rehype:wrap-class=col-span-3-->
```tsx
import { FC, ForwardedRef, forwardRef, PropsWithRef } from "react";
function InternalProgress(props: ProgressProps, ref?: ForwardedRef<HTMLDivElement>) {
return (
<div {...props} ref={ref}>
{props.children}
</div>
)
}
export interface ProgressProps extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement> {}
export const Progress: FC<PropsWithRef<ProgressProps>> = forwardRef<HTMLDivElement>(InternalProgress)
```
各种各样的技巧
---
@ -1325,6 +1349,89 @@ const point = [3, 4] as const
// type 'readonly [3, 4]'
```
### satisfies
`satisfies` 允许将验证表达式的类型与某种类型匹配,而无需更改该表达式的结果类型。
```ts
type Colors = 'red' | 'green' | 'blue';
type RGB = [
red: number,
green: number,
blue: number
];
type Palette = Record<Colors, string | RGB>
const palette: Palette = {
red: [255, 0, 0],
green: '#00ff00',
blue: [0, 0, 255],
};
// 通常的方式会推导出 redComponent 为
// => string | number | undefined
const redComponent = palette.red.at(0);
```
#### 使用 satisfies
```ts
const palette = {
red: [255, 0, 0],
green: '#00ff00',
blue: [0, 0, 255],
} satisfies Record<Colors, string | RGB>
// undefined | number
const redComponent = palette.red.at(0)
```
<!--rehype:className=wrap-text-->
### 范型实例化表达式
不使用的情况下:
```ts
const errorMap: Map<string, Error> = new Map()
// 或者使用 type 定义别名
type ErrorMapType = Map<string, Error>
```
使用泛型实例化表达式:
```ts
const ErrorMap = Map<string, Error>
const errorMap = new ErrorMap()
```
#### 泛型实例化函数
```ts
function makeBox<T>(value: T) {
return { value };
}
```
---
不使用:
```ts
function makeHammerBox(hammer: Hammer) {
return makeBox(hammer);
}
// or...
const makeWrenchBox: (wrench: Wrench) => Box<Wrench> = makeBox;
```
使用:
```ts
const makeStringBox = makeBox<string>;
makeStringBox(42);
```
CLI
---

View File

@ -1,7 +1,13 @@
Vue 3 备忘清单
===
渐进式 JavaScript 框架 [Vue 3](https://cn.vuejs.org/) 备忘清单的快速参考列表,包含常用 API 和示例。
[![NPM version](https://img.shields.io/npm/v/vue.svg?style=flat)](https://npmjs.org/package/vue)
[![Downloads](https://img.shields.io/npm/dm/vue.svg?style=flat)](https://www.npmjs.com/package/vue)
[![Repo Dependents](https://badgen.net/github/dependents-repo/vuejs/core)](https://github.com/vuejs/core/network/dependents)
[![Github repo](https://badgen.net/badge/icon/Github?icon=github&label)](https://github.com/vuejs/core)
渐进式 JavaScript 框架 [Vue 3](https://cn.vuejs.org/) 备忘清单的快速参考列表,包含常用 API 和示例
<!--rehype:style=padding-top: 12px;-->
入门
---
@ -677,6 +683,434 @@ const value = inject(ProvideKey)
<!--rehype:className=wrap-text -->
Vue 中使用 TypeScript
---
### 为组件的 props 标注类型
<!--rehype:wrap-class=row-span-4-->
当使用 `<script setup>` 时,`defineProps()` 宏函数支持从它的参数中推导类型
```html
<script setup lang="ts">
const props = defineProps({
foo: { type: String, required: true },
bar: Number
})
props.foo // string
props.bar // number | undefined
</script>
```
对同一个文件中的一个接口或对象类型字面量的引用:
```ts
interface Props {/* ... */}
defineProps<Props>()
```
#### Props 解构默认值
```ts
export interface Props {
msg?: string
labels?: string[]
}
const props = withDefaults(defineProps<Props>(), {
msg: 'hello',
labels: () => ['one', 'two']
})
```
使用目前为实验性的响应性语法糖
```html
<script setup lang="ts">
interface Props {
name: string
count?: number
}
// 对 defineProps() 的响应性解构
// 默认值会被编译为等价的运行时选项
const {
name, count = 100
} = defineProps<Props>()
</script>
```
### 为组件的 emits 标注类型
```html
<script setup lang="ts">
// 运行时
const emit = defineEmits(['change', 'update'])
// 基于类型
const emit = defineEmits<{
(e: 'change', id: number): void
(e: 'update', value: string): void
}>()
</script>
```
### 为 ref() 标注类型
ref 会根据初始化时的值推导其类型:
```ts
import { ref } from 'vue'
import type { Ref } from 'vue'
const year: Ref<string | number> = ref('2020')
year.value = 2020 // 成功!
```
### 为 reactive() 标注类型
```ts
import { reactive } from 'vue'
interface Book {
title: string
year?: number
}
const book: Book = reactive({
title: 'Vue 3 指引'
})
```
### 为 computed() 标注类型
你还可以通过泛型参数显式指定类型:
```ts
const double = computed<number>(() => {
// 若返回值不是 number 类型则会报错
})
```
### 为事件处理函数标注类型
<!--rehype:wrap-class=row-span-2-->
```html
<script setup lang="ts">
function handleChange(event) {
// `event` 隐式地标注为 `any` 类型
console.log(event.target.value)
}
</script>
<template>
<input
type="text"
@change="handleChange" />
</template>
```
显式地为事件处理函数的参数标注类型
```ts
function handleChange(event: Event) {
const target = event.target as HTMLInputElement
console.log(target.value)
}
```
### 为 provide / inject 标注类型
```ts
import { provide, inject } from 'vue'
import type { InjectionKey } from 'vue'
const key = Symbol() as InjectionKey<string>
// 若提供的是非字符串值会导致错误
provide(key, 'foo')
// foo 的类型string | undefined
const foo = inject(key)
```
### 为模板引用标注类型
```html
<script setup lang="ts">
import { ref, onMounted } from 'vue'
const el = ref<HTMLInputElement | null>(null)
onMounted(() => {
el.value?.focus()
})
</script>
<template>
<input ref="el" />
</template>
```
### 为组件模板引用标注类型
```html
<!-- MyModal.vue -->
<script setup lang="ts">
import { ref } from 'vue'
const isContentShown = ref(false)
const open =
() => (isContentShown.value = true)
defineExpose({
open
})
</script>
```
使用 TypeScript 内置的 `InstanceType` 工具类型来获取其实例类
```html
<!-- App.vue -->
<script setup lang="ts">
import MyModal from './MyModal.vue'
type Modal = InstanceType<typeof MyModal>
const modal = ref<Modal | null>(null)
const openModal = () => {
modal.value?.open()
}
</script>
```
### 选项式 API 为组件的 props 标注类型
<!--rehype:wrap-class=row-span-2-->
```ts
import { defineComponent } from 'vue'
export default defineComponent({
// 启用了类型推导
props: {
name: String,
id: [Number, String],
msg: { type: String, required: true },
metadata: null
},
mounted() {
// 类型string | undefined
this.name
// 类型number|string|undefined
this.id
// 类型string
this.msg
// 类型any
this.metadata
}
})
```
使用 PropType 这个工具类型来标记更复杂的 props 类型
```ts
import { defineComponent } from 'vue'
import type { PropType } from 'vue'
interface Book {
title: string
author: string
year: number
}
export default defineComponent({
props: {
book: {
// 提供相对 `Object` 更确定的类型
type: Object as PropType<Book>,
required: true
},
// 也可以标记函数
callback: Function as PropType<(id: number) => void>
},
mounted() {
this.book.title // string
this.book.year // number
// TS Error: argument of type 'string' is not
// assignable to parameter of type 'number'
this.callback?.('123')
}
})
```
### 选项式 API 为组件的 emits 标注类型
```ts
import { defineComponent } from 'vue'
type Payload = { bookName: string }
export default defineComponent({
emits: {
addBook(payload: Payload) {
// 执行运行时校验
return payload.bookName.length > 0
}
},
methods: {
onSubmit() {
this.$emit('addBook', {
bookName: 123 // 类型错误
})
// 类型错误
this.$emit('non-declared-event')
}
}
})
```
### 选项式 API 为计算属性标记类型
<!--rehype:wrap-class=row-span-2-->
计算属性会自动根据其返回值来推导其类型:
```ts
import { defineComponent } from 'vue'
export default defineComponent({
data() {
return {
message: 'Hello!'
}
},
computed: {
greeting() {
return this.message + '!'
}
},
mounted() {
this.greeting // 类型string
}
})
```
在某些场景中,你可能想要显式地标记出计算属性的类型以确保其实现是正确的:
```ts
import { defineComponent } from 'vue'
export default defineComponent({
data() {
return {
message: 'Hello!'
}
},
computed: {
// 显式标注返回类型
greeting(): string {
return this.message + '!'
},
// 标注一个可写的计算属性
greetingUppercased: {
get(): string {
return this.greeting.toUpperCase()
},
set(newValue: string) {
this.message = newValue.toUpperCase()
}
}
}
})
```
### 选项式 API 为事件处理函数标注类型
```ts
import { defineComponent } from 'vue'
export default defineComponent({
methods: {
handleChange(event: Event) {
console.log((event.target as HTMLInputElement).value)
}
}
})
```
### 选项式 API 扩展全局属性
```ts
import axios from 'axios'
declare module 'vue' {
interface ComponentCustomProperties {
$http: typeof axios
$translate: (key: string) => string
}
}
```
#### 类型扩展的位置
我们可以将这些类型扩展放在一个 `.ts` 文件,或是一个影响整个项目的 `*.d.ts` 文件中
```ts
// 不工作,将覆盖原始类型。
declare module 'vue' {
interface ComponentCustomProperties {
$translate: (key: string) => string
}
}
```
---
```ts
// 正常工作。
export {}
declare module 'vue' {
interface ComponentCustomProperties {
$translate: (key: string) => string
}
}
```
### 选项式 API 扩展自定义选项
某些插件,比如 vue-router提供了一些自定义的组件选项比如 beforeRouteEnter
```ts
import { defineComponent } from 'vue'
export default defineComponent({
beforeRouteEnter(to, from, next) {
// ...
}
})
```
如果没有确切的类型标注,这个钩子函数的参数会隐式地标注为 `any` 类型。我们可以为 `ComponentCustomOptions` 接口扩展自定义的选项来支持:
```ts
import { Route } from 'vue-router'
declare module 'vue' {
interface ComponentCustomOptions {
beforeRouteEnter?(
to: Route,
from: Route,
next: () => void
): void
}
}
```
API 参考
---

View File

@ -90,7 +90,7 @@ Webstorm Windows & Linux 键盘映射
`Alt` `Up` | 转到上一个方法
`Alt` `Down` | 转到下一个方法
`Ctrl` `]` _/_ `[` | 移动到代码块结束/开始
`Cltrl` `Shift` `M` | 将插入符号移动到匹配的大括号
`Ctrl` `Shift` `M` | 将插入符号移动到匹配的大括号
`Ctrl` `F12` | 文件结构弹出
`Ctrl` `H` | 类型层次结构
`Ctrl` `Alt` `H` | 调用层次结构

View File

@ -1,6 +1,6 @@
{
"name": "@wcj/reference",
"version": "1.27.0",
"version": "1.31.0",
"description": "为开发人员分享快速参考备忘单(主要是方便自己)。",
"author": "jaywcjlove",
"license": "MIT",
@ -25,7 +25,7 @@
"husky": "^8.0.1",
"lint-staged": "^13.0.3",
"prettier": "^2.7.1",
"refs-cli": "^0.0.11"
"refs-cli": "^1.2.7"
},
"engines": {
"node": ">=16.0.0"