├── .github └── workflows │ ├── build_test.yml │ └── publish.yml ├── .gitignore ├── .markdownlint.json ├── LICENSE ├── README.md ├── README_EN.md ├── docs ├── .pages ├── CNAME ├── firmware │ └── RustSBI.md ├── frame │ ├── img │ │ └── wasm-bpf-no-bcc.png │ ├── wasm-bpf.en.md │ ├── wasm-bpf.md │ ├── zineland.en.md │ └── zineland.md ├── index.en.md ├── index.md ├── javascripts │ └── mathjax.js ├── large_language_model │ ├── img │ │ ├── v2-0e4e1e401f478835a3d093653a594751_720w.webp │ │ ├── v2-1227b07bc19529ebed99f6af17d81566_720w.webp │ │ ├── v2-486e3098f940511231b353ff5ca2783c_720w.webp │ │ ├── v2-4d614aad71b16c9588d241f07bdd72c0_720w.webp │ │ ├── v2-673e9a0cde7e3f50fe20994a5d0eec72_720w.webp │ │ └── v2-8881c00c2d9940545e76e28c29794f96_720w.jpg │ └── rwkv.cpp.md ├── one_click_deployment │ ├── Source-changer.md │ ├── Windows_Setup.en.md │ ├── Windows_Setup.md │ ├── docker_os_c.en.md │ ├── docker_os_c.md │ ├── docker_os_rust.en.md │ ├── docker_os_rust.md │ ├── img │ │ ├── Source-changer_主页面.png │ │ ├── Source-changer_软件选择.png │ │ ├── Source-changer_镜像选择.png │ │ └── python版本.png │ ├── os.en.md │ └── os.md ├── package_manager │ ├── APT(DEB)包管理工具.md │ ├── AppImage(Linux).md │ ├── Chocolatey(Win).md │ ├── DNF(RPM)包管理工具.md │ ├── Homebrew(Linux&Mac).md │ ├── Nix(声明式)包管理工具.md │ ├── Scoop(Win).md │ ├── WinGet(Win).md │ ├── YaST & Zypper(RPM).md │ └── pacman(Arch)包管理工具.md ├── platform │ ├── GitBucket.md │ ├── chatGPT.en.md │ ├── chatGPT.md │ ├── excalidraw.md │ ├── flydav.md │ ├── gpt-paper.md │ ├── minio.md │ ├── overleaf.en.md │ └── overleaf.md ├── plugins │ ├── android.en.md │ ├── android.md │ ├── browser.en.md │ ├── browser.md │ ├── img │ │ └── tabnine.png │ ├── tabnine.en.md │ └── tabnine.md ├── software │ ├── Double Commander.md │ ├── Pycharm.md │ ├── TiddlyWiki.md │ ├── antlr.en.md │ ├── antlr.md │ ├── code-debug.en.md │ ├── code-debug.md │ ├── eunomia-bpf.md │ ├── fzf.md │ ├── gdbdashboard.en.md │ ├── gdbdashboard.md │ ├── img │ │ ├── Pycharm打开界面.png │ │ ├── Pycharm的配置结果.png │ │ ├── pycharm图片.png │ │ ├── pycharm配置界面.png │ │ └── python解释器.png │ ├── mathpix.en.md │ ├── mathpix.md │ ├── nano.en.md │ ├── nano.md │ ├── ranger.en.md │ ├── ranger.md │ ├── texmacs.en.md │ └── texmacs.md └── specification │ ├── .pages │ ├── markdown │ ├── chinese_copywriting_guidelines.md │ ├── latex.md │ └── markdown.md │ ├── pr.en.md │ ├── pr.md │ ├── template.en.md │ └── template.md ├── mkdocs.yml └── overrides └── main.html /.github/workflows/build_test.yml: -------------------------------------------------------------------------------- 1 | # This is a basic workflow to help you get started with Actions 2 | 3 | name: build test 4 | 5 | # Controls when the action will run. 6 | on: 7 | # Triggers the workflow on push or pull request events but only for the main branch 8 | pull_request: 9 | branches: [ main ] 10 | 11 | # Allows you to run this workflow manually from the Actions tab 12 | workflow_dispatch: 13 | 14 | # A workflow run is made up of one or more jobs that can run sequentially or in parallel 15 | jobs: 16 | # This workflow contains a single job called "build" 17 | build: 18 | # The type of runner that the job will run on 19 | runs-on: ubuntu-latest 20 | strategy: 21 | matrix: 22 | python-version: [3.8] 23 | 24 | # Steps represent a sequence of tasks that will be executed as part of the job 25 | steps: 26 | # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it 27 | - uses: actions/checkout@v2 28 | with: 29 | python-version: 3.8 30 | - uses: actions/cache@v2 31 | with: 32 | key: ${{ github.ref }} 33 | path: .cache 34 | - run: pip install mkdocs-material 35 | - run: pip install mkdocs-static-i18n 36 | - run: pip install mkdocs-awesome-pages-plugin 37 | - run: mkdocs build --verbose --clean 38 | 39 | permissions: 40 | contents: read 41 | 42 | -------------------------------------------------------------------------------- /.github/workflows/publish.yml: -------------------------------------------------------------------------------- 1 | # This is a basic workflow to help you get started with Actions 2 | 3 | name: publish pages 4 | 5 | # Controls when the action will run. 6 | on: 7 | # Triggers the workflow on push or pull request events but only for the main branch 8 | push: 9 | branches: [ main ] 10 | # pull_request: 11 | # branches: [ main ] 12 | 13 | # Allows you to run this workflow manually from the Actions tab 14 | workflow_dispatch: 15 | 16 | # A workflow run is made up of one or more jobs that can run sequentially or in parallel 17 | jobs: 18 | # This workflow contains a single job called "build" 19 | build: 20 | # The type of runner that the job will run on 21 | runs-on: ubuntu-latest 22 | strategy: 23 | matrix: 24 | python-version: [3.8] 25 | 26 | # Steps represent a sequence of tasks that will be executed as part of the job 27 | steps: 28 | # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it 29 | - uses: actions/checkout@v2 30 | with: 31 | python-version: 3.8 32 | - uses: actions/cache@v2 33 | with: 34 | key: ${{ github.ref }} 35 | path: .cache 36 | - run: pip install mkdocs-material 37 | - run: pip install mkdocs-static-i18n 38 | - run: pip install mkdocs-awesome-pages-plugin 39 | - run: mkdocs gh-deploy --force 40 | 41 | permissions: 42 | contents: write 43 | 44 | # mannually scripts 45 | # cd $out_dir 46 | # git init 47 | # git config user.name ${{ secrets.GIT_NAME }} 48 | # git config user.email ${{ secrets.GIT_EMAIL }} 49 | # git remote add upstream "git@github.com:${{ secrets.REPO }}.git" 50 | # git add -A 51 | # git commit -m "rebuild website ad $commit_info" 52 | # SSHPATH="$HOME/.ssh" 53 | # rm -rf "$SSHPATH" 54 | # mkdir -p "$SSHPATH" 55 | # echo "${{ secrets.ACCESS_KEY }}" > "$SSHPATH/id_rsa" 56 | # chmod 600 "$SSHPATH/id_rsa" 57 | # sudo sh -c "echo StrictHostKeyChecking no >>/etc/ssh/ssh_config" 58 | # git push upstream HEAD:gh-pages --force 59 | 60 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # 忽略自动生成的目录 2 | site -------------------------------------------------------------------------------- /.markdownlint.json: -------------------------------------------------------------------------------- 1 | { 2 | "MD004": false, 3 | "MD007": false, 4 | "MD013": false, 5 | "MD032": false, 6 | "MD033": false, 7 | "MD036": false, 8 | "MD041": false, 9 | "MD042": false, 10 | "MD046": false 11 | } -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Attribution 4.0 International 2 | 3 | ======================================================================= 4 | 5 | Creative Commons Corporation ("Creative Commons") is not a law firm and 6 | does not provide legal services or legal advice. Distribution of 7 | Creative Commons public licenses does not create a lawyer-client or 8 | other relationship. Creative Commons makes its licenses and related 9 | information available on an "as-is" basis. Creative Commons gives no 10 | warranties regarding its licenses, any material licensed under their 11 | terms and conditions, or any related information. Creative Commons 12 | disclaims all liability for damages resulting from their use to the 13 | fullest extent possible. 14 | 15 | Using Creative Commons Public Licenses 16 | 17 | Creative Commons public licenses provide a standard set of terms and 18 | conditions that creators and other rights holders may use to share 19 | original works of authorship and other material subject to copyright 20 | and certain other rights specified in the public license below. The 21 | following considerations are for informational purposes only, are not 22 | exhaustive, and do not form part of our licenses. 23 | 24 | Considerations for licensors: Our public licenses are 25 | intended for use by those authorized to give the public 26 | permission to use material in ways otherwise restricted by 27 | copyright and certain other rights. Our licenses are 28 | irrevocable. Licensors should read and understand the terms 29 | and conditions of the license they choose before applying it. 30 | Licensors should also secure all rights necessary before 31 | applying our licenses so that the public can reuse the 32 | material as expected. Licensors should clearly mark any 33 | material not subject to the license. This includes other CC- 34 | licensed material, or material used under an exception or 35 | limitation to copyright. More considerations for licensors: 36 | wiki.creativecommons.org/Considerations_for_licensors 37 | 38 | Considerations for the public: By using one of our public 39 | licenses, a licensor grants the public permission to use the 40 | licensed material under specified terms and conditions. If 41 | the licensor's permission is not necessary for any reason--for 42 | example, because of any applicable exception or limitation to 43 | copyright--then that use is not regulated by the license. Our 44 | licenses grant only permissions under copyright and certain 45 | other rights that a licensor has authority to grant. Use of 46 | the licensed material may still be restricted for other 47 | reasons, including because others have copyright or other 48 | rights in the material. A licensor may make special requests, 49 | such as asking that all changes be marked or described. 50 | Although not required by our licenses, you are encouraged to 51 | respect those requests where reasonable. More_considerations 52 | for the public: 53 | wiki.creativecommons.org/Considerations_for_licensees 54 | 55 | ======================================================================= 56 | 57 | Creative Commons Attribution 4.0 International Public License 58 | 59 | By exercising the Licensed Rights (defined below), You accept and agree 60 | to be bound by the terms and conditions of this Creative Commons 61 | Attribution 4.0 International Public License ("Public License"). To the 62 | extent this Public License may be interpreted as a contract, You are 63 | granted the Licensed Rights in consideration of Your acceptance of 64 | these terms and conditions, and the Licensor grants You such rights in 65 | consideration of benefits the Licensor receives from making the 66 | Licensed Material available under these terms and conditions. 67 | 68 | Section 1 -- Definitions. 69 | 70 | a. Adapted Material means material subject to Copyright and Similar 71 | Rights that is derived from or based upon the Licensed Material 72 | and in which the Licensed Material is translated, altered, 73 | arranged, transformed, or otherwise modified in a manner requiring 74 | permission under the Copyright and Similar Rights held by the 75 | Licensor. For purposes of this Public License, where the Licensed 76 | Material is a musical work, performance, or sound recording, 77 | Adapted Material is always produced where the Licensed Material is 78 | synched in timed relation with a moving image. 79 | 80 | b. Adapter's License means the license You apply to Your Copyright 81 | and Similar Rights in Your contributions to Adapted Material in 82 | accordance with the terms and conditions of this Public License. 83 | 84 | c. Copyright and Similar Rights means copyright and/or similar rights 85 | closely related to copyright including, without limitation, 86 | performance, broadcast, sound recording, and Sui Generis Database 87 | Rights, without regard to how the rights are labeled or 88 | categorized. For purposes of this Public License, the rights 89 | specified in Section 2(b)(1)-(2) are not Copyright and Similar 90 | Rights. 91 | 92 | d. Effective Technological Measures means those measures that, in the 93 | absence of proper authority, may not be circumvented under laws 94 | fulfilling obligations under Article 11 of the WIPO Copyright 95 | Treaty adopted on December 20, 1996, and/or similar international 96 | agreements. 97 | 98 | e. Exceptions and Limitations means fair use, fair dealing, and/or 99 | any other exception or limitation to Copyright and Similar Rights 100 | that applies to Your use of the Licensed Material. 101 | 102 | f. Licensed Material means the artistic or literary work, database, 103 | or other material to which the Licensor applied this Public 104 | License. 105 | 106 | g. Licensed Rights means the rights granted to You subject to the 107 | terms and conditions of this Public License, which are limited to 108 | all Copyright and Similar Rights that apply to Your use of the 109 | Licensed Material and that the Licensor has authority to license. 110 | 111 | h. Licensor means the individual(s) or entity(ies) granting rights 112 | under this Public License. 113 | 114 | i. Share means to provide material to the public by any means or 115 | process that requires permission under the Licensed Rights, such 116 | as reproduction, public display, public performance, distribution, 117 | dissemination, communication, or importation, and to make material 118 | available to the public including in ways that members of the 119 | public may access the material from a place and at a time 120 | individually chosen by them. 121 | 122 | j. Sui Generis Database Rights means rights other than copyright 123 | resulting from Directive 96/9/EC of the European Parliament and of 124 | the Council of 11 March 1996 on the legal protection of databases, 125 | as amended and/or succeeded, as well as other essentially 126 | equivalent rights anywhere in the world. 127 | 128 | k. You means the individual or entity exercising the Licensed Rights 129 | under this Public License. Your has a corresponding meaning. 130 | 131 | Section 2 -- Scope. 132 | 133 | a. License grant. 134 | 135 | 1. Subject to the terms and conditions of this Public License, 136 | the Licensor hereby grants You a worldwide, royalty-free, 137 | non-sublicensable, non-exclusive, irrevocable license to 138 | exercise the Licensed Rights in the Licensed Material to: 139 | 140 | a. reproduce and Share the Licensed Material, in whole or 141 | in part; and 142 | 143 | b. produce, reproduce, and Share Adapted Material. 144 | 145 | 2. Exceptions and Limitations. For the avoidance of doubt, where 146 | Exceptions and Limitations apply to Your use, this Public 147 | License does not apply, and You do not need to comply with 148 | its terms and conditions. 149 | 150 | 3. Term. The term of this Public License is specified in Section 151 | 6(a). 152 | 153 | 4. Media and formats; technical modifications allowed. The 154 | Licensor authorizes You to exercise the Licensed Rights in 155 | all media and formats whether now known or hereafter created, 156 | and to make technical modifications necessary to do so. The 157 | Licensor waives and/or agrees not to assert any right or 158 | authority to forbid You from making technical modifications 159 | necessary to exercise the Licensed Rights, including 160 | technical modifications necessary to circumvent Effective 161 | Technological Measures. For purposes of this Public License, 162 | simply making modifications authorized by this Section 2(a) 163 | (4) never produces Adapted Material. 164 | 165 | 5. Downstream recipients. 166 | 167 | a. Offer from the Licensor -- Licensed Material. Every 168 | recipient of the Licensed Material automatically 169 | receives an offer from the Licensor to exercise the 170 | Licensed Rights under the terms and conditions of this 171 | Public License. 172 | 173 | b. No downstream restrictions. You may not offer or impose 174 | any additional or different terms or conditions on, or 175 | apply any Effective Technological Measures to, the 176 | Licensed Material if doing so restricts exercise of the 177 | Licensed Rights by any recipient of the Licensed 178 | Material. 179 | 180 | 6. No endorsement. Nothing in this Public License constitutes or 181 | may be construed as permission to assert or imply that You 182 | are, or that Your use of the Licensed Material is, connected 183 | with, or sponsored, endorsed, or granted official status by, 184 | the Licensor or others designated to receive attribution as 185 | provided in Section 3(a)(1)(A)(i). 186 | 187 | b. Other rights. 188 | 189 | 1. Moral rights, such as the right of integrity, are not 190 | licensed under this Public License, nor are publicity, 191 | privacy, and/or other similar personality rights; however, to 192 | the extent possible, the Licensor waives and/or agrees not to 193 | assert any such rights held by the Licensor to the limited 194 | extent necessary to allow You to exercise the Licensed 195 | Rights, but not otherwise. 196 | 197 | 2. Patent and trademark rights are not licensed under this 198 | Public License. 199 | 200 | 3. To the extent possible, the Licensor waives any right to 201 | collect royalties from You for the exercise of the Licensed 202 | Rights, whether directly or through a collecting society 203 | under any voluntary or waivable statutory or compulsory 204 | licensing scheme. In all other cases the Licensor expressly 205 | reserves any right to collect such royalties. 206 | 207 | Section 3 -- License Conditions. 208 | 209 | Your exercise of the Licensed Rights is expressly made subject to the 210 | following conditions. 211 | 212 | a. Attribution. 213 | 214 | 1. If You Share the Licensed Material (including in modified 215 | form), You must: 216 | 217 | a. retain the following if it is supplied by the Licensor 218 | with the Licensed Material: 219 | 220 | i. identification of the creator(s) of the Licensed 221 | Material and any others designated to receive 222 | attribution, in any reasonable manner requested by 223 | the Licensor (including by pseudonym if 224 | designated); 225 | 226 | ii. a copyright notice; 227 | 228 | iii. a notice that refers to this Public License; 229 | 230 | iv. a notice that refers to the disclaimer of 231 | warranties; 232 | 233 | v. a URI or hyperlink to the Licensed Material to the 234 | extent reasonably practicable; 235 | 236 | b. indicate if You modified the Licensed Material and 237 | retain an indication of any previous modifications; and 238 | 239 | c. indicate the Licensed Material is licensed under this 240 | Public License, and include the text of, or the URI or 241 | hyperlink to, this Public License. 242 | 243 | 2. You may satisfy the conditions in Section 3(a)(1) in any 244 | reasonable manner based on the medium, means, and context in 245 | which You Share the Licensed Material. For example, it may be 246 | reasonable to satisfy the conditions by providing a URI or 247 | hyperlink to a resource that includes the required 248 | information. 249 | 250 | 3. If requested by the Licensor, You must remove any of the 251 | information required by Section 3(a)(1)(A) to the extent 252 | reasonably practicable. 253 | 254 | 4. If You Share Adapted Material You produce, the Adapter's 255 | License You apply must not prevent recipients of the Adapted 256 | Material from complying with this Public License. 257 | 258 | Section 4 -- Sui Generis Database Rights. 259 | 260 | Where the Licensed Rights include Sui Generis Database Rights that 261 | apply to Your use of the Licensed Material: 262 | 263 | a. for the avoidance of doubt, Section 2(a)(1) grants You the right 264 | to extract, reuse, reproduce, and Share all or a substantial 265 | portion of the contents of the database; 266 | 267 | b. if You include all or a substantial portion of the database 268 | contents in a database in which You have Sui Generis Database 269 | Rights, then the database in which You have Sui Generis Database 270 | Rights (but not its individual contents) is Adapted Material; and 271 | 272 | c. You must comply with the conditions in Section 3(a) if You Share 273 | all or a substantial portion of the contents of the database. 274 | 275 | For the avoidance of doubt, this Section 4 supplements and does not 276 | replace Your obligations under this Public License where the Licensed 277 | Rights include other Copyright and Similar Rights. 278 | 279 | Section 5 -- Disclaimer of Warranties and Limitation of Liability. 280 | 281 | a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE 282 | EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS 283 | AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF 284 | ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, 285 | IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, 286 | WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR 287 | PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, 288 | ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT 289 | KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT 290 | ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU. 291 | 292 | b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE 293 | TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, 294 | NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, 295 | INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, 296 | COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR 297 | USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN 298 | ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR 299 | DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR 300 | IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. 301 | 302 | c. The disclaimer of warranties and limitation of liability provided 303 | above shall be interpreted in a manner that, to the extent 304 | possible, most closely approximates an absolute disclaimer and 305 | waiver of all liability. 306 | 307 | Section 6 -- Term and Termination. 308 | 309 | a. This Public License applies for the term of the Copyright and 310 | Similar Rights licensed here. However, if You fail to comply with 311 | this Public License, then Your rights under this Public License 312 | terminate automatically. 313 | 314 | b. Where Your right to use the Licensed Material has terminated under 315 | Section 6(a), it reinstates: 316 | 317 | 1. automatically as of the date the violation is cured, provided 318 | it is cured within 30 days of Your discovery of the 319 | violation; or 320 | 321 | 2. upon express reinstatement by the Licensor. 322 | 323 | For the avoidance of doubt, this Section 6(b) does not affect any 324 | right the Licensor may have to seek remedies for Your violations 325 | of this Public License. 326 | 327 | c. For the avoidance of doubt, the Licensor may also offer the 328 | Licensed Material under separate terms or conditions or stop 329 | distributing the Licensed Material at any time; however, doing so 330 | will not terminate this Public License. 331 | 332 | d. Sections 1, 5, 6, 7, and 8 survive termination of this Public 333 | License. 334 | 335 | Section 7 -- Other Terms and Conditions. 336 | 337 | a. The Licensor shall not be bound by any additional or different 338 | terms or conditions communicated by You unless expressly agreed. 339 | 340 | b. Any arrangements, understandings, or agreements regarding the 341 | Licensed Material not stated herein are separate from and 342 | independent of the terms and conditions of this Public License. 343 | 344 | Section 8 -- Interpretation. 345 | 346 | a. For the avoidance of doubt, this Public License does not, and 347 | shall not be interpreted to, reduce, limit, restrict, or impose 348 | conditions on any use of the Licensed Material that could lawfully 349 | be made without permission under this Public License. 350 | 351 | b. To the extent possible, if any provision of this Public License is 352 | deemed unenforceable, it shall be automatically reformed to the 353 | minimum extent necessary to make it enforceable. If the provision 354 | cannot be reformed, it shall be severed from this Public License 355 | without affecting the enforceability of the remaining terms and 356 | conditions. 357 | 358 | c. No term or condition of this Public License will be waived and no 359 | failure to comply consented to unless expressly agreed to by the 360 | Licensor. 361 | 362 | d. Nothing in this Public License constitutes or may be interpreted 363 | as a limitation upon, or waiver of, any privileges and immunities 364 | that apply to the Licensor or You, including from the legal 365 | processes of any jurisdiction or authority. 366 | 367 | ======================================================================= 368 | 369 | Creative Commons is not a party to its public 370 | licenses. Notwithstanding, Creative Commons may elect to apply one of 371 | its public licenses to material it publishes and in those instances 372 | will be considered the “Licensor.” The text of the Creative Commons 373 | public licenses is dedicated to the public domain under the CC0 Public 374 | Domain Dedication. Except for the limited purpose of indicating that 375 | material is shared under a Creative Commons public license or as 376 | otherwise permitted by the Creative Commons policies published at 377 | creativecommons.org/policies, Creative Commons does not authorize the 378 | use of the trademark "Creative Commons" or any other trademark or logo 379 | of Creative Commons without its prior written consent including, 380 | without limitation, in connection with any unauthorized modifications 381 | to any of its public licenses or any other arrangements, 382 | understandings, or agreements concerning use of licensed material. For 383 | the avoidance of doubt, this paragraph does not form part of the 384 | public licenses. 385 | 386 | Creative Commons may be contacted at creativecommons.org. 387 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ToolDiy 2 | 3 | [English](https://github.com/cargo-youth/ToolDiy/blob/main/README_EN.md) | 简体中文 4 | 5 | ## 🤔 前言 6 | 7 | 工欲善其事,必先利其器。 ———《论语·卫灵公》 8 | 9 | 如果该项目使你受益,你可以在你的项目中添加 ![Shields IO](https://img.shields.io/badge/ToolDiy-Let's%20build%20the%20world%20with%20tools-%23eb4d4b) 徽章 10 | 11 | ## ⛏ 贡献 12 | 13 | 我们非常欢迎各种的 PR 请求(包括但不局限于添加一个换行增加阅读体验),_(:з)∠)_本项目还处于初期阶段,非常需要各位大佬的完善和纠错。 14 | 15 | 如果你有已经写好的文章想要添加到这里,你可以通过下列方式: 16 | 17 | 1. fork 本仓库,在 mkdocs.yml 中添加 nav,并在 docs 下添加内容,提出 PR 以便进行合并。 18 | 2. 联系 [SakurajimaMaii](https://github.com/SakurajimaMaii) ,将文档的**中文**和**英文**版发送至他的邮箱 Email 。 19 | 20 | 文档采用 [MKDocs](https://www.mkdocs.org/) 来编辑及部署,采用 [Material for MKDocs](https://squidfunk.github.io/mkdocs-material/) 主题。 21 | 22 | ## 🤳 联系我们 23 | 24 | 点击链接加入群聊 [tooldiy](https://jq.qq.com/?_wv=1027&k=QCT1smVY) 25 | 26 | ## 💫 特别鸣谢 27 | 28 | 29 | 30 | 31 | 32 | 33 | [![Star History Chart](https://api.star-history.com/svg?repos=cargo-youth/ToolDiy&type=Date)](https://star-history.com/#cargo-youth/ToolDiy&Date) 34 | 35 | ## 📑 许可证 36 | 37 | 知识共享许可协议
本作品采用知识共享署名-相同方式共享 4.0 国际许可协议进行许可。 38 | -------------------------------------------------------------------------------- /README_EN.md: -------------------------------------------------------------------------------- 1 | # ToolDiy 2 | 3 | English | [简体中文](https://github.com/cargo-youth/ToolDiy/blob/main/README.md) 4 | 5 | ## 🤔 Preface 6 | 7 | Let's build the world with tools. 8 | 9 | If this project benefits you, you can add following badges to your project. 10 | ![Shields IO](https://img.shields.io/badge/ToolDiy-Let's%20build%20the%20world%20with%20tools-%23eb4d4b) 11 | 12 | ## ⛏ Contribute 13 | 14 | We very much welcome all kinds of PR requests (including but not limited to adding a line break to enhance the reading experience), _(:з)∠)_ This project is still in its infancy, and it is very much in need of improvement and error correction from everyone. 15 | 16 | If you have already written articles that you would like to add here, you can do so in the following ways: 17 | 18 | 1. Fork this repository and submit a PR for merging after successful local debugging. 19 | 2. Contact [SakurajimaMaii](https://github.com/SakurajimaMaii) and send the **Chinese** and **English** versions of the document to his email Email. 20 | 21 | Documentation is edited and deployed using [MKDocs](https://www.mkdocs.org/), using [Material for MKDocs](https://squidfunk.github.io/mkdocs-material/) theme. 22 | 23 | ## 🤳 Contact us 24 | 25 | Click the link to join the group chat [tooldiy](https://jq.qq.com/?_wv=1027&k=QCT1smVY) 26 | 27 | ## 💫 Special thanks 28 | 29 | 30 | 31 | 32 | 33 | 34 | [![Star History Chart](https://api.star-history.com/svg?repos=cargo-youth/ToolDiy&type=Date)](https://star-history.com/#cargo-youth/ToolDiy&Date) 35 | 36 | ## 📑 LICENSE 37 | 38 | Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. 39 | -------------------------------------------------------------------------------- /docs/.pages: -------------------------------------------------------------------------------- 1 | nav: 2 | - index.md 3 | - index.en.md 4 | - specification 5 | - ... 6 | 7 | collapse_single_pages: true 8 | -------------------------------------------------------------------------------- /docs/CNAME: -------------------------------------------------------------------------------- 1 | tooldiy.ry.rs 2 | -------------------------------------------------------------------------------- /docs/firmware/RustSBI.md: -------------------------------------------------------------------------------- 1 | # RustSBI 2 | 3 | 官网: 4 | 5 | RustSBI是RISC-V下可用的SBI固件实现,它拥有“独立包”和“原型设计系统”。 6 | RISC-V SBI是RISC-V下不可或缺的固件接口,它提供了足以操作系统使用的基本功能; 7 | 更多的功能性接口应当通过其它的工业标准实现。 8 | 9 | ## 独立包 10 | 11 | 独立包是分别实现RustSBI的项目,每个不同的主板都拥有不同的仓库和解决方案。 12 | 这些方案包括但不限于: 13 | 14 | - [rustsbi-k510](https://github.com/Gstalker/rustsbi-k510) 15 | - [rustsbi-d1](https://github.com/rustsbi/rustsbi-d1) 16 | - [rustsbi-hifive-unmatched](https://github.com/rustsbi/rustsbi-hifive-unmatched) 17 | - [rustsbi-qemu](https://github.com/rustsbi/rustsbi-qemu) 18 | - [rustsbi-k210](https://github.com/rustsbi/rustsbi-k210) 19 | 20 | 这些解决方案的文档和下载链接都在各自的仓库中。 21 | 22 | ## 原型设计系统 23 | 24 | RustSBI原型设计系统提供了从SBI到UEFI、LinuxBoot的完整解决方案, 25 | 它拥有一个图形化的编译界面,能在不同的主板上运行。 26 | 27 | 为了编译原型设计系统,复制仓库后使用以下的命令: 28 | 29 | ``` 30 | cargo termconfig 31 | ``` 32 | 33 | 在图形界面配置完毕后,配置文件将保存到`Xtask.toml`文件中,以供编译过程阅读。 34 | 35 | 接下来,我们可以选择仅编译或者编译并烧录。使用以下的命令编译: 36 | 37 | ``` 38 | cargo make 39 | ``` 40 | 41 | 或者,使用以下的命令直接编译和烧录到目标主板: 42 | 43 | ``` 44 | cargo flash 45 | ``` 46 | 47 | RustSBI原型设计系统的链接: 48 | -------------------------------------------------------------------------------- /docs/frame/img/wasm-bpf-no-bcc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/storage-db/ToolDiy/b83977c85695c48e1d48119b8c774c192895765f/docs/frame/img/wasm-bpf-no-bcc.png -------------------------------------------------------------------------------- /docs/frame/wasm-bpf.en.md: -------------------------------------------------------------------------------- 1 | ![logo](https://github.com/eunomia-bpf/wasm-bpf/tree/main/docs/logo.png) 2 | 3 | # 📦 Wasm-bpf: Wasm library and toolchain for eBPF 4 | 5 | [![Actions Status](https://github.com/eunomia-bpf/wasm-bpf/workflows/Ubuntu/badge.svg)](https://github.com/eunomia-bpf/wasm-bpf/actions) 6 | [![codecov](https://codecov.io/gh/eunomia-bpf/wasm-bpf/branch/main/graph/badge.svg?token=6TKN4WU99U)](https://codecov.io/gh/eunomia-bpf/wasm-bpf) 7 | [![CodeFactor](https://www.codefactor.io/repository/github/eunomia-bpf/wasm-bpf/badge)](https://www.codefactor.io/repository/github/eunomia-bpf/wasm-bpf) 8 | [![DeepSource](https://deepsource.io/gh/eunomia-bpf/wasm-bpf.svg/?label=active+issues&show_trend=true&token=rcSI3J1-gpwLIgZWtKZC-N6C)](https://deepsource.io/gh/eunomia-bpf/wasm-bpf/?ref=repository-badge) 9 | [![](https://img.shields.io/crates/v/wasm-bpf-rs.svg)](https://crates.io/crates/wasm-bpf-rs) 10 | 11 | [中文文档](README_zh.md) [Gitee](https://gitee.com/eunomia-bpf/wasm-bpf) [Github](https://github.com/eunomia-bpf/wasm-bpf) 12 | 13 | `Wasm-bpf` is a WebAssembly eBPF library, toolchain and runtime powered by [CO-RE](https://facebookmicrosites.github.io/bpf/blog/2020/02/19/bpf-portability-and-co-re.html)(Compile Once – Run Everywhere) [libbpf](https://github.com/libbpf/libbpf). It can help you build almost every eBPF programs or usecases to `Wasm` with nearly zero modification, and run them cross platforms with Wasm sandbox. 14 | 15 | # Quick start guides 16 | 17 | ⌨️ [Introduction](#introduction) to wasm-bpf \ 18 | 📦 [Features](#features) \ 19 | 🚀 [Running](#running-a-standalone-wasm-ebpf-program) a standalone Wasm program from CLI or Docker \ 20 | 🔌 Embed a Wasm-eBPF function in your [Rust program](#embed-a-wasm-ebpf-function-in-your-program) or [C/C++ program](#build-the-runtime) \ 21 | 🔨 [Examples](#examples) covering the use cases from `tracing`, `networking` to `security` \ 22 | 📚 [How it works](#how-it-works) \ 23 | 🤖 [Build](#build-the-runtime) the runtime 24 | 25 | 📚 **[Check out our more documentations](https://docs.eunomia.dev/)** 26 | 27 | ## Introduction 28 | 29 | `WebAssembly` (Wasm) is a portable binary format for executable code. The code is executed at a nearly-native speed in a memory-safe (for host) sandbox, with clearly defined resource constraints, and APIs for communicating with the embedding host environment (eg. proxy).The `wasm-bpf` project combines Wasm and eBPF technologies to enhance the performance and programmability of eBPF applications. 30 | 31 | With `wasm-bpf`, users can dynamically load and securely execute user-defined or community-contributed Wasm-eBPF codes as `plug-ins` in their software products, such as observability platforms or service proxy. This enables efficient and scalable data collection, while also allowing for advanced processing and analysis of that data. 32 | 33 | It also enables developers to write eBPF programs in familiar languages like `C/C++`, `Rust`, `Go`, and more than 30 other programming languages, and deploy them easily across different Linux distributions. Additionally, cloud providers can leverage wasm-bpf to offer a `secure` and `high-performance` environment for their customers to develop and deploy eBPF applications in their cloud environments. 34 | 35 | ## 🚀 Get started 36 | 37 | ### 📦 Install wasm-bpf 38 | 39 | Run the following command to install the `wasm-bpf` CLI tool: 40 | 41 | ```sh 42 | cargo install wasm-bpf 43 | ``` 44 | 45 | ### Running a standalone Wasm-eBPF program 46 | 47 | Running the `runqlat` example with docker: 48 | 49 | ```console 50 | $ wget https://eunomia-bpf.github.io/wasm-bpf/examples/runqlat/runqlat.wasm 51 | $ docker run --rm -it --privileged -v $(pwd):/examples ghcr.io/eunomia-bpf/wasm-bpf:latest /examples/runqlat.wasm 52 | Tracing run queue latency... Hit Ctrl-C to end. 53 | 54 | usecs : count distribution 55 | 0 -> 1 : 72 |***************************** | 56 | 2 -> 3 : 93 |************************************* | 57 | 4 -> 7 : 98 |****************************************| 58 | 8 -> 15 : 96 |*************************************** | 59 | 16 -> 31 : 38 |*************** | 60 | 32 -> 63 : 4 |* | 61 | 64 -> 127 : 5 |** | 62 | 128 -> 255 : 6 |** | 63 | 256 -> 511 : 0 | | 64 | 512 -> 1023 : 0 | | 65 | 1024 -> 2047 : 0 | | 66 | 2048 -> 4095 : 1 | | 67 | ``` 68 | 69 | For more tools to distribute and deploy Wasm-eBPF programs for usecases from `Observability`, `Networking` to `Security`, please refer to [eunomia-bpf](https://github.com/eunomia-bpf/eunomia-bpf) repo. 70 | 71 | ### Embed a Wasm-eBPF function in your program 72 | 73 | Add the following line to your Cargo.toml to use Wasm-bpf as a `library`: 74 | 75 | ```toml 76 | wasm-bpf-rs = "0.2.1" 77 | ``` 78 | 79 | See the [main.rs](https://github.com/eunomia-bpf/wasm-bpf/tree/main/runtime/cmd/src/main.rs) for an example of how to use the `wasm-bpf-rs` library. 80 | 81 | ## Features 82 | 83 | - **`General purpose`**: provide most abilities from eBPF to Wasm, `polling` from the ring buffer or perf buffer, bidirectional communications between `kernel` eBPF and `userspace` Wasm using `maps`, dynamically `loading`, `attaching` or `detaching`, etc. Supports a large number of eBPF program types and map types. 84 | - **`High performance`**: No `serialization` overhead for complex data types, using `shared memory` to avoid copy overhead between host and Wasm. 85 | - **`Easy to use`**: provide a similar developing experience as the [libbpf-bootstrap](https://github.com/libbpf/libbpf-bootstrap), `auto generate` the Wasm-eBPF skeleton headers and type definitions for bindings. Write your eBPF programs in `C/C++`, `Rust`, `Go` and compile to Wasm. 86 | - **`Ultralightweight`**: the miminal runtime has only `1.5 MB` in binary size. Compiled Wasm module would be only `~90K`. With the same toolchain, you can easily build your own Wasm-eBPF runtime in any languages and platforms! 87 | 88 | See the [examples](https://github.com/eunomia-bpf/wasm-bpf/tree/main/examples) directory for examples of eBPF programs written in C, Rust, Go and compiled to Wasm, covering the use cases from `tracing`, `networking` to `security`. 89 | 90 | For tools to distribute Wasm-eBPF programs in [`OCI`](https://opencontainers.org/) images, please refer to [eunomia-bpf](https://github.com/eunomia-bpf/eunomia-bpf) repo. 91 | 92 | ## Examples 93 | 94 | See the [examples](https://github.com/eunomia-bpf/wasm-bpf/tree/main/examples) directory for examples of eBPF programs written in C, Rust, Go and compiled to WASM. 95 | 96 | `tracing examples` 97 | - [bootstrap](https://github.com/eunomia-bpf/wasm-bpf/tree/main/examples/bootstrap) and [rust-bootstrap](https://github.com/eunomia-bpf/wasm-bpf/tree/main/examples/rust-bootstrap): trace process exec and exit 98 | - [runqlat](https://github.com/eunomia-bpf/wasm-bpf/tree/main/examples/runqlat): summarizes scheduler run queue latency as a histogram 99 | - [execve](https://github.com/eunomia-bpf/wasm-bpf/tree/main/examples/execve) and [go-execve](https://github.com/eunomia-bpf/wasm-bpf/tree/main/examples/go-execve): trace execve syscall 100 | 101 | `security example` 102 | - [lsm](https://github.com/eunomia-bpf/wasm-bpf/tree/main/examples/lsm) and [go-lsm](https://github.com/eunomia-bpf/wasm-bpf/tree/main/examples/go-lsm): check the permission to remove a directory 103 | 104 | `networking example` 105 | - [sockfilter](https://github.com/eunomia-bpf/wasm-bpf/tree/main/examples/sockfilter): monitoring packet and dealing with __sk_buff. 106 | - [sockops](https://github.com/eunomia-bpf/wasm-bpf/tree/main/examples/sockops): Add the pid int tcp option in syn packet. 107 | 108 | ## How it works 109 | 110 | An eBPF application typically consists of two parts: the `user space part` and `the kernel space part`. With wasm-bpf, the user space part is executed in a WebAssembly (Wasm) sandbox while the kernel space part is executed in the eBPF runtime in the Linux kernel. This separation of concerns allows for greater flexibility and security in developing and running eBPF programs, as well as the ability to leverage the benefits of both Wasm and eBPF. 111 | 112 | The wasm-bpf runtime require two parts: `the host side`(Outside the Wasm runtime) and the `Wasm guest side`(Inside the Wasm runtime). 113 | 114 | - host side: A simple runtime implementation example 115 | - see [runtime/cpp](https://github.com/eunomia-bpf/wasm-bpf/tree/main/runtime/cpp), which would be a sample runtime in `C++` built on the top of [libbpf](https://github.com/libbpf/libbpf) and [WAMR](https://github.com/bytecodealliance/wasm-micro-runtime). Another more complex runtime implement in `Rust` is [runtime/wasm-bpf-rs](https://github.com/eunomia-bpf/wasm-bpf/tree/main/runtime/wasm-bpf-rs), based on [Wasmtime](https://github.com/bytecodealliance/wasmtime). 116 | - You can easily build your own Wasm-eBPF runtime in `any` languages, `any` eBPF libraries and `any` Wasm runtimes with the same System interface. 117 | - wasm side: toolchains and libraries 118 | - a [`libbpf-wasm`](https://github.com/eunomia-bpf/wasm-bpf/tree/main/wasm-sdk/c/libbpf-wasm.h) header only library to provide libbpf APIs for Wasm guest `C/C++` code. 119 | - a [`bpftool`](https://github.com/eunomia-bpf/bpftool/tree/wasm-bpftool) tool to generate the Wasm-eBPF `skeleton` headers, and `C struct definitions` for passing data between the host and Wasm guest without serialization. 120 | - `Rust`, `Go` and other language support is similar to the `C/C++` support. 121 | 122 | For details compile process, please refer to the [examples/bootstrap/README.md](https://github.com/eunomia-bpf/wasm-bpf/tree/main/examples/bootstrap/README.md). The figure below shows the overall interaction between the eBPF and Wasm runtimes: 123 | 124 | ![wasi-bpf](img/wasm-bpf-no-bcc.png) 125 | 126 | A Wasm module could load and control multiple eBPF programs at the same time, and can call another Wasm module written in other languages to process the data or control with [the component model](https://github.com/WebAssembly/component-model). 127 | 128 | We have proposed a new WASI issue [wasi-bpf](https://github.com/WebAssembly/WASI/issues/513). 129 | 130 | ## Build the runtime 131 | 132 | We have two types of runtime samples: 133 | 134 | - A C/C++ runtime example, which is a minimal runtime based on WAMR. see [runtime/cpp](../runtime/cpp) for more details. 135 | - A Rust runtime example, which is a more complex runtime based on Wasmtime. see [runtime/wasm-bpf-rs](../runtime/wasm-bpf-rs) for more details. 136 | 137 | The runtime can be built as a library or a standalone executable. see [docs/build.md](https://github.com/eunomia-bpf/wasm-bpf/tree/main/docs/build.md) to build the runtimes. 138 | 139 | ## LICENSE 140 | 141 | [MIT LICENSE](LICENSE) 142 | 143 | ## 🔗 Links 144 | 145 | - eunomia-bpf project: simplify and enhance eBPF with CO-RE and WebAssembly 146 | - documents and blogs: 147 | - CO-RE (Compile Once – Run Everywhere): 148 | - WAMR (WebAssembly Micro Runtime): 149 | - libbpf: 150 | -------------------------------------------------------------------------------- /docs/frame/wasm-bpf.md: -------------------------------------------------------------------------------- 1 | # 📦 Wasm-bpf: 为在 WebAssembly 上运行 eBPF 应用而设计的库、工具链和运行时 2 | 3 | [![Actions Status](https://github.com/eunomia-bpf/wasm-bpf/workflows/Ubuntu/badge.svg)](https://github.com/eunomia-bpf/wasm-bpf/actions) 4 | [![CodeFactor](https://www.codefactor.io/repository/github/eunomia-bpf/wasm-bpf/badge)](https://www.codefactor.io/repository/github/eunomia-bpf/wasm-bpf) 5 | [![DeepSource](https://deepsource.io/gh/eunomia-bpf/wasm-bpf.svg/?label=active+issues&show_trend=true&token=rcSI3J1-gpwLIgZWtKZC-N6C)](https://deepsource.io/gh/eunomia-bpf/wasm-bpf/?ref=repository-badge) 6 | 7 | [中文文档](README_zh.md) [Gitee](https://gitee.com/eunomia-bpf/wasm-bpf) [Github](https://github.com/eunomia-bpf/wasm-bpf) 8 | 9 | Wasm-bpf 是一个由 [CO-RE](https://facebookmicrosites.github.io/bpf/blog/2020/02/19/bpf-portability-and-co-re.html)(一次编写 – 到处运行) [libbpf](https://github.com/libbpf/libbpf) libbpf 驱动的 WebAssembly eBPF 库、工具链和运行时。它可以帮助您几乎不用修改地构建几乎所有的 eBPF 程序或用例到 Wasm 中,并在 Wasm 沙箱中跨平台运行。 10 | 11 | ## 简介 12 | 13 | `WebAssembly`(简称Wasm)是一种可执行代码的便携式二进制格式。代码在一个内存安全的沙盒环境中以接近本机速度执行,具有明确定义的资源限制和一个 API ,用于与嵌入式主机环境(例如代理)进行通信。 14 | 15 | `wasm-bpf` 项目结合了 Wasm 和 eBPF 技术,提高了eBPF应用程序的性能和可编程性。它提供了一个库和工具链,用于将多种语言编写的 eBPF 应用编译成 Wasm,并提供运行时环境以在安全的沙箱中运行这些程序。 16 | 17 | 使用 wasm-bpf,用户可以动态加载和安全地执行用户自定义或社区贡献的 Wasm-eBPF 代码作为插件,例如在他们的网络相关软件产品,或可观测性平台中。这其中 eBPF 使得数据收集高效可扩展,同时 Wasm 也允许对这些数据进行高级处理和分析。 18 | 19 | 此外,它使开发人员能够使用熟悉的语言,如 C/C ++,Rust,Go 和其他 30 多种能编译到 Wasm 的编程语言编写 eBPF 程序,并轻松地在不同的Linux发行版中部署它们。此外,利用 Wasm 的生态和工具链,云提供商可以利用 wasm-bpf 为其客户提供安全且高性能的环境来开发和部署 eBPF 应用程序。 20 | 21 | ## 功能 22 | 23 | - `通用性`: 提供了从 eBPF 到 Wasm 的大多数能力,包括从`环形缓冲区`或 `perf 缓冲区`进行轮询,使用 `maps` 在内核 eBPF 和用户空间 Wasm 之间进行双向通信,动态加载、挂载到 hook 执行等。支持大量的 eBPF 程序类型和 `maps` 类型。 24 | - `高性能`: 对于复杂数据类型没有序列化开销,使用共享内存来避免主机和 Wasm 之间的拷贝开销。 25 | - `易于使用`: 提供类似于 [libbpf-bootstrap](https://github.com/libbpf/libbpf-bootstrap) 的开发体验,自动生成 Wasm-eBPF 骨架头文件和类型定义以进行绑定。可以使用 `C/C++`、`Rust`、`Go` 编写 eBPF 程序并编译成 Wasm。 26 | - `超轻量级`: 最小运行时的二进制大小仅为 1.5 MB。编译后的 Wasm 模块大小仅为 ~90K。使用相同的工具链,您可以轻松地在任何语言和平台上构建自己的 Wasm-eBPF 运行时! 27 | 28 | 请参阅 [examples](https://github.com/eunomia-bpf/wasm-bpf/tree/main/examples) 目录中以 C、Rust、Go 编写的编译为 Wasm 的 eBPF 程序示例,覆盖了从跟踪、网络到安全的各种用例。 29 | 30 | 有关使用 OCI 镜像分发、动态加载、运行 Wasm-eBPF 程序的工具,请参阅 [eunomia-bpf](https://github.com/eunomia-bpf/eunomia-bpf) 仓库。 31 | 32 | ## 🔨 示例 33 | 34 | 请查看 [examples](https://github.com/eunomia-bpf/wasm-bpf/tree/main/examples) 目录中用 C、Rust、Go 编写的编译成 WASM 的 eBPF 程序示例。 35 | 36 | `tracing examples` 37 | 38 | - [bootstrap](https://github.com/eunomia-bpf/wasm-bpf/tree/main/examples/bootstrap) and [rust-bootstrap](https://github.com/eunomia-bpf/wasm-bpf/tree/main/examples/rust-bootstrap): 跟踪进程的 exec 和 exit 操作 39 | - [runqlat](https://github.com/eunomia-bpf/wasm-bpf/tree/main/examples/runqlat): 将调度程序的运行队列延迟汇总成直方图 40 | - [execve](https://github.com/eunomia-bpf/wasm-bpf/tree/main/examples/execve) and [go-execve](https://github.com/eunomia-bpf/wasm-bpf/tree/main/examples/go-execve): 跟踪 execve 系统调用 41 | 42 | `security example` 43 | - [lsm](https://github.com/eunomia-bpf/wasm-bpf/tree/main/examples/lsm) and [go-lsm](https://github.com/eunomia-bpf/wasm-bpf/tree/main/examples/go-lsm): 检查删除目录的权限 44 | 45 | `networking example` 46 | - [sockfilter](https://github.com/eunomia-bpf/wasm-bpf/tree/main/examples/sockfilter): 监视数据包并处理 __sk_buff 47 | - [sockops](https://github.com/eunomia-bpf/wasm-bpf/tree/main/examples/sockops): 在 syn 数据包中添加 pid 选项。 48 | 49 | runqlat 的一个示例输出: 50 | 51 | ```console 52 | $ sudo ./wasm-bpf runqlat.wasm 1 53 | Tracing run queue latency... Hit Ctrl-C to end. 54 | 55 | usecs : count distribution 56 | 0 -> 1 : 72 |***************************** | 57 | 2 -> 3 : 93 |************************************* | 58 | 4 -> 7 : 98 |****************************************| 59 | 8 -> 15 : 96 |*************************************** | 60 | 16 -> 31 : 38 |*************** | 61 | 32 -> 63 : 4 |* | 62 | 64 -> 127 : 5 |** | 63 | 128 -> 255 : 6 |** | 64 | 256 -> 511 : 0 | | 65 | 512 -> 1023 : 0 | | 66 | 1024 -> 2047 : 0 | | 67 | 2048 -> 4095 : 1 | | 68 | ``` 69 | 70 | ## 构建运行时 71 | 72 | 请参考 [docs/build.md](https://github.com/eunomia-bpf/wasm-bpf/tree/main/docs/build.md)。 73 | 74 | ## Wasm-bpf 工作原理 75 | 76 | wasm-bpf 运行时需要两部分:主机端(在 Wasm 运行时之外)和 Wasm 客户端端(在 Wasm 运行时之内)。 77 | 78 | - 主机端:一个简单的运行时实现示例 79 | - 参见 [runtime/cpp](https://github.com/eunomia-bpf/wasm-bpf/tree/main/runtime/cpp),它将是在 [libbpf](https://github.com/libbpf/libbpf) 和 [WAMR](https://github.com/bytecodealliance/wasm-micro-runtime) 之上构建的 C++ 示例运行时。另一个更完善的基于 [Wasmtime](https://github.com/bytecodealliance/wasmtime) 的 Rust 运行时实现在 [runtime/wasm-bpf-rs](https://github.com/eunomia-bpf/wasm-bpf/tree/main/runtime/wasm-bpf-rs) 中。 80 | - 您可以使用相同的系统接口以 任何 语言、任何 eBPF 库和 任何 Wasm 运行时轻松构建自己的 Wasm-eBPF 运行时。 81 | - wasm 端:工具链和库 82 | - 一个名为 [`libbpf-wasm`](https://github.com/eunomia-bpf/wasm-bpf/tree/main/wasm-sdk/c/libbpf-wasm.h) 的头文件库,为 Wasm 客户端 C/C++ 代码提供 libbpf API。 83 | - 一个名为 [`bpftool`](https://github.com/eunomia-bpf/bpftool/tree/wasm-bpftool) 的工具,用于生成 Wasm-eBPF skeleton 头文件和 C 结构定义,以便在主机和 Wasm 客户端之间传递数据而无需序列化。 84 | - 对于 Rust、Go 和其他语言的支持与 C/C++ 支持类似。 85 | 86 | 有关详细的编译过程,请参阅 [examples/bootstrap/README.md](https://github.com/eunomia-bpf/wasm-bpf/tree/main/examples/bootstrap/README.md)。下图显示了 eBPF 和 Wasm 运行时之间的整体交互过程: 87 | 88 | ![wasi-bpf](img/wasm-bpf-no-bcc.png) 89 | 90 | Wasm 模块可以同时加载和控制多个 eBPF 程序, 并且能够调用或者控制(通过[组件模型](https://github.com/WebAssembly/component-model))其他语言编写的 Wasm 模块来处理数据。 91 | 92 | 我们也提了一个 WASI 提案 [wasi-bpf](https://github.com/WebAssembly/WASI/issues/513)。 93 | 94 | ## 协议 95 | 96 | MIT 97 | -------------------------------------------------------------------------------- /docs/frame/zineland.en.md: -------------------------------------------------------------------------------- 1 | # Zineland 2 | 3 | ## Introduction 4 | 5 | Zineland is a simple and effective magazine building framework that can quickly generate magazine-style static pages from Markdown documents 6 | 7 | ## Install 8 | 9 | - repository 10 | - install 11 | - cargo 12 | 13 | ``` sh 14 | cargo install zine 15 | ``` 16 | 17 | - brew 18 | 19 | ``` sh 20 | brew install zineland/tap/zine 21 | ``` 22 | 23 | - doc 24 | 25 | ## Advantages 26 | 27 | - Mobile-first. 28 | - Intuitive and elegant magazine design. 29 | - Best reading experiences. 30 | - Theme customizable, extend friendly. 31 | - RSS Feed supported. 32 | - Open Graph Protocol supported. 33 | - Article topic supported. 34 | - I18n and l10n supported. 35 | - Build into a static website, hosting anywhere. 36 | -------------------------------------------------------------------------------- /docs/frame/zineland.md: -------------------------------------------------------------------------------- 1 | # Zineland 2 | 3 | ## 简介 4 | 5 | Zineland 是一个简单有效的杂志构建框架,能够快速通过 Markdown 文档生成杂志风格的静态网页 6 | 7 | ## 获取 8 | 9 | - 源代码仓库 10 | - 获取 11 | - cargo 12 | 13 | ``` sh 14 | cargo install zine 15 | ``` 16 | 17 | - brew 18 | 19 | ``` sh 20 | brew install zineland/tap/zine 21 | ``` 22 | 23 | - 文档 24 | 25 | ## 优点 26 | 27 | - 移动端阅读体验优先 28 | - 优雅的杂志设计 29 | - 可定制化程度高,支持扩展 30 | - 支持I18n和I10n 31 | -------------------------------------------------------------------------------- /docs/index.en.md: -------------------------------------------------------------------------------- 1 | # Preface 2 | 3 | ## The original intention of ToolDiy 4 | 5 | 1. In the long river of time, we found that repetitive and tedious work brings only time and energy consumption to everyone.Indeed,in our continuous thinking and progress, excellent tools have appeared before our eyes.But what follows is that the rapid development of the types and quantities of tools makes it difficult for us to quickly and easily get started with a tool according to specific needs. On the contrary, "Baidu" and "Google" have become our commonplace. 6 | Keep trying in link after link and answer. Some are jerky English documents, some are a few words, which undoubtedly increases our cost of use. So the original intention of Tooldiy is to solve this problem.We want to use the environment of the open source community to continuously collect and refine tools from all walks of life (after all, the one that suits you is the best). Tooldiy will recommend and analyze various tools from an objective and user perspective, not just limited to a fixed direction. 7 | 8 | 2. Many times we will encounter environment configuration problems of many tools during the development process. We have to spend a lot of time thinking and learning to use them. Many times, these tasks can only exercise your patience in configuring the environment. We want to Everyone focuses on the tool itself, so we want to maintain some automated scripts for tool configuration and construction or a docker environment for the convenience of users. Of course, the build scripts we left when writing can also be provided for users to learn. It's exciting to think about a tool that can be obtained with one click, let's build it together! 9 | 10 | As long as it can bring you help and a better experience, this is the meaning of Tooldiy's existence. 11 | 12 | Now, let's use it together! 13 | 14 | ## Contribute 15 | 16 | The original intention of this project is to provide a warehouse and wiki for maintaining a tool description. It is a project that lowers the threshold of use and is convenient for everyone. Our principle is not limited to any specific discipline and field. We can share all the tools we think are useful (Pay attention to the introductory introduction, which is in line with the original intention of the project). It can be shared under the premise of respecting the labor of tool producers. Therefore, we do not allow everyone to share pirated and cracked tools. We welcome all kinds of PR on the premise of standardization. If you have any doubts other than the appeal, you can file an issue or contact the warehouse management. When it comes to paid content tools, we encourage sharing and hope that everyone will do a good job of disclosing their information and marking their prices. This project will not advertise any tools, and there will be no special advertisement behaviors such as location are arranged according to the time of submission. We also welcome various PR requests to improve the reading experience of this project (including but not limited to adding a line break to improve the reading experience, adding a project logo, Chinese and English proofreading, etc.) _(:з)∠)_ This project is still in its infancy, and it is very much in need of improvement and error correction from everyone. 17 | 18 | If you have already written articles that you would like to add here, you can do so in the following ways: 19 | 20 | 1. Fork this repository, create an Markdown document in the docs folder under the corresponding category and submit a PR to merge. 21 | 2. Contact [SakurajimaMaii](https://github.com/SakurajimaMaii) and send the **Chinese** and **English** versions of the document to his email Email. 22 | 23 | If you wonder where to start, check the [writing template](https://cargo-youth.github.io/ToolDiy/specification/template/) is a good idea. 24 | 25 | !!! Note 26 | 27 | 1. **All content uploaded to this website should strictly conform to Specification.** 28 | 2. If you are not familiar with PR, you can refer to [3 minutes to learn, how to PR (Pull Request) code to Github](https://github.com/any86/Notes/issues/22) 29 | 30 | ## Contact us 31 | 32 | Click the link to join the group chat [tooldiy](https://jq.qq.com/?_wv=1027&k=QCT1smVY) 33 | 34 | ## Copyright 35 | 36 | Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. 37 | -------------------------------------------------------------------------------- /docs/index.md: -------------------------------------------------------------------------------- 1 | # 前言 2 | 3 | ## ToolDiy的初衷 4 | 5 | 在时间的长河中,我们发现,重复繁琐的工作带给大家的只有时间和精力的消耗。的确在我们的不断思考和进步中,一个个优秀的工具出现在我们的眼前。但随之而来的是,工具种类和数量的飞速发展,我们难以根据具体需求,快速,简易地上手一款工具。相反,“百度”,“谷歌”成为了我们老生常谈的话语。 6 | 7 | 1. 在一个个链接和回答中不断尝试。有的是生涩的英文文档,有的是寥寥数语,这无疑增加了我们的使用成本。所以 ToolDiy 的初衷就是为了解决这个问题,我们想借助开源社区的环境,不断收集和提炼各行各业的工具(毕竟适合你的才是最好的)。 ToolDiy 将从客观的角度,以用户的视角出发,推荐分析各类工具,而不仅仅局限于固定的方向。 8 | 9 | 2. 很多时候我们在开发过程中会遇到很多工具的环境配置问题,我们不得不花费大量时间去思考和学习使用,很多时候这些工作本身就只能够锻炼你对配置环境的耐心,我们想让大家专注工具本身,于是我们想维护一些工具配置和构建的自动化脚本或者是docker环境方便使用者,当然我们在书写时候留下的构建脚本也可以提供给使用者学习。一个能够开箱即用的工具想想都令人兴奋,让我们一起建设他吧! 10 | 11 | 只要能够给大家带来帮助和更好的体验,这便是 ToolDiy 存在的意义。 12 | 13 | 接下来,让我们一起使用它吧! 14 | 15 | ## 贡献 16 | 17 | 本项目的初衷是提供维护一个工具说明的仓库和维基,本身就是一个降低使用门槛方便大家的项目,我们的原则是不限于任何特定的学科和领域,我们可以将所有自己认为有用的工具进行分享(注意做好入门介绍,符合项目初衷),在尊重工具生产者劳动的前提下都可以分享,因此我们不允许大家分享盗版和破解工具,在规范的前提下我们欢迎各种各样的 PR ,有任何除开上诉的疑惑都可以提出 issue 或者联系仓库管理,在涉及付费内容的工具时我们鼓励分享也希望大家做好信息公开标注他的价格,本项目不会给任何工具广告,不会有特殊位置等广告行为一切以提交时间排版。我们同样欢迎各种改善本项目阅读体验的 PR 请求(包括但不局限于添加一个换行增加阅读体验,增加项目 logo ,中英文校对等),_(:з)∠)_本项目还处于初期阶段,非常需要各位大佬的完善和纠错。 18 | 19 | 如果你有已经写好的文章想要添加到这里,你可以通过下列方式: 20 | 21 | 1. fork 本仓库,在 docs 文件夹下选择对应分类创建**中文**与**英文**版 Markdown 文档(英文版文件名以 `.en.md` 结尾),最后提出 PR 以便进行合并。 22 | 2. 联系 [SakurajimaMaii](https://github.com/SakurajimaMaii) ,将文档的**中文**和**英文**版发送至他的邮箱 Email 。 23 | 24 | 如果你不知道从何处下笔,可以首先参考[写作模板](https://cargo-youth.github.io/ToolDiy/specification/template/)。 25 | 26 | !!! Note 27 | 28 | 1. **所有上传到本网站的内容均应该符合规范。** 29 | 2. 如果你不熟悉 PR ,你可以参考[3分钟学会, 如何PR(Pull Request)代码到 Github](https://github.com/any86/Notes/issues/22)。 30 | 31 | ## 联系我们 32 | 33 | 点击链接加入群聊 [tooldiy](https://jq.qq.com/?_wv=1027&k=QCT1smVY) 34 | 35 | ## 版权声明 36 | 37 | 知识共享许可协议
本作品采用知识共享署名-相同方式共享 4.0 国际许可协议进行许可。 38 | -------------------------------------------------------------------------------- /docs/javascripts/mathjax.js: -------------------------------------------------------------------------------- 1 | window.MathJax = { 2 | tex: { 3 | inlineMath: [["\\(", "\\)"]], 4 | displayMath: [["\\[", "\\]"]], 5 | processEscapes: true, 6 | processEnvironments: true 7 | }, 8 | options: { 9 | ignoreHtmlClass: ".*|", 10 | processHtmlClass: "arithmatex" 11 | } 12 | }; 13 | 14 | document$.subscribe(() => { 15 | MathJax.typesetPromise() 16 | }) 17 | -------------------------------------------------------------------------------- /docs/large_language_model/img/v2-0e4e1e401f478835a3d093653a594751_720w.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/storage-db/ToolDiy/b83977c85695c48e1d48119b8c774c192895765f/docs/large_language_model/img/v2-0e4e1e401f478835a3d093653a594751_720w.webp -------------------------------------------------------------------------------- /docs/large_language_model/img/v2-1227b07bc19529ebed99f6af17d81566_720w.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/storage-db/ToolDiy/b83977c85695c48e1d48119b8c774c192895765f/docs/large_language_model/img/v2-1227b07bc19529ebed99f6af17d81566_720w.webp -------------------------------------------------------------------------------- /docs/large_language_model/img/v2-486e3098f940511231b353ff5ca2783c_720w.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/storage-db/ToolDiy/b83977c85695c48e1d48119b8c774c192895765f/docs/large_language_model/img/v2-486e3098f940511231b353ff5ca2783c_720w.webp -------------------------------------------------------------------------------- /docs/large_language_model/img/v2-4d614aad71b16c9588d241f07bdd72c0_720w.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/storage-db/ToolDiy/b83977c85695c48e1d48119b8c774c192895765f/docs/large_language_model/img/v2-4d614aad71b16c9588d241f07bdd72c0_720w.webp -------------------------------------------------------------------------------- /docs/large_language_model/img/v2-673e9a0cde7e3f50fe20994a5d0eec72_720w.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/storage-db/ToolDiy/b83977c85695c48e1d48119b8c774c192895765f/docs/large_language_model/img/v2-673e9a0cde7e3f50fe20994a5d0eec72_720w.webp -------------------------------------------------------------------------------- /docs/large_language_model/img/v2-8881c00c2d9940545e76e28c29794f96_720w.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/storage-db/ToolDiy/b83977c85695c48e1d48119b8c774c192895765f/docs/large_language_model/img/v2-8881c00c2d9940545e76e28c29794f96_720w.jpg -------------------------------------------------------------------------------- /docs/large_language_model/rwkv.cpp.md: -------------------------------------------------------------------------------- 1 | # rwkv.cpp: CPU 也能跑的 RNN 中文语言大模型 2 | 3 | 最近 LLM(大语言模型)实在火爆,出了不少开源模型,比如 Alpaca[^1]、ChatGLM[^2]、BELLE[^3] 等等,让每个人都有机会运行和训练专属自己的 LLM,我也迫不及待了。 4 | 5 | 但是,熟悉我的老读者朋友应该知道,虽然我是搞算法的,也发过几篇论文,但我是走的是贫穷科研的路线,一张显卡都没有。像 ChatGLM-6B 这种模型,在我的小破 Mac 上根本跑不起来。Alpaca 的 CPU 版本虽然能跑,但它中文水平实在太烂了。有没有什么模型不仅中文好,又可以不依赖显卡?RWKV[^4]进入了我的视野。 6 | 7 | RWKV 是一种纯 RNN 的架构,能够进行语言建模[^5],目前最大参数规模已经做到了 14B[^6]。目前的在线体验地址: 8 | 9 | [Raven RWKV 7B - a Hugging Face Space by BlinkDL](​huggingface.co/spaces/BlinkDL/Raven-RWKV-7B) 10 | 11 | 不过请注意,上面这个体验模型的微调语料英文占 99%,所以中文水平并不是最好的。作者 [@PENG Bo](https://www.zhihu.com/people/bopengbopeng) 最近发布的 `RWKV-4-Raven-7B-v9x-Eng49%-Chn50%-Other1%` 这个模型的中文微调语料占 50%,中文水平更好。以下我也会基于该模型进行操作。 12 | 13 | ## 下载模型 14 | 15 | 首先,RWKV 的模型分为很多种,都发布在作者的 huggingface[^7] 上: 16 | 17 | ![img](img/v2-8881c00c2d9940545e76e28c29794f96_720w.jpg) 18 | 19 | 其中: 20 | 21 | * 统一前缀 rwkv-4 表示它们都基于 RWKV 的第 4 代架构。 22 | * pile 代表基底模型,在 pile 等基础语料上进行预训练,没有进行微调,适合高玩来给自己定制。 23 | * novel 代表小说模型,在各种语言的小说上进行微调,适合写小说。 24 | * raven 代表对话模型,在各种开源的对话语料上进行微调,适合聊天、问答、写代码。 25 | * 430m、7b 这些指的是模型的参数量。 26 | 27 | 我下载的是 `RWKV-4-Raven-7B-v9x-Eng49%-Chn50%-Other1%-20230418-ctx4096.pth`[^8] , 即参数量为 7B 的对话模型,微调预料中 49% 是英文,50% 是中文。ctx4096 表示微调是的上下文长度。 28 | 29 | ![img](img/v2-1227b07bc19529ebed99f6af17d81566_720w.webp) 30 | 31 | 32 | 这个模型有 14.8 GB,请务必确保自己电脑的可用硬盘空间在 40 GB 以上(因为后面要对这个模型进行转换和量化,需要占用更多的硬盘空间。) 33 | 34 | ## 模型转换 35 | 36 | 下载好的模型配合 ChatRWKV[^9]这个仓库里的代码就可以跑了,但是它对 CPU 策略的支持最低只到 fp32i8,7B 模型需要 12 GB 内存才能跑起来,我用 16GB 内存的 Mac 试了一下,跑是跑起来了,但是非常慢。 37 | 38 | 所以,这里需要介绍一下能够更充分利用 CPU 的方法: 39 | 40 | [saharNooby/rwkv.cpp: INT4 and FP16 inference on CPU for RWKV language model (github.com)](https://github.com/saharNooby/rwkv.cpp) 41 | 42 | rwkv.cpp 可以将 RWKV 原始模型的参数转化为 float16,并量化到 int4,可以在 CPU 上更快地运行,也可以节省更多的内存。 43 | 44 | 以下是操作步骤。 45 | 46 | ### 1. 下载仓库代码 47 | 48 | 需要安装 git(没有 git 的朋友,可能你要补的前置知识有点多,我建议自行搜索) 49 | 50 | ```bash 51 | git clone --recursive https://github.com/saharNooby/rwkv.cpp.git 52 | cd rwkv.cpp 53 | ``` 54 | 55 | ### 2. 下载依赖库 or 编译依赖库 56 | 57 | rwkv.cpp 的开发者已经预编译了不同平台上的依赖库,可以在这里下载:https://github.com/saharNooby/rwkv.cpp/releases 58 | 59 | ![img](img/v2-0e4e1e401f478835a3d093653a594751_720w.webp) 60 | 61 | 下载的时候请注意操作系统类型和支持的架构。由于作者没有预编译对 Mac m1 的 ARM64 架构的依赖库,所以我选择自行编译(需要安装 cmake,并在 shell 中移动到 rwkv.cpp 路径下): 62 | 63 | ```bash 64 | cmake -DBUILD_SHARED_LIBS=ON . 65 | cmake --build . --config Release 66 | ``` 67 | 68 | ### 3. 转换模型 69 | 70 | 需要装 PyTorch 71 | 72 | 我直接把下载好的模型放在了 rwkv.cpp 的路径下,然后执行以下命令: 73 | 74 | ```bash 75 | python rwkv/convert_pytorch_to_ggml.py ./RWKV-4-Raven-7B-v9x-Eng49%-Chn50%-Other1%-20230418-ctx4096.pth ./rwkv.cpp-7B.bin float16 76 | ``` 77 | 78 | 其实就是让 python 运行 `rwkv/convert_pytorch_to_ggml.py` 这个转换模型的代码, `./RWKV-4-Raven-7B-v9x-Eng49%-Chn50%-Other1%-20230418-ctx4096.pth` 是待转换的模型的路径, `./rwkv.cpp-7B.bin` 是转换后的路径,float16 是要转换成什么类型的参数。 79 | 80 | ### 4. 量化模型 81 | 82 | 其实上面转换好的 `./rwkv.cpp-7B.bin` 已经可以用了,但是它要占用 16GB 内存。为了减少内存占用,可以将 `./rwkv.cpp-7B.bin` 量化为 int4,可以省一半内存,也就是只占 6GB 内存。只需要执行以下命令: 83 | 84 | ```bash 85 | python rwkv/quantize.py ./rwkv.cpp-7B.bin ./rwkv.cpp-7B-Q4_1_O.bin 4 86 | ``` 87 | 88 | 然后你就会得到一个大小只有 6GB 的模型了。 89 | 90 | ## 运行模型 91 | 92 | 同样,一行命令搞定: 93 | 94 | ```bash 95 | python rwkv/chat_with_bot.py ./rwkv.cpp-7B-Q4_1_0.bin 96 | ``` 97 | 98 | 让我们看看效果,首先是内存占用,不到 6GB 99 | 100 | ![img](img/v2-4d614aad71b16c9588d241f07bdd72c0_720w.webp) 101 | 102 | 103 | 然后是问答和执行命令: 104 | 105 | 1. 太阳有几只眼睛? 106 | 2. 知乎是什么网站? 107 | 3. 写一篇介绍数据分析的文章。 108 | 109 | ![img](img/v2-486e3098f940511231b353ff5ca2783c_720w.webp) 110 | 111 | 效果还不错,不过最后莫名其妙又多说了一段话,可能是量化带来的精度损失?非量化版本的效果如下: 112 | 113 | ![img](img/v2-673e9a0cde7e3f50fe20994a5d0eec72_720w.webp) 114 | 115 | 116 | 希望开发者之后能对量化版本进行测评,让 rwkv 变得更好用。 117 | 118 | 119 | 以上就是我在 Mac 上用 6GB 内存运行 7B 的中文语言模型 RWKV 的过程了,希望对读者朋友们有所帮助。 120 | 121 | 122 | 参考 123 | [^1]: https://github.com/antimatter15/alpaca.cpp 124 | [^2]: https://github.com/THUDM/ChatGLM-6B 125 | [^3]: https://github.com/LianjiaTech/BELLE 126 | [^4]: 发布几个RWKV的Chat模型(包括英文和中文)7B/14B欢迎大家玩 - PENG Bo的文章 - 知乎 https://zhuanlan.zhihu.com/p/618011122 127 | [^5]: RWKV-v2-RNN 原理:超越 Transformer,实现 O(T) 的语言建模 - PENG Bo的文章 - 知乎 https://zhuanlan.zhihu.com/p/514840332 128 | [^6]: RWKV:用RNN达到Transformer性能,且支持并行模式和长程记忆,既快又省显存,已在14B参数规模检验 - PENG Bo的文章 - 知乎 https://zhuanlan.zhihu.com/p/599150009 129 | [^7]: BlinkDL (BlinkDL) (huggingface.co) https://huggingface.co/BlinkDL 130 | [^8]: RWKV-4-Raven-7B-v9x-Eng49%-Chn50%-Other1%-20230418-ctx4096.pth https://huggingface.co/BlinkDL/rwkv-4-raven/blob/main/RWKV-4-Raven-7B-v9x-Eng49%25-Chn50%25-Other1%25-20230418-ctx4096.pth 131 | [^9]: https://github.com/BlinkDL/ChatRWKV -------------------------------------------------------------------------------- /docs/one_click_deployment/Source-changer.md: -------------------------------------------------------------------------------- 1 | # Source-changer换源工具 2 | 3 | 本文向大家介绍一款用于换源个工具帮助大家更快的更换所使用软件的源提高开发效率 4 | 5 | ## 安装 6 | 7 | > git clone https://github.com/57307407/Source-changer.git 8 | 9 | ## 介绍 10 | 11 | 目前支持 maven 、 npm 、 python(pip)换源 12 | 13 | 由于本工具使用 python 语言进行开发,使用前请先安装python环境 14 | 15 | > 下载链接:https://www.python.org/ 16 | 17 | 输入命令 18 | 19 | > python -V 20 | > 21 | > or 22 | > 23 | > python3 -V 24 | 25 | 出现python版本号即为安装完毕 26 | 27 | ![python版本](https://raw.githubusercontent.com/57307407/Source-changer/main/img/python版本.png) 28 | 29 | ## 使用 30 | 31 | > python main.py / python3 main.py 32 | 33 | > 更换maven源时需要在命令前加sudo 34 | > 35 | > 即: sudo python3 main.py 36 | 37 | ![Source-changer_主页面](https://raw.githubusercontent.com/57307407/Source-changer/main/img/Source-changer_主页面.png) 38 | 39 | 选择需换源的软件 40 | 41 | ![Source-changer_软件选择](https://raw.githubusercontent.com/57307407/Source-changer/main/img/Source-changer_软件选择.png) 42 | 43 | 选择更换的镜像 44 | 45 | ![Source-changer_镜像选择](https://raw.githubusercontent.com/57307407/Source-changer/main/img/Source-changer_镜像选择.png) 46 | -------------------------------------------------------------------------------- /docs/one_click_deployment/Windows_Setup.en.md: -------------------------------------------------------------------------------- 1 | # windows Environmental deployment 2 | 3 | This article shows you how to deploy the project in your windows environment. 4 | 5 | > Note: This requires a python environment, `python3.10` in my case. 6 | 7 | 8 | ## Download ToolDiy 9 | 10 | ``` 11 | git clone https://github.com/cargo-youth/ToolDiy.git 12 | ``` 13 | 14 | ## Install mkdocs 15 | 16 | ``` 17 | Download link:pip install mkdocs 18 | ``` 19 | 20 | ## Install site theme 21 | 22 | The theme of this site is material. Use the following command to install it. 23 | 24 | ``` 25 | pip install mkdocs-material 26 | ``` 27 | 28 | ## Install other dependencies 29 | 30 | ``` 31 | pip install pymdown-extensions 32 | pip install mkdocs-awesome-pages-plugin 33 | ``` 34 | 35 | ## Install the i18n 36 | 37 | Here is a pit, when I install, directly install `pip install i18n` is not ok, you need to specially install i18n under mkdocs, then ask chatGPT, he provided me with a solution is `pip install mkdocs-i18n-plugin` ; Unfortunately, no, finally find the following command on Google, right. 38 | 39 | ``` 40 | pip install mkdocs-static-i18n 41 | ``` 42 | 43 | ## Running Project 44 | 45 | ``` 46 | mkdocs serve 47 | ``` 48 | 49 | ## Build static website files 50 | 51 | ``` 52 | mkdocs build 53 | ``` 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | -------------------------------------------------------------------------------- /docs/one_click_deployment/Windows_Setup.md: -------------------------------------------------------------------------------- 1 | # windows环境部署 2 | 3 | 本文向大家介绍自己的windows环境如何部署该项目 4 | 5 | > 注意:这里需要用到python环境,本人是`python3.10` 6 | 7 | ## 下载 ToolDiy 8 | 9 | ``` 10 | git clone https://github.com/cargo-youth/ToolDiy.git 11 | ``` 12 | ## 安装 mkdocs 13 | 14 | ``` 15 | 下载链接:pip install mkdocs 16 | ``` 17 | ## 安装网站主题 18 | 19 | 本站主题是material,使用下面命令进行安装即可。 20 | ``` 21 | pip install mkdocs-material 22 | ``` 23 | 24 | ## 安装其它依赖 25 | 26 | ``` 27 | pip install pymdown-extensions 28 | pip install mkdocs-awesome-pages-plugin 29 | ``` 30 | 31 | ## 安装i18n 32 | 33 | 这里是个坑,我安装的时候,直接安装`pip install i18n`不行,你需要专门安装mkdocs下的i18n,然后问的chatGPT,他给我提供的解决方案是`pip install mkdocs-i18n-plugin`;可惜不对,最后在谷歌上找到下面命令,就对了。 34 | ``` 35 | pip install mkdocs-static-i18n 36 | ``` 37 | 38 | ## 运行项目 39 | 40 | ``` 41 | mkdocs serve 42 | ``` 43 | 44 | ## 构建静态网站文件 45 | 46 | ``` 47 | mkdocs build 48 | ``` 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | -------------------------------------------------------------------------------- /docs/one_click_deployment/docker_os_c.en.md: -------------------------------------------------------------------------------- 1 | # C-based operating system development environment using Docker 2 | 3 | ## Overview of the development environment 4 | 5 | - ubuntu 22.04.2 LTS 6 | - gcc 11.3.0 7 | - GNU Make 4.3 8 | - cmake 3.22.1 9 | - QEMU emulator 7.0.0 10 | - code-server 4.10.1 11 | - code-server extensions 12 | 13 | - C/C++ 1.14.4 14 | 15 | ## Quick Start 16 | 17 | Install Docker Desktop, see [Install Docker Desktop on Windows](https://docs.docker.com/desktop/install/windows-install/) 18 | 19 | Run Docker Desktop,and then open CMD or PowerShell,execute 20 | 21 | ``` 22 | docker pull jklincn/c-os 23 | ``` 24 | 25 | After the image is successfully pulled, execute 26 | 27 | ``` 28 | docker run -d --privileged -p 58888:8080 jklincn/c-os 29 | ``` 30 | 31 | Now, you can open [http://localhost:58888](http://localhost:58888) in the browser. Development environment is ready. 32 | 33 | You can control the containers by the Docker Desktop graphical interface. 34 | 35 | >The host mapping port 58888 can be changed at will. Service port 8080 can be changed by modifying Dockerfile. 36 | 37 | ## Dockerfile 38 | 39 | Here is the Dockerfile, for others who need demand for reference and modification. 40 | 41 | ```dockerfile 42 | FROM ubuntu:22.04 43 | SHELL ["/bin/bash", "-c"] 44 | 45 | RUN sed -i 's/archive.ubuntu.com/mirrors.ustc.edu.cn/g' /etc/apt/sources.list && \ 46 | apt-get update && apt-get install -y \ 47 | gcc-riscv64-unknown-elf gdb-multiarch dosfstools cmake \ 48 | git wget python3 vim file curl \ 49 | autoconf automake autotools-dev libmpc-dev libmpfr-dev libgmp-dev \ 50 | gawk build-essential bison flex texinfo gperf libtool patchutils bc \ 51 | zlib1g-dev libexpat-dev \ 52 | ninja-build pkg-config libglib2.0-dev libpixman-1-dev libsdl2-dev \ 53 | && rm -rf /var/lib/apt/lists/* 54 | 55 | ARG QEMU_VERSION=7.0.0 56 | RUN cd /tmp && \ 57 | wget https://download.qemu.org/qemu-${QEMU_VERSION}.tar.xz && \ 58 | tar xf qemu-${QEMU_VERSION}.tar.xz && \ 59 | cd qemu-${QEMU_VERSION} && \ 60 | ./configure --target-list=riscv64-softmmu,riscv64-linux-user && \ 61 | make -j && \ 62 | make install && \ 63 | cd .. && \ 64 | rm -rf qemu-${QEMU_VERSION} qemu-${QEMU_VERSION}.tar.xz 65 | 66 | ARG CODE_VERSION=4.10.1 67 | RUN cd /usr/local/ && \ 68 | wget https://github.com/coder/code-server/releases/download/v${CODE_VERSION}/code-server-${CODE_VERSION}-linux-amd64.tar.gz && \ 69 | tar xf code-server-${CODE_VERSION}-linux-amd64.tar.gz && \ 70 | ln -s /usr/local/code-server-${CODE_VERSION}-linux-amd64/bin/code-server /usr/bin/code && \ 71 | rm code-server-${CODE_VERSION}-linux-amd64.tar.gz && \ 72 | wget https://github.com/microsoft/vscode-cpptools/releases/download/v1.14.4/cpptools-linux.vsix && \ 73 | code --install-extension cpptools-linux.vsix && \ 74 | rm cpptools-linux.vsix && \ 75 | wget https://open-vsx.org/api/MS-CEINTL/vscode-language-pack-zh-hans/1.75.0/file/MS-CEINTL.vscode-language-pack-zh-hans-1.75.0.vsix && \ 76 | code --install-extension MS-CEINTL.vscode-language-pack-zh-hans-1.75.0.vsix && \ 77 | rm MS-CEINTL.vscode-language-pack-zh-hans-1.75.0.vsix 78 | 79 | EXPOSE 8080/tcp 80 | CMD ["code", "--auth", "none", "--bind-addr", "0.0.0.0:8080"] 81 | ``` 82 | -------------------------------------------------------------------------------- /docs/one_click_deployment/docker_os_c.md: -------------------------------------------------------------------------------- 1 | # Docker 搭建 C 语言操作系统开发环境 2 | 3 | ## 预设开发环境简述 4 | 5 | - ubuntu 22.04.2 LTS 6 | - gcc 11.3.0 7 | - GNU Make 4.3 8 | - cmake 3.22.1 9 | - QEMU emulator 7.0.0 10 | - code-server 4.10.1 11 | - code-server extensions 12 | 13 | - C/C++ 1.14.4 14 | - Chinese (Simplified) Language Pack 1.75.0 15 | 16 | ## 快速开始 17 | 18 | 安装 Docker Desktop,参见 [Install Docker Desktop on Windows](https://docs.docker.com/desktop/install/windows-install/)。 19 | 20 | 运行 Docker Desktop,再打开 CMD 或者 PowerShell,执行 21 | 22 | ``` 23 | docker pull jklincn/c-os 24 | ``` 25 | 26 | 镜像成功拉取后,执行 27 | 28 | ``` 29 | docker run -d --privileged -p 58888:8080 jklincn/c-os 30 | ``` 31 | 32 | 这时使用浏览器打开 [http://localhost:58888](http://localhost:58888) 即可启动开发环境。 33 | 34 | 后续可以在 Docker Desktop 界面的 Containers 中控制已创建容器的暂停与开启。 35 | 36 | >1. 主机映射端口 58888 可随意更换。服务端口 8080 可以通过修改 Dockerfile 更换。 37 | 38 | >2. 如果镜像拉取缓慢,可以点击 Docker Desktop 界面右上角齿轮打开设置,在 Docker Engine 配置文件中添加国内源,再点击 `Apply & restart` 重启 Docker,再次尝试拉取。 39 | > 40 | ``` 41 | "registry-mirrors": [ 42 | "http://hub-mirror.c.163.com", 43 | "https://docker.mirrors.ustc.edu.cn" 44 | ] 45 | ``` 46 | 47 | ## Dockerfile 48 | 49 | 此处给出镜像的构建脚本,供有需求的同学参考与修改 50 | 51 | ```dockerfile 52 | FROM ubuntu:22.04 53 | SHELL ["/bin/bash", "-c"] 54 | 55 | # 安装必要依赖与开发工具 56 | RUN sed -i 's/archive.ubuntu.com/mirrors.ustc.edu.cn/g' /etc/apt/sources.list && \ 57 | apt-get update && apt-get install -y \ 58 | gcc-riscv64-unknown-elf gdb-multiarch dosfstools cmake \ 59 | git wget python3 vim file curl \ 60 | autoconf automake autotools-dev libmpc-dev libmpfr-dev libgmp-dev \ 61 | gawk build-essential bison flex texinfo gperf libtool patchutils bc \ 62 | zlib1g-dev libexpat-dev \ 63 | ninja-build pkg-config libglib2.0-dev libpixman-1-dev libsdl2-dev \ 64 | && rm -rf /var/lib/apt/lists/* 65 | 66 | # 安装 QEMU 67 | ARG QEMU_VERSION=7.0.0 68 | RUN cd /tmp && \ 69 | wget https://download.qemu.org/qemu-${QEMU_VERSION}.tar.xz && \ 70 | tar xf qemu-${QEMU_VERSION}.tar.xz && \ 71 | cd qemu-${QEMU_VERSION} && \ 72 | ./configure --target-list=riscv64-softmmu,riscv64-linux-user && \ 73 | make -j && \ 74 | make install && \ 75 | cd .. && \ 76 | rm -rf qemu-${QEMU_VERSION} qemu-${QEMU_VERSION}.tar.xz 77 | 78 | # 安装 code-server 和扩展 79 | ARG CODE_VERSION=4.10.1 80 | RUN cd /usr/local/ && \ 81 | wget https://github.com/coder/code-server/releases/download/v${CODE_VERSION}/code-server-${CODE_VERSION}-linux-amd64.tar.gz && \ 82 | tar xf code-server-${CODE_VERSION}-linux-amd64.tar.gz && \ 83 | ln -s /usr/local/code-server-${CODE_VERSION}-linux-amd64/bin/code-server /usr/bin/code && \ 84 | rm code-server-${CODE_VERSION}-linux-amd64.tar.gz && \ 85 | wget https://github.com/microsoft/vscode-cpptools/releases/download/v1.14.4/cpptools-linux.vsix && \ 86 | code --install-extension cpptools-linux.vsix && \ 87 | rm cpptools-linux.vsix && \ 88 | wget https://open-vsx.org/api/MS-CEINTL/vscode-language-pack-zh-hans/1.75.0/file/MS-CEINTL.vscode-language-pack-zh-hans-1.75.0.vsix && \ 89 | code --install-extension MS-CEINTL.vscode-language-pack-zh-hans-1.75.0.vsix && \ 90 | rm MS-CEINTL.vscode-language-pack-zh-hans-1.75.0.vsix 91 | 92 | EXPOSE 8080/tcp 93 | CMD ["code", "--auth", "none", "--bind-addr", "0.0.0.0:8080"] 94 | ``` 95 | -------------------------------------------------------------------------------- /docs/one_click_deployment/docker_os_rust.en.md: -------------------------------------------------------------------------------- 1 | # C-based operating system development environment using Docker 2 | 3 | ## Overview of the development environment 4 | 5 | - ubuntu 22.04.2 LTS 6 | - GNU Make 4.3 7 | - QEMU emulator 7.0.0 8 | - rustc nightly-latest 9 | - rustup latest 10 | - cargo nightly-latest 11 | - code-server 4.10.1 12 | - code-server extensions 13 | 14 | - rust-analyzer 0.3.1435 15 | 16 | ## Quick Start 17 | 18 | Install Docker Desktop, see [Install Docker Desktop on Windows](https://docs.docker.com/desktop/install/windows-install/) 19 | 20 | Run Docker Desktop,and then open CMD or PowerShell,execute 21 | 22 | ``` 23 | docker pull jklincn/rust-os 24 | ``` 25 | 26 | After the image is successfully pulled, execute 27 | 28 | ``` 29 | docker run -d --privileged -p 58888:8080 jklincn/rust-os 30 | ``` 31 | 32 | Now, you can open [http://localhost:58888](http://localhost:58888) in the browser. Development environment is ready. 33 | 34 | You can control the containers by the Docker Desktop graphical interface. 35 | 36 | >The host mapping port 58888 can be changed at will. Service port 8080 can be changed by modifying Dockerfile. 37 | 38 | ## Dockerfile 39 | 40 | Here is the Dockerfile, for others who need demand for reference and modification. 41 | 42 | ```dockerfile 43 | FROM ubuntu:22.04 44 | SHELL ["/bin/bash", "-c"] 45 | 46 | RUN sed -i 's/archive.ubuntu.com/mirrors.ustc.edu.cn/g' /etc/apt/sources.list && \ 47 | apt-get update && apt-get install -y \ 48 | gcc-riscv64-unknown-elf gdb-multiarch dosfstools cmake \ 49 | git wget python3 vim file curl \ 50 | autoconf automake autotools-dev libmpc-dev libmpfr-dev libgmp-dev \ 51 | gawk build-essential bison flex texinfo gperf libtool patchutils bc \ 52 | zlib1g-dev libexpat-dev \ 53 | ninja-build pkg-config libglib2.0-dev libpixman-1-dev libsdl2-dev \ 54 | && rm -rf /var/lib/apt/lists/* 55 | 56 | ARG QEMU_VERSION=7.0.0 57 | RUN cd /tmp && \ 58 | wget https://download.qemu.org/qemu-${QEMU_VERSION}.tar.xz && \ 59 | tar xf qemu-${QEMU_VERSION}.tar.xz && \ 60 | cd qemu-${QEMU_VERSION} && \ 61 | ./configure --target-list=riscv64-softmmu,riscv64-linux-user && \ 62 | make -j && \ 63 | make install && \ 64 | cd .. && \ 65 | rm -rf qemu-${QEMU_VERSION} qemu-${QEMU_VERSION}.tar.xz 66 | 67 | ARG CODE_VERSION=4.10.1 68 | RUN cd /usr/local/ && \ 69 | wget https://github.com/coder/code-server/releases/download/v${CODE_VERSION}/code-server-${CODE_VERSION}-linux-amd64.tar.gz && \ 70 | tar xf code-server-${CODE_VERSION}-linux-amd64.tar.gz && \ 71 | ln -s /usr/local/code-server-${CODE_VERSION}-linux-amd64/bin/code-server /usr/bin/code && \ 72 | rm code-server-${CODE_VERSION}-linux-amd64.tar.gz && \ 73 | wget https://openvsxorg.blob.core.windows.net/resources/rust-lang/rust-analyzer/linux-x64/0.3.1435/rust-lang.rust-analyzer-0.3.1435@linux-x64.vsix && \ 74 | code --install-extension rust-lang.rust-analyzer-0.3.1435@linux-x64.vsix && \ 75 | rm rust-lang.rust-analyzer-0.3.1435@linux-x64.vsix && \ 76 | wget https://open-vsx.org/api/MS-CEINTL/vscode-language-pack-zh-hans/1.75.0/file/MS-CEINTL.vscode-language-pack-zh-hans-1.75.0.vsix && \ 77 | code --install-extension MS-CEINTL.vscode-language-pack-zh-hans-1.75.0.vsix && \ 78 | rm MS-CEINTL.vscode-language-pack-zh-hans-1.75.0.vsix 79 | 80 | WORKDIR /root 81 | ARG RUST_VERSION=nightly 82 | ENV RUSTUP_DIST_SERVER=https://mirrors.ustc.edu.cn/rust-static 83 | ENV RUSTUP_UPDATE_ROOT=https://mirrors.ustc.edu.cn/rust-static/rustup 84 | RUN mkdir .cargo && \ 85 | echo '[source.crates-io]' >> .cargo/config && \ 86 | echo 'registry = "https://github.com/rust-lang/crates.io-index"' >> .cargo/config && \ 87 | echo 'replace-with = "ustc"' >> .cargo/config && \ 88 | echo '[source.ustc]' >> .cargo/config && \ 89 | echo 'registry = "git://mirrors.ustc.edu.cn/crates.io-index"' >> .cargo/config && \ 90 | curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs -o rustup-init && \ 91 | chmod +x rustup-init && \ 92 | ./rustup-init -y --default-toolchain ${RUST_VERSION} --target riscv64imac-unknown-none-elf && \ 93 | rm rustup-init && \ 94 | source $HOME/.cargo/env && \ 95 | cargo install cargo-binutils && \ 96 | rustup component add llvm-tools-preview && \ 97 | rustup component add rust-src 98 | 99 | EXPOSE 8080/tcp 100 | CMD ["code", "--auth", "none", "--bind-addr", "0.0.0.0:8080"] 101 | ``` -------------------------------------------------------------------------------- /docs/one_click_deployment/docker_os_rust.md: -------------------------------------------------------------------------------- 1 | # Docker 搭建 Rust 语言操作系统开发环境 2 | 3 | ## 预设开发环境简述 4 | 5 | - ubuntu 22.04.2 LTS 6 | - GNU Make 4.3 7 | - QEMU emulator 7.0.0 8 | - rustc nightly-latest 9 | - rustup latest 10 | - cargo nightly-latest 11 | - code-server 4.10.1 12 | - code-server extensions 13 | 14 | - rust-analyzer 0.3.1435 15 | - Chinese (Simplified) Language Pack 1.75.0 16 | 17 | ## 快速开始 18 | 19 | 安装 Docker Desktop,参见 [Install Docker Desktop on Windows](https://docs.docker.com/desktop/install/windows-install/)。 20 | 21 | 运行 Docker Desktop,再打开 CMD 或者 PowerShell,执行 22 | 23 | ``` 24 | docker pull jklincn/rust-os 25 | ``` 26 | 27 | 镜像成功拉取后,执行 28 | 29 | ``` 30 | docker run -d --privileged -p 58888:8080 jklincn/rust-os 31 | ``` 32 | 33 | 这时使用浏览器打开 [http://localhost:58888](http://localhost:58888) 即可启动开发环境。 34 | 35 | 后续可以在 Docker Desktop 界面的 Containers 中控制已创建容器的暂停与开启。 36 | 37 | >1. 主机映射端口 58888 可随意更换。服务端口 8080 可以通过修改 Dockerfile 更换 38 | 39 | >2. 如果镜像拉取缓慢,可以点击 Docker Desktop 界面右上角齿轮打开设置,在 Docker Engine 配置文件中添加国内源,再点击 `Apply & restart` 重启 Docker,再次尝试拉取。 40 | > 41 | ``` 42 | "registry-mirrors": [ 43 | "http://hub-mirror.c.163.com", 44 | "https://docker.mirrors.ustc.edu.cn" 45 | ] 46 | ``` 47 | 48 | ## Dockerfile 49 | 50 | 此处给出镜像的构建脚本,供有需求的同学参考与修改 51 | 52 | ```dockerfile 53 | FROM ubuntu:22.04 54 | SHELL ["/bin/bash", "-c"] 55 | 56 | # 安装必要依赖与开发工具 57 | RUN sed -i 's/archive.ubuntu.com/mirrors.ustc.edu.cn/g' /etc/apt/sources.list && \ 58 | apt-get update && apt-get install -y \ 59 | gcc-riscv64-unknown-elf gdb-multiarch dosfstools cmake \ 60 | git wget python3 vim file curl \ 61 | autoconf automake autotools-dev libmpc-dev libmpfr-dev libgmp-dev \ 62 | gawk build-essential bison flex texinfo gperf libtool patchutils bc \ 63 | zlib1g-dev libexpat-dev \ 64 | ninja-build pkg-config libglib2.0-dev libpixman-1-dev libsdl2-dev \ 65 | && rm -rf /var/lib/apt/lists/* 66 | 67 | # 安装 QEMU 68 | ARG QEMU_VERSION=7.0.0 69 | RUN cd /tmp && \ 70 | wget https://download.qemu.org/qemu-${QEMU_VERSION}.tar.xz && \ 71 | tar xf qemu-${QEMU_VERSION}.tar.xz && \ 72 | cd qemu-${QEMU_VERSION} && \ 73 | ./configure --target-list=riscv64-softmmu,riscv64-linux-user && \ 74 | make -j && \ 75 | make install && \ 76 | cd .. && \ 77 | rm -rf qemu-${QEMU_VERSION} qemu-${QEMU_VERSION}.tar.xz 78 | 79 | # 安装 code-server 和扩展 80 | ARG CODE_VERSION=4.10.1 81 | RUN cd /usr/local/ && \ 82 | wget https://github.com/coder/code-server/releases/download/v${CODE_VERSION}/code-server-${CODE_VERSION}-linux-amd64.tar.gz && \ 83 | tar xf code-server-${CODE_VERSION}-linux-amd64.tar.gz && \ 84 | ln -s /usr/local/code-server-${CODE_VERSION}-linux-amd64/bin/code-server /usr/bin/code && \ 85 | rm code-server-${CODE_VERSION}-linux-amd64.tar.gz && \ 86 | wget https://openvsxorg.blob.core.windows.net/resources/rust-lang/rust-analyzer/linux-x64/0.3.1435/rust-lang.rust-analyzer-0.3.1435@linux-x64.vsix && \ 87 | code --install-extension rust-lang.rust-analyzer-0.3.1435@linux-x64.vsix && \ 88 | rm rust-lang.rust-analyzer-0.3.1435@linux-x64.vsix && \ 89 | wget https://open-vsx.org/api/MS-CEINTL/vscode-language-pack-zh-hans/1.75.0/file/MS-CEINTL.vscode-language-pack-zh-hans-1.75.0.vsix && \ 90 | code --install-extension MS-CEINTL.vscode-language-pack-zh-hans-1.75.0.vsix && \ 91 | rm MS-CEINTL.vscode-language-pack-zh-hans-1.75.0.vsix 92 | 93 | WORKDIR /root 94 | # 安装 rust 95 | ARG RUST_VERSION=nightly 96 | ENV RUSTUP_DIST_SERVER=https://mirrors.ustc.edu.cn/rust-static 97 | ENV RUSTUP_UPDATE_ROOT=https://mirrors.ustc.edu.cn/rust-static/rustup 98 | RUN mkdir .cargo && \ 99 | echo '[source.crates-io]' >> .cargo/config && \ 100 | echo 'registry = "https://github.com/rust-lang/crates.io-index"' >> .cargo/config && \ 101 | echo 'replace-with = "ustc"' >> .cargo/config && \ 102 | echo '[source.ustc]' >> .cargo/config && \ 103 | echo 'registry = "git://mirrors.ustc.edu.cn/crates.io-index"' >> .cargo/config && \ 104 | curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs -o rustup-init && \ 105 | chmod +x rustup-init && \ 106 | ./rustup-init -y --default-toolchain ${RUST_VERSION} --target riscv64imac-unknown-none-elf && \ 107 | rm rustup-init && \ 108 | source $HOME/.cargo/env && \ 109 | cargo install cargo-binutils && \ 110 | rustup component add llvm-tools-preview && \ 111 | rustup component add rust-src 112 | 113 | EXPOSE 8080/tcp 114 | CMD ["code", "--auth", "none", "--bind-addr", "0.0.0.0:8080"] 115 | ``` 116 | -------------------------------------------------------------------------------- /docs/one_click_deployment/img/Source-changer_主页面.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/storage-db/ToolDiy/b83977c85695c48e1d48119b8c774c192895765f/docs/one_click_deployment/img/Source-changer_主页面.png -------------------------------------------------------------------------------- /docs/one_click_deployment/img/Source-changer_软件选择.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/storage-db/ToolDiy/b83977c85695c48e1d48119b8c774c192895765f/docs/one_click_deployment/img/Source-changer_软件选择.png -------------------------------------------------------------------------------- /docs/one_click_deployment/img/Source-changer_镜像选择.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/storage-db/ToolDiy/b83977c85695c48e1d48119b8c774c192895765f/docs/one_click_deployment/img/Source-changer_镜像选择.png -------------------------------------------------------------------------------- /docs/one_click_deployment/img/python版本.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/storage-db/ToolDiy/b83977c85695c48e1d48119b8c774c192895765f/docs/one_click_deployment/img/python版本.png -------------------------------------------------------------------------------- /docs/one_click_deployment/os.en.md: -------------------------------------------------------------------------------- 1 | # os Introduction to development environment and tools 2 | 3 | ```sh 4 | # (ubuntu) install package 5 | sudo apt install autoconf automake autotools-dev curl libmpc-dev libmpfr-dev libgmp-dev \ 6 | gawk build-essential bison flex texinfo gperf libtool patchutils bc \ 7 | zlib1g-dev libexpat-dev pkg-config libglib2.0-dev libpixman-1-dev libsdl2-dev \ 8 | git tmux python3 python3-pip ninja-build 9 | # install QEMU 10 | mkdir dev 11 | pushd dev 12 | wget https://download.qemu.org/qemu-7.0.0.tar.xz 13 | tar -xf qemu-7.0.0.tar.xz 14 | cd qemu-7.0.0 15 | ./configure --target-list=x86_64-softmmu,aarch64-softmmu,riscv64-softmmu --enable-debug 16 | make -j$(nproc) 17 | make install 18 | popd 19 | # Configure environment variables 20 | vi ~/.bashrc 21 | export PATH=$PATH:/path/to/qemu-7.0.0/build 22 | # Update the system path after configuration 23 | source ~/.bashrc 24 | # test qemu 25 | qemu-system-riscv64 --version 26 | # install rust 27 | curl https://sh.rustup.rs -sSf | sh 28 | # Update the system path after configuration 29 | source $HOME/.cargo/env 30 | # test rust 31 | rustc --version 32 | # rust related package installation 33 | rustup target add riscv64gc-unknown-none-elf 34 | cargo install cargo-binutils 35 | rustup component add llvm-tools-preview 36 | rustup component add rust-src 37 | ``` 38 | 39 | ## Common problems and solutions 40 | 41 | ```sh 42 | # (centos) install package 43 | sudo yum install autoconf automake libmpc-devel mpfr-devel gmp-devel gawk bison flex \ 44 | texinfo patchutils gcc gcc-c++ zlib-devel expat-devel git 45 | # gcc version is too low 46 | yum install centos-release-scl 47 | scl enable devtoolset-8 bash 48 | # test gcc 49 | gcc -v 50 | ``` 51 | 52 | ## Configure rust download mirror 53 | 54 | ```sh 55 | vi ~/.cargo/config 56 | [source.crates-io] 57 | registry = "https://github.com/rust-lang/crates.io-index" 58 | replace-with = 'ustc' 59 | [source.ustc] 60 | registry = "git://mirrors.ustc.edu.cn/crates.io-index" 61 | ``` 62 | -------------------------------------------------------------------------------- /docs/one_click_deployment/os.md: -------------------------------------------------------------------------------- 1 | # os开发环境和工具介绍 2 | 3 | ```sh 4 | # (ubuntu) 安装QEMU7.0依赖包 5 | sudo apt install autoconf automake autotools-dev curl libmpc-dev libmpfr-dev libgmp-dev \ 6 | gawk build-essential bison flex texinfo gperf libtool patchutils bc \ 7 | zlib1g-dev libexpat-dev pkg-config libglib2.0-dev libpixman-1-dev libsdl2-dev \ 8 | git tmux python3 python3-pip ninja-build 9 | # 在开发目录执行安装 10 | mkdir dev 11 | pushd dev 12 | wget https://download.qemu.org/qemu-7.0.0.tar.xz 13 | tar -xf qemu-7.0.0.tar.xz 14 | cd qemu-7.0.0 15 | ./configure --target-list=x86_64-softmmu,aarch64-softmmu,riscv64-softmmu --enable-debug 16 | make -j$(nproc) 17 | make install 18 | popd 19 | # 配置环境变量 20 | vi ~/.bashrc 21 | export PATH=$PATH:/path/to/qemu-7.0.0/build 22 | # 配置后更新系统路径 23 | source ~/.bashrc 24 | # 检测qemu版本(以riscv64 为例上诉配置已将x86_64 aarch64 riscv64安装好均可以检测版本) 25 | qemu-system-riscv64 --version 26 | # 配置rust环境 27 | curl https://sh.rustup.rs -sSf | sh 28 | # 配置环境变量 29 | source $HOME/.cargo/env 30 | # 检测版本 31 | rustc --version 32 | # rust相关软件包安装 33 | rustup target add riscv64gc-unknown-none-elf 34 | cargo install cargo-binutils 35 | rustup component add llvm-tools-preview 36 | rustup component add rust-src 37 | ``` 38 | 39 | ## 常见问题及解决办法 40 | 41 | ```sh 42 | # centos 依赖安装 43 | sudo yum install autoconf automake libmpc-devel mpfr-devel gmp-devel gawk bison flex \ 44 | texinfo patchutils gcc gcc-c++ zlib-devel expat-devel git 45 | # gcc版本过低导致的qemu编译失败(也可以直接官网更高版本安装) 46 | yum install centos-release-scl 47 | scl enable devtoolset-8 bash 48 | # 查看gcc版本 49 | gcc -v 50 | ``` 51 | 52 | ## 配置rust下载镜像 53 | 54 | ```sh 55 | vi ~/.cargo/config 56 | [source.crates-io] 57 | registry = "https://github.com/rust-lang/crates.io-index" 58 | replace-with = 'ustc' 59 | [source.ustc] 60 | registry = "git://mirrors.ustc.edu.cn/crates.io-index" 61 | ``` 62 | -------------------------------------------------------------------------------- /docs/package_manager/APT(DEB)包管理工具.md: -------------------------------------------------------------------------------- 1 | # APT(DEB)包管理工具 2 | 3 | ```bash 4 | apt list --installed 5 | apt list --all-versions :列出指定软件包的所有版本。 6 | apt list --upgradable | grep :列出包含搜索词的可更新软件包。 7 | apt list --verbose:显示更详细的输出信息。 8 | 9 | apt edit-sources 10 | 11 | sudo apt build-dep package #安装相关的编译环境,这真是个神技能,有了它,编译安装都变得索然无味了 12 | sudo apt --purge autoremove 13 | apt-get clean && sudo apt-get autoclean #清理无用的包 14 | 15 | aptitude 16 | apt-add-repository [options] repository #修改软件源命令 (software-properties-common) 17 | ``` 18 | 19 | 20 | ```bash 21 | apt search package #搜索包 22 | apt show package #获取包的相关信息,如说明、大小、版本等 23 | apt depends package #了解使用依赖 24 | apt rdepends package #查看该包被哪些包依赖 25 | apt-cache pkgnames #执行pkgnames子命令列出当前所有可用的软件包 26 | apt policy package #使用policy命令显示软件包的安装状态和版本信息。 27 | 28 | sudo apt install package #安装包 29 | sudo apt install package=version #安装指定版本的包 30 | sudo apt install package --reinstall #重新安装包 31 | sudo apt -f install #修复安装, "-f = --fix-missing" 32 | sudo apt remove package #删除包 33 | sudo apt purge package #删除包,包括删除配置文件等 34 | sudo apt autoremove #自动卸载所有未使用的软件包 35 | 36 | sudo apt source package #下载该包的源代码 37 | sudo apt update #更新apt软件源信息 38 | sudo apt upgrade #更新已安装的包 39 | sudo apt dist-upgrade #升级系统 40 | sudo apt dselect-upgrade #使用dselect升级 41 | sudo apt build-dep package #安装相关的编译环境 42 | sudo apt clean && sudo apt autoclean #清理无用的包 43 | sudo apt clean #清理已下载的软件包,实际上是清楚/var/cache/apt/archives目录中的软件包 44 | sudo apt autoclean #删除已经卸载的软件包备份 45 | sudo apt-get check #检查是否有损坏的依赖 46 | ``` 47 | 48 | 49 | ```bash 50 | 51 | sudo dpkg -i #安装包 52 | sudo dpkg -r   #删除包 53 | sudo dpkg -p   #彻底删除包(包括配置文件) 54 | dpkg -l #列出当前已安装的包 55 | 56 | ``` 57 | -------------------------------------------------------------------------------- /docs/package_manager/AppImage(Linux).md: -------------------------------------------------------------------------------- 1 | # AppImage(Linux) 2 | 3 | 1. AppImage Pool :一个帮助你寻找和管理 AppImage 的应用商店 | Linux 中国 4 | 2. appimage-installer :这个工具能在十几秒内快速的将一个 AppImage 文件部署到开始菜单,并且设置好图标和名称。 5 | 3. AppImageLauncher :可以自动将 AppImage 程序快捷方式添加到桌面环境的程序启动器/菜单(包括程序图标和合适的说明)中。 6 | 4. Appimage-installer 工具, AUR 包的问题, https://gitee.com/deepin-opensource/appimage-installer/issues/I421HL 7 | 5. AppImage 安装器,深度科技社区 Maicss 分享:深度科技社区 Maicss 分享: ttps://bbs.deepin.org/zh/post/220754 8 | 6. AppImage 官网: AppImage 官网: https://appimage.org/ 9 | -------------------------------------------------------------------------------- /docs/package_manager/Chocolatey(Win).md: -------------------------------------------------------------------------------- 1 | # Chocolatey(WIN) 2 | 3 | >本文介绍了 Chocolatey 的安装与使用过程。这篇文章不是为普通用户编写的,而是给需要统一开发环境的开发人员写的 4 | > 5 | >为什么要用 Chocolatey 6 | > 7 | >如果使用过 Linux 一定熟悉一行代码进行软件的搜索,安装,更新,卸载等所有操作。而 Windows 中的也有包管理器 Chocolatey 。虽然没有 Linux 里的包管理器那么强大,但让 Windows 安装软件方便了很多。 8 | 9 | ## Chocolatey 的安装 10 | - 方法一:以管理员身份打开 cmd.exe (很重要),执行以下代码 11 | ```cmd 12 | @"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin" 13 | ``` 14 | 15 | - 方法二:以管理员身份打开 powershell.exe ,执行以下代码 16 | 17 | ```powershell 18 | Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) 19 | ``` 20 | 21 | - 方法三:直接打开 https://chocolatey.org/install.ps1 ,复制内容到本地新建 install.psl 文件,执行安装。 22 | 23 | 在有的时候,因为电脑安装防火墙的原因,可能会导致前两个方法出现问题,但是方法三不存在此问题,最好用 powershell.exe 来执行 install.psl 脚本,可以看到安装的完整过程。 24 | 25 | 26 | ## Chocolatey 的使用 27 | Chocolatey 运行需要的环境: 28 | - Windows 7+ / Windows Server 2003+ 29 | - PowerShell v2+ 30 | - .NET Framework 4+ (不用安装,安装脚本时会自动安装) 31 | 32 | 33 | ### 安装软件 34 | 35 | ```powershell 36 | choco install -y git 37 | choco install -y python 38 | choco install -y chromium 39 | cinst -y nodejs.install 40 | ... 41 | ``` 42 | 43 | choco 和 cinst 都是安装命令, -y 避免对协议的二次确认,可以在官网 https://chocolatey.org/packages 查找确认自己要安装的包。 44 | 45 | ### 查找软件 46 | 47 | 1. choco search cntlm 搜索软件是否存在,包名是什么。 48 | 2. choco info cntlm 查看软件详细信息。 49 | 50 | ### 升级软件 51 | 52 | `choco upgrade git` 53 | 54 | ### 卸载软件 55 | 56 | `choco uninstall git` 57 | 58 | 59 | ### 配置统一环境 60 | 61 | ```xml 62 | choco install dev-package.config 63 | dev-package.config: 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | ``` 72 | 73 | 文件名称随意,但是扩展名必须是 .config 。通过 .config 的方式,就可以配置一个团队统一的开发环境,软件和版本都可以统一。这样可以为开发带来很多好处,避免由于开发环境不一样引起的各种不同错误。 74 | 通过传统方式安装软件,如果配置了环境变量,例如 JAVA_HOME , PATH 等等,都需要重启命令行工具,甚至要等一会才能生效。 Chocolatey 提供了一个 refreshenv 命令,可以快速生效环境变量。 75 | 76 | ### 更改本地仓库 77 | 78 | - 方法一: cmd.exe 管理员模式下执行以下指令 79 | setx ChocolateyInstall D:\Chocolatey /M 80 | - 方法二: powershell.exe 管理员模式下执行以下指令 81 | & setx.exe ChocolateyInstall D:\Chocolatey /M 82 | 设定成功提示: 83 | 成功: 已经存储指定的值 84 | 85 | ## 卸载Chocolatey 86 | 87 | 卸载 Chocolatey 只需要删除它安装的文件夹,并删除对应的环境变量即可。对于使用 Chocolatey 安装的其它软件,如果也需要卸载的话,需要先手动卸载。 88 | 89 | 1. 删除环境变量 ChocolateyInstall 对应的安装文件夹,默认是 C:\ProgramData\chocolatey 90 | 2. 删除环境变量 ChocolateyInstall 91 | 3. 删除环境变量 ChocolateyToolsLocation ,部分工具软件安装的位置,删除需谨慎 92 | 4. 删除环境变量 ChocolateyLastPathUpdate 93 | 5. 更新环境变量 PATH ,去掉 Chocolatey 相关的配置 94 | 95 | 96 | 97 | ## 总结 98 | 99 | Chocolatey 更注重的是整个团队的软件配置统一,统一用某一个软件,统一用某一个版本,统一安装配置(包括安装路径)。在实际开发中,太多次因为安装路径引起问题,例如路径里有空格或中文等等。最好就用默认安装路径。 100 | -------------------------------------------------------------------------------- /docs/package_manager/DNF(RPM)包管理工具.md: -------------------------------------------------------------------------------- 1 | # DNF(RPM)包管理工具 2 | 3 | 4 | 5 | 由于 Yum 中许多长期存在的问题仍未得到解决,因此 Yum 包管理器已被 DNF 包管理器取代。这些问题包括性能差、内存占用过多、依赖解析速度变慢等。 6 | 7 | 8 | DNF 是一款 Linux 软件包管理工具,用于管理 RPM 软件包。 DNF 可以查询软件包信息,从指定软件库获取软件包,自动处理依赖关系以安装或卸载软件包,以及更新系统到最新可用版本。 9 | 10 | 11 | - DNF 与 YUM 完全兼容,提供了 YUM 兼容的命令行以及为扩展和插件提供的API。 12 | - 使用 DNF 需要管理员权限,本章所有命令需要在管理员权限下执行。 13 | 14 | [使用 Dnf 管理软件包 (openeuler.org)](https://docs.openeuler.org/zh/docs/20.03_LTS/docs/Administration/%E4%BD%BF%E7%94%A8DNF%E7%AE%A1%E7%90%86%E8%BD%AF%E4%BB%B6%E5%8C%85.html) 15 | -------------------------------------------------------------------------------- /docs/package_manager/Homebrew(Linux&Mac).md: -------------------------------------------------------------------------------- 1 | # Homebrew(Linux&Mac) 2 | 3 | 4 | 5 | Linuxbrew(Mac OS 的 Homebrew 分支,支持mac和linux,用法完全相同) 6 | 7 | 详情页: https://ostechnix.com/linuxbrew-common-package-manager-linux-mac-os-x/ 8 | 9 | 搜索可用的软件包: https://sitemap.filecroco.com/a/1.html 10 | 11 | [在 Linux 上安装和使用 Homebrew 包管理器 | Linux 中国 - 知乎 (zhihu.com)](https://zhuanlan.zhihu.com/p/443011573) -------------------------------------------------------------------------------- /docs/package_manager/Nix(声明式)包管理工具.md: -------------------------------------------------------------------------------- 1 | # Nix(声明式)包管理工具 2 | 3 | [Nix:可重现的构建和部署 (nixos.org)](https://nixos.org/) 4 | 5 | -------------------------------------------------------------------------------- /docs/package_manager/Scoop(Win).md: -------------------------------------------------------------------------------- 1 | # Scoop(Win) 2 | 3 | > scoop 必要组件: 7zip git innounp lessmsi dark sudo aria2 4 | > 5 | > main : https://github.com/ScoopInstaller/Scoop 6 | 7 | ## 一、安装 scoop 8 | - 将 scoop 安装到自定义目录 9 | 10 | ```powershell 11 | # 设置自定义安装路径:D:\Software\Scoop 12 | $env:SCOOP='D:\Software\Scoop';[environment]::setEnvironmentVariable('SCOOP',$env:SCOOP,'User') 13 | 14 | # 允许执行本地脚本 15 | set-executionpolicy remotesigned -scope currentuser 16 | 17 | # 从 github 下载并安装 scoop 18 | iex (new-object net.webclient).downloadstring('https://get.scoop.sh') 19 | ``` 20 | 21 | ## 二、配置scoop 22 | - scoop 源配置: `scoop config SCOOP_REPO ` 23 | 24 | **软件仓库 bucket 源:软件源使用 git 版本管理,因此可以使用修改远程仓库的地址修改源地址加快速度。** 25 | 26 | ```shell 27 | cd $env:SCOOP\buckets\Main 28 | git remote set-url origin 29 | 30 | cd $env:SCOOP\buckets\Extras 31 | git remote set-url origin 32 | ``` 33 | 34 | - 修改 buckets git 仓库链接: 35 | 36 | ```powershell 37 | cd $env:SCOOP\buckets\Main 这是一个 git 管理的文件夹 38 | git remote set-url origin https://hub.fastgit.org/ScoopInstaller/Main 39 | ``` 40 | 41 | - aria2 相关配置 42 | ``` 43 | aria2-enabled (默认值: true) 44 | aria2-retry-wait (默认值: 2) 45 | aria2-split (默认值: 5) 46 | aria2-max-connection-per-server (默认值: 5) 47 | aria2-min-split-size (默认值: 5M) 48 | ``` 49 | 50 | 51 | ## 三、常用 bucket 52 | ```powershell 53 | #scoop bucket remove main 54 | scoop bucket add main 'https://github.com/ScoopInstaller/Main' 55 | scoop bucket add extras 'https://github.com/ScoopInstaller/scoop-extras' 56 | scoop bucket add versions 'https://github.com/ScoopInstaller/Versions' 57 | scoop bucket add jetbrains 'https://github.com/Ash258/Scoop-JetBrains' 58 | scoop bucket add java 'https://github.com/ScoopInstaller/Java' 59 | scoop bucket add dorado https://github.com/chawyehsu/dorado 60 | scoop bucket add scoopet https://github.com/ivaquero/scoopet 61 | ``` 62 | 63 | 1. 查看支持的命令:scoop help 64 | 2. 查找软件:scoop search xxx 软件包 65 | 3. 安装软件:scoop install xxx 软件包 66 | 4. 卸载软件:scoop uninstall xxx 软件 67 | 5. 查看软件官方页:scoop home xxx 软件 68 | 6. 查看安装的软件列表:scoop list 69 | 7. 更新软件:`scoop update` 70 | 8. 查看软件列表:`scoop export >> xxx.txt` 71 | 9. 查看 官方支持的 bucket:`scoop bucket known` 72 | 10. 查看 bucket 命令帮助:`scoop bucket help` 73 | 11. 添加 bucket :`scoop bucket add xxxbucket` 74 | 12. 删除 bukcet :`scoop bucket rm xxx 仓库` 75 | 76 | 常用命令说明 77 | 78 | ```powershell 79 | alias Manage scoop aliases # 管理指令的替身 80 | bucket Manage Scoop buckets # 管理软件仓库 81 | cache Show or clear the download cache # 查看与管理缓存 82 | checkup Check for potential problems # 做个体检 83 | cleanup Cleanup apps by removing old versions # 清理缓存与旧版本软件包 84 | config Get or set configuration values # 配置 Scoop 85 | create Create a custom app manifest # 创建自定义软件包 86 | depends List dependencies for an app # 查看依赖 87 | export Exports (an importable) list of installed apps # 导出软件包列表 88 | help Show help for a command # 显示帮助指令 89 | hold Hold an app to disable updates # 禁止软件包更新 90 | home Opens the app homepage # 打开软件包主页 91 | info Display information about an app # 显示软件包信息 92 | install Install apps # 安装软件包的指令 93 | list List installed apps # 列出所有已安装软件包 94 | prefix Returns the path to the specified app # 查看软件包路径 95 | reset Reset an app to resolve conflicts # 恢复软件包版本 96 | search Search available apps # 搜索软件包 97 | status Show status and check for new app versions # 查看软件包更新状态 98 | unhold Unhold an app to enable updates # 启动软件包更新 99 | uninstall Uninstall an app # 卸载软件包的指令 100 | update Update apps, or Scoop itself # 更新软件包 101 | virustotal Look for app hash on virustotal.com # 查看哈希值 102 | which Locate a shim/executable (similar to 'which' on Linux) # 查看可执行程序路径 103 | ``` 104 | 105 | ## 卸载Scoop 106 | 107 | `scoop uninstall scoop`:这将卸载 Scoop 和所有与 Scoop 一起安装的程序! 108 | 109 | The scoop 配置文件保存在 `~/.config/scoop/config.json` 110 | buckets 源配置文件保存在 `SCOOP\apps\scoop\current\buckets.json` 111 | 112 | ```json 113 | { 114 | "main": "https://github.com/ScoopInstaller/Main", 115 | "extras": "https://github.com/ScoopInstaller/Extras" 116 | } 117 | ``` 118 | 119 | ## Scoop 技巧和知识 120 | 121 | 链接: https://blog.csdn.net/weixin_39986178/article/details/110900876 122 | 123 | 相比于 Chocolatey , Scoop 则更专注于开源的命令行工具,使用 Scoop 安装的应用程序通常称为"便携式"应用程序,需要的权限更少,对系统产生的副作用也更少,所以我这里选择了使用 Scoop。 124 | 注意:对于像 VirtualBox、Docker for Windows ,输入法等这些需要高权限的软件还是通过在官网下载安装包进行安装。 125 | -------------------------------------------------------------------------------- /docs/package_manager/WinGet(Win).md: -------------------------------------------------------------------------------- 1 | # WinGet(Win) 2 | 3 | WinGet ( Windows 程序包管理器: Windows Package Manager )是微软为 win10 开发的一款开源的软件包管理器,于 2020 年 5 月的 Microsoft Build 开发者大会上首宣。 4 | 5 | 前提:Windows 10 1709 及以上版本 6 | 当前 WinGet 支持的安装程序类型尚不多,除了 EXE、 MSIX 、 MSI 三种之外,还能够在自定义配置后下载部分微软应用商店的程序。 7 | 8 | ## 下载、安装和验证 9 | 10 | 你可以在 Github Release 下载 .appxbundle 格式的文件,双击打开并运行。 11 | 12 | 如果出现「此电脑不支持打开该类型文件」的提示,则可在 `Win + I` 进入设置 -> 更新和安全 -> 开发者选项 -> 打开开发人员模式。 13 | 14 | 输入 winget 可以查看简略帮助文档;输入 winget -v 查看版本信息 15 | 16 | ## 基本使用 17 | 18 | 显示简略帮助文档: winget -?(-?可选);查看特定命令的详细帮助文档: winget [] -?,如 winget install -?显示软件详细信息: winget show 搜索软件: winget search 安装软件:winget install 19 | 20 | 是的,如你所见, WinGet 并没有自动开启卸载、升级等功能,这也是其在发布之后很长时间不温不火的重要原因。 21 | 22 | 但是不要着急,截止到 2021/03/25 发布的最新预览版 v0.2.10771 , WinGet 实验性功能(需要用户自启)的数量已经增加到了八个,其中就包括 uninstall 、 upgrade 、 list 等重要功能,以及支持安装 Microsoft Store 上的应用程序! 23 | 24 | 如果想要开启实验功能,可以在终端输入 winget settiings,打开 WinGet 配置文件 settings.json 增加以下内容: 25 | 26 | "experimentalFeatures": { "uninstall": true, "upgrade": true, "list": true, "experimentalMSStore": true}, 27 | 28 | 如果想要更改 winget 显示的进度条视觉效果,可以在 setting.json 里增加: 29 | "visual": { "progressBar": "accent"},# 三种样式可选:accent(默认值)、 retro、 rainbow 30 | 31 | winget list > winget.txt 同样支持一键导出软件列表,方便备份和换机重装。 32 | 33 | ## 下载 Microsoft Store 软件 34 | 35 | 实验功能开启"experimentalMSStore": true之后,winget 可以下载 MStore 的软件了(不过目前支持的并不多)。 36 | 37 | winget source list 查看软件源列表,发现除了 winget 源之外,MSStore 源已经添加上了。部分商店内软件可以正常下载安装了。 38 | 39 | ## 卸载其他源安装的软件 40 | 41 | winget 可以卸载 winget list 显示出的所有软件。包括电脑上的大多数软件,如 Windows 系统自带的、手动安装的、 Chocolatey 安装的部分等。唯一不足的是,卸载时会被弹出的卸载窗口打断,降低了自动化的一致性。 42 | 43 | winget 可以卸载多种类型的软件程序 44 | -------------------------------------------------------------------------------- /docs/package_manager/YaST & Zypper(RPM).md: -------------------------------------------------------------------------------- 1 | # YaST & Zypper(RPM) 2 | 3 | openSUSE 是一个独立的 Linux 发行版分支,使用 RPM 作为分发的软件包格式,采用 zypper 作为包管理器,同时兼容多种计算机硬件。 openSUSE 有两个正式的发行版: Leap 和 Tumbleweed 。 4 | 5 | ## 软件包的分层管理 6 | 7 | OpenSUSE 是一个一直被低估的多功能 Linux 操作系统 -------------------------------------------------------------------------------- /docs/package_manager/pacman(Arch)包管理工具.md: -------------------------------------------------------------------------------- 1 | # pacman(Arch)包管理工具 2 | 3 | Manjaro 换源 4 | 5 | ```shell 6 | sudo pacman-mirrors -i -c China -m rank 7 | sudo pacman -Syy 8 | ``` 9 | 10 | 11 | ## 1. 更新系统 12 | 13 | 命令 解释 14 | pacman -Syu 对整个系统进行更新(常用) 15 | pacman -Syy 强制更新 16 | pacman -Syudd 使用 -dd跳过所有检测 17 | 18 | ## 2. 搜索包 19 | 20 | 命令 解释 21 | pacman -Ss keyword 在仓库中搜索含关键字的包(常用)pacman -Ss '^fcitx-' 22 | pacman -Qs keyword 搜索已安装的包(常用)pacman -Qs '^fcitx-' 23 | pacman -Qi package_name 查询本地安装包的详细信息 24 | pacman -Ql package_name 列出该包的文件 25 | pacman -Fs keyword 按文件名查找软件库 26 | pacman -Si package_name 显示远程软件包的详尽的信息 27 | pacman -Qii package_name 使用两个 -i 将同时显示备份文件和修改状态 28 | pacman -Ql package_name 要获取已安装软件包所包含文件的列表 29 | pacman -Fl package_name 查询远程库中软件包包含的文件 30 | pacman -Qk package_name 检查软件包安装的文件是否都存在 31 | pacman -Fo /path/to/file_name 查询文件属于远程数据库中的哪个软件包 32 | pacman -Qdt 要罗列所有不再作为依赖的软件包(孤立 orphans ) 33 | pacman -Qet 要罗列所有明确安装而且不被其它包依赖的软件包 34 | pactree package_name 要显示软件包的依赖树 35 | whoneeds package_name 检查一个安装的软件包被那些包依赖pkgtoolsAUR中的whoneeds 36 | pactree -r package_name 检查一个安装的软件包被那些包依赖 37 | 38 | ## 3. 安装包 39 | 40 | 命令 解释 41 | pacman -S package_name 执行 pacman -S firefox 将安装 Firefox(常用) 42 | pacman -Sy package_name 将在同步包数据库后再执行安装。 43 | pacman -Sv package_name 在显示一些操作信息后执行安装。 44 | pacman -U local_package_name 安装本地包,其扩展名为pkg.tar.gz或pkg.tar.xz 45 | pacman -U url 安装一个远程包(不在 pacman 配置的源里面) 46 | 47 | ## 4. 删除包 48 | 49 | 命令 解释 50 | pacman -R package_name 该命令将只删除包,保留其全部已经安装的依赖关系 51 | pacman -Rs package_name 在删除包的同时,删除其所有没有被其他已安装软件包使用的依赖关系(常用) 52 | pacman -Rsc package_name 在删除包的同时,删除所有依赖这个软件包的程序 53 | pacman -Rd package_name 在删除包时不检查依赖 54 | 55 | ## 5. 其他用法 56 | 57 | pacman -Sw package_name 只下载包,不安装。 58 | pacman -Sc 清理未安装的包文件(常用)包文件位于 /var/cache/pacman/pkg/ 目录 59 | pacman -Scc 清理所有的缓存文件(常用) 60 | 61 | # Manjaro软件管理 62 | 63 | ## 1. 切换国内最快的软件源 64 | 65 | 大多数 Linux 发行版都是来自国外,自然官方仓库地址也在国外,所以一般情况下安装完 Linux 发行版之后做的第一件事就是切换源为国内的源。源的切换操作,大部分发行版也都支持 GUI 切换,这里只列出在命令行下如何擦操作 66 | 67 | ## 1. 第一部分使用 pacman-mirrors 更新官方软件源 68 | 69 | ### 1.1 按照地区自动更新为最快最稳定的软件源镜像地址 70 | 71 | `sudo pacman-mirrors --country China` 72 | 73 | ### 1.2. 恢复默认软件源操作 74 | 75 | `sudo pacman-mirrors --interactive --default` 76 | 77 | 78 | ### 1.3 软件源更新之后,我们一般会进行系统更新 79 | 80 | `sudo pacman -Syyu# 软件源更新完成之后进行系统软件更新操作` 81 | 82 | 83 | ### 1.4 查看所有可用的地区信息 84 | `sudo pacman-mirrors -l` 85 | 86 | 参考翻译自: https://wiki.manjaro.org/index.php?title=Use_pacman-mirrors_to_Set_the_Fastest_Download_Server 87 | 88 | ## 2. 使用 pacman 管理软件 89 | 90 | ## 2. 第二部分使用 pacman 管理软件 91 | ### 2.1 同步并且更新你的系统 92 | `sudo pacman -Syyu` 93 | 94 | ### 2.2 在软件仓库中搜索软件 95 | `sudo pacman -Ss [software package name]` 96 | 97 | ### 2.3 查看已安装软件 98 | 99 | `sudo pacman -Qs [software package name]` 100 | `sudo pacman -Qi [software package name]`# 附带详细信息 101 | `sudo pacman -Qii [software package name]`# 附带更加详细的包信息 102 | `sudo pacman -Ql`# 列出所有安装的软件包 103 | 104 | ### 2.4 查看软件的详细依赖 105 | 106 | `sudo pactree [software package name]` 107 | 108 | ### 2.5 查看系统中那些没有被使用软件依赖包(orphans) 109 | 110 | `sudo pacman -Qdt` 111 | 112 | ### 2.6 自动移除那些系统中没有被使用的依赖包【类似于Debian下的 sudo apt autoremove --purge】 113 | 114 | `sudo pacman -Rs $(pacman -Qdtq)` 115 | 116 | ### 2.7 下载并安装软件包 117 | 118 | `sudo pacman -Syu [software package name]`# 从软件仓库安装 119 | `yay -S [software package name]`# Packages from the AUR 120 | `sudo pacman -U [/package_path/][software package name.pkg.tar.xz]`# 从本地安装 121 | 122 | `pacman -U http://www.examplepackage/repo/examplepkg.tar.xz`# 从网络安装【非官方仓库】 123 | 124 | ### 2.8 卸载软件 125 | 126 | `sudo pacman -R [software package name]` 127 | `sudo pacman -Rs [software package name]`# 同时删除依赖 128 | `sudo pacman -Rns [software package name]`# 删除软件及其依赖,还有pacman生成的配置文件,即更彻底的删除 129 | 130 | ### 2.9 清空缓存【默认情况下安装软件会先来缓存中查看是否已经下载过,没有再去下载,软件安装后通常下载缓存还在】 131 | 132 | `sudo pacman -Sc` 133 | `sudo pacman -Scc` # 更彻底的清理 134 | 135 | 关于 pacman 常用就这些了,更多请使用 man pacman OR pacman -h 去查看 136 | 参考翻译自: https://wiki.manjaro.org/index.php?title=Pacman_Overview 137 | From < https://csdnimg.cn/release/phoenix/template/new_img/articleReadEyes.png> 138 | -------------------------------------------------------------------------------- /docs/platform/GitBucket.md: -------------------------------------------------------------------------------- 1 | # GitBucket 2 | 3 | ## 简介 4 | 5 | [GitBucket](https://gitbucket.github.io/) 6 | 是一个非常好的免费开源,易部署的开源Git平台,同时拥有诸多优势,虽然也有弊端。 7 | 8 | - 优点 9 | 10 | - 完全开源,没有任何限制; 11 | 12 | - 运行在JVM平台上,非常容易部署; 13 | 14 | - 类似于GitHub的界面,操作容易; 15 | 16 | - 丰富的插件,使得扩展非常容易; 17 | 18 | - 提供了大量兼容GitHub的API; 19 | 20 | - 缺点 21 | 22 | - 有点残废的权限管理(权限没有依照公开,私有库区分); 23 | 24 | - 开发语言为Scala,对于非Scala用户自己写插件有一定门槛; 25 | 26 | - 由于作者暂未完成平台升级,暂时无法部署在除Tomcat之外的Servlet容器。 27 | 28 | ## 部署 29 | 30 | 1. 下载 [Release](https://github.com/gitbucket/gitbucket/releases) 31 | 里面的war到你的服务器; 32 | 33 | 2. `java -jar gitbucket.war` 启动。(笔者用的是JDK17); 34 | 35 | 3. (可选)将启动端口反向代理到子域名。 36 | -------------------------------------------------------------------------------- /docs/platform/chatGPT.en.md: -------------------------------------------------------------------------------- 1 | # ChatGPT 2 | 3 | Official website: 4 | 5 | ChatGPT is an artificial intelligence chat robot based on natural language processing technology, which uses GPT (Generative Pre-trained Transformer) technology to generate human language responses. 6 | 7 | Function: 8 | 9 | - Used as a search engine, we can easily use it to search for some information, such as directly asking ChatGPT "how to use ChatGPT". 10 | - Used to find learning materials, such as directly asking ChatGPT "how to learn natural language processing". 11 | - Used to query documents, such as directly asking ChatGPT "what is the usage of the reduce function in the python library functools". 12 | - Used to adjust mood, such as directly asking ChatGPT "how should I date a girl". 13 | 14 | Configuration method: 15 | 16 | - Search ChatGPT through the browser, click to enter the official website, and click the "Sign in" button to register an account. 17 | - After successful registration, bind an overseas mobile phone number, and enter the verification code in the received verification code to complete the registration. 18 | - It should be noted that ChatGPT cannot be used in Hong Kong for the time being, and even if the node of the ladder is in Hong Kong, even the login to the official website will be restricted. 19 | - If you do not have an overseas mobile phone number, you can obtain it through some mobile phone verification code receiving websites. There are many such websites like ladders, and you only need to google to find them. -------------------------------------------------------------------------------- /docs/platform/chatGPT.md: -------------------------------------------------------------------------------- 1 | # ChatGPT 2 | 3 | 官网: 4 | 5 | ChatGPT是一种基于自然语言处理技术的人工智能聊天机器人,使用GPT(Generative Pre-trained Transformer)技术生成人类语言响应。 6 | 7 | 功能: 8 | 9 | - 用来当作搜索引擎,我们可以很容易地使用它来搜索一些信息,例如直接问ChatGPT“如何使用ChatGPT”。 10 | - 用来查找学习资料,例如直接问ChatGPT“如何学习自然语言处理”。 11 | - 用来查询文档,例如直接问ChatGPT“python库functools里面reduce函数的用法是什么”。 12 | - 用来调节心情,例如直接问ChatGPT“我应该怎么和女孩子约会”。 13 | 14 | 配置方法: 15 | 16 | - 通过浏览器搜索ChatGPT,点击进入官网,点击"Sign in"按钮注册账号。 17 | - 注册成功后,绑定一个海外的手机号,在接收到的验证码中输入验证码,即可完成注册。 18 | - 需要注意的是香港地区暂时不能够使用ChatGPT,甚至如果梯子的节点在香港,连登陆官网都会受到限制。 19 | - 如果没有海外手机号码的话,可以通过一些手机验证码接收网站来获取,这样的网站和梯子一样有非常多家,只需要google一下就可以找到。 20 | 21 | -------------------------------------------------------------------------------- /docs/platform/excalidraw.md: -------------------------------------------------------------------------------- 1 | # Excalidraw 2 | 3 | ## 简介 4 | 5 | 官网: [Excalidraw's repository](https://github.com/excalidraw/excalidraw) 6 | 7 | Excalidraw 是一款开源的画图工具,可以“手绘”一些简单的流程图,显示效果像是用笔在纸上画的一样,操作简单。 8 | 9 | ![example1](https://ggssh.oss-cn-beijing.aliyuncs.com/mdimg/20230203182851.png) 10 | 11 | 同时其拥有丰富的[素材库](https://libraries.excalidraw.com/?theme=light&sort=default),帮助每个人更好地绘图。 12 | 13 | ![example2](https://ggssh.oss-cn-beijing.aliyuncs.com/mdimg/20230203183006.png) 14 | 15 | 除了在线网站,也可以通过浏览器扩展直接安装到本地使用,具体可以在[官方文档](https://docs.excalidraw.com/docs)查看。 16 | -------------------------------------------------------------------------------- /docs/platform/flydav.md: -------------------------------------------------------------------------------- 1 | # FlyDav 2 | 3 | ## 简介 4 | 5 | [FlyDav](https://github.com/pluveto/flydav) 是一个轻量级的开源 webdav 服务器 6 | 7 | - 优点 8 | - 完美兼容 WebDav 协议 9 | - 支持无配置运行,双击即可开启 WebDav 服务器 10 | - 完全开源,提供中英文文档 11 | - 极简,大小 10MB 以内,跨平台 12 | - 安全,不存储明文密码,隔离不同目录 13 | 14 | - 缺点 15 | - 不支持 SSL 16 | - 不支持细粒度权限管理 17 | 18 | ## 部署 19 | 20 | 最简部署: 21 | 22 | 1. 首先从 [发布页](https://github.com/pluveto/flydav/releases) 下载 FlyDav。 23 | 2. 运行 `./flydav -H 0.0.0.0` 来启动服务器。然后你要输入默认用户 `flydav` 的密码。 24 | 3. 在你的 webdav 客户端(比如 RaiDrive)中打开 `http://YOUR_IP:7086/webdav`。 25 | 26 | 完整部署可参阅文档。 27 | -------------------------------------------------------------------------------- /docs/platform/gpt-paper.md: -------------------------------------------------------------------------------- 1 | 本文介绍使用new bing和chatgpt搞科研的具体方法,视频教程可参看[bilibili使用说明](https://www.bilibili.com/video/BV1EP411o724/?vd_source=5bf708edcd78334660e81ecde5948c78) 2 | 3 | ## 内容 4 | 5 | ==关于如何正确使用new bing,如何不转到国内特供版。不是本节的内容== 6 | 7 | new bing(消化以及输出) --> chatgpt(组织语言)--> 划水学生(复制粘贴) 8 | 9 | 因为:new bing被阉割了,输出和输入文字都比chatgpt限制了太多。但是new bing 可以**联网**,可以标注文献来源。 10 | 11 | ## 侧边栏甄别文献 12 | 13 | 使用edge甄别文献,但不去阅读。因为翻译很慢。(看的话可以结合wps) 14 | 15 | 阅读左边的论文,告诉我他讲了什么内容。 16 | 17 | 阅读左边的论文,细致地告诉我他每一小节都讲了什么内容。 18 | 19 | 20 | 21 | ## 消化文献并输出(无惧查重) 22 | 23 | 我希望你阅读英文文献 :【A Survey of Surface Reconstruction from Point Clouds】,分别介绍XXXX的【==(基本原理)、分类、效果、发展趋势、(优点和缺点、应用范围)==】。 最后对二者比较,并通过表格,最后证明XXXX结论。我希望你输出的文字为中文,总体内容要超过500字。 24 | 25 | 26 | 27 | - 英文文献,总结出中文,生成式的,基本不会重复。 28 | - 输出内容要强调一下,否则会不成功。 29 | - **如果感觉内容不对,换一篇文献,让他说,或者重新开会话** 30 | 31 | ## chatgpt组织语言 32 | 33 | - 组织new bing生成的中文 34 | - 组织原本的英文,生成中文 35 | - 不可以组织论文的中文,==效果很差。== 36 | 37 | ## 论文最后:语言润色 38 | 39 | 如果不用以上ai写的文字,纯粹自己写。 40 | 41 | 写出来效果可能不太行,让ai利用书面语言润色。这里可以上网搜一些相关的prompt 42 | 43 | - 请用写论文的中文书面语改写或者丰富以下段落,让其更有逻辑,重点突出: 44 | 45 | - 请用写论文的中文书面语丰富以下段落,让其用词更准确,内容更丰富: 46 | 47 | ## 论文最后:改错别字 48 | 49 | 50 | 51 | 52 | 53 | ## Note 54 | 55 | - 不要陷入无意义的ai玩耍 56 | 57 | - 不要登录cn的bing,不然之后都会记住。只能重新清除cookie。 58 | 59 | 60 | 61 | 62 | 63 | ## 保存 64 | 65 | - single file插件 66 | 67 | 68 | 69 | -------------------------------------------------------------------------------- /docs/platform/minio.md: -------------------------------------------------------------------------------- 1 | # MinIO 2 | 3 | ## 简介 4 | 5 | [MinIO](https://min.io/) 6 | 是一个提供开源部署方案的多级云对象存储(S3)方案。 7 | 8 | - 优点 9 | 10 | - 提供许可证为AGPL v3的开源许可证的版本,无任何容量,带宽限制; 11 | 12 | - 兼容现有AWS S3的SDK,API等; 13 | 14 | - 非常完善的文档,活跃的社区; 15 | 16 | - 部署相对简单; 17 | 18 | - 缺点 19 | 20 | - 没有任何中文文档; 21 | 22 | - 非付费版软件更新周期较短,需要自行更新; 23 | 24 | ## 部署 25 | 26 | **[RTFM](https://min.io/download#/kubernetes)** 27 | 28 | 官方提供了非常详尽,多种极为容易的安装方式,这里不再赘述。 29 | 30 | ## 笔者的提醒 31 | 32 | 一定要到官方的[文档](https://min.io/docs/minio/linux/index.html)去确认你是不是有参数没有设定,是不是使用了独立的卷(最少是独立的文件夹)。 33 | 34 | -------------------------------------------------------------------------------- /docs/platform/overleaf.en.md: -------------------------------------------------------------------------------- 1 | # Overleaf 2 | 3 | Official website: 4 | 5 | Overleaf is an online tex rendering website. The configuration of the tex environment is cumbersome and not friendly enough for novices (especially in Windows), but overleaf is a good alternative. You just need to choose a nice template, and it will be very convenient to write assignments or small papers of less than 10 pages. Overleaf also provides the basic teamwork function, which can be edited by multiple people through links or invitations. The free version of Overleaf has a maximum compilation time and a limited set of features. For more complex projects, consider paying for more features. 6 | 7 | $\LaTeX$ is NOT a wysiwyg (what you see is what you get) typesetting system in which users enter specific code, save it in a file with the suffix.tex, and compile it to get the desired pdf file. $\LaTeX$ Excellent large document typesetting ability and mathematical formula rendering ability is one of the reasons why it can be widely used. To learn more about can refer to the CTAN introduce [lshort](https://www.ctan.org/pkg/lshort). 8 | 9 | Features: 10 | 11 | - After the template is edited, it is very fast to write assignments within 10 pages 12 | - Isolation of projects can be achieved by writing temp files, and tex-related package management is convenient 13 | - Friendly editing interface, double-click the content in the pdf preview to jump directly to the code 14 | - Automatically save documents in the cloud, and the whole process is completed on the web page without changing the local environment 15 | - Many questions overleaf officially gave answers and examples, such as how to embed pseudo-code blocks, etc. 16 | -------------------------------------------------------------------------------- /docs/platform/overleaf.md: -------------------------------------------------------------------------------- 1 | # Overleaf 2 | 3 | 官网: 4 | 5 | Overleaf 是一个在线 $\LaTeX$ 渲染网站。 $\LaTeX$ 环境的配置比较麻烦(尤其是在 Windows 环境下),对于新手也不够友好,而 overleaf 是一个很好的替代。只需要选择一个好看的模版,写 10 页以内的作业或者小论文将会十分方便,同时 Overleaf 也提供了基本的团队协作功能,可以通过链接或邀请的方式实现多人共同编辑。 Overleaf 免费版有最大编译时长和一些功能的限制,在完成一些比较复杂的项目时,可以考虑付费获得更多的功能。 6 | 7 | $\LaTeX$ 是一种「非所见即所得」的排版系统,用户需要输入特定的代码,保存在后缀为 .tex 的文件中,通过编译得到所需的 pdf 文件。 $\LaTeX$ 优秀的大型文档排版能力和数学公式渲染能力是其能够广泛应用的原因之一。系统学习 $\LaTeX$ 需要一定的时间,详细了解可以参阅托管在 CTAN 的中译版介绍 [lshort-zh-cn](https://www.ctan.org/pkg/lshort-zh-cn)。 8 | 9 | 特点: 10 | 11 | - 模版编辑好以后编写 10 页以内作业十分快速 12 | - 通过写 temp 文件可以实现项目的隔离, tex 相关的包管理方便 13 | - 友好的编辑交互界面,双击 pdf 预览中的内容可以直接跳转到代码 14 | - 自动保存文档在云端,全程都在网页上完成,不会污染本地环境 15 | - 许多问题 overleaf 官方给出了解答和范例,例如怎么嵌入伪代码块等 16 | -------------------------------------------------------------------------------- /docs/plugins/android.en.md: -------------------------------------------------------------------------------- 1 | # Android Studio 2 | 3 | This article recommends plug-ins for [Android Studio](https://developer.android.com/studio), which can greatly improve your development experience. 4 | 5 | ## theme class 6 | 7 | ### Atom Material Icons 8 | 9 | The plugin optimizes icons to improve the aesthetics of your interface. 10 | 11 | ![Atom Material Icons](https://raw.githubusercontent.com/file-icons/atom/6714706f268e257100e03c9eb52819cb97ad570b/preview.png) 12 | 13 | ### [Material Theme UI](https://plugins.jetbrains.com/plugin/8006-material-theme-ui) 14 | 15 | The Material theme for JetBrains IDE, with multiple themes for day and night, makes the interface more beautiful. 16 | 17 | ![Material Theme UI](https://plugins.jetbrains.com/files/8006/screenshot_17526.png) 18 | 19 | ## Tools 20 | 21 | ### JSON to Bean 22 | 23 | JSON as a lightweight data interchange format. It is often used in development, and one of the requirements is to convert Json to the corresponding Bean object. The following two main plugins are recommended: 24 | 25 | - [GsonFormatPlus](https://github.com/mars-men/GsonFormatPlus) 26 | 27 | Can convert Json to corresponding Java Bean 28 | 29 | - [JSON To Kotlin Class ​(JsonToKotlinClass)​](https://plugins.jetbrains.com/plugin/9960-json-to-kotlin-class-jsontokotlinclass-) 30 | 31 | Can convert Json to corresponding Kotlin Bean 32 | 33 | ### Translate 34 | 35 | [Translation](https://github.com/YiiGuxing/TranslationPlugin) plug-in greatly facilitates the development of developers with poor English foundation. It has the following properties: 36 | 37 | ![Translation](https://yiiguxing.github.io/TranslationPlugin/img/translation_plugin.png) 38 | 39 | - Multiple Translation Engines 40 | 41 | * Microsoft Translator 42 | * Google Translate 43 | * DeepL Translator 44 | * Youdao Translate 45 | * Baidu Translate 46 | * Alibaba Translate 47 | 48 | - Multilingual translation 49 | - Document translation 50 | - Text-to-speech 51 | - Automatic word selection 52 | - Automatic word breaks 53 | - Word Book 54 | -------------------------------------------------------------------------------- /docs/plugins/android.md: -------------------------------------------------------------------------------- 1 | # Android Studio 2 | 3 | 本文为你推荐适用于 [Android Studio](https://developer.android.com/studio) 的插件,能够极大的改善你的开发体验。 4 | 5 | ## 主题类 6 | 7 | ### Atom Material Icons 8 | 9 | 该插件对图标进行了优化以改善你的界面美观程度。 10 | 11 | ![Atom Material Icons](https://raw.githubusercontent.com/file-icons/atom/6714706f268e257100e03c9eb52819cb97ad570b/preview.png) 12 | 13 | ### [Material Theme UI](https://plugins.jetbrains.com/plugin/8006-material-theme-ui) 14 | 15 | 适用于 JetBrains IDE 的 Material 主题,拥有适用于白天和黑夜的多个主题,让界面更加美观。 16 | 17 | ![Material Theme UI](https://plugins.jetbrains.com/files/8006/screenshot_17526.png) 18 | 19 | ## 工具类 20 | 21 | ### JSON转Bean 22 | 23 | JSON作为轻量级资料交换格式。在开发中经常被使用,其中一个需求就是将 Json 转换为对应的 Bean 对象。下面主要推荐两个插件: 24 | 25 | - [GsonFormatPlus](https://github.com/mars-men/GsonFormatPlus) 26 | 27 | 能将Json 转换为对应的 Java Bean 28 | 29 | - [JSON To Kotlin Class ​(JsonToKotlinClass)​](https://plugins.jetbrains.com/plugin/9960-json-to-kotlin-class-jsontokotlinclass-) 30 | 31 | 能将Json 转换为对应的 Kotlin Bean 32 | 33 | ### 翻译 34 | 35 | [Translation](https://github.com/YiiGuxing/TranslationPlugin) 插件极大的方便了英语基础不好的开发者进行开发。其具有以下特性: 36 | 37 | ![Translation](https://yiiguxing.github.io/TranslationPlugin/img/translation_plugin.png) 38 | 39 | - 多翻译引擎 40 | 41 | * 谷歌翻译 42 | * 微软翻译 43 | * 有道翻译 44 | * 百度翻译 45 | * 阿里翻译 46 | * DeepL 翻译 47 | 48 | - 多语言互译 49 | - 文档翻译 50 | - 语音朗读 51 | - 自动选词 52 | - 自动单词拆分 53 | - 单词本 54 | -------------------------------------------------------------------------------- /docs/plugins/browser.en.md: -------------------------------------------------------------------------------- 1 | # Browser 2 | 3 | This article hopes to inspire others and encourage everyone to propose more convenient browser plug-ins. 4 | 5 | ## Tampermonkey 6 | 7 | Official website: 8 | 9 | Very convenient script manager, you can install some small scripts that are not available in the extension store. 10 | 11 | ## Simpread 12 | 13 | Official website: 14 | 15 | Enhance the browser reading experience, provide a focus mode that dilutes irrelevant elements to increase concentration and a completely pure reading mode; you can export web pages to various formats such as markdown to the local, or import them into notion, onenote and other note-taking applications after authorization, which is convenient for archiving and Read it later. There are many related enhancements in the official plug-in center, but the default mode experience is also quite comfortable. 16 | 17 | ## Zotero Connector 18 | 19 | Official website: 20 | 21 | Zotero Connectors allow you to save to Zotero 22 | directly from your web browser. 23 | 24 | ## Global Speed 25 | 26 | Official website: 27 | 28 | Web extension that sets a default speed for HTML media elements (video and audio). 29 | 30 | ## Language Reactor 31 | 32 | Official website: 33 | 34 | Language Reactor is a powerful toolbox for learning languages. It helps you to discover, understand, and learn from native materials. Studying will become more effective, interesting, and enjoyable! 35 | 36 | ## Vimium 37 | 38 | Official website: 39 | 40 | Vimium is a browser extension that provides keyboard-based navigation and control of the web in the spirit of the Vim editor. 41 | -------------------------------------------------------------------------------- /docs/plugins/browser.md: -------------------------------------------------------------------------------- 1 | # Browser 2 | 3 | 本文希望抛砖引玉,鼓励大家提出更多方便的浏览器插件。 4 | 5 | ## Tampermonkey 6 | 7 | 官网: 8 | 9 | 很方便的脚本管理器,可以安装一些扩展商店里没有的小脚本。 10 | 11 | ## Simpread 12 | 13 | 官网: 14 | 15 | 增强浏览器阅读体验,提供淡化内容无关元素以增加专注的聚焦模式和完全纯净的阅读模式;可以导出网页为 markdown 等多种格式到本地,或授权后导入 notion 、onenote 等笔记应用,方便存档和稍后阅读。官方插件中心还有许多相关增强,但默认模式体验也相当舒适。 16 | 17 | ## Zotero Connector 18 | 19 | 官网: 20 | 21 | 从网页上直接保存论文至 Zotero ,支持选择保存分类。 22 | 23 | ## Global Speed 24 | 25 | 官网: 26 | 27 | 调节网页视频播放速度,使用简单。 28 | 29 | ## Language Reactor 30 | 31 | 官网: 32 | 33 | 为Youtube视频提供机翻双语字幕,并且支持导出。 34 | 35 | ## Vimium 36 | 37 | 官网: 38 | 39 | Vimium 受到 Vim 编辑器的启发,让你能够抛弃鼠标,完全使用键盘完成浏览器的导航、页面跳转、页面搜索等操作。 40 | -------------------------------------------------------------------------------- /docs/plugins/img/tabnine.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/storage-db/ToolDiy/b83977c85695c48e1d48119b8c774c192895765f/docs/plugins/img/tabnine.png -------------------------------------------------------------------------------- /docs/plugins/tabnine.en.md: -------------------------------------------------------------------------------- 1 | # Tabnine 2 | 3 | ## install 4 | 5 | Installer link: 6 | 7 | ## Features(These words are generated by chatgpt) 8 | 9 | "TabNine is a machine learning-based code autocompletion tool that can be used in various editors and IDEs, including but not limited to VS Code, Sublime Text, PyCharm, Vim, Emacs, and more. Unlike traditional code autocompletion tools, TabNine not only completes based on existing code snippets and syntax rules, but can also generate entirely new code by learning from large code repositories and language syntax, significantly improving coding efficiency and accuracy. 10 | 11 | The advantages of TabNine include: 12 | 13 | + High accuracy: TabNine is trained using machine learning algorithms and can generate the most appropriate code completion options based on the code context. 14 | + Fast response: TabNine's completion response speed is very fast and can easily handle large projects and complex code structures. 15 | + Intelligent prediction: TabNine can intelligently predict the next possible code completion option based on context and history, making coding smoother and more efficient. 16 | + Easy to customize: TabNine supports user-defined configuration and extension, allowing customization of the tool based on personal needs. 17 | 18 | By providing high-quality code completion options, TabNine reduces the time and error rate of writing code and is a highly valuable and practical programming tool." 19 | 20 | ## The difference with copilot 21 | 22 | "TabNine and Copilot are both machine learning-based code autocompletion tools that can generate code completion options based on context and syntax rules to improve coding efficiency and accuracy. However, there are some differences between them. 23 | 24 | Firstly, they are developed by different companies, with TabNine being developed by Codota and Copilot being developed by OpenAI. 25 | 26 | Secondly, they have different training data sources. TabNine uses both public and private code repositories from GitHub, while Copilot uses public code repositories from GitHub and OpenAI's own internal code repositories. 27 | 28 | Thirdly, TabNine supports multiple programming languages, including Python, JavaScript, Java, C++, Go, Ruby, and more, while Copilot currently only supports Python, JavaScript, and TypeScript. 29 | 30 | Fourthly, TabNine focuses on code completion and intelligent prediction, while Copilot's unique feature is the ability to generate code snippets and functions, even based on natural language descriptions. 31 | 32 | Finally, TabNine's code is mostly open source, allowing users to customize and extend the tool, while Copilot does not currently support customization and is not open source due to its use of OpenAI's GPT series models. 33 | 34 | Overall, both TabNine and Copilot are valuable code autocompletion tools with their own strengths and suitable use cases. Users can choose the appropriate tool based on their needs." 35 | 36 | ## preview 37 | 38 | ![preview](img/tabnine.png) 39 | -------------------------------------------------------------------------------- /docs/plugins/tabnine.md: -------------------------------------------------------------------------------- 1 | # Tabnine优秀的代码补全工具(不犯病的时候) 2 | 3 | 本文为你推荐代码补全工具tabnine的介绍同时将和copilot的区别写出,copilot的安装在评论区后续补充。 4 | 5 | ## 安装 6 | 7 | 下载链接: 8 | 9 | 在这个下载页面中可以选择自己所使用的代码编辑器,对于 VSCode 用户来讲,我们可以直接在插件搜索中搜索tabnine,然后安装即可。 10 | 11 | ## 介绍(本段文字由 ChatGPT 生成) 12 | 13 | TabNine 是一个基于机器学习的代码自动补全工具,它可以在多种编辑器和 IDE 中使用,包括但不限于 VS Code、Sublime Text、PyCharm、Vim、Emacs 等等。与传统的代码自动补全工具不同,TabNine 不仅可以根据已有的代码段和语法规则进行补全,而且还可以通过学习大量的代码库和语言语法,自动生成全新的代码,大大提高编码效率和准确性。 14 | 15 | TabNine 的优点包括: 16 | 17 | + 准确性高:TabNine 通过机器学习算法训练得到,可以根据代码上下文生成最合适的代码补全选项。 18 | + 跨语言支持:TabNine 支持多种编程语言,包括 Python、JavaScript、Java、C++、Go、Ruby 等等。 19 | + 快速响应:TabNine 的补全响应速度非常快,可以轻松应对大型项目和复杂的代码结构。 20 | + 智能预测:TabNine 可以根据上下文和历史记录智能预测下一个可能的代码补全选项,让编码更加顺畅和高效。 21 | + 易于定制:TabNine 支持用户自定义配置和扩展,可以根据个人需求定制化工具。 22 | + TabNine 通过提供高质量的代码补全选项,减少了编写代码的时间和错误率,是一个极具价值和实用性的编程工具。 23 | 24 | ## 和copilot的区别 25 | 26 | TabNine 和 Copilot 都是基于机器学习的代码自动补全工具,它们都可以根据上下文和语法规则来生成代码补全选项,提高编码效率和准确性。但是它们之间也有一些不同之处。 27 | 28 | + 产品背景:TabNine 是由 Codota 公司开发的,而 Copilot 则是由 OpenAI 公司开发的。 29 | + 训练数据:TabNine 训练数据来自于 GitHub 上的公共代码库和用户的私有代码库,而 Copilot 使用的是 GitHub 上公共的代码库和 OpenAI 自己的内部代码库。 30 | + 功能特点:TabNine 重点关注代码补全和智能预测功能,而 Copilot 的特点在于能够自动生成代码片段和函数,甚至可以根据自然语言描述来生成代码。 31 | + 开源程度:TabNine 的代码基本开源,用户可以自行扩展和定制,而 Copilot 由于使用的是 OpenAI 的 GPT 系列模型,目前不支持自主定制和开源。 32 | 33 | 总的来说,TabNine 和 Copilot 都是非常有用的代码自动补全工具,具有各自的优点和适用场景,用户可以根据自己的需求选择合适的工具。 34 | 35 | ## 效果如图 36 | 37 | ![效果图](img/tabnine.png) 它是个动图捏大家可以体验下嘿嘿 38 | -------------------------------------------------------------------------------- /docs/software/Double Commander.md: -------------------------------------------------------------------------------- 1 | # Double Commander 2 | 3 | 免费的跨平台开源文件管理器,它的灵感来自 Total Commander ,并提供了一些新的想法(支持 Linux )。 4 | -------------------------------------------------------------------------------- /docs/software/Pycharm.md: -------------------------------------------------------------------------------- 1 | # PyCharm 2 | 3 | ## 1.首先我们要进行Pyhton解释器的下载 4 | 5 | ```python 6 | print('Hello World') 7 | ``` 8 | 9 | Python 不能直接在计算机中运行,因此需要 Python 语言的运行环境: Python 解析器 10 | 11 | 下载地址: 12 | 当然你安装3.8或者3.9也是没问题的 13 | 14 | 查找目标文件:Windows x86-64 executable installer -- 单击即可下载。(格式不能找错) 15 | 16 | ## 2.Python解析器的安装 17 | 18 | 第一步:双击运行 Python 的解析器,选择 ==自定义安装== 以及 ==添加 Python 到环境变量(这一步非常重要)== 19 | 20 | 第二步:选择所有要安装的功能菜单,默认全部勾选 21 | 22 | 第三步:设置 Python 解析器的安装路径,尽量不要安装在C盘,但需要知道自己安装的位置 23 | 24 | 第四步:测试 Python 解析器是否可以使用 25 | 方法:按 Windows + R ,输入 cmd ,打开 Windows 的 DOS 窗口,输入 python(全部小写),当出现下图就成功了 26 | 27 | ![image-python解释器.png](img/python%E8%A7%A3%E9%87%8A%E5%99%A8.png) 28 | 29 | 使用exit()退出 30 | 31 | ## 3. Python开发工具PyCharm(我下载的是2021.2.1)新版容易出现未知问题 32 | 33 | 在不涉及到人工智能的方向,推荐不用安装 anaconda ,直接安装 PyCharm 即可。它是目前功能最强大的 IDE 34 | 35 | PyCharm 一共有两个版本:专业版(收费) 与 社区版(免费、开源)。我们选择后者 36 | 37 | 第一步:下载 PyCharm 。 38 | 39 | 第二步:设置软件的安装路径,不用安装在 C 盘 40 | 41 | 第三步:PyCharm 基本设置。如下图设置,不建议把 Pycharm 添加到环境变量里面 42 | 43 | ![image-pycharm图片.png](img/pycharm%E5%9B%BE%E7%89%87.png) 44 | 45 | ## 4.创建Python项目 46 | 47 | 第一步:创建项目 **(Pycharm 不要汉化!不要汉化!不要汉化!)** 48 | 49 | 点开图标,初次点开会有一个提示窗口,不用管他,点击 New Project 50 | 51 | ![image-Pycharm打开界面.png](img/Pycharm%E6%89%93%E5%BC%80%E7%95%8C%E9%9D%A2.png) 52 | 53 | 第二步:设置项目路径,尽量放到 C 盘以外(非常重要!!) 54 | 55 | 你会看到类似如下图片。(因为我使用的是虚拟机安装,只用于开发 pycharm ,只有一个盘所以放在了 C 盘) 56 | 57 | ![image-pycharm配置界面.png](img/pycharm配置界面.png) 58 | 59 | 其中 base interpreter 会自动感知到 python.exe 的位置,没感知到可以手动定位(找到 python 安装路径然后选定 python.exe ) 60 | 61 | 新建文件并书写代码 62 | 63 | ```python 64 | print('Hello World') 65 | ``` 66 | 67 | 进行运行,右上角绿色的三角符号 Run 。 68 | 69 | 结果如下,就完成啦。 70 | 71 | ![image-Pycharm的配置结果.png](img/Pycharm%E7%9A%84%E9%85%8D%E7%BD%AE%E7%BB%93%E6%9E%9C.png) 72 | -------------------------------------------------------------------------------- /docs/software/TiddlyWiki.md: -------------------------------------------------------------------------------- 1 | # TiddlyWiki-知识管理框架 2 | 3 | 官网:https://tiddlywiki.com/ 4 | 5 | 国际交流社区:https://talk.tiddlywiki.org/ 6 | 7 | > 很久很久以前,在一条河流里,生活着许多许多的小鱼儿(Tiddlers),它们快活地在故事河(Story River)里游来游去。这些小鱼儿每一个都有自己的名字(条目名),自己的种类(内容类型),它携带的信息组成了鱼儿美丽的身体与骨架,附加的字段构成了它美丽的鳞片。——TiddlyWiki简易教程。 8 | 9 | ## 1. 中文社区 10 | 11 | - 太微中文教程:https://tw-cn.netlify.app/ 12 | - 太微中文Github社区:https://github.com/tiddly-gittly/TiddlyWiki-Chinese-Tutorial 13 | - 社区中文教程资源链接(丰富且友好的初学者资源):https://tw-cn.netlify.app/#%E8%B5%84%E6%BA%90%E9%93%BE%E6%8E%A5 14 | 15 | ## 2. 介绍太微 16 | 17 | 1. 「太微」是我们对 TiddlyWiki 的中文称呼,TiddlyWiki是一款极其强大又极具拓展性的个人 Wiki 系统。 18 | 19 | 2. 为什么把 TiddlyWiki 翻译成「太微」?因为受到 @pimgeek 的启发:TiddlyWiki 可以干很多细致轻量的工作,但也从不限制用法,可以无限组合叠加。故以其首字母音译为「太微」,TiddlyWiki 可以称为「太微笔记」「太微万能抽屉」「太微卡片盒」…… 20 | 21 | 3. 太微具有多种形态。拥有HTML文件与文件夹 2种存储形式。桌面浏览器,服务端软件,应用软件 3种使用方式。可以在任意平台中使用,只有你想不到的,没有做不到的。 22 | 23 | ### 3. 太微能做什么 24 | 25 | - 您曾感觉人类的大脑是有极限的吗?感觉它不足以容纳一切你需要记住的事? 26 | 27 | - 欢迎使用 TiddlyWiki,一个独特的非线性笔记本,用于截取、管理和复用复杂的信息。 28 | 29 | - 用它来保留您的待办清单、计划一篇散文或一部小说、或安排您的婚礼。记录每个闪过您脑中的想法,或创建一个灵活和反应迅速的网站。 30 | 31 | ## 4. 使用TiddlyWiki构建本地个人知识库 32 | 33 | > 非线性笔记,这很像我们的大脑的思维习惯,不连续的、片段的信息,通过一些线索联系在一起。正如TiddlyWiki的条目记载的信息,通过标签或者字段又或者链接与嵌入相互联系在一起。 34 | 35 | ### 4.1 TidGi(太记) 36 | 37 | - 下载链接:https://github.com/tiddly-gittly/TidGi-Desktop 38 | 39 | - TidGi,全平台的桌面端电脑支持,快速安装使用。内置ItonNote TiddlyWiki模板(预装常用插件)。省去配置插件的过程。 40 | 41 | 42 | 43 | ### 4.2 TiddlyDesktop 44 | - TiddlyDesktop。全平台桌面端软件,tiddlywiki模板可以在Tiddlystow中选一个使用,比较推荐的是tiddlywiki XP以及适配TidGi单文件wiki。TiddlyDesktop主要是用于管理单个tiddlywiki的工具,而TidGi是一个wiki就是一个工作空间,采用all in one的思路。 45 | 46 | - 下载链接:https://github.com/TiddlyWiki/TiddlyDesktop/releases 47 | 48 | ### 4.3 Timimi 49 | - Timimi,一个浏览器插件与伺服软件配套使用的软件。优点是使用方便,即点即用,缺点是,配置步骤比前两个多一点。 50 | 51 | - 可以把一个HTML单文件版wiki作为超级灵活的word文档使用。即即点即用。 52 | 53 | - 下载链接:https://ibnishak.github.io/Timimi/ 54 | 55 | ### 4.4 NodeJS环境 56 | 57 | - 最后一个Node.js,适用于对命令行工具、JS以及NodeJS有一定了解的用户。 58 | 59 | - 运行在NodeJS环境的TiddlyWiki,支持多用户同时使用/编辑相同的wiki的插件:TW5-Bob,与此再进一步封装了TW5-BobEXE程序,可以直接下载到你的电脑上运行。 60 | -------------------------------------------------------------------------------- /docs/software/antlr.en.md: -------------------------------------------------------------------------------- 1 | # Antlr 2 | 3 | Official website: 4 | 5 | ANTLR (ANother Tool for Language Recognition) is a powerful parser generator for reading, processing, executing, or translating structured text or binary files. It's widely used to build languages, tools, and frameworks. From a grammar, ANTLR generates a parser that can build and walk parse trees 6 | 7 | ## DownLoad 8 | 9 | - DownLoad Guide 10 | [download guide](https://www.antlr.org/download.html) 11 | 12 | ## Example 13 | 14 | example.g4 15 | ```antlr 16 | // specific grammar name 17 | grammar example; 18 | // for non-terminal, star with lower-case letter 19 | 20 | //'*' represents 0 or more occurrences of the production 21 | //'+' represents at least one occurrence 22 | //The following example will be parsed as vector 23 | addExp 24 | : number ('+' number)* 25 | ; 26 | 27 | //You can use # nickname after the production 28 | //Create an alias to analyze the production of different situations with the same name 29 | number 30 | : IntLiteral # number1 31 | | FloatLiteral # number2 32 | ; 33 | 34 | // for terminal, star with lower-case letter 35 | IntLiteral 36 | : [0-9]+ 37 | | ('0x'|'0X')[0-9a-fA-F]+ 38 | ; 39 | 40 | // '?' Indicates that the production may exist, if it exists, it only occurs once 41 | FloatLiteral 42 | : ([0-9]+|[0-9]*'.'[0-9]*)([eE]('+'|'-')?[0-9]+)?[fFlL]? 43 | | ('0x'|'0X')([0-9a-fA-F]*'.'[0-9a-fA-F]*)([pP]('+'|'-')?[0-9]+)?[fFlL]? 44 | ; 45 | ``` 46 | 47 | shell command 48 | ``` sh 49 | antlr -Dlanguage=Cpp -no-listener -visitor example.g4 50 | ``` 51 | 52 | exampleVisitor.h 53 | ``` cpp 54 | #include "exampleBaseVisitor.h" 55 | 56 | class ExampleVisitor : public exampleBaseVisitor { 57 | virtual antlrcpp::Any visitAddExp(exampleParser::AddExpContext *ctx) override; 58 | virtual antlrcpp::Any visitNumber(exampleParser::NumberContext *ctx) override; 59 | }; 60 | // Access string of current node by `ctx->getText()` 61 | // Visit `number` node of `addExp` by `ctx->number()` 62 | // then you can override visit-function to build your own parser ! 63 | ``` 64 | 65 | ## Reference 66 | 67 | - Antlr Repository 68 | [antlr repository](https://github.com/antlr) 69 | 70 | - Antlr Document 71 | [antlr official doc](https://github.com/antlr/antlr4/blob/master/doc/index.md) -------------------------------------------------------------------------------- /docs/software/antlr.md: -------------------------------------------------------------------------------- 1 | # Antlr 2 | 3 | 官网: 4 | 5 | ANTLR(ANother-Tool-for-Language-Recognition)是一个功能强大的语法分析器生成器,用于读取、处理、执行或翻译结构化文本或二进制文件。它被广泛用于构建语言、工具和框架。ANTLR根据语法生成一个解析器,该解析器可以构建和遍历解析树 6 | 7 | ## 安装 8 | 9 | - 官方指导 10 | [download guide](https://www.antlr.org/download.html) 11 | 12 | ## Example 13 | 14 | example.g4 15 | ```antlr 16 | // specific grammar name 17 | grammar example; 18 | // for non-terminal, star with lower-case letter 19 | 20 | // '*' 代表该产生式出现0次或以上 21 | // '+' 代表至少出现一次 22 | // 下例将会被解析成vector 23 | addExp 24 | : number ('+' number)* 25 | ; 26 | 27 | // 可以通过在产生式后 # nickname 28 | // 创建一个别名用来分析同名的不同情况下的产生式 29 | number 30 | : IntLiteral # number1 31 | | FloatLiteral # number2 32 | ; 33 | 34 | // for terminal, star with lower-case letter 35 | IntLiteral 36 | : [0-9]+ 37 | | ('0x'|'0X')[0-9a-fA-F]+ 38 | ; 39 | 40 | // '?' 代表该产生式可能存在,若存在仅出现一次 41 | FloatLiteral 42 | : ([0-9]+|[0-9]*'.'[0-9]*)([eE]('+'|'-')?[0-9]+)?[fFlL]? 43 | | ('0x'|'0X')([0-9a-fA-F]*'.'[0-9a-fA-F]*)([pP]('+'|'-')?[0-9]+)?[fFlL]? 44 | ; 45 | ``` 46 | 47 | shell command 48 | ``` sh 49 | antlr -Dlanguage=Cpp -no-listener -visitor example.g4 50 | ``` 51 | 52 | exampleVisitor.h 53 | ``` cpp 54 | #include "exampleBaseVisitor.h" 55 | 56 | class ExampleVisitor : public exampleBaseVisitor { 57 | virtual antlrcpp::Any visitAddExp(exampleParser::AddExpContext *ctx) override; 58 | virtual antlrcpp::Any visitNumber(exampleParser::NumberContext *ctx) override; 59 | }; 60 | // Access string of current node by `ctx->getText()` 61 | // Visit `number` node of `addExp` by `ctx->number()` 62 | // then you can override visit-function to build your own parser ! 63 | ``` 64 | 65 | ## 参考 66 | 67 | - 官方仓库 68 | [antlr repository](https://github.com/antlr) 69 | 70 | - 官方文档 71 | [antlr official doc](https://github.com/antlr/antlr4/blob/master/doc/index.md) 72 | -------------------------------------------------------------------------------- /docs/software/code-debug.en.md: -------------------------------------------------------------------------------- 1 | # code-debug 2 | 3 | Website: [https://github.com/chenzhiy2001/code-debug/](https://github.com/chenzhiy2001/code-debug) 4 | 5 | `code-debug` is a source-level kernel debugging tool that supports Rust. Currently it is capable of debugging the rCore-Tutorial-v3 operating system and support tracing from kernel to user space. Recent work has been done to implement richer and more robust tracing capabilities using eBPF technology. -------------------------------------------------------------------------------- /docs/software/code-debug.md: -------------------------------------------------------------------------------- 1 | # code-debug 2 | 3 | 官网: [https://github.com/chenzhiy2001/code-debug/](https://github.com/chenzhiy2001/code-debug) 4 | 5 | code-debug 是一个支持Rust语言的源代码级内核调试工具. 现在可以调试rCore-Tutorial-v3操作系统,支持从内核态跟踪到用户态. 最近的工作是,利用eBPF技术实现更丰富,更鲁棒的跟踪功能. 6 | -------------------------------------------------------------------------------- /docs/software/eunomia-bpf.md: -------------------------------------------------------------------------------- 1 | # eunomia-bpf: 简化和增强 eBPF 与 CO-RE[^1] 和 WebAssembly[^2] 2 | 3 | [![Actions Status](https://github.com/eunomia-bpf/eunomia-bpf/workflows/Ubuntu/badge.svg)](https://github.com/eunomia-bpf/eunomia-bpf/actions) 4 | [![GitHub release (latest by date)](https://img.shields.io/github/v/release/eunomia-bpf/eunomia-bpf)](https://github.com/eunomia-bpf/eunomia-bpf/releases) 5 | [![codecov](https://codecov.io/gh/eunomia-bpf/eunomia-bpf/branch/master/graph/badge.svg?token=YTR1M16I70)](https://codecov.io/gh/eunomia-bpf/eunomia-bpf) 6 | [![DeepSource](https://deepsource.io/gh/eunomia-bpf/eunomia-bpf.svg/?label=active+issues&show_trend=true&token=rcSI3J1-gpwLIgZWtKZC-N6C)](https://deepsource.io/gh/eunomia-bpf/eunomia-bpf/?ref=repository-badge) 7 | [![CodeFactor](https://www.codefactor.io/repository/github/eunomia-bpf/eunomia-bpf/badge)](https://www.codefactor.io/repository/github/eunomia-bpf/eunomia-bpf) 8 | 9 | **一个编译器和运行时框架,以帮助您尽可能轻松地构建和分发 eBPF 程序。** 10 | 11 | ## 介绍 12 | 13 | `eunomia-bpf` 是一个动态加载库/运行时和编译工具链框架,旨在帮助您更轻松地构建和分发 eBPF 程序。 14 | 15 | 使用 eunomia-bpf,您可以: 16 | 17 | - 简化编写 eBPF 程序: 18 | - 简化构建 CO-RE[^1] `libbpf` eBPF 应用程序:[仅编写 eBPF 内核代码](https://github.com/eunomia-bpf/eunomia-bpf/tree/master/documents/introduction.md#simplify-building-co-re-libbpf-ebpf-applications),并自动从内核中使用 `perf event` 或 `ring buffer` 自动输出采样数据到内核态。 19 | - [自动采样](https://github.com/eunomia-bpf/eunomia-bpf/tree/master/documents/introduction.md#automatically-sample-the-data-and-print-hists-in-userspace) 来自 hash mpas 的数据,并在用户空间中打印 `hists`(直方图等信息)。 20 | - [自动生成](https://github.com/eunomia-bpf/eunomia-bpf/tree/master/documents/introduction.md#automatically-generate-and-config-command-line-arguments) 并配置 eBPF 程序的 `命令行参数`。 21 | - 您可以同时使用 `BCC` 和 `libbpf` 等多种格式编写内核部分。 22 | - 使用 `Wasm`[^2] 构建 eBPF 程序:参见 [`Wasm-bpf`](https://github.com/eunomia-bpf/wasm-bpf) 项目 23 | - 在使用 C/C++、Rust、Go…等多种语言,使用 Wasm-bpf 库和工具链来使用 Wasm 编写和运行 eBPF,覆盖从tracing、networking、security到其他用例。 24 | - 简化分发 eBPF 程序: 25 | - 一个[工具](ecli/)用于将预编译的 eBPF 程序作为 Wasm `OCI` 镜像推送、拉取或运行 26 | - 在不需要重新编译 eBPF 程序、不限制架构和内核版本的情况下,在[`1` 行 bash](https://github.com/eunomia-bpf/eunomia-bpf/tree/master/documents/introduction.md#dynamic-load-and-run-co-re-ebpf-kernel-code-from-the-cloud-with-url-or-oci-image)中从 `云端存储库` 或 `URL` 运行 eBPF 程序。 27 | - [动态加载](bpf-loader)带有 `JSON` 配置文件或 `Wasm` 用户态控制和数据处理模块的 eBPF 程序。 28 | 29 | 更多信息请参见 [documents/introduction.md](https://github.com/eunomia-bpf/eunomia-bpf/tree/master/documents/introduction.md)。 30 | 31 | [^1]: CO-RE:[Compile Once – Run Everywhere](https://facebookmicrosites.github.io/bpf/blog/2020/02/19/bpf-portability-and-co-re.html) 32 | 33 | [^2]: WebAssembly 或 Wasm:https://webassembly.org/ 34 | 35 | ## eunomia-bpf 提供了大量教程和示例应用,帮助入门 eBPF 程序开发 36 | 37 | - Github 模板:[eunomia-bpf/ebpm-template](https://github.com/eunomia-bpf/ebpm-template) 38 | - 示例 bpf 程序:[examples/bpftools](https://github.com/eunomia-bpf/eunomia-bpf/tree/master/examples/bpftools/) 39 | - eBPF 开发教程:[eunomia-bpf/bpf-developer-tutorial](https://github.com/eunomia-bpf/bpf-developer-tutorial) 40 | 41 | 您可以使用一行 bash 从云端下载预编译的 eBPF 程序并将其运行到内核中: 42 | 43 | ```bash 44 | # 从 https://github.com/eunomia-bpf/eunomia-bpf/releases/latest/download/ecli 下载 ecli 运行时 45 | $ wget https://aka.pw/bpf-ecli -O ecli && chmod +x ./ecli 46 | $ sudo ./ecli https://eunomia-bpf.github.io/eunomia-bpf/sigsnoop/package.json # 从 url 运行预编译的 ebpf 代码 47 | $ sudo ./ecli sigsnoop:latest # 直接使用名称运行,并从我们的仓库下载最新版本 bpf 工具 48 | ``` 49 | -------------------------------------------------------------------------------- /docs/software/fzf.md: -------------------------------------------------------------------------------- 1 | ![fzf.png](https://raw.githubusercontent.com/junegunn/i/master/fzf.png) 2 | 3 | ## 简介 4 | 5 | 仓库地址: 6 | 7 | FZF 是一款使用 Go 编写的交互式 CLI ,可用来查找任何列表内容、文件、历史指令、进程、host 名、书签或 Git commit 等内容。 8 | 9 | ![image-20230209215751132](https://pic.skihome.xyz/2023/02/09/63e4fbe7685d2.webp) 10 | 11 | ## 安装 12 | 13 | ### macOS 14 | 15 | 对于 macOS ,推荐使用 Homebrew 进行安装: 16 | 17 | ```bash 18 | brew install fzf 19 | ``` 20 | 21 | ### Linux 22 | 23 | 在 Linux 发行版上,可使用不同的包管理器进行安装,例如: 24 | 25 | **Debian/Ubuntu(Apt)**: 26 | 27 | ```bash 28 | sudo apt install fzf 29 | ``` 30 | 31 | **ArchLinux(Pacman)**: 32 | 33 | ```bash 34 | sudo pacman -S fzf 35 | ``` 36 | 37 | ### Windows 38 | 39 | *并不推荐在 Windows 中使用 FZF 。Windows 可使用 [Everything](https://www.voidtools.com/zh-cn/) 进行搜索。* 40 | 41 | Windows下可使用 Scoop 进行安装使用。 42 | 43 | ```bash 44 | scoop install fzf 45 | ``` 46 | 47 | ## 简单使用 48 | 49 | ### 文件搜索 50 | 51 | 直接执行 FZF ,打开文件搜索功能。 52 | 53 | ```bash 54 | fzf 55 | ``` 56 | 57 | 在此模式下,用户可输入特定的文件或目录名,FZF 将会在**当前目录**下执行查找,并显示出**指定文件或目录**的**相对路径**。 58 | 59 | 使用快捷键 `Ctrl+J` 或 `Ctrl+N` 可向下滚动列表; `Ctrl+K` 或 `Ctrl+P` 可向下滚动列表。 60 | 使用 `Enter` 选中条目并退出 FZF,`Ctrl+C` 、`Ctrl+G` 或 `Esc` 可退出 FZF 而不进行选择。 61 | 62 | ### 作为 Vim 插件 63 | 64 | FZF 可作为 Vim 的插件使用,方便快速查找需要编辑的文件。 65 | 66 | 在本例中,使用 vim-plug 插件管理器进行安装: 67 | 编辑 `~/.vimrc` 文件,在 `call plug#begin()` 下添加如下行: 68 | 69 | ```bash 70 | Plug 'junegunn/fzf', { 'do': { -> fzf#install() } } 71 | ``` 72 | 73 | 重新加载 `.vimrc` 文件: 74 | 75 | ```bash 76 | source ~/.vimrc 77 | ``` 78 | 79 | 打开 vim ,并执行 `:PlugInstall` 用于安装插件。 80 | 81 | ## 更多信息 82 | 83 | ### 优点 84 | 85 | 1. 本工具使用 Go 编写,不需其他依赖 86 | 2. 性能强悍,搜索效率高 87 | 3. 功能丰富,可视化界面(TUI)易于操作 88 | 4. 可对接诸多工具(例Vim、tmux 等) 89 | -------------------------------------------------------------------------------- /docs/software/gdbdashboard.en.md: -------------------------------------------------------------------------------- 1 | # GDB-dashboard 2 | 3 | ## Introduction 4 | 5 | Using python to configure the gdb debugging interface, you can write your own code to define the entire debugging interface. It can be said that it is comparable to an IDE, and the display is also very good-looking. It is completely based on the terminal. As the underlying debugging software, it can help developers better view variables and registers. , single-step execution, etc. 6 | 7 | ## install 8 | 9 | + open source address: 10 | 11 | + get it 12 | 13 | ```sh 14 | wget -P ~ https://git.io/.gdbinit # If the network speed is slow, you can directly create a new file with the same name. gdbinit and then copy and paste it 15 | ``` 16 | 17 | + renderings ![gdbrenderings](https://raw.githubusercontent.com/wiki/cyrus-and/gdb-dashboard/Screenshot.png) 18 | 19 | ## Recommended reason 20 | 21 | It is true that the IDE integrates a lot of debugging tools at present, but GDB still plays an irreplaceable role in some kernel programming or other low-level development fields. For this reason, we hope to find a more observable page in the original boring debugging terminal. Fortunately, someone has helped us to realize this tool, we hope to bring such convenience to everyone. 22 | 23 | ## Run and debug basic commands 24 | 25 | Reference [common commands for gdb debugging](https://www.jianshu.com/p/5663e4a55202) 26 | 27 | ## Notice 28 | 29 | When using this plugin, you need to check whether the gdb currently in use supports python scripts. When `Scripting in the "Python" language is not supported in this copy of GDB.` appears, it indicates that the gdb does not support python scripts and cannot be used this plugin. In addition, you also need to pay attention to whether the versions of gdb and python match, see [issue](https://github.com/cyrus-and/gdb-dashboard/issues/147). 30 | -------------------------------------------------------------------------------- /docs/software/gdbdashboard.md: -------------------------------------------------------------------------------- 1 | # GDB-dashboard 2 | 3 | ## 简介 4 | 5 | 使用 python 配置了 gdb 调试界面,完全可以自己写代码去定义整个调试界面可以说是堪比 IDE ,显示也非常好看,完全基于终端,作为底层的调试软件可以帮助开发者更好的查看变量、寄存器、单步执行等。 6 | 7 | ## 安装(linux环境) 8 | 9 | + 开源地址 10 | 11 | + 获取 12 | 13 | ```sh 14 | wget -P ~ https://git.io/.gdbinit #如果网速较慢可以直接新建同名文件.gdbinit之后复制粘贴过来 15 | ``` 16 | 17 | + 效果图 18 | ![gdb效果图](https://raw.githubusercontent.com/wiki/cyrus-and/gdb-dashboard/Screenshot.png) 19 | 20 | ## 推荐理由 21 | 22 | 目前 IDE 集成了很多的调试工具,但是在一些内核编程或者其他的底层开发领域 gdb 仍然具备不可替代的作用,为此我们希望在原本枯燥的调试终端找到更加便于观察的页面好在已经有人帮我们实现了这一工具为此我们希望把这样的便捷带给每一个人。 23 | 24 | ## 运行调试基本指令 25 | 26 | 参考 [gdb调试常见指令](https://www.jianshu.com/p/5663e4a55202) 27 | 28 | ## 注意 29 | 30 | 在使用该插件时需要查看当前所使用的 gdb 是否支持 python 脚本,当出现 `Scripting in the "Python" language is not supported in this copy of GDB.` 时则表明该 gdb 不支持 python 脚本,无法使用该插件。另外,也需要注意 gdb 与 python 的版本是否匹配的问题,见 [issue](https://github.com/cyrus-and/gdb-dashboard/issues/147) 31 | -------------------------------------------------------------------------------- /docs/software/img/Pycharm打开界面.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/storage-db/ToolDiy/b83977c85695c48e1d48119b8c774c192895765f/docs/software/img/Pycharm打开界面.png -------------------------------------------------------------------------------- /docs/software/img/Pycharm的配置结果.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/storage-db/ToolDiy/b83977c85695c48e1d48119b8c774c192895765f/docs/software/img/Pycharm的配置结果.png -------------------------------------------------------------------------------- /docs/software/img/pycharm图片.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/storage-db/ToolDiy/b83977c85695c48e1d48119b8c774c192895765f/docs/software/img/pycharm图片.png -------------------------------------------------------------------------------- /docs/software/img/pycharm配置界面.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/storage-db/ToolDiy/b83977c85695c48e1d48119b8c774c192895765f/docs/software/img/pycharm配置界面.png -------------------------------------------------------------------------------- /docs/software/img/python解释器.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/storage-db/ToolDiy/b83977c85695c48e1d48119b8c774c192895765f/docs/software/img/python解释器.png -------------------------------------------------------------------------------- /docs/software/mathpix.en.md: -------------------------------------------------------------------------------- 1 | # Mathpix 2 | 3 | Official website: 4 | 5 | Mathpix is a tex format formula generation software. Its main function is to identify the formula in the screenshot through OCR technology and generate the corresponding tex code, which can greatly speed up the speed of formula writing in the process of writing a thesis. 6 | 7 | Features: 8 | 9 | - Support the recognition of handwritten formulas and automatically generate tex codes. 10 | - Support the operation of the digital board, you can write formulas, recognize and generate tex through an external digital board. 11 | - Support table recognition, although not as accurate as formulas, but in most cases the effect is ok. 12 | - Interactive editing interface, when the orc result deviates, you can directly modify it. 13 | 14 | Shortcoming: 15 | 16 | - There is a limit on the number of times of use, but it can be solved by changing the mailbox. According to my experience, I don’t use that much at all. The normal model is enough, and it’s not worthwhile to pay to upgrade the pro version. 17 | -------------------------------------------------------------------------------- /docs/software/mathpix.md: -------------------------------------------------------------------------------- 1 | # Mathpix 2 | 3 | 官网: 4 | 5 | Mathpix是一款 tex 格式公式生成软件,它主要的功能是通过 ocr 技术识别截图当中的公式,并生成对应的 tex 代码,在论文写作的过程中能够极大的加速公式编写的速度。 6 | 7 | 特性: 8 | 9 | - 支持手写公式的识别并自动生成 tex 代码。 10 | - 支持数位板的操作,可以通过外接数位板的方式写入公式,识别并生成 tex 。 11 | - 支持表格的识别,虽然不如公式那么精准,但是大部分情况下效果还行。 12 | - 交互式编辑界面, orc 结果有偏差的时候可以直接修改。 13 | 14 | 缺点: 15 | 16 | - 有使用次数的限制,但是可以通过更换邮箱的方式解决,根据本人的经验根本用不到那么多,普通款已经很足够,付费升级 pro 版本并不划算。 17 | -------------------------------------------------------------------------------- /docs/software/nano.en.md: -------------------------------------------------------------------------------- 1 | GNU nano 2 | 3 | Official website: 4 | 5 | GNU nano is a simple and easy-to-use command line editor, it is the default text editor for some 6 | linux distributions, and you can also use it in the windows. 7 | 8 | ## install 9 | 10 | In the linux distributions we can use the package manager to install it. 11 | 12 | Take the debain with apt as example: 13 | 14 | ```shell 15 | sudo apt install nano 16 | ``` 17 | 18 | ## basic use 19 | 20 | Input nano to the terminal you can get the detail instruction. 21 | 22 | ![image.png](https://s2.loli.net/2023/02/04/5hON6PcIaBWkmwl.png) 23 | 24 | ## advantages 25 | 26 | - lightweight and take a little system recourse. 27 | - simple and easy to use. 28 | 29 | ## disadvantages 30 | 31 | - few functions, compared with emacs and vim, nano is less scalable. 32 | -------------------------------------------------------------------------------- /docs/software/nano.md: -------------------------------------------------------------------------------- 1 | # GNU nano 2 | 3 | 官网: [https://www.nano-editor.org/](https://www.nano-editor.org/) 4 | 5 | gnu nano 是一个简单易上手的命令行编辑器,部分 linux 发行版的默认编辑器就是 nano ,同时你也可以在 windows 中安装它。 6 | 7 | ## 安装 8 | 9 | 在 linux 发行版中我们可以使用发行版对应的的包管理工具进行安装。 10 | 11 | 以使用 apt 作为包管理工具的 debain 为例: 12 | 13 | ```shell 14 | sudo apt install nano 15 | ``` 16 | 17 | ## 基础使用 18 | 19 | 在命令行中输入 nano 就会出现详细的操作指导。 20 | 21 | ![image.png](https://s2.loli.net/2023/02/04/OLH9r4kAGCQ83ua.png) 22 | 23 | ## 优点 24 | 25 | - 轻量,占用系统资源少。 26 | - 简单易上手。 27 | 28 | ## 缺点 29 | 30 | - 功能较少,相比emacs,vim拓展性较差。 31 | -------------------------------------------------------------------------------- /docs/software/ranger.en.md: -------------------------------------------------------------------------------- 1 | # Ranger 2 | 3 | ## Introduction 4 | 5 | Ranger is a terminal file manager with Vim-style shortcuts. You can use the keyboard to quickly view and preview files, navigate between different folders, and perform common operations such as copying, pasting, deleting, and renaming files or folders directly under the ranger interface. 6 | 7 | ## Install 8 | 9 | + Official website 10 | + How to install ranger 11 | - Ubuntu && Debian 12 | 13 | ```bash 14 | sudo apt install ranger 15 | ``` 16 | 17 | - install from pip 18 | 19 | ```bash 20 | pip install ranger-fm 21 | ``` 22 | 23 | + ranger renderings 24 | 25 | ![ranger interface demo](https://raw.githubusercontent.com/trace1729/blog_img/master/20230204233006.png) 26 | 27 | ## Recommended reason 28 | 29 | 1. No longer need to use the `cd` command to switch directories. 30 | 2. Simplify the operation of copying, pasting and renaming files (folders). 31 | 3. Ranger has a corresponding vim plugin, you can open ranger in vim after some configuration, which will boost your effiency. 32 | 33 | ## refer to 34 | 35 | - Official documentation of the tool 36 | 37 | [ranger official wiki](https://github.com/ranger/ranger/wiki/Official-user-guide) 38 | - Related pages 39 | 40 | [ranger cheat sheet](https://gist.github.com/heroheman/aba73e47443340c35526755ef79647eb) 41 | -------------------------------------------------------------------------------- /docs/software/ranger.md: -------------------------------------------------------------------------------- 1 | # Ranger 2 | 3 | ## 简介 4 | 5 | Ranger 是有着 Vim 风格的快捷键的终端文件管理器。你可以使用键盘快速查看、预览文件,在不同的文件夹之间导航,还可以直接在ranger下对文件(文件夹)进行复制、粘贴、删除、重命名等常用操作。 6 | 7 | ## 安装 8 | 9 | + 开源地址 10 | + 获取 11 | - Ubuntu && Debian 12 | 13 | ```bash 14 | sudo apt install ranger 15 | ``` 16 | 17 | - 通过 pip 安装 18 | 19 | ```bash 20 | pip install ranger-fm 21 | ``` 22 | 23 | + 效果图 24 | ![ranger 效果图](https://raw.githubusercontent.com/trace1729/blog_img/master/20230204233006.png) 25 | 26 | ## 推荐理由 27 | 28 | 1. 不再需要再使用 cd 命令切换目录 29 | 2. 简化了对文件(夹)的复制、粘贴、重命名等操作。 30 | 3. ranger 有对应的 Vim 插件,可以在 Vim 里打开 ranger,能提高文件的编辑效率。 31 | 32 | ## 参考 33 | 34 | 参考 35 | 36 | - 官方文档 37 | 38 | [ranger official wiki](https://github.com/ranger/ranger/wiki/Official-user-guide) 39 | 40 | - 快捷键总结 41 | 42 | [ranger cheat sheet](https://gist.github.com/heroheman/aba73e47443340c35526755ef79647eb) 43 | -------------------------------------------------------------------------------- /docs/software/texmacs.en.md: -------------------------------------------------------------------------------- 1 | # GNU TeXmacs 2 | 3 | Website: 4 | 5 | Try GNU TeXmacs if you are being tortured by *LaTeX* GNU TeXmacs is a WYSIWYG open source editor for scientific documents (papers, notes, etc.). Highly recommended if you write lots of maths! 6 | 7 | Features: 8 | 9 | - Editing tables and formulas visually. 10 | - Intuitive keyboard shortcuts. One of them is that when editing a mathematical formula, you can switch to similar symbols by pressing `tab` multiple times. For example, press `a` and then press `tab` to get $\alpha$ and other characters that looks like a. 11 | - Support many computer algebra systems and interactive software, similar to Jupyter Notebook 12 | - Support Scheme and macros for hacking 13 | 14 | In most cases the built-in documentations will suit your needs. Occasionally, there are outdated parts in the documentation. In this case you can read [The Jolly Writer](https://www.scypress.com/book_info.html), which is also written by the main author of TeXmacs. 15 | 16 | Remember to switch to Chinese mode (click the national flag on the menu bar), otherwise it will not line wrap automatically. 17 | -------------------------------------------------------------------------------- /docs/software/texmacs.md: -------------------------------------------------------------------------------- 1 | # GNU TeXmacs 2 | 3 | 官网: 4 | 5 | 被 *LaTeX* 折磨的话,不妨试试 GNU TeXmacs!TeXmacs 是一款所见即所得的科学文档(论文,笔记等)开源编辑器。 6 | 如果写很多的数学公式的话可以试试,非常好用! 7 | 8 | 特性: 9 | 10 | - 完全可视化的表格,公式编辑环境。 11 | - 非常人性化的按键设计。最好用的一个功能是,在编辑数学公式时,你按任意一个字符,然后就可以用多次 TAB 键相继选择相似的字符。比如,按 `a` 再按tab就可以得到 $\alpha$ 等看着像 a 的字符。 12 | - 支持很多种计算机代数系统,和交互式软件,类似 Jupyter Notebook 。 13 | - 支持Scheme语言和宏进行功能扩展。 14 | 15 | 需要什么功能看一看内建文档就差不多会了,偶尔文档里有过时的地方,可以下一本 [The Jolly Writer](https://www.scypress.com/book_info.html) ,也是软件的主要作者写的。 16 | 17 | 唯一要注意的一点是,记得切换到中文模式(点菜单栏上面的国旗),否则不会自动换行。 18 | -------------------------------------------------------------------------------- /docs/specification/.pages: -------------------------------------------------------------------------------- 1 | nav: 2 | - pr.md 3 | - pr.en.md 4 | - markdown 5 | - template.md 6 | - template.en.md 7 | -------------------------------------------------------------------------------- /docs/specification/markdown/chinese_copywriting_guidelines.md: -------------------------------------------------------------------------------- 1 | # 中英混排规范 2 | 3 | ## 空格 4 | 5 | > 「有研究显示,打字的时候不喜欢在中文和英文之间加空格的人,感情路都走得很辛苦,有七成的比例会在 34 岁的时候跟自己不爱的人结婚,而其余三成的人最后只能把遗产留给自己的猫。毕竟爱情跟书写都需要适时地留白。 6 | > 7 | > 与大家共勉之。」——[vinta/paranoid-auto-spacing](https://github.com/vinta/pangu.js) 8 | 9 | ### 中英文之间需要增加空格 10 | 11 | 正确: 12 | 13 | > 在 LeanCloud 上,数据存储是围绕 `AVObject` 进行的。 14 | 15 | 错误: 16 | 17 | > 在LeanCloud上,数据存储是围绕`AVObject`进行的。 18 | > 19 | > 在 LeanCloud上,数据存储是围绕`AVObject` 进行的。 20 | 21 | 完整的正确用法: 22 | 23 | > 在 LeanCloud 上,数据存储是围绕 `AVObject` 进行的。每个 `AVObject` 都包含了与 JSON 兼容的 key-value 对应的数据。数据是 schema-free 的,你不需要在每个 `AVObject` 上提前指定存在哪些键,只要直接设定对应的 key-value 即可。 24 | 25 | 例外:「豆瓣FM」等产品名词,按照官方所定义的格式书写。 26 | 27 | ### 中文与数字之间需要增加空格 28 | 29 | 正确: 30 | 31 | > 今天出去买菜花了 5000 元。 32 | 33 | 错误: 34 | 35 | > 今天出去买菜花了 5000元。 36 | > 37 | > 今天出去买菜花了5000元。 38 | 39 | ### 数字与单位之间需要增加空格 40 | 41 | 正确: 42 | 43 | > 我家的光纤入屋宽带有 10 Gbps,SSD 一共有 20 TB 44 | 45 | 错误: 46 | 47 | > 我家的光纤入屋宽带有 10Gbps,SSD 一共有 20TB 48 | 49 | 例外:度数/百分比与数字之间不需要增加空格: 50 | 51 | 正确: 52 | 53 | > 角度为 90° 的角,就是直角。 54 | > 55 | > 新 MacBook Pro 有 15% 的 CPU 性能提升。 56 | 57 | 错误: 58 | 59 | > 角度为 90 ° 的角,就是直角。 60 | > 61 | > 新 MacBook Pro 有 15 % 的 CPU 性能提升。 62 | 63 | ### 全角标点与其他字符之间不加空格 64 | 65 | 正确: 66 | 67 | > 刚刚买了一部 iPhone,好开心! 68 | 69 | 错误: 70 | 71 | > 刚刚买了一部 iPhone ,好开心! 72 | > 73 | > 刚刚买了一部 iPhone, 好开心! 74 | 75 | ### 用 `text-spacing` 来挽救? 76 | 77 | CSS Text Module Level 4 的 [`text-spacing`](https://www.w3.org/TR/css-text-4/#text-spacing-property) 和 Microsoft 的 [`-ms-text-autospace`](https://msdn.microsoft.com/library/ms531164(v=vs.85).aspx) 可以实现自动为中英文之间增加空白。不过目前并未普及,另外在其他应用场景,例如 macOS、iOS、Windows 等用户界面目前并不存在这个特性,所以请继续保持随手加空格的习惯。 78 | 79 | ## 标点符号 80 | 81 | ### 不重复使用标点符号 82 | 83 | 即使中国大陆的标点符号用法允许重复使用标点符号,但是这么做会破坏句子的美观性。 84 | 85 | 正确: 86 | 87 | > 德国队竟然战胜了巴西队! 88 | > 89 | > 她竟然对你说「喵」?! 90 | 91 | 错误: 92 | 93 | > 德国队竟然战胜了巴西队!! 94 | > 95 | > 德国队竟然战胜了巴西队!!!!!!!! 96 | > 97 | > 她竟然对你说「喵」??!! 98 | > 99 | > 她竟然对你说「喵」?!?!??!! 100 | 101 | ## 全角和半角 102 | 103 | 不明白什么是全角(全形)与半角(半形)符号?请查看维基百科条目『[全角和半角](https://zh.wikipedia.org/wiki/%E5%85%A8%E5%BD%A2%E5%92%8C%E5%8D%8A%E5%BD%A2)』。 104 | 105 | ### 使用全角中文标点 106 | 107 | 正确: 108 | 109 | > 嗨!你知道嘛?今天前台的小妹跟我说「喵」了哎! 110 | > 111 | > 核磁共振成像(NMRI)是什么原理都不知道?JFGI! 112 | 113 | 错误: 114 | 115 | > 嗨! 你知道嘛? 今天前台的小妹跟我说 "喵" 了哎! 116 | > 117 | > 嗨!你知道嘛?今天前台的小妹跟我说"喵"了哎! 118 | > 119 | > 核磁共振成像 (NMRI) 是什么原理都不知道? JFGI! 120 | > 121 | > 核磁共振成像(NMRI)是什么原理都不知道?JFGI! 122 | 123 | ### 数字使用半角字符 124 | 125 | 正确: 126 | 127 | > 这个蛋糕只卖 1000 元。 128 | 129 | 错误: 130 | 131 | > 这个蛋糕只卖 1000 元。 132 | 133 | 例外:在设计稿、宣传海报中如出现极少量数字的情形时,为方便文字对齐,是可以使用全角数字的。 134 | 135 | ### 遇到完整的英文整句、特殊名词,其内容使用半角标点 136 | 137 | 正确: 138 | 139 | > 乔布斯那句话是怎么说的?「Stay hungry, stay foolish.」 140 | > 141 | > 推荐你阅读《Hackers & Painters: Big Ideas from the Computer Age》,非常的有趣。 142 | 143 | 错误: 144 | 145 | > 乔布斯那句话是怎么说的?「Stay hungry,stay foolish。」 146 | > 147 | > 推荐你阅读《Hackers&Painters:Big Ideas from the Computer Age》,非常的有趣。 148 | 149 | ## 名词 150 | 151 | ### 专有名词使用正确的大小写 152 | 153 | 大小写相关用法原属于英文书写范畴,不属于本 wiki 讨论内容,在这里只对部分易错用法进行简述。 154 | 155 | 正确: 156 | 157 | > 使用 GitHub 登录 158 | > 159 | > 我们的客户有 GitHub、Foursquare、Microsoft Corporation、Google、Facebook, Inc.。 160 | 161 | 错误: 162 | 163 | > 使用 github 登录 164 | > 165 | > 使用 GITHUB 登录 166 | > 167 | > 使用 Github 登录 168 | > 169 | > 使用 gitHub 登录 170 | > 171 | > 使用 gイんĤЦ8 登录 172 | > 173 | > 我们的客户有 github、foursquare、microsoft corporation、google、facebook, inc.。 174 | > 175 | > 我们的客户有 GITHUB、FOURSQUARE、MICROSOFT CORPORATION、GOOGLE、FACEBOOK, INC.。 176 | > 177 | > 我们的客户有 Github、FourSquare、MicroSoft Corporation、Google、FaceBook, Inc.。 178 | > 179 | > 我们的客户有 gitHub、fourSquare、microSoft Corporation、google、faceBook, Inc.。 180 | > 181 | > 我们的客户有 gイんĤЦ8、キouЯƧquムгє、๓เςг๏ร๏Ŧt ς๏гק๏гคtเ๏ภn、900913、ƒ4ᄃëв๏๏к, IПᄃ.。 182 | 183 | 注意:当网页中需要配合整体视觉风格而出现全部大写/小写的情形,HTML 中请使用标淮的大小写规范进行书写;并通过 `text-transform: uppercase;`/`text-transform: lowercase;` 对表现形式进行定义。 184 | 185 | ### 不要使用不地道的缩写 186 | 187 | 正确: 188 | 189 | > 我们需要一位熟悉 TypeScript、HTML5,至少理解一种框架(如 React、Next.js)的前端开发者。 190 | 191 | 错误: 192 | 193 | > 我们需要一位熟悉 Ts、h5,至少理解一种框架(如 RJS、nextjs)的 FED。 194 | 195 | ## 争议 196 | 197 | 以下用法略带有个人色彩,即:无论是否遵循下述规则,从语法的角度来讲都是**正确**的。 198 | 199 | ### 链接之间增加空格 200 | 201 | 用法: 202 | 203 | > 请 [提交一个 issue](#) 并分配给相关同事。 204 | > 205 | > 访问我们网站的最新动态,请 [点击这里](#) 进行订阅! 206 | 207 | 对比用法: 208 | 209 | > 请[提交一个 issue](#)并分配给相关同事。 210 | > 211 | > 访问我们网站的最新动态,请[点击这里](#)进行订阅! 212 | 213 | ### 简体中文使用直角引号 214 | 215 | 用法: 216 | 217 | > 「老师,『有条不紊』的『紊』是什么意思?」 218 | 219 | 对比用法: 220 | 221 | > “老师,‘有条不紊’的‘紊’是什么意思?” 222 | 223 | !!! note 中英混排规范 224 | 225 | 本要求取自 [中文文案排版指北](https://github.com/sparanoid/chinese-copywriting-guidelines/blob/master/README.zh-Hans.md) ,你可以点击链接来了解更多内容。 226 | -------------------------------------------------------------------------------- /docs/specification/markdown/latex.md: -------------------------------------------------------------------------------- 1 | # LaTeX 2 | 3 | ## 如何插入公式 4 | 5 | _LaTeX_ 的数学公式有两种:行中公式和独立公式(行间公式)。行中公式放在文中与其它文字混编,独立公式单独成行。 6 | 7 | 行中公式可以用如下方法表示: 8 | 9 | `$ 数学公式 $` 10 | 11 | 独立公式可以用如下方法表示: 12 | 13 | `$$ 数学公式 $$` 14 | 15 | ## 函数、符号及特殊字符 16 | 17 | ### 声调 / 变音符号 18 | 19 | `\dot{a}, \ddot{a}, \acute{a}, \grave{a}` 20 | 21 | $\dot{a}, \ddot{a}, \acute{a}, \grave{a}$ 22 | 23 | `\check{a}, \breve{a}, \tilde{a}, \bar{a}` 24 | 25 | $\check{a}, \breve{a}, \tilde{a}, \bar{a}$ 26 | 27 | `\hat{a}, \widehat{a}, \vec{a}` 28 | 29 | $\hat{a}, \widehat{a}, \vec{a}$ 30 | 31 | ### 标准函数 32 | 33 | 指数 34 | 35 | `\exp_a b = a^b, \exp b = e^b, 10^m` 36 | 37 | $\exp_a b = a^b, \exp b = e^b, 10^m$ 38 | 39 | 对数 40 | 41 | `\ln c, \lg d = \log e, \log_{10} f` 42 | 43 | $\ln c, \lg d = \log e, \log_{10} f$ 44 | 45 | 三角函数 46 | 47 | `\sin a, \cos b, \tan c, \cot d, \sec e, \csc f` 48 | 49 | $\sin a, \cos b, \tan c, \cot d, \sec e, \csc f$ 50 | 51 | `\arcsin a, \arccos b, \arctan c` 52 | 53 | $\arcsin a, \arccos b, \arctan c$ 54 | 55 | `\sinh a, \cosh b, \tanh c, \coth d` 56 | 57 | $\sinh a, \cosh b, \tanh c, \coth d$ 58 | 59 | `\operatorname{sh}k, \operatorname{ch}l, \operatorname{th}m, \operatorname{coth}n` 60 | 61 | $\operatorname{sh}k, \operatorname{ch}l, \operatorname{th}m, \operatorname{coth}n$ 62 | 63 | `\operatorname{argsh}o, \operatorname{argch}p, \operatorname{argth}q` 64 | 65 | $\operatorname{argsh}o, \operatorname{argch}p, \operatorname{argth}q$ 66 | 67 | 最大值,最小值 68 | 69 | `\min(x,y), \max(x,y)` 70 | 71 | $\min(x,y), \max(x,y)$ 72 | 73 | ### 界限,极限 74 | 75 | `\min x, \max y, \inf s, \sup t` 76 | 77 | $\min x, \max y, \inf s, \sup t$ 78 | 79 | `\lim u, \liminf v, \limsup w` 80 | 81 | $\lim u, \liminf v, \limsup w$ 82 | 83 | `\lim_{x \to \infty} \frac{1}{n(n+1)}` 84 | 85 | $\lim_{x \to \infty} \frac{1}{n(n+1)}$ 86 | 87 | `\dim p, \deg q, \det m, \ker\phi` 88 | 89 | $\dim p, \deg q, \det m, \ker\phi$ 90 | 91 | ### 投射 92 | 93 | `\Pr j, \hom l, \lVert z \rVert, \arg z` 94 | 95 | $\Pr j, \hom l, \lVert z \rVert, \arg z$ 96 | 97 | ### 微分及导数 98 | 99 | `dt, \mathrm{d}t, \partial t, \nabla\psi` 100 | 101 | $dt, \mathrm{d}t, \partial t, \nabla\psi$ 102 | 103 | `dy/dx, \mathrm{d}y/\mathrm{d}x, \frac{dy}{dx}, \frac{\mathrm{d}y}{\mathrm{d}x}, \frac{\partial^2}{\partial x_1\partial x_2}y` 104 | 105 | $dy/dx, \mathrm{d}y/\mathrm{d}x, \frac{dy}{dx}, \frac{\mathrm{d}y}{\mathrm{d}x}, \frac{\partial^2}{\partial x_1\partial x_2}y$ 106 | 107 | `\prime, \backprime, f^\prime, f', f'', f^{(3)}, \dot y, \ddot y` 108 | 109 | $\prime, \backprime, f^\prime, f', f'', f^{(3)}, \dot y, \ddot y$ 110 | 111 | ### 类字母符号及常数 112 | 113 | `\infty, \aleph, \complement, \backepsilon, \eth, \Finv, \hbar` 114 | 115 | ∞,ℵ,∁,∍,ð,Ⅎ,ℏ 116 | 117 | `\Im, \imath, \jmath, \Bbbk, \ell, \mho, \wp, \Re, \circledS` 118 | 119 | $\Im, \imath, \jmath, \Bbbk, \ell, \mho, \wp, \Re, \circledS$ 120 | 121 | ### 模运算 122 | 123 | `s_k \equiv 0 \pmod{m}` 124 | 125 | $s_k \equiv 0 \pmod{m}$ 126 | 127 | `a \bmod b` 128 | 129 | $a \bmod b$ 130 | 131 | `\gcd(m, n), \operatorname{lcm}(m, n)` 132 | 133 | $\gcd(m, n), \operatorname{lcm}(m, n)$ 134 | 135 | `\mid, \nmid, \shortmid, \nshortmid` 136 | 137 | $\mid, \nmid, \shortmid, \nshortmid$ 138 | 139 | ### 根号 140 | 141 | `\surd, \sqrt{2}, \sqrt[n]{}, \sqrt[3]{\frac{x^3+y^3}{2}}` 142 | 143 | $\surd, \sqrt{2}, \sqrt[n]{}, \sqrt[3]{\frac{x^3+y^3}{2}}$ 144 | 145 | ### 运算符 146 | 147 | `+, -, \pm, \mp, \dotplus` 148 | 149 | $+, -, \pm, \mp, \dotplus$ 150 | 151 | `\times, \div, \divideontimes, /, \backslash` 152 | 153 | $\times, \div, \divideontimes, /, \backslash$ 154 | 155 | `\cdot, * \ast, \star, \circ, \bullet` 156 | 157 | $\cdot, * \ast, \star, \circ, \bullet$ 158 | 159 | `\boxplus, \boxminus, \boxtimes, \boxdot` 160 | 161 | $\boxplus, \boxminus, \boxtimes, \boxdot$ 162 | 163 | `\oplus, \ominus, \otimes, \oslash, \odot` 164 | 165 | $\oplus, \ominus, \otimes, \oslash, \odot$ 166 | 167 | `\circleddash, \circledcirc, \circledast` 168 | 169 | $\circleddash, \circledcirc, \circledast$ 170 | 171 | `\bigoplus, \bigotimes, \bigodot` 172 | 173 | $\bigoplus, \bigotimes, \bigodot$ 174 | 175 | ### 集合 176 | 177 | `\{ \}, \empty \emptyset, \varnothing` 178 | 179 | $\{ \}, \empty \emptyset, \varnothing$ 180 | 181 | `\in, \notin \not\in, \ni, \not\ni` 182 | 183 | $\in, \notin \not\in, \ni, \not\ni$ 184 | 185 | `\cap, \Cap, \sqcap, \bigcap` 186 | 187 | $\cap, \Cap, \sqcap, \bigcap$ 188 | 189 | `\cup, \Cup, \sqcup, \bigcup, \bigsqcup, \uplus, \biguplus` 190 | 191 | $\cup, \Cup, \sqcup, \bigcup, \bigsqcup, \uplus, \biguplus$ 192 | 193 | `\setminus, \smallsetminus, \times` 194 | 195 | $\setminus, \smallsetminus, \times$ 196 | 197 | `\subset, \Subset, \sqsubset` 198 | 199 | $\subset, \Subset, \sqsubset$ 200 | 201 | `\supset, \Supset, \sqsupset` 202 | 203 | $\supset, \Supset, \sqsupset$ 204 | 205 | `\subseteq, \nsubseteq, \subsetneq, \varsubsetneq, \sqsubseteq` 206 | 207 | $\subseteq, \nsubseteq, \subsetneq, \varsubsetneq, \sqsubseteq$ 208 | 209 | `\supseteq, \nsupseteq, \supsetneq, \varsupsetneq, \sqsupseteq` 210 | 211 | $\supseteq, \nsupseteq, \supsetneq, \varsupsetneq, \sqsupseteq$ 212 | 213 | `\subseteqq, \nsubseteqq, \subsetneqq, \varsubsetneqq` 214 | 215 | $\subseteqq, \nsubseteqq, \subsetneqq, \varsubsetneqq$ 216 | 217 | `\supseteqq, \nsupseteqq, \supsetneqq, \varsupsetneqq` 218 | 219 | $\supseteqq, \nsupseteqq, \supsetneqq, \varsupsetneqq$ 220 | 221 | ### 关系符号 222 | 223 | `=, \ne, \neq, \equiv, \not\equiv` 224 | 225 | $=, \ne, \neq, \equiv, \not\equiv$ 226 | 227 | `\doteq, \doteqdot, \overset{\underset{\mathrm{def}}{}}{=}, :=` 228 | 229 | $\doteq, \doteqdot, \overset{\underset{\mathrm{def}}{}}{=}, :=$ 230 | 231 | `\sim, \nsim, \backsim, \thicksim, \simeq, \backsimeq, \eqsim, \cong, \ncong` 232 | 233 | $\sim, \nsim, \backsim, \thicksim, \simeq, \backsimeq, \eqsim, \cong, \ncong$ 234 | 235 | `\approx, \thickapprox, \approxeq, \asymp, \propto, \varpropto` 236 | 237 | $\approx, \thickapprox, \approxeq, \asymp, \propto, \varpropto$ 238 | 239 | `<, \nless, \ll, \not\ll, \lll, \not\lll, \lessdot` 240 | 241 | $<, \nless, \ll, \not\ll, \lll, \not\lll, \lessdot$ 242 | 243 | `>, \ngtr, \gg, \not\gg, \ggg, \not\ggg, \gtrdot` 244 | 245 | $>, \ngtr, \gg, \not\gg, \ggg, \not\ggg, \gtrdot$ 246 | 247 | `\le, \leq, \lneq, \leqq, \nleq, \nleqq, \lneqq, \lvertneqq` 248 | 249 | $\le, \leq, \lneq, \leqq, \nleq, \nleqq, \lneqq, \lvertneqq$ 250 | 251 | `\ge, \geq, \gneq, \geqq, \ngeq, \ngeqq, \gneqq, \gvertneqq` 252 | 253 | $\ge, \geq, \gneq, \geqq, \ngeq, \ngeqq, \gneqq, \gvertneqq$ 254 | 255 | `\lessgtr, \lesseqgtr, \lesseqqgtr, \gtrless, \gtreqless, \gtreqqless` 256 | 257 | $\lessgtr, \lesseqgtr, \lesseqqgtr, \gtrless, \gtreqless, \gtreqqless$ 258 | 259 | `\leqslant, \nleqslant, \eqslantless` 260 | 261 | $\leqslant, \nleqslant, \eqslantless$ 262 | 263 | `\geqslant, \ngeqslant, \eqslantgtr` 264 | 265 | $\geqslant, \ngeqslant, \eqslantgtr$ 266 | 267 | `\lesssim, \lnsim, \lessapprox, \lnapprox` 268 | 269 | $\lesssim, \lnsim, \lessapprox, \lnapprox$ 270 | 271 | `\gtrsim, \gnsim, \gtrapprox, \gnapprox` 272 | 273 | $\gtrsim, \gnsim, \gtrapprox, \gnapprox$ 274 | 275 | `\prec, \nprec, \preceq, \npreceq, \precneqq` 276 | 277 | $\prec, \nprec, \preceq, \npreceq, \precneqq$ 278 | 279 | `\succ, \nsucc, \succeq, \nsucceq, \succneqq` 280 | 281 | $\succ, \nsucc, \succeq, \nsucceq, \succneqq$ 282 | 283 | `\preccurlyeq, \curlyeqprec` 284 | 285 | $\preccurlyeq, \curlyeqprec$ 286 | 287 | `\succcurlyeq, \curlyeqsucc` 288 | 289 | $\succcurlyeq, \curlyeqsucc$ 290 | 291 | `\precsim, \precnsim, \precapprox, \precnapprox` 292 | 293 | $\precsim, \precnsim, \precapprox, \precnapprox$ 294 | 295 | `\succsim, \succnsim, \succapprox, \succnapprox` 296 | 297 | $\succsim, \succnsim, \succapprox, \succnapprox$ 298 | 299 | ### 几何符号 300 | 301 | `\parallel, \nparallel, \shortparallel, \nshortparallel` 302 | 303 | $\parallel, \nparallel, \shortparallel, \nshortparallel$ 304 | 305 | `\perp, \angle, \sphericalangle, \measuredangle, 45^\circ` 306 | 307 | $\perp, \angle, \sphericalangle, \measuredangle, 45^\circ$ 308 | 309 | `\Box, \blacksquare, \diamond, \Diamond \lozenge, \blacklozenge, \bigstar` 310 | 311 | $\Box, \blacksquare, \diamond, \Diamond \lozenge, \blacklozenge, \bigstar$ 312 | 313 | `\bigcirc, \triangle, \bigtriangleup, \bigtriangledown` 314 | 315 | $\bigcirc, \triangle, \bigtriangleup, \bigtriangledown$ 316 | 317 | `\vartriangle, \triangledown` 318 | 319 | $\vartriangle, \triangledown$ 320 | 321 | `\blacktriangle, \blacktriangledown, \blacktriangleleft, \blacktriangleright` 322 | 323 | $\blacktriangle, \blacktriangledown, \blacktriangleleft, \blacktriangleright$ 324 | 325 | ### 逻辑符号 326 | 327 | `\forall, \exists, \nexists` 328 | 329 | $\forall, \exists, \nexists$ 330 | 331 | `\therefore, \because, \And` 332 | 333 | $\therefore, \because, \And$ 334 | 335 | `\vee, \curlyvee, \bigvee` 336 | 337 | $\vee, \curlyvee, \bigvee$ 338 | 339 | `\land, \wedge, \curlywedge, \bigwedge` 340 | 341 | $\land, \wedge, \curlywedge, \bigwedge$ 342 | 343 | `\bar{q}, \bar{abc}, \overline{q}, \overline{abc},` 344 | 345 | `\lnot \neg, \not\operatorname{R}, \bot, \top` 346 | 347 | $\bar{q}, \bar{abc}, \overline{q}, \overline{abc},$ 348 | 349 | $\lnot \neg, \not\operatorname{R}, \bot, \top$ 350 | 351 | `\vdash \dashv, \vDash, \Vdash, \models` 352 | 353 | $\vdash \dashv, \vDash, \Vdash, \models$ 354 | 355 | `\Vvdash \nvdash \nVdash \nvDash \nVDash` 356 | 357 | $\Vvdash \nvdash \nVdash \nvDash \nVDash$ 358 | 359 | `\ulcorner \urcorner \llcorner \lrcorner` 360 | 361 | $\ulcorner \urcorner \llcorner \lrcorner$ 362 | 363 | ### 箭头 364 | 365 | `\Rrightarrow, \Lleftarrow` 366 | 367 | $\Rrightarrow, \Lleftarrow$ 368 | 369 | `\Rightarrow, \nRightarrow, \Longrightarrow \implies` 370 | 371 | $\Rightarrow, \nRightarrow, \Longrightarrow \implies$ 372 | 373 | `\Leftarrow, \nLeftarrow, \Longleftarrow` 374 | 375 | $\Leftarrow, \nLeftarrow, \Longleftarrow$ 376 | 377 | `\Leftrightarrow, \nLeftrightarrow, \Longleftrightarrow \iff` 378 | 379 | $\Leftrightarrow, \nLeftrightarrow, \Longleftrightarrow \iff$ 380 | 381 | `\Uparrow, \Downarrow, \Updownarrow` 382 | 383 | $\Uparrow, \Downarrow, \Updownarrow$ 384 | 385 | `\rightarrow \to, \nrightarrow, \longrightarrow` 386 | 387 | $\rightarrow \to, \nrightarrow, \longrightarrow$ 388 | 389 | `\leftarrow \gets, \nleftarrow, \longleftarrow` 390 | 391 | $\leftarrow \gets, \nleftarrow, \longleftarrow$ 392 | 393 | `\leftrightarrow, \nleftrightarrow, \longleftrightarrow` 394 | 395 | $\leftrightarrow, \nleftrightarrow, \longleftrightarrow$ 396 | 397 | `\uparrow, \downarrow, \updownarrow` 398 | 399 | $\uparrow, \downarrow, \updownarrow$ 400 | 401 | `\nearrow, \swarrow, \nwarrow, \searrow` 402 | 403 | $\nearrow, \swarrow, \nwarrow, \searrow$ 404 | 405 | `\mapsto, \longmapsto` 406 | 407 | $\mapsto, \longmapsto$ 408 | 409 | `\rightharpoonup \rightharpoondown \leftharpoonup \leftharpoondown \upharpoonleft \upharpoonright \downharpoonleft \downharpoonright \rightleftharpoons \leftrightharpoons` 410 | 411 | $\rightharpoonup \rightharpoondown \leftharpoonup \leftharpoondown \upharpoonleft \upharpoonright \downharpoonleft \downharpoonright \rightleftharpoons \leftrightharpoons$ 412 | 413 | `\curvearrowleft \circlearrowleft \Lsh \upuparrows \rightrightarrows \rightleftarrows \rightarrowtail \looparrowright` 414 | 415 | $\curvearrowleft \circlearrowleft \Lsh \upuparrows \rightrightarrows \rightleftarrows \rightarrowtail \looparrowright$ 416 | 417 | `\curvearrowright \circlearrowright \Rsh \downdownarrows \leftleftarrows \leftrightarrows \leftarrowtail \looparrowleft` 418 | 419 | $\curvearrowright \circlearrowright \Rsh \downdownarrows \leftleftarrows \leftrightarrows \leftarrowtail \looparrowleft$ 420 | 421 | `\hookrightarrow \hookleftarrow \multimap \leftrightsquigarrow \rightsquigarrow \twoheadrightarrow \twoheadleftarrow` 422 | 423 | $\hookrightarrow \hookleftarrow \multimap \leftrightsquigarrow \rightsquigarrow \twoheadrightarrow \twoheadleftarrow$ 424 | 425 | ### 特殊符号 426 | 427 | 省略号:数学公式中常见的省略号有两种,`\ldots` 表示与文本底线对齐的省略号,`\cdots` 表示与文本中线对齐的省略号。 428 | 429 | `\amalg \% \dagger \ddagger \ldots \cdots` 430 | 431 | $\amalg \% \dagger \ddagger \ldots \cdots$ 432 | 433 | `\smile \frown \wr \triangleleft \triangleright` 434 | 435 | $\smile \frown \wr \triangleleft \triangleright$ 436 | 437 | `\diamondsuit, \heartsuit, \clubsuit, \spadesuit, \Game, \flat, \natural, \sharp` 438 | 439 | $\diamondsuit, \heartsuit, \clubsuit, \spadesuit, \Game, \flat, \natural, \sharp$ 440 | 441 | ### 未分类 442 | 443 | `\diagup \diagdown \centerdot \ltimes \rtimes \leftthreetimes \rightthreetimes` 444 | 445 | $\diagup \diagdown \centerdot \ltimes \rtimes \leftthreetimes \rightthreetimes$ 446 | 447 | `\eqcirc \circeq \triangleq \bumpeq \Bumpeq \doteqdot \risingdotseq \fallingdotseq` 448 | 449 | $\eqcirc \circeq \triangleq \bumpeq \Bumpeq \doteqdot \risingdotseq \fallingdotseq$ 450 | 451 | `\intercal \barwedge \veebar \doublebarwedge \between \pitchfork` 452 | 453 | $\intercal \barwedge \veebar \doublebarwedge \between \pitchfork$ 454 | 455 | `\vartriangleleft \ntriangleleft \vartriangleright \ntriangleright` 456 | 457 | $\vartriangleleft \ntriangleleft \vartriangleright \ntriangleright$ 458 | 459 | `\trianglelefteq \ntrianglelefteq \trianglerighteq \ntrianglerighteq` 460 | 461 | $\trianglelefteq \ntrianglelefteq \trianglerighteq \ntrianglerighteq$ 462 | 463 | ## 上标、下标及积分等 464 | 465 | 功能|语法|效果 466 | 467 | `^` 表示上标, `_` 表示下标。如果上下标的内容多于一个字符,需要用 `{}` 将这些内容括成一个整体。上下标可以嵌套,也可以同时使用。 468 | 469 | 上标 470 | 471 | `a^2` 472 | 473 | $a^2$ 474 | 475 | 下标 476 | 477 | `a_2` 478 | 479 | $a_2$ 480 | 481 | 组合 482 | 483 | `a^{2+2}` 484 | 485 | $a^{2+2}$ 486 | 487 | `a_{i,j}` 488 | 489 | $a_{i,j}$ 490 | 491 | 结合上下标 492 | 493 | `x_2^3` 494 | 495 | $x_2^3$ 496 | 497 | 前置上下标 498 | 499 | `{}_1^2\!X_3^4` 500 | 501 | ${}_1^2\!X_3^4$ 502 | 503 | 导数 504 | 505 | `x'` 506 | 507 | $x'$ 508 | 509 | 导数 510 | 511 | `x^\prime` 512 | 513 | $x\prime$ 514 | 515 | 导数点 516 | 517 | `\dot{x}` 518 | 519 | $\dot{x}$ 520 | 521 | `\ddot{y}` 522 | 523 | $\ddot{y}$ 524 | 525 | 向量 526 | 527 | `\vec{c}`(只有一个字母) 528 | 529 | $\vec{c}$ 530 | 531 | `\overleftarrow{a b}` 532 | 533 | $\overleftarrow{a b}$ 534 | 535 | `\overrightarrow{c d}` 536 | 537 | $\overrightarrow{c d}$ 538 | 539 | `\overleftrightarrow{a b}` 540 | 541 | $\overleftrightarrow{a b}$ 542 | 543 | `\widehat{e f g}` 544 | 545 | $\widehat{e f g}$ 546 | 547 | 上弧 548 | 549 | (注: 正确应该用 \overarc,但在这里行不通。要用建议的语法作为解决办法。)(使用 \ overarc 时需要引入 {arcs} 包。) 550 | 551 | `\overset{\frown} {AB}` 552 | 553 | $\overset{\frown} {AB}$ 554 | 555 | 上划线 556 | 557 | `\overline{h i j}` 558 | 559 | $\overline{h i j}$ 560 | 561 | 下划线 562 | 563 | `\underline{k l m}` 564 | 565 | $\underline{k l m}$ 566 | 567 | 上括号 568 | 569 | `\overbrace{1+2+\cdots+100}` 570 | 571 | $\overbrace{1+2+\cdots+100}$ 572 | 573 | `\begin{matrix} 5050 \\ \overbrace{ 1+2+\cdots+100 } \end{matrix}` 574 | 575 | $\begin{matrix} 5050 \\ \overbrace{ 1+2+\cdots+100 } \end{matrix}$ 576 | 577 | 下括号 578 | 579 | `\underbrace{a+b+\cdots+z}` 580 | 581 | $\underbrace{a+b+\cdots+z}$ 582 | 583 | `\begin{matrix} \underbrace{ a+b+\cdots+z } \\ 26 \end{matrix}` 584 | 585 | $\begin{matrix} \underbrace{ a+b+\cdots+z } \\ 26 \end{matrix}$ 586 | 587 | 求和(累加) 588 | 589 | `\sum_{k=1}^N k^2` 590 | 591 | $\sum_{k=1}^N k^2$ 592 | 593 | `\begin{matrix} \sum_{k=1}^N k^2 \end{matrix}` 594 | 595 | $\begin{matrix} \sum_{k=1}^N k^2 \end{matrix}$ 596 | 597 | 求积(累乘) 598 | 599 | `\prod_{i=1}^N x_i` 600 | 601 | $\prod_{i=1}^N x_i$ 602 | 603 | `\begin{matrix} \prod_{i=1}^N x_i \end{matrix}` 604 | 605 | $\begin{matrix} \prod_{i=1}^N x_i \end{matrix}$ 606 | 607 | 上积 608 | 609 | `\coprod_{i=1}^N x_i` 610 | 611 | $\coprod_{i=1}^N x_i$ 612 | 613 | `\begin{matrix} \coprod_{i=1}^N x_i \end{matrix}` 614 | 615 | $\begin{matrix} \coprod_{i=1}^N x_i \end{matrix}$ 616 | 617 | 极限 618 | 619 | `\lim_{n \to \infty}x_n` 620 | 621 | $\lim_{n \to \infty}x_n$ 622 | 623 | `\begin{matrix} \lim_{n \to \infty}x_n \end{matrix}` 624 | 625 | $\begin{matrix} \lim_{n \to \infty}x_n \end{matrix}$ 626 | 627 | 积分 628 | 629 | `\int_{-N}^{N} e^x\, {\rm d}x` 630 | 631 | $\int_{-N}^{N} e^x\, {\rm d}x$ 632 | 633 | 本例中 `\` , 和 `{\rm d}` 部分可省略,但建议加入,能使式子更美观。`{\rm d}` 可以用 `\mathrm{d}` 等价替换。 634 | 635 | `\begin{matrix} \int_{-N}^{N} e^x\, \mathrm{d}x \end{matrix}`(矩阵中积分符号变小) 636 | 637 | $\begin{matrix} \int_{-N}^{N} e^x\, \mathrm{d}x \end{matrix}$ 638 | 639 | 双重积分 640 | 641 | `\iint_{D}^{W} \, \mathrm{d}x\,\mathrm{d}y` 642 | 643 | $\iint_{D}^{W} \, \mathrm{d}x\,\mathrm{d}y$ 644 | 645 | 三重积分 646 | 647 | `\iiint_{E}^{V} \, \mathrm{d}x\,\mathrm{d}y\,\mathrm{d}z` 648 | 649 | $\iiint_{E}^{V} \, \mathrm{d}x\,\mathrm{d}y\,\mathrm{d}z$ 650 | 651 | 闭合的曲线、曲面积分 652 | 653 | `\oint_{C} x^3\, \mathrm{d}x + 4y^2\, \mathrm{d}y` 654 | 655 | $\oint_{C} x^3\, \mathrm{d}x + 4y^2\, \mathrm{d}y$ 656 | 657 | 交集 658 | 659 | `\bigcap_1^{n} p` 660 | 661 | $\bigcap_1^{n} p$ 662 | 663 | 并集 664 | 665 | `\bigcup_1^{k} p` 666 | 667 | $\bigcup_1^{k} p$ 668 | 669 | ## 分数 670 | 671 | 通常使用 `\frac {分子} {分母}` 命令产生一个分数,分数可嵌套。 672 | 便捷情况可直接输入 `\frac ab` 来快速生成一个 $\frac ab$ 。 673 | 如果分式很复杂,亦可使用 `分子 \over 分母` 命令,此时分数仅有一层。 674 | 675 | 功能|语法|效果 676 | 677 | 分数 678 | 679 | `\frac{2}{4} = 0.5` 680 | 681 | $\frac{2}{4}=0.5$ 682 | 683 | 小型分数 684 | 685 | `\tfrac{2}{4} = 0.5` 686 | 687 | $\tfrac{2}{4} = 0.5$ 688 | 689 | 连分式(大型嵌套分式) 690 | 691 | `\cfrac{2}{c + \cfrac{2}{d + \cfrac{2}{4}}} = a` 692 | 693 | $\cfrac{2}{c + \cfrac{2}{d + \cfrac{2}{4}}} = a$ 694 | 695 | 大型不嵌套分式 696 | 697 | `\dfrac{2}{4} = 0.5 \qquad \dfrac{2}{c + \dfrac{2}{d + \dfrac{2}{4}}} = a` 698 | 699 | $\dfrac{2}{4} = 0.5 \qquad \dfrac{2}{c + \dfrac{2}{d + \dfrac{2}{4}}} = a$ 700 | 701 | 二项式系数 702 | 703 | `\dbinom{n}{r}=\binom{n}{n-r}=\mathrm{C}_n^r=\mathrm{C}_n^{n-r}` 704 | 705 | $\dbinom{n}{r}=\binom{n}{n-r}=\mathrm{C}_n^r=\mathrm{C}_n^{n-r}$ 706 | 707 | 小型二项式系数 708 | 709 | `\tbinom{n}{r}=\tbinom{n}{n-r}=\mathrm{C}_n^r=\mathrm{C}_n^{n-r}` 710 | 711 | $\tbinom{n}{r}=\tbinom{n}{n-r}=\mathrm{C}_n^r=\mathrm{C}_n^{n-r}$ 712 | 713 | 大型二项式系数 714 | 715 | `\binom{n}{r}=\dbinom{n}{n-r}=\mathrm{C}_n^r=\mathrm{C}_n^{n-r}` 716 | 717 | $\binom{n}{r}=\dbinom{n}{n-r}=\mathrm{C}_n^r=\mathrm{C}_n^{n-r}$ 718 | 719 | 在以 $e$ 为底的指数函数、极限和积分中尽量不要使用 `\frac` 符号:它会使整段函数看起来很怪,而且可能产生歧义。也正是因此它在专业数学排版中几乎从不出现。 720 | 横着写这些分式,中间使用斜线间隔 `/` (用斜线代替分数线)。 721 | 722 | 例子: 723 | 724 | ```markdown 725 | \begin{array}{cc} 726 | \mathrm{Bad} & \mathrm{Better} \\ 727 | \hline \\ 728 | e^{i\frac{\pi}2} \quad e^{\frac{i\pi}2}& e^{i\pi/2} \\ 729 | \int_{-\frac\pi2}^\frac\pi2 \sin x\,dx & \int_{-\pi/2}^{\pi/2}\sin x\,dx \\ 730 | \end{array} 731 | ``` 732 | 733 | 显示: 734 | 735 | $$ 736 | \begin{array}{cc} 737 | \mathrm{Bad} & \mathrm{Better} \\ 738 | \hline \\ 739 | e^{i\frac{\pi}2} \quad e^{\frac{i\pi}2}& e^{i\pi/2} \\ 740 | \int_{-\frac\pi2}^\frac\pi2 \sin x\,dx & \int_{-\pi/2}^{\pi/2}\sin x\,dx \\ 741 | \end{array} 742 | $$ 743 | 744 | ## 矩阵、条件表达式、方程组 745 | 746 | 语法: 747 | 748 | ```latex 749 | \begin{类型} 750 | 公式内容 751 | \end{类型} 752 | ``` 753 | 754 | 类型可以是:矩阵 `matrix` `pmatrix` `bmatrix` `Bmatrix` `vmatrix` `Vmatrix` 、条件表达式 `cases` 、多行对齐方程式 `aligned` 、数组 `array`。 755 | 756 | 在公式内容中:在每一行中插入 `&` 来指定需要对齐的内容,在每行结尾处使用 `\\` **换行**。 757 | 758 | ### 无框矩阵 759 | 760 | 在开头使用 `begin{matrix}` ,在结尾使用 `end{matrix}` ,在中间插入矩阵元素,每个元素之间插入 `&` ,并在每行结尾处使用 `\\` 。 761 | 762 | ```latex 763 | \begin{matrix} 764 | x & y \\ 765 | z & v 766 | \end{matrix} 767 | ``` 768 | 769 | $\begin{matrix} 770 | x & y \\ 771 | z & v 772 | \end{matrix}$ 773 | 774 | ### 有框矩阵 775 | 776 | 在开头将 `matrix` 替换为 `pmatrix` `bmatrix` `Bmatrix` `vmatrix` `Vmatrix` 。 777 | 778 | ```latex 779 | \begin{vmatrix} 780 | x & y \\ 781 | z & v 782 | \end{vmatrix} 783 | ``` 784 | 785 | $\begin{vmatrix} 786 | x & y \\ 787 | z & v 788 | \end{vmatrix}$ 789 | 790 | ```latex 791 | \begin{Vmatrix} 792 | x & y \\ 793 | z & v 794 | \end{Vmatrix} 795 | ``` 796 | 797 | $\begin{Vmatrix} 798 | x & y \\ 799 | z & v 800 | \end{Vmatrix}$ 801 | 802 | 使用 `\cdots` ⋯ , `\ddots` ⋱ , `\vdots` ⋮ 来输入省略符号。 803 | 804 | ```latex 805 | \begin{bmatrix} 806 | 0 & \cdots & 0 \\ 807 | \vdots & \ddots & \vdots \\ 808 | 0 & \cdots & 0 809 | \end{bmatrix} 810 | ``` 811 | 812 | $\begin{bmatrix} 813 | 0 & \cdots & 0 \\ 814 | \vdots & \ddots & \vdots \\ 815 | 0 & \cdots & 0 816 | \end{bmatrix}$ 817 | 818 | ```latex 819 | \begin{Bmatrix} 820 | x & y \\ 821 | z & v 822 | \end{Bmatrix} 823 | ``` 824 | 825 | $\begin{Bmatrix} 826 | x & y \\ 827 | z & v 828 | \end{Bmatrix}$ 829 | 830 | ```latex 831 | \begin{pmatrix} 832 | x & y \\ 833 | z & v 834 | \end{pmatrix} 835 | ``` 836 | 837 | $\begin{pmatrix} 838 | x & y \\ 839 | z & v 840 | \end{pmatrix}$ 841 | 842 | ### 条件表达式 843 | 844 | ```latex 845 | f(n) = 846 | \begin{cases} 847 | n/2, & \text{if }n\text{ is even} \\ 848 | 3n+1, & \text{if }n\text{ is odd} 849 | \end{cases} 850 | ``` 851 | 852 | $f(n) = 853 | \begin{cases} 854 | n/2, & \text{if }n\text{ is even} \\ 855 | 3n+1, & \text{if }n\text{ is odd} 856 | \end{cases}$ 857 | 858 | ### 多行等式、同余式 859 | 860 | 人们经常想要一列整齐且居中的方程式序列。使用 `\begin{aligned}…\end{aligned}` 。 861 | 862 | ```latex 863 | \begin{aligned} 864 | f(x) & = (m+n)^2 \\ 865 | & = m^2+2mn+n^2 \\ 866 | \end{aligned} 867 | ``` 868 | 869 | $\begin{aligned} 870 | f(x) & = (m+n)^2 \\ 871 | & = m^2+2mn+n^2 \\ 872 | \end{aligned}$ 873 | 874 | ```latex 875 | \begin{aligned} 876 | 3^{6n+3}+4^{6n+3} 877 | & \equiv (3^3)^{2n+1}+(4^3)^{2n+1}\\ 878 | & \equiv 27^{2n+1}+64^{2n+1}\\ 879 | & \equiv 27^{2n+1}+(-27)^{2n+1}\\ 880 | & \equiv 27^{2n+1}-27^{2n+1}\\ 881 | & \equiv 0 \pmod{91}\\ 882 | \end{aligned} 883 | ``` 884 | 885 | $\begin{aligned} 886 | 3^{6n+3}+4^{6n+3} 887 | & \equiv (3^3)^{2n+1}+(4^3)^{2n+1}\\ 888 | & \equiv 27^{2n+1}+64^{2n+1}\\ 889 | & \equiv 27^{2n+1}+(-27)^{2n+1}\\ 890 | & \equiv 27^{2n+1}-27^{2n+1}\\ 891 | & \equiv 0 \pmod{91}\\ 892 | \end{aligned}$ 893 | 894 | ```latex 895 | \begin{alignedat}{3} 896 | f(x) & = (m-n)^2 \\ 897 | f(x) & = (-m+n)^2 \\ 898 | & = m^2-2mn+n^2 \\ 899 | \end{alignedat} 900 | ``` 901 | 902 | $\begin{alignedat}{3} 903 | f(x) & = (m-n)^2 \\ 904 | f(x) & = (-m+n)^2 \\ 905 | & = m^2-2mn+n^2 \\ 906 | \end{alignedat}$ 907 | 908 | ### 方程组 909 | 910 | ```latex 911 | \begin{cases} 912 | 3x + 5y + z \\ 913 | 7x - 2y + 4z \\ 914 | -6x + 3y + 2z 915 | \end{cases} 916 | ``` 917 | 918 | $\begin{cases} 919 | 3x + 5y + z \\ 920 | 7x - 2y + 4z \\ 921 | -6x + 3y + 2z 922 | \end{cases}$ 923 | 924 | 或 925 | 926 | ```latex 927 | \left\{\begin{aligned} 928 | 3x + 5y + z \\ 929 | 7x - 2y + 4z \\ 930 | -6x + 3y + 2z 931 | \end{aligned}\right. 932 | ``` 933 | 934 | $\left\{\begin{aligned} 935 | 3x + 5y + z \\ 936 | 7x - 2y + 4z \\ 937 | -6x + 3y + 2z 938 | \end{aligned}\right.$ 939 | 940 | ## 数组与表格 941 | 942 | 通常,一个格式化后的表格比单纯的文字或排版后的文字更具有可读性。数组和表格均以 `\begin{array}` 开头,并在其后定义列数及每一列的文本对齐属性,`c` `l` `r` 分别代表居中、左对齐及右对齐。若需要插入垂直分割线,在定义式中插入 `|` ,若要插入水平分割线,在下一行输入前插入 `\hline` 。与矩阵相似,每行元素间均须要插入 `&` ,每行元素以 `\\` 结尾,最后以 `\end{array}` 结束数组。 943 | 944 | - 例子: 945 | 946 | ```latex 947 | \begin{array}{c|lcr} 948 | n & \text{左对齐} & \text{居中对齐} & \text{右对齐} \\ 949 | \hline 950 | 1 & 0.24 & 1 & 125 \\ 951 | 2 & -1 & 189 & -8 \\ 952 | 3 & -20 & 2000 & 1+10i 953 | \end{array} 954 | ``` 955 | 956 | - 显示: 957 | 958 | $\begin{array}{c|lcr} 959 | n & \text{左对齐} & \text{居中对齐} & \text{右对齐} \\ 960 | \hline 961 | 1 & 0.24 & 1 & 125 \\ 962 | 2 & -1 & 189 & -8 \\ 963 | 3 & -20 & 2000 & 1+10i 964 | \end{array}$ 965 | 966 | - 例子: 967 | 968 | ```latex 969 | \begin{array}{lcl} 970 | z & = & a \\ 971 | f(x,y,z) & = & x + y + z 972 | \end{array} 973 | ``` 974 | 975 | - 显示: 976 | 977 | $\begin{array}{lcl} 978 | z & = & a \\ 979 | f(x,y,z) & = & x + y + z 980 | \end{array}$ 981 | 982 | - 例子: 983 | 984 | ```latex 985 | \begin{array}{lcr} 986 | z & = & a \\ 987 | f(x,y,z) & = & x + y + z 988 | \end{array} 989 | ``` 990 | 991 | - 显示: 992 | 993 | $\begin{array}{lcr} 994 | z & = & a \\ 995 | f(x,y,z) & = & x + y + z 996 | \end{array}$ 997 | 998 | - 例子: 999 | 1000 | ```latex 1001 | \begin{array}{ccc} 1002 | a & b & S \\ 1003 | \hline 1004 | 0&0&1\\ 1005 | 0&1&1\\ 1006 | 1&0&1\\ 1007 | 1&1&0\\ 1008 | \end{array} 1009 | ``` 1010 | 1011 | - 显示: 1012 | 1013 | $\begin{array}{ccc} 1014 | a & b & S \\ 1015 | \hline 1016 | 0&0&1\\ 1017 | 0&1&1\\ 1018 | 1&0&1\\ 1019 | 1&1&0\\ 1020 | \end{array}$ 1021 | 1022 | ### 嵌套数组或表格 1023 | 1024 | 多个数组/表格可 互相嵌套 并组成一组数组/一组表格。 1025 | 使用嵌套前必须声明 `$$` 符号。 1026 | 1027 | - 例子: 1028 | 1029 | ```latex 1030 | % outer vertical array of arrays 外层垂直表格 1031 | \begin{array}{c} 1032 | % inner horizontal array of arrays 内层水平表格 1033 | \begin{array}{cc} 1034 | % inner array of minimum values 内层"最小值"数组 1035 | \begin{array}{c|cccc} 1036 | \text{min} & 0 & 1 & 2 & 3\\ 1037 | \hline 1038 | 0 & 0 & 0 & 0 & 0\\ 1039 | 1 & 0 & 1 & 1 & 1\\ 1040 | 2 & 0 & 1 & 2 & 2\\ 1041 | 3 & 0 & 1 & 2 & 3 1042 | \end{array} 1043 | & 1044 | % inner array of maximum values 内层"最大值"数组 1045 | \begin{array}{c|cccc} 1046 | \text{max}&0&1&2&3\\ 1047 | \hline 1048 | 0 & 0 & 1 & 2 & 3\\ 1049 | 1 & 1 & 1 & 2 & 3\\ 1050 | 2 & 2 & 2 & 2 & 3\\ 1051 | 3 & 3 & 3 & 3 & 3 1052 | \end{array} 1053 | \end{array} 1054 | % 内层第一行表格组结束 1055 | \\ 1056 | % inner array of delta values 内层第二行Delta值数组 1057 | \begin{array}{c|cccc} 1058 | \Delta&0&1&2&3\\ 1059 | \hline 1060 | 0 & 0 & 1 & 2 & 3\\ 1061 | 1 & 1 & 0 & 1 & 2\\ 1062 | 2 & 2 & 1 & 0 & 1\\ 1063 | 3 & 3 & 2 & 1 & 0 1064 | \end{array} 1065 | % 内层第二行表格组结束 1066 | \end{array} 1067 | ``` 1068 | 1069 | - 显示: 1070 | 1071 | $% outer vertical array of arrays 外层垂直表格 1072 | \begin{array}{c} 1073 | % inner horizontal array of arrays 内层水平表格 1074 | \begin{array}{cc} 1075 | % inner array of minimum values 内层"最小值"数组 1076 | \begin{array}{c|cccc} 1077 | \text{min} & 0 & 1 & 2 & 3\\ 1078 | \hline 1079 | 0 & 0 & 0 & 0 & 0\\ 1080 | 1 & 0 & 1 & 1 & 1\\ 1081 | 2 & 0 & 1 & 2 & 2\\ 1082 | 3 & 0 & 1 & 2 & 3 1083 | \end{array} 1084 | & 1085 | % inner array of maximum values 内层"最大值"数组 1086 | \begin{array}{c|cccc} 1087 | \text{max}&0&1&2&3\\ 1088 | \hline 1089 | 0 & 0 & 1 & 2 & 3\\ 1090 | 1 & 1 & 1 & 2 & 3\\ 1091 | 2 & 2 & 2 & 2 & 3\\ 1092 | 3 & 3 & 3 & 3 & 3 1093 | \end{array} 1094 | \end{array} 1095 | % 内层第一行表格组结束 1096 | \\ 1097 | % inner array of delta values 内层第二行Delta值数组 1098 | \begin{array}{c|cccc} 1099 | \Delta&0&1&2&3\\ 1100 | \hline 1101 | 0 & 0 & 1 & 2 & 3\\ 1102 | 1 & 1 & 0 & 1 & 2\\ 1103 | 2 & 2 & 1 & 0 & 1\\ 1104 | 3 & 3 & 2 & 1 & 0 1105 | \end{array} 1106 | % 内层第二行表格组结束 1107 | \end{array}$ 1108 | 1109 | ### 用数组实现带分割符号的矩阵 1110 | 1111 | - 例子: 1112 | 1113 | ```latex 1114 | $$ 1115 | \left[ 1116 | \begin{array}{cc|c} 1117 | 1&2&3\\ 1118 | 4&5&6 1119 | \end{array} 1120 | \right] 1121 | $$ 1122 | ``` 1123 | 1124 | 显示: 1125 | 1126 | $$ 1127 | \left[ 1128 | \begin{array}{cc|c} 1129 | 1&2&3\\ 1130 | 4&5&6 1131 | \end{array} 1132 | \right] 1133 | $$ 1134 | 1135 | 其中 `cc|c` 代表在一个三列矩阵中的第二和第三列之间插入分割线。 1136 | 1137 | ## 字体 1138 | 1139 | ### 希腊字母 1140 | 1141 | !!! note 提示 1142 | 1143 | 对于部分希腊字母,例如 `\Alpha` 在预览时会生效但在网页上渲染会出现错误,因此这里的希腊字符写法参考 [Greek letters](https://www.overleaf.com/learn/latex/List_of_Greek_letters_and_math_symbols) 进行编辑,更多详情请参考 [#39 LaTeX文档希腊字母大写显示有问题](https://github.com/cargo-youth/ToolDiy/issues/39) 。 1144 | 1145 | 输入 `\小写希腊字母英文全称` 和 `\首字母大写希腊字母英文全称` 来分别输入小写和大写希腊字母。 1146 | 1147 | `A B \Gamma \Delta E Z H \Theta` 1148 | 1149 | $A B \Gamma \Delta E Z H \Theta$ 1150 | 1151 | `I K \Lambda M N \Xi O \Pi` 1152 | 1153 | $I K \Lambda M N \Xi O \Pi$ 1154 | 1155 | `P \Sigma T \Upsilon \Phi X \Psi \Omega` 1156 | 1157 | $P \Sigma T \Upsilon \Phi X \Psi \Omega$ 1158 | 1159 | `\alpha \beta \gamma \delta \epsilon \zeta \eta \theta` 1160 | 1161 | $\alpha \beta \gamma \delta \epsilon \zeta \eta \theta$ 1162 | 1163 | `\iota \kappa \lambda \mu \nu \omicron \xi \pi` 1164 | 1165 | $\iota \kappa \lambda \mu \nu \omicron \xi \pi$ 1166 | 1167 | `\rho \sigma \tau \upsilon \phi \chi \psi \omega` 1168 | 1169 | $\rho \sigma \tau \upsilon \phi \chi \psi \omega$ 1170 | 1171 | **部分字母有变量专用形式,以 `\var-` 开头**。 1172 | 1173 | `\varepsilon \digamma \varkappa \varpi` 1174 | 1175 | $\varepsilon \digamma \varkappa \varpi$ 1176 | 1177 | `\varrho \varsigma \vartheta \varphi` 1178 | 1179 | $\varrho \varsigma \vartheta \varphi$ 1180 | 1181 | ### 希伯来符号 1182 | 1183 | `\aleph \beth \gimel \daleth` 1184 | 1185 | $\aleph \beth \gimel \daleth$ 1186 | 1187 | !!! note LaTeX公式手册 1188 | 1189 | 该指南摘自 [LaTeX公式手册](https://www.cnblogs.com/1024th/p/11623258.html) ,你可以点击链接来了解更多内容。 1190 | -------------------------------------------------------------------------------- /docs/specification/markdown/markdown.md: -------------------------------------------------------------------------------- 1 | # Markdown 写作 2 | 3 | !!! note 前言 4 | 5 | 本文提供了Markdown的基本撰写说明。因为主题设置的缘故可能会导致某些效果不生效,遇到此问题请前往 [issues](https://github.com/cargo-youth/ToolDiy/issues) 进行反馈。 6 | 7 | ## 标题 8 | 9 | 你的内容标题应该从二级标题( `##` )开始 10 | 11 | ```markdown 12 | # 一级标题 13 | ## 二级标题 14 | ### 三级标题 15 | ``` 16 | 17 | ## 强调,斜体,删除线 18 | 19 | 我们只知道 **地球** 具有让人类生存的环境,还有 ~~火星~~ ,也许还有 *其它星球* 。 20 | 21 | ```markdown 22 | 我们只知道 **地球** 具有让人类生存的环境,还有 ~~火星~~ ,也许还有 *其它星球* 。 23 | ``` 24 | 25 | ## 分隔符 26 | 27 | ```markdown 28 | --- 29 | *** 30 | ``` 31 | 32 | ## 链接 33 | 34 | 你应该避免直接内嵌 HTML 代码。 35 | 36 | ```markdown 37 | [link name](link url) 或者 38 | ``` 39 | 40 | ## 列表 41 | 42 | - 多翻译引擎 43 | 44 | * 谷歌翻译 45 | * 微软翻译 46 | * 有道翻译 47 | * 百度翻译 48 | * 阿里翻译 49 | * DeepL 翻译 50 | 51 | - 多语言互译 52 | 53 | ```markdown 54 | - 多翻译引擎 55 | 56 | * 谷歌翻译 57 | * 微软翻译 58 | * 有道翻译 59 | * 百度翻译 60 | * 阿里翻译 61 | * DeepL 翻译 62 | 63 | - 多语言互译 64 | ``` 65 | 66 | ## 代码 67 | 68 | 使用单引号 `code` 来表示行内代码,使用三引号来表示代码块。 69 | 70 | ```java 71 | code 72 | ``` 73 | 74 | 并且对于代码块,你应该**写上对应的语言**。 75 | 76 | ## 图片 77 | 78 | 你应该避免内嵌 HTML 来插入图片。 79 | 80 | ```java 81 | ![link name](picture url) 82 | ``` 83 | 84 | ## 注释 85 | 86 | 下面是一段注释 87 | > 这里是一段注释 (`
`) 88 | > 这是注释的第二行 89 | 90 | ```python 91 | # 这里是注释里面的代码段 92 | print("hello") 93 | ``` 94 | 95 | > 注释 96 | >> 注释嵌套 97 | >> 注释嵌套 98 | 99 | ```markdown 100 | 下面是一段注释 101 | > 这里是一段注释 (`
`) 102 | > 这是注释的第二行 103 | 104 | # 这里是注释里面的代码段 105 | print("hello") 106 | 107 | > 注释 108 | >> 注释嵌套 109 | >> 注释嵌套 110 | ``` 111 | 112 | ## Emoji 113 | 114 | 暂不支持 `emoji` 语法,但是可以直接从 `emoji` 表情大全拷贝表情到文档,比如: 115 | 🍊 🍇 😀 😅 😇 116 | 117 | > 访问以获取更多emoji 118 | 119 | ## 上下标 120 | 121 | H~2~O, y = x^2^ 122 | 123 | ```markdown 124 | H~2~O, y = x^2^ 125 | ``` 126 | 127 | ## 引用 128 | 129 | 我能干饭我自豪。[^干饭人] 130 | 131 | [^干饭人]: 老子说道 132 | 这会在文章末尾进行注解 133 | 134 | ```markdown 135 | 我能干饭我自豪。[^干饭人] 136 | 137 | [^干饭人]: 老子说道 138 | 这会在文章末尾进行注解 139 | ``` 140 | 141 | ## 表格 142 | 143 | | Header 1 | *Header2* | 144 | | -------- | -------- | 145 | | `Cell 1` | [Cell 2](http://example.com) link | 146 | | Cell 3 | **Cell 4** | 147 | 148 | ```markdown 149 | | Header 1 | *Header2* | 150 | | -------- | -------- | 151 | | `Cell 1` | [Cell 2](http://example.com) link | 152 | | Cell 3 | **Cell 4** | 153 | ``` 154 | 155 | ## 任务列表 156 | 157 | - [x] 任务1 158 | - [x] 任务2 159 | - [ ] 任务3 160 | - [ ] 任务4 161 | 162 | ```markdown 163 | - [x] 任务1 164 | - [x] 任务2 165 | - [ ] 任务3 166 | - [ ] 任务4 167 | ``` 168 | 169 | ## 数学 170 | 171 | 文档支持 `LaTeX` ,关于 `LaTeX` ,你可以访问 [LaTeX公式手册](https://www.cnblogs.com/1024th/p/11623258.html) 来获取帮助。 172 | 173 | ## mermaid 支持 174 | 175 | 使用 mermaid 可以画很多类型的图表, 详细的语法和支持请看[官网](https://mermaid-js.github.io/) 176 | 177 | ```mermaid 178 | sequenceDiagram 179 | Alice->>John: Hello John, how are you? 180 | loop Healthcheck 181 | John->>John: Fight against hypochondria 182 | end 183 | Note right of John: Rational thoughts! 184 | John-->>Alice: Great! 185 | John->>Bob: How about you? 186 | Bob-->>John: Jolly good! 187 | ``` 188 | 189 | ```markdown 190 | ```mermaid 191 | sequenceDiagram 192 | Alice->>John: Hello John, how are you? 193 | loop Healthcheck 194 | John->>John: Fight against hypochondria 195 | end 196 | Note right of John: Rational thoughts! 197 | John-->>Alice: Great! 198 | John->>Bob: How about you? 199 | Bob-->>John: Jolly good! 200 | ``` 201 | ``` 202 | -------------------------------------------------------------------------------- /docs/specification/pr.en.md: -------------------------------------------------------------------------------- 1 | # Pull Request Message Specification 2 | 3 | For Pull Request, please follow the following requirements[^1]: 4 | 5 | 1. The title should be clear about the purpose of this PR (what **work** is done, what **problem** is fixed). 6 | 2. The content should briefly describe the changes. If you fix an issue, please add `fix #xxxx` in the content, where `xxxx` is the issue number. 7 | 8 | For the title, such format is recommended: 9 | 10 | ```plain 11 | (): () 12 | ``` 13 | 14 | Edit type can be one of the following: 15 | 16 | - `feat`: for adding new content. 17 | - `fix`: for fixing existing content errors. 18 | - `refactor`: for refactoring a page (larger changes). 19 | - `revert`: for reverting previous changes. 20 | 21 | Examples: 22 | 23 | - `fix(sepecification/specification): edit code comment to make it more clear` 24 | - `fix: plugins/xxx not in directory (#2)` 25 | - `feat(software/mathpix): official website` 26 | - `refactor(specification/template): tidy up page content` 27 | 28 | [^1]: Edited from [OI-wiki: 如何参与](https://oi-wiki.org/intro/htc/#pull-request-%E4%BF%A1%E6%81%AF%E6%A0%BC%E5%BC%8F%E8%A7%84%E8%8C%83) 29 | -------------------------------------------------------------------------------- /docs/specification/pr.md: -------------------------------------------------------------------------------- 1 | # Pull Request 规范 2 | 3 | 对于 Pull Request,请遵守以下几点要求[^1]: 4 | 5 | 1. 标题请写明本次 PR 的目的(做了 **什么** 工作,修复了 **什么** 问题)。 6 | 2. 内容请简要叙述修改的内容。如果修复了一个 issue 的问题,请在内容中添加 `fix #xxxx` 字段,其中 `xxxx` 代表 issue 的编号。 7 | 3. 推荐删除 pull request message 中的模板信息(“首先,十分感谢……”这一段)。 8 | 9 | 对于 Pull Request 的标题,推荐使用如下格式书写: 10 | 11 | ```plain 12 | <修改类型>(<文件名>): <修改的内容> (<对应 issue 的编号>) 13 | ``` 14 | 15 | 修改类型分为如下几类: 16 | 17 | - `feat`:用于添加内容的情况。 18 | - `fix`:用于修正现有内容错误的情况。 19 | - `refactor`:用于对一个页面进行重构(较大规模的更改)的情况。 20 | - `revert`:用于回退之前更改的情况。 21 | 22 | 示例: 23 | 24 | - `fix(sepecification/specification): 修改代码注释使描述更清晰` 25 | - `fix: plugins/xxx 不在目录中 (#2)` 26 | - `feat(software/mathpix): official website` 27 | - `refactor(specification/template): 整理页面内容` 28 | 29 | [^1]: 修改自 [OI-wiki: 如何参与](https://oi-wiki.org/intro/htc/#pull-request-%E4%BF%A1%E6%81%AF%E6%A0%BC%E5%BC%8F%E8%A7%84%E8%8C%83) 30 | -------------------------------------------------------------------------------- /docs/specification/template.en.md: -------------------------------------------------------------------------------- 1 | # Template 2 | 3 | Hello friends, if you have a great tool that you want to share with everyone, but you don’t know how to write a markdown, here is a template for reference 4 | 5 | ## Introduction 6 | 7 | We would like submitted PRs to describe this tool in the introduction section: 8 | 9 | - The main function 10 | - the environment used 11 | - Official website (if available) 12 | - Other basic features 13 | 14 | ## Install 15 | 16 | The PR we want to submit is described in the installation section: 17 | 18 | - The version of the operating system that the software is compatible with 19 | - The way to install the software, especially the installation in the `linux` operating system, it is best to give instructions 20 | - If you need to install other dependent software in advance to install this software, please specify 21 | - If possible, please provide a method to check the successful installation of the software, such as using `$clang --version` to check whether `clang` is successfully installed 22 | 23 | ## Recommended reason 24 | 25 | The PR we want to submit is described in the recommendation reason section: 26 | 27 | - Advantages of this tool 28 | - Disadvantages of this tool 29 | - If this tool charges, please specify 30 | - If there is an educational support version of this tool, please specify 31 | 32 | ## refer to 33 | 34 | We hope that the submitted PR will provide some common references in the reference section, such as: 35 | 36 | - Official documentation of the tool 37 | - Relevant communities 38 | - related books 39 | - Related pages -------------------------------------------------------------------------------- /docs/specification/template.md: -------------------------------------------------------------------------------- 1 | # 模版(软件的标题,如果是必须付费软件,直接在标题写上“付费”) 2 | 3 | 朋友你好,如果你有一个很棒的工具希望和大家分享,但是你不知道怎么写一个markdown,这里提供了一个可以参考的模版 4 | 5 | ## 简介 6 | 7 | 我们希望提交的pr在简介部分描述这个工具的: 8 | 9 | - 官方的网站(如果有,尽可能以内嵌链接形式嵌入到简介) 10 | - 主要功能 11 | - 使用的环境 12 | - 其他基本的特点 13 | 14 | ## 安装 15 | 16 | 我们希望提交的pr在安装部分描述: 17 | 18 | - 软件适配的操作系统的版本 19 | - 安装软件的方式 特别是非Windows操作系统中的安装最好给出指令 20 | - 如果安装这个软件需要提前安装其他的依赖软件,请注明 21 | - 如果可以请提供检查软件成功安装的方法,例如使用 `$clang --version` 检查 `clang` 是否成功安装 22 | 23 | ## 推荐理由 24 | 25 | 我们希望提交的pr在推荐理由部分描述: 26 | 27 | - 这个工具的优点 28 | - 这个工具的缺点 29 | - 这个工具是否开源(开源,但提供付费服务最好标明) 30 | - 如果这个工具不开源,是否免费,是否允许商业化使用,是否提供教育版 31 | - 如果这个工具需要付费,起步价格是多少,如果有其他层级价位,请注明官网定价链接 32 | 33 | ## 参考 34 | 35 | 我们希望提交的pr在参考部分提供一些常用的参考,例如: 36 | 37 | - 工具的官方文档 38 | - 笔者实际使用中遇到的情况 39 | - 相关的社区,书籍,网页 40 | -------------------------------------------------------------------------------- /mkdocs.yml: -------------------------------------------------------------------------------- 1 | site_name: ToolDiy 2 | site_url: https://github.com/cargo-youth/ToolDiy/ 3 | 4 | repo_name: ToolDiy 5 | repo_url: https://github.com/cargo-youth/ToolDiy 6 | 7 | edit_uri: blob/main/docs/ 8 | 9 | # 主题设置 10 | theme: 11 | name: material 12 | language: zh 13 | custom_dir: overrides 14 | palette: 15 | - media: "(prefers-color-scheme: light)" 16 | scheme: default 17 | toggle: 18 | icon: material/weather-night 19 | name: 暗色模式 20 | - media: "(prefers-color-scheme: dark)" 21 | scheme: slate 22 | toggle: 23 | icon: material/weather-sunny 24 | name: 亮色模式 25 | features: 26 | # https://squidfunk.github.io/mkdocs-material/setup/setting-up-navigation/?h=nav#navigation-tabs 27 | - navigation.tabs 28 | - navigation.tabs.sticky 29 | # https://squidfunk.github.io/mkdocs-material/setup/setting-up-the-footer/?h=footer 30 | - navigation.footer 31 | - navigation.top 32 | - navigation.sections 33 | # https://squidfunk.github.io/mkdocs-material/setup/adding-a-git-repository/?h=edit#code-actions 34 | - content.action.edit 35 | - content.tabs.link 36 | 37 | # 版权 38 | copyright: This website follows CC BY-SA 4.0 39 | 40 | # 插件 41 | plugins: 42 | - awesome-pages: 43 | strict: false 44 | - i18n: 45 | default_language: zh 46 | material_alternate: true 47 | languages: 48 | zh: 49 | name: 简体中文 50 | build: true 51 | en: 52 | name: English 53 | build: true 54 | nav_translations: 55 | zh: 56 | One click deployment : 一键部署 57 | Markdown : Markdown 规范 58 | Platform : 平台 59 | Plugins : 插件 60 | Software : 软件 61 | Preface : 前言 62 | Specification : 规范 63 | Frame : 开源框架 64 | Firmware : 固件 65 | Large language model : 大语言模型 66 | Package manager: 包管理器 67 | en: 68 | 前言 : Preface 69 | 规范 : Specification 70 | PR规范 : PR Specification 71 | 中英混排 : Chinese With English 72 | 写作模板 : Writing Template 73 | 软件 : Software 74 | 插件 : Plugins 75 | 平台 : Platform 76 | 一键部署 : One-Click Deployment 77 | 开源框架 : Opensource Frame 78 | 大语言模型 : Large Language Model 79 | 包管理器 : Package manager 80 | - search: 81 | lang: ja 82 | 83 | # LaTeX支持 84 | markdown_extensions: 85 | - pymdownx.arithmatex: 86 | generic: true 87 | - admonition 88 | - pymdownx.details 89 | - pymdownx.tilde 90 | - pymdownx.superfences 91 | - pymdownx.critic 92 | - pymdownx.caret 93 | - pymdownx.keys 94 | - pymdownx.mark 95 | - pymdownx.highlight: 96 | use_pygments: true 97 | - footnotes 98 | - def_list 99 | - pymdownx.tasklist: 100 | custom_checkbox: true 101 | - pymdownx.tabbed: 102 | alternate_style: true 103 | - attr_list 104 | - md_in_html 105 | 106 | extra_javascript: 107 | - javascripts/mathjax.js 108 | - https://polyfill.io/v3/polyfill.min.js?features=es6 109 | - https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js 110 | -------------------------------------------------------------------------------- /overrides/main.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block content %} 4 | {{ super() }} 5 | 6 | 7 |

{{ lang.t("meta.comments") }}

8 | 24 | 25 | 53 | {% endblock %} 54 | --------------------------------------------------------------------------------