├── README.md ├── Translated └── list.md ├── TranslatorReadMe.md ├── Waiting_for_translation └── 2020_11 │ └── list.md └── repos ├── delay-timer.md ├── kuguo-kgm-decoderlist.md ├── list.md ├── rust-guide.md └── 使用rust实现的osu!Bancho服务器.md /README.md: -------------------------------------------------------------------------------- 1 | 2 | ## 本仓库Rust编程语言相关讨论交流 3 | 4 | 相关讨论请在Issues模块讨论交流。 5 | 6 | ## Issues 列表 7 | 8 | - [Rust吐槽](https://github.com/Praying/RustBackyard/issues/14) 9 | 10 | - [收集大家的Repo](https://github.com/Praying/RustBackyard/issues/8) 11 | 12 | - [Rust都有哪些好的学习资料](https://github.com/Praying/RustBackyard/issues/6) 13 | 14 | - [Rust开发IDE讨论](https://github.com/Praying/RustBackyard/issues/4) 15 | 16 | ## 等待翻译的文章 17 | ## Waiting for translation 18 | 19 | 20 | 🎉 [欢迎大家来翻译](https://github.com/Praying/RustBackyard/Waiting_for_translation) 🎉 21 | 22 | 文章按月份归档, 23 | 24 | 在每个月的 list.md 添加待翻译文章吧。 😀 25 | 26 | 格式是 year_month [header] (link) 。 27 | 28 | Articles are archived by month 29 | 30 | Add not-translated articles to list.md in each files!😀 31 | 32 | ## 中文翻译指北 33 | 34 | 统一中文文案、排版的相关用法,欢迎阅读。 35 | [翻译指北](https://github.com/Praying/RustBackyard/TranslatorReadMe.md) 36 | 37 | ## 谈天说地 38 | 39 | - QQ Group:951882729 40 | 41 | - Telegram: https://t.me/rustforfree 42 | 43 | - Discord:https://discord.gg/dAkv2DJjZ2 44 | 45 | - Lark: https://applink.feishu.cn/TeF3WgSQ 46 | 47 | - 公众号:Rust碎碎念 -------------------------------------------------------------------------------- /Translated/list.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Praying/RustBackyard/033eddc8cc266e6f70f273a60d77219e0fa4f0e5/Translated/list.md -------------------------------------------------------------------------------- /TranslatorReadMe.md: -------------------------------------------------------------------------------- 1 | # 中文文案排版指北 2 | 3 | [![Crowdin](https://d322cqt584bo4o.cloudfront.net/chinese-copywriting-guidelines/localized.svg)](https://crowdin.com/project/chinese-copywriting-guidelines) [![Greenkeeper badge](https://badges.greenkeeper.io/sparanoid/chinese-copywriting-guidelines.svg)](https://greenkeeper.io/) [![devDependency Status](https://david-dm.org/sparanoid/chinese-copywriting-guidelines/dev-status.svg)](https://david-dm.org/sparanoid/chinese-copywriting-guidelines#info=devDependencies) [![Built with Almace Scaffolding](https://d349cztnlupsuf.cloudfront.net/amsf-badge.svg)](https://sparanoid.com/note/chinese-copywriting-guidelines/) 4 | 5 | 统一中文文案、排版的相关用法,降低团队成员之间的沟通成本,增强网站气质。 6 | 7 | 其他语言: 8 | 9 | - [英语](README.en-US.md) 10 | - [繁体中文](README.md) 11 | - [简体中文](README.zh-CN.md) 12 | - [简体中文](https://github.com/mzlogin/chinese-copywriting-guidelines)(外部链接) 13 | 14 | * * * 15 | 16 | ## 目录 17 | 18 | {:.no_toc} 19 | 20 | - TOC {:toc} 21 | 22 | ## 空格 23 | 24 | 「有研究显示,打字的时候不喜欢在中文和英文之间加空格的人,感情路都走得很辛苦,有七成的比例会在 34 岁的时候跟自己不爱的人结婚,而其余三成的人最后只能把遗产留给自己的猫。毕竟爱情跟书写都需要适时地留白。 25 | 26 | 与大家共勉之。」——[vinta/paranoid-auto-spacing](https://github.com/vinta/pangu.js) 27 | 28 | ### 中英文之间需要增加空格 29 | 30 | 正确: 31 | 32 | > 在 LeanCloud 上,数据存储是围绕 `AVObject` 进行的。 33 | 34 | 错误: 35 | 36 | > 在LeanCloud上,数据存储是围绕`AVObject`进行的。 37 | > 38 | > 在 LeanCloud上,数据存储是围绕`AVObject` 进行的。 39 | 40 | 完整的正确用法: 41 | 42 | > 在 LeanCloud 上,数据存储是围绕 `AVObject` 进行的。每个 `AVObject` 都包含了与 JSON 兼容的 key-value 对应的数据。数据是 schema-free 的,你不需要在每个 `AVObject` 上提前指定存在哪些键,只要直接设定对应的 key-value 即可。 43 | 44 | 例外:「豆瓣FM」等产品名词,按照官方所定义的格式书写。 45 | 46 | ### 中文与数字之间需要增加空格 47 | 48 | 正确: 49 | 50 | > 今天出去买菜花了 5000 元。 51 | 52 | 错误: 53 | 54 | > 今天出去买菜花了 5000元。 55 | > 56 | > 今天出去买菜花了5000元。 57 | 58 | ### 数字与单位之间需要增加空格 59 | 60 | 正确: 61 | 62 | > 我家的光纤入屋宽带有 10 Gbps,SSD 一共有 20 TB 63 | 64 | 错误: 65 | 66 | > 我家的光纤入屋宽带有 10Gbps,SSD 一共有 20TB 67 | 68 | 例外:度 / 百分比与数字之间不需要增加空格: 69 | 70 | 正确: 71 | 72 | > 今天是 233° 的高温。 73 | > 74 | > 新 MacBook Pro 有 15% 的 CPU 性能提升。 75 | 76 | 错误: 77 | 78 | > 今天是 233 ° 的高温。 79 | > 80 | > 新 MacBook Pro 有 15 % 的 CPU 性能提升。 81 | 82 | ### 全角标点与其他字符之间不加空格 83 | 84 | 正确: 85 | 86 | > 刚刚买了一部 iPhone,好开心! 87 | 88 | 错误: 89 | 90 | > 刚刚买了一部 iPhone ,好开心! 91 | > 92 | > 刚刚买了一部 iPhone, 好开心! 93 | 94 | ### 用 `text-spacing` 来挽救? 95 | 96 | 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 等用户介面目前并不存在这个特性,所以请继续保持随手加空格的习惯。 97 | 98 | ## 标点符号 99 | 100 | ### 不重复使用标点符号 101 | 102 | 正确: 103 | 104 | > 德国队竟然战胜了巴西队! 105 | > 106 | > 她竟然对你说「喵」?! 107 | 108 | 错误: 109 | 110 | > 德国队竟然战胜了巴西队!! 111 | > 112 | > 德国队竟然战胜了巴西队!!!!!!!! 113 | > 114 | > 她竟然对你说「喵」??!! 115 | > 116 | > 她竟然对你说「喵」?!?!??!! 117 | 118 | ## 全角和半角 119 | 120 | 不明白什么是全角(全形)与半角(半形)符号?请查看维基百科词条『[全形和半形](https://zh.wikipedia.org/wiki/%E5%85%A8%E5%BD%A2%E5%92%8C%E5%8D%8A%E5%BD%A2)』。 121 | 122 | ### 使用全角中文标点 123 | 124 | 正确: 125 | 126 | > 嗨!你知道嘛?今天前台的小妹跟我说「喵」了哎! 127 | > 128 | > 核磁共振成像(NMRI)是什么原理都不知道?JFGI! 129 | 130 | 错误: 131 | 132 | > 嗨! 你知道嘛? 今天前台的小妹跟我说 "喵" 了哎! 133 | > 134 | > 嗨!你知道嘛?今天前台的小妹跟我说"喵"了哎! 135 | > 136 | > 核磁共振成像 (NMRI) 是什么原理都不知道? JFGI! 137 | > 138 | > 核磁共振成像(NMRI)是什么原理都不知道?JFGI! 139 | 140 | ### 数字使用半角字符 141 | 142 | 正确: 143 | 144 | > 这个蛋糕只卖 1000 元。 145 | 146 | 错误: 147 | 148 | > 这个蛋糕只卖 1000 元。 149 | 150 | 例外:在设计稿、宣传海报中如出现极少量数字的情形时,为方便文字对齐,是可以使用全形数字的。 151 | 152 | ### 遇到完整的英文整句、特殊名词,其内容使用半角标点 153 | 154 | 正确: 155 | 156 | > 贾伯斯那句话是怎么说的?「Stay hungry, stay foolish.」 157 | > 158 | > 推荐你阅读《Hackers & Painters: Big Ideas from the Computer Age》,非常的有趣。 159 | 160 | 错误: 161 | 162 | > 贾伯斯那句话是怎么说的?「Stay hungry,stay foolish。」 163 | > 164 | > 推荐你阅读《Hackers&Painters:Big Ideas from the Computer Age》,非常的有趣。 165 | 166 | ## 名词 167 | 168 | ### 专有名词使用正确的大小写 169 | 170 | 大小写相关用法原属于英文书写范畴,不属于本 wiki 讨论内容,在这里只对部分易错用法进行简述。 171 | 172 | 正确: 173 | 174 | > 使用 GitHub 登录 175 | > 176 | > 我们的客户有 GitHub、Foursquare、Microsoft Corporation、Google、Facebook, Inc.。 177 | 178 | 错误: 179 | 180 | > 使用 github 登录 181 | > 182 | > 使用 GITHUB 登录 183 | > 184 | > 使用 Github 登录 185 | > 186 | > 使用 gitHub 登录 187 | > 188 | > 使用 gイんĤЦ8 登录 189 | > 190 | > 我们的客户有 github、foursquare、microsoft corporation、google、facebook, inc.。 191 | > 192 | > 我们的客户有 GITHUB、FOURSQUARE、MICROSOFT CORPORATION、GOOGLE、FACEBOOK, INC.。 193 | > 194 | > 我们的客户有 Github、FourSquare、MicroSoft Corporation、Google、FaceBook, Inc.。 195 | > 196 | > 我们的客户有 gitHub、fourSquare、microSoft Corporation、google、faceBook, Inc.。 197 | > 198 | > 我们的客户有 gイんĤЦ8、キouЯƧquムгє、๓เςг๏ร๏Ŧt ς๏гק๏гคtเ๏ภn、900913、ƒ4ᄃëв๏๏к, IПᄃ.。 199 | 200 | 注意:当网页中需要配合整体视觉风格而出现全部大写/小写的情形,HTML 中请使用标淮的大小写规范进行书写;并通过 `text-transform: uppercase;`/`text-transform: lowercase;` 对表现形式进行定义。 201 | 202 | ### 不要使用不地道的缩写 203 | 204 | 正确: 205 | 206 | > 我们需要一位熟悉 JavaScript、HTML5,至少理解一种框架(如 Backbone.js、AngularJS、React 等)的前端开发者。 207 | 208 | 错误: 209 | 210 | > 我们需要一位熟悉 Js、h5,至少理解一种框架(如 backbone、angular、RJS 等)的 FED。 211 | 212 | ## 争议 213 | 214 | 以下用法略带有个人色彩,即:无论是否遵循下述规则,从语法的角度来讲都是**正确**的。 215 | 216 | ### 链接之间增加空格 217 | 218 | 用法: 219 | 220 | > 请 [提交一个 issue](#) 并分配给相关同事。 221 | > 222 | > 访问我们网站的最新动态,请 [点击这里](#) 进行订阅! 223 | 224 | 对比用法: 225 | 226 | > 请[提交一个 issue](#)并分配给相关同事。 227 | > 228 | > 访问我们网站的最新动态,请[点击这里](#)进行订阅! 229 | 230 | ### 简体中文使用直角引号 231 | 232 | 用法: 233 | 234 | > 「老师,『有条不紊』的『紊』是什么意思?」 235 | 236 | 对比用法: 237 | 238 | > “老师,‘有条不紊’的‘紊’是什么意思?” 239 | 240 | ## 工具 241 | 242 | | 仓库 | 语言 | 243 | | ------------------------------------------------------------------------------------------------------------------------------- | --------------- | 244 | | [vinta/paranoid-auto-spacing](https://github.com/vinta/paranoid-auto-spacing) | JavaScript | 245 | | [huei90/pangu.node](https://github.com/huei90/pangu.node) | Node.js | 246 | | [huacnlee/auto-correct](https://github.com/huacnlee/auto-correct) | Ruby | 247 | | [sparanoid/space-lover](https://github.com/sparanoid/space-lover) | PHP (WordPress) | 248 | | [nauxliu/auto-correct](https://github.com/NauxLiu/auto-correct) | PHP | 249 | | [jxlwqq/chinese-typesetting](https://github.com/jxlwqq/chinese-typesetting) | PHP | 250 | | [hotoo/pangu.vim](https://github.com/hotoo/pangu.vim) | Vim | 251 | | [sparanoid/grunt-auto-spacing](https://github.com/sparanoid/grunt-auto-spacing) | Node.js (Grunt) | 252 | | [hjiang/scripts/add-space-between-latin-and-cjk](https://github.com/hjiang/scripts/blob/master/add-space-between-latin-and-cjk) | Python | 253 | | [hustcc/hint](https://github.com/hustcc/hint) | Python | 254 | | [studygolang/autocorrect](https://github.com/studygolang/autocorrect) | Go | 255 | 256 | ## 谁在这样做? 257 | 258 | | 网站 | 文案 | UGC | 259 | | ------------------------------------------------ | -- | ---- | 260 | | [Apple 中国](https://www.apple.com/cn/) | 是 | N/A | 261 | | [Apple 香港](https://www.apple.com/hk/) | 是 | N/A | 262 | | [Apple 台湾](https://www.apple.com/tw/) | 是 | N/A | 263 | | [Microsoft 中国](https://www.microsoft.com/zh-cn/) | 是 | N/A | 264 | | [Microsoft 香港](https://www.microsoft.com/zh-hk/) | 是 | N/A | 265 | | [Microsoft 台湾](https://www.microsoft.com/zh-tw/) | 是 | N/A | 266 | | [LeanCloud](https://leancloud.cn/) | 是 | N/A | 267 | | [V2EX](https://www.v2ex.com/) | 是 | 是 | 268 | | [Apple4us](https://apple4us.com/) | 是 | N/A | 269 | | [Ruby China](https://ruby-china.org/) | 是 | 标题达成 | 270 | | [PHPHub](https://phphub.org/) | 是 | 标题达成 | 271 | | [少数派](https://sspai.com/) | 是 | N/A | 272 | 273 | ## 参考文献 274 | 275 | - [Guidelines for Using Capital Letters - ThoughtCo.](https://www.thoughtco.com/guidelines-for-using-capital-letters-1691724) 276 | - [Letter case - Wikipedia](https://en.wikipedia.org/wiki/Letter_case) 277 | - [Punctuation - Oxford Dictionaries](https://en.oxforddictionaries.com/grammar/punctuation) 278 | - [Punctuation - The Purdue OWL](https://owl.english.purdue.edu/owl/section/1/6/) 279 | - [How to Use English Punctuation Correctly - wikiHow](https://www.wikihow.com/Use-English-Punctuation-Correctly) 280 | - [格式 - openSUSE](https://zh.opensuse.org/index.php?title=Help:%E6%A0%BC%E5%BC%8F) 281 | - [全形和半形 - 维基百科](https://zh.wikipedia.org/wiki/%E5%85%A8%E5%BD%A2%E5%92%8C%E5%8D%8A%E5%BD%A2) 282 | - [引号 - 维基百科](https://zh.wikipedia.org/wiki/%E5%BC%95%E8%99%9F) 283 | - [疑问惊叹号 - 维基百科](https://zh.wikipedia.org/wiki/%E7%96%91%E5%95%8F%E9%A9%9A%E5%98%86%E8%99%9F) -------------------------------------------------------------------------------- /Waiting_for_translation/2020_11/list.md: -------------------------------------------------------------------------------- 1 | 2020_11 [Learn Assembly by Writing Entirely Too Many Brainfuck Compilers in Rust](https://github.com/pretzelhammer/rust-blog/blob/master/posts/too-many-brainfuck-compilers.md) 2 | -------------------------------------------------------------------------------- /repos/delay-timer.md: -------------------------------------------------------------------------------- 1 | # delay-timer 2 | [项目地址](https://github.com/BinChengZhao/delay-timer/blob/master/README.md) 3 | 4 | delay-timer is a task manager based on a time wheel algorithm, which makes it easy to manage timed tasks, or to periodically execute arbitrary tasks such as closures.. 5 | 6 | The underlying runtime is currently based on smol, so upper level applications that want to extend asynchronous functionality need to use libraries that are compatible with smol. 7 | 8 | Since the library currently includes features such as #[bench], it needs to be developed in a nightly version. 9 | 10 | [![Build](https://github.com/BinChengZhao/delay-timer/workflows/Build%20and%20test/badge.svg)]( 11 | https://github.com/BinChengZhao/delay-timer/actions) 12 | [![License](https://img.shields.io/badge/license-MIT%2FApache--2.0-blue.svg)]( 13 | https://github.com/BinChengZhao/delay-timer) 14 | [![Cargo](https://img.shields.io/crates/v/delay_timer.svg)]( 15 | https://crates.io/crates/delay_timer) 16 | [![Documentation](https://docs.rs/delay_timer/badge.svg)]( 17 | https://docs.rs/delay_timer) 18 | ![image](https://github.com/BinChengZhao/delay-timer/blob/master/structural_drawing/DelayTImer.png) 19 | ## Examples 20 | 21 | 22 | ```rust 23 | fn main() { 24 | let mut delay_timer = DelayTimer::new(); 25 | let task_builder = TaskBuilder::default(); 26 | 27 | delay_timer.add_task(build_task1(task_builder)).unwrap(); 28 | 29 | delay_timer.add_task(build_task2(task_builder)).unwrap(); 30 | delay_timer.add_task(build_task3(task_builder)).unwrap(); 31 | delay_timer.add_task(build_task5(task_builder)).unwrap(); 32 | 33 | sleep(Duration::new(2, 1_000_000)); 34 | delay_timer.remove_task(1).unwrap(); 35 | 36 | // cancel_task cancel_task is currently available, 37 | // but the user does not currently have access to reasonable input data (record_id). 38 | 39 | // Development of a version of delay_timer that supports rustc-stable, 40 | // with full canca support is expected to be completed in version 0.2.0. 41 | 42 | sleep(Duration::new(90, 0)); 43 | delay_timer.stop_delay_timer().unwrap(); 44 | } 45 | 46 | fn build_task1(mut task_builder: TaskBuilder) -> Task { 47 | let body = create_async_fn_body!({ 48 | println!("create_async_fn_body!--7"); 49 | 50 | Timer::after(Duration::from_secs(3)).await; 51 | 52 | println!("create_async_fn_body:i'success"); 53 | Ok(()) 54 | }); 55 | task_builder 56 | .set_task_id(1) 57 | .set_frequency(Frequency::Repeated("0/7 * * * * * *")) 58 | .spawn(body) 59 | } 60 | 61 | fn build_task2(mut task_builder: TaskBuilder) -> Task { 62 | let body = create_async_fn_body!({ 63 | let mut res = surf::get("https://httpbin.org/get").await.unwrap(); 64 | dbg!(res.body_string().await.unwrap()); 65 | 66 | Ok(()) 67 | }); 68 | task_builder 69 | .set_frequency(Frequency::CountDown(2, "0/8 * * * * * *")) 70 | .set_task_id(2) 71 | .set_maximum_running_time(5) 72 | .spawn(body) 73 | } 74 | 75 | fn build_task3(mut task_builder: TaskBuilder) -> Task { 76 | let body = unblock_process_task_fn("php /home/open/project/rust/repo/myself/delay_timer/examples/try_spawn.php >> ./try_spawn.txt".into()); 77 | task_builder 78 | .set_frequency(Frequency::Once("@minutely")) 79 | .set_task_id(3) 80 | .set_maximum_running_time(5) 81 | .spawn(body) 82 | } 83 | 84 | fn build_task5(mut task_builder: TaskBuilder) -> Task { 85 | let body = generate_closure_template("delay_timer is easy to use. .".into()); 86 | task_builder 87 | .set_frequency(Frequency::Repeated( 88 | "0,10,15,25,50 0/1 * * Jan-Dec * 2020-2100", 89 | )) 90 | .set_task_id(5) 91 | .set_maximum_running_time(5) 92 | .spawn(body) 93 | } 94 | 95 | pub fn generate_closure_template( 96 | name: String, 97 | ) -> impl Fn() -> Box + 'static + Send + Sync { 98 | move || { 99 | create_delay_task_handler(async_spawn(async_template( 100 | get_timestamp() as i32, 101 | name.clone(), 102 | ))) 103 | } 104 | } 105 | 106 | pub async fn async_template(id: i32, name: String) -> Result<()> { 107 | let url = format!("https://httpbin.org/get?id={}&name={}", id, name); 108 | let mut res = surf::get(url).await.unwrap(); 109 | dbg!(res.body_string().await.unwrap()); 110 | 111 | Ok(()) 112 | } 113 | ``` 114 | 115 | There's a lot more in the [examples] directory. 116 | 117 | 118 | ## License 119 | 120 | Licensed under either of 121 | 122 | * MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT) 123 | 124 | 125 | ## To Do List 126 | - [x] Disable unwrap related methods that will panic. 127 | - [x] Thread and running task quit when delayTimer drop. 128 | - [x] error handle need supplement. 129 | - [x] neaten todo in code, replenish tests and benchmark. 130 | - [x] batch-opration. 131 | - [x] report-for-server. 132 | - [x] TASK-TAG. 133 | - [x] Future upgrade of delay_timer to multi-wheel mode, different excutor handling different wheels e.g. subtract laps for one wheel, run task for one wheel. 134 | 135 | #### Contribution 136 | 137 | Unless you explicitly state otherwise, any contribution intentionally submitted 138 | for inclusion in the work by you, as defined in the Apache-2.0 license, shall be 139 | dual licensed as above, without any additional terms or conditions. -------------------------------------------------------------------------------- /repos/kuguo-kgm-decoderlist.md: -------------------------------------------------------------------------------- 1 | # 酷狗混淆的歌曲文件的解码器 2 | 3 | > [项目地址](https://github.com/ghtz08/kuguo-kgm-decoder) 4 | 5 | [![Badge](https://img.shields.io/badge/link-996.icu-%23FF4D5B.svg?style=flat-square)](https://996.icu) 6 | [![LICENSE](https://img.shields.io/badge/license-Anti%20996-blue.svg?style=flat-square)](/LICENSE) 7 | [![Lang](https://img.shields.io/badge/lang-rust-brightgreen?style=flat-square)](https://www.rust-lang.org) 8 | ![Repo Size](https://img.shields.io/github/repo-size/ghtz08/kuguo-kgm-decoder?style=flat-square) 9 | ![Code Size](https://img.shields.io/github/languages/code-size/ghtz08/kuguo-kgm-decoder?style=flat-square) 10 | 11 | ## 介绍 12 | 13 | 一个命令行工具,可以用来解码酷狗缓存歌曲文件和下载的单曲收费歌曲文件。 14 | 15 | 解码原理来自博客[孤心浪子 - 闲来无事研究一下酷狗缓存文件kgtemp的加密方式](https://www.cnblogs.com/KMBlog/p/6877752.html)和 [ix64] 的 [unlock-music] 项目中的[酷狗解码实现]。 16 | 17 | 感谢 [ix64] 提供用于解码的 Key,[ix64] 的 [unlock-music] 项目提供了包括酷狗、网易云等多个平台的歌曲文件解码功能,并有网页和命令行两种使用方式。 18 | 19 | [ix64]: https://github.com/ix64 20 | [unlock-music]: https://github.com/ix64/unlock-music 21 | [酷狗解码实现]: https://github.com/ix64/unlock-music/blame/1d415cae524dccc565cb339ba1a0225baf0b28fc/src/decrypt/kgm.js#L49-L59 22 | 23 | ## 使用方式 24 | 25 | > 使用命令 `cargo build --release` 构建或者直接下载发布的二进制文件。 26 | 27 | - 针对单个文件 28 | 29 | ```bash 30 | kgm-decoder <文件名> 31 | ``` 32 | 33 | - 针对某个目录下的文件(不包括子目录) 34 | 35 | ```bash 36 | kgm-decoder <目录名> 37 | ``` 38 | 39 | - 针对某个目录下的文件(包括子目录) 40 | 41 | ```bash 42 | kgm-decoder -r <目录名> 43 | ``` 44 | 45 | ### 其它参数 46 | 47 | | 参数 | 解释 | 48 | | :--- | :--- | 49 | | -k, --keep | 保留原文件 | 50 | 51 | > 生成的后缀为 .mp3 的文件不一定是 mp3 格式的文件,后续考虑加上自动判断解码后的文件类型这个功能。 52 | 53 | ## 许可证 54 | 55 | [反 996 许可证版本 1.0](/LICENSE) 56 | -------------------------------------------------------------------------------- /repos/list.md: -------------------------------------------------------------------------------- 1 | [酷狗混淆的歌曲文件的解码器](https://github.com/ghtz08/kuguo-kgm-decoder) 2 | 3 | [delay-timer一个基于时间轮算法的任务管理者,周期执行任意同步/异步任务,基于smol异步运行时](https://github.com/BinChengZhao/delay-timer) 4 | 5 | [使用rust实现的osu!Bancho服务器(actix-web)](https://github.com/Pure-Peace/Peace) 6 | 7 | 8 | [用纯Rust写PHP扩展的框架](https://github.com/jmjoy/phper) 9 | 10 | [rust-guide](https://github.com/VWWL/rust-guide) 11 | -------------------------------------------------------------------------------- /repos/rust-guide.md: -------------------------------------------------------------------------------- 1 | # Rust guide 2 | 3 | > [项目地址](https://github.com/VWWL/rust-guide) 4 | 5 | ## [Programmer Dojo by Rust](https://github.com/VWWL/rust-guide/tree/master/src/dojo) 6 | 7 | ### Dojo 8 | 9 | #### 简介 10 | 11 | 本脚手架修改自 [熊节老师](https://github.com/gigix) 的练功房脚手架,将原本的Java实现改至Rust实现,测试使用Rust自带的测试框架 + [codecov](https://codecov.io/gh/VWWL/rust-guide) 实现。 12 | 13 | 原始脚手架仓库:https://github.com/gigix/dojo-scaffold.git 14 | 15 | ## [Design patterns by Rust](https://github.com/VWWL/rust-guide/tree/master/src/design_pattern) 16 | 17 | ### 使用Rust实现设计模式 18 | 19 | | Name | Description | 20 | | --- | --- | 21 | | [策略模式(Strategy Pattern)](./strategy_pattern/content.rs)| 将if...else...硬编码转变为dynamic trait. 编译时分支变为运行时分支。
关注点分离,判断逻辑放在一起,业务逻辑根据不同分支进行不同的trait实现。 | 22 | 23 | 持续更新中... 24 | 25 | 26 | [![Basic](https://github.com/VWWL/rust-guide/actions/workflows/main.yml/badge.svg)](https://github.com/VWWL/rust-guide/actions/workflows/main.yml/badge.svg) 27 | [![codecov](https://codecov.io/gh/VWWL/rust-guide/branch/master/graph/badge.svg)](https://codecov.io/gh/VWWL/rust-guide) 28 | 29 | ## How to deploy, run, and redevelop 30 | 31 | Run following script to install rustup: 32 | ~~~shell 33 | brew install rustup 34 | ~~~ 35 | 36 | Run the following script to prepare development environment: 37 | ~~~shell 38 | cargo build 39 | ~~~ 40 | 41 | Run the following script to verify that the development environment is working, or to test and validate the use case. 42 | ~~~shell 43 | sh ./scripts/check-all.sh 44 | ~~~ 45 | 46 | ## Attention 47 | Test coverage must be 100%. 48 | 49 | ## The role of this repository 50 | 51 | Learn Rust grammar and practice. 52 | -------------------------------------------------------------------------------- /repos/使用rust实现的osu!Bancho服务器.md: -------------------------------------------------------------------------------- 1 | # Peace 2 | 3 | ## osu! server written in Rust. 4 | [项目地址](https://github.com/Pure-Peace/Peace) 5 | 6 | [![Rust](https://forthebadge.com/images/badges/made-with-rust.svg)](https://forthebadge.com) 7 | 8 | Currently learning and experimental, 9 | 10 | ### but you can still star :p 11 | 12 | Recommended development tool: **Vscode** 13 | 14 | ![vscode](http://miya.ink/news.png) 15 | Soo good 16 | 17 | ![Chino](http://miya.ink/22.png) 18 | 19 | **With plugins:** 20 | 21 | ``` 22 | Rust 23 | rust-analyzer 24 | Rust Syntax 25 | crates 26 | Cargo 27 | Even Better TOML 28 | Better Comments 29 | Code Runner 30 | 31 | GitLens — Git supercharged 32 | Git History 33 | Git Graph 34 | ``` 35 | 36 | ## Run 37 | 38 | **Debug** 39 | ``` 40 | cargo run 41 | ``` 42 | 43 | **Release** 44 | ``` 45 | cargo run --release 46 | ``` 47 | 48 | **Run with environment** 49 | ``` 50 | cargo run prodction 51 | ``` 52 | or 53 | ``` 54 | cargo run development 55 | ``` 56 | or 57 | ``` 58 | ./Peace prodction 59 | ``` 60 | 61 | ## MIT --------------------------------------------------------------------------------