feat(curriculum): restore seed + solution to Chinese (#40683)

* feat(tools): add seed/solution restore script

* chore(curriculum): remove empty sections' markers

* chore(curriculum): add seed + solution to Chinese

* chore: remove old formatter

* fix: update getChallenges

parse translated challenges separately, without reference to the source

* chore(curriculum): add dashedName to English

* chore(curriculum): add dashedName to Chinese

* refactor: remove unused challenge property 'name'

* fix: relax dashedName requirement

* fix: stray tag

Remove stray `pre` tag from challenge file.

Signed-off-by: nhcarrigan <nhcarrigan@gmail.com>

Co-authored-by: nhcarrigan <nhcarrigan@gmail.com>
This commit is contained in:
Oliver Eyton-Williams
2021-01-13 03:31:00 +01:00
committed by GitHub
parent 0095583028
commit ee1e8abd87
4163 changed files with 57505 additions and 10540 deletions

View File

@@ -3,6 +3,7 @@ id: 587d824a367417b2b2512c45
title: 匿名留言板
challengeType: 4
videoUrl: ''
dashedName: anonymous-message-board
---
# --description--
@@ -85,3 +86,10 @@ videoUrl: ''
# --solutions--
```js
/**
Backend challenges don't need solutions,
because they would need to be tested against a full working project.
Please check our contributing guidelines to learn more.
*/
```

View File

@@ -1,6 +1,7 @@
---
id: 5e46f979ac417301a38fb932
challengeType: 10
dashedName: port-scanner
---
# --description--
@@ -32,3 +33,8 @@ It should pass all Python tests.
# --solutions--
```py
# Python challenges don't need solutions,
# because they would need to be tested against a full working project.
# Please check our contributing guidelines to learn more.
```

View File

@@ -1,6 +1,7 @@
---
id: 5e601c775ac9d0ecd8b94aff
challengeType: 4
dashedName: secure-real-time-multiplayer-game
---
# --description--
@@ -123,3 +124,10 @@ The headers say that the site is powered by "PHP 7.4.3" even though it isn't (as
# --solutions--
```js
/**
Backend challenges don't need solutions,
because they would need to be tested against a full working project.
Please check our contributing guidelines to learn more.
*/
```

View File

@@ -1,6 +1,7 @@
---
id: 5e46f983ac417301a38fb933
challengeType: 10
dashedName: sha-1-password-cracker
---
# --description--
@@ -32,3 +33,8 @@ It should pass all Python tests.
# --solutions--
```py
# Python challenges don't need solutions,
# because they would need to be tested against a full working project.
# Please check our contributing guidelines to learn more.
```

View File

@@ -3,6 +3,7 @@ id: 587d824a367417b2b2512c44
title: 股票价格检查
challengeType: 4
videoUrl: ''
dashedName: stock-price-checker
---
# --description--
@@ -55,3 +56,10 @@ videoUrl: ''
# --solutions--
```js
/**
Backend challenges don't need solutions,
because they would need to be tested against a full working project.
Please check our contributing guidelines to learn more.
*/
```

View File

@@ -3,6 +3,7 @@ id: 587d8248367417b2b2512c3c
title: 要求浏览器通过HTTPS访问您的站点仅限于使用helmet.hsts
challengeType: 2
forumTopicId: 301573
dashedName: ask-browsers-to-access-your-site-via-https-only-with-helmet-hsts
---
# --description--
@@ -53,3 +54,10 @@ HTTP 严格安全传输HSTS是一个能帮助我们抵御协议 [降级攻
# --solutions--
```js
/**
Backend challenges don't need solutions,
because they would need to be tested against a full working project.
Please check our contributing guidelines to learn more.
*/
```

View File

@@ -3,6 +3,7 @@ id: 587d8248367417b2b2512c3a
title: 使用 helment.noSniff() 来避免推断响应的 MIME 类型
challengeType: 2
forumTopicId: 301574
dashedName: avoid-inferring-the-response-mime-type-with-helmet-nosniff
---
# --description--
@@ -30,3 +31,10 @@ forumTopicId: 301574
# --solutions--
```js
/**
Backend challenges don't need solutions,
because they would need to be tested against a full working project.
Please check our contributing guidelines to learn more.
*/
```

View File

@@ -3,6 +3,7 @@ id: 587d8249367417b2b2512c40
title: 使用 helmet() 中间件来配置 Helmet
challengeType: 2
forumTopicId: 301575
dashedName: configure-helmet-using-the-parent-helmet-middleware
---
# --description--
@@ -40,3 +41,10 @@ assert(true);
# --solutions--
```js
/**
Backend challenges don't need solutions,
because they would need to be tested against a full working project.
Please check our contributing guidelines to learn more.
*/
```

View File

@@ -3,6 +3,7 @@ id: 587d8249367417b2b2512c3e
title: 使用 helment.noCache() 禁用客户端缓存
challengeType: 2
forumTopicId: 301576
dashedName: disable-client-side-caching-with-helmet-nocache
---
# --description--
@@ -33,3 +34,10 @@ forumTopicId: 301576
# --solutions--
```js
/**
Backend challenges don't need solutions,
because they would need to be tested against a full working project.
Please check our contributing guidelines to learn more.
*/
```

View File

@@ -3,6 +3,7 @@ id: 587d8248367417b2b2512c3d
title: 使用 helmet.dnsPrefetchControl() 禁用 DNS 预获取
challengeType: 2
forumTopicId: 301577
dashedName: disable-dns-prefetching-with-helmet-dnsprefetchcontrol
---
# --description--
@@ -30,3 +31,10 @@ forumTopicId: 301577
# --solutions--
```js
/**
Backend challenges don't need solutions,
because they would need to be tested against a full working project.
Please check our contributing guidelines to learn more.
*/
```

View File

@@ -3,6 +3,7 @@ id: 58a25bcff9fc0f352b528e7d
title: 哈希和异步比较密码
challengeType: 2
forumTopicId: 301578
dashedName: hash-and-compare-passwords-asynchronously
---
# --description--
@@ -71,3 +72,10 @@ bcrypt.hash('passw0rd!', 13, (err, hash) => {
# --solutions--
```js
/**
Backend challenges don't need solutions,
because they would need to be tested against a full working project.
Please check our contributing guidelines to learn more.
*/
```

View File

@@ -3,6 +3,7 @@ id: 58a25bcff9fc0f352b528e7e
title: 哈希和同步比较密码
challengeType: 2
forumTopicId: 301579
dashedName: hash-and-compare-passwords-synchronously
---
# --description--
@@ -56,3 +57,10 @@ var result = bcrypt.compareSync(myPlaintextPassword, hash);
# --solutions--
```js
/**
Backend challenges don't need solutions,
because they would need to be tested against a full working project.
Please check our contributing guidelines to learn more.
*/
```

View File

@@ -3,6 +3,7 @@ id: 587d8247367417b2b2512c37
title: 使用 helmet.hidePoweredBy() 隐藏潜在的危险信息
challengeType: 2
forumTopicId: 301580
dashedName: hide-potentially-dangerous-information-using-helmet-hidepoweredby
---
# --description--
@@ -30,3 +31,10 @@ forumTopicId: 301580
# --solutions--
```js
/**
Backend challenges don't need solutions,
because they would need to be tested against a full working project.
Please check our contributing guidelines to learn more.
*/
```

View File

@@ -3,6 +3,7 @@ id: 587d8247367417b2b2512c36
title: 安装和引入 Helmet
challengeType: 2
forumTopicId: 301581
dashedName: install-and-require-helmet
---
# --description--
@@ -34,3 +35,10 @@ Helmet 通过配置不同的 HTTP header 信息来使你的 Express 应用更加
# --solutions--
```js
/**
Backend challenges don't need solutions,
because they would need to be tested against a full working project.
Please check our contributing guidelines to learn more.
*/
```

View File

@@ -3,6 +3,7 @@ id: 587d8247367417b2b2512c38
title: 使用 helmet.frameguard() 降低点击劫持的风险
challengeType: 2
forumTopicId: 301582
dashedName: mitigate-the-risk-of-clickjacking-with-helmet-frameguard
---
# --description--
@@ -52,3 +53,10 @@ forumTopicId: 301582
# --solutions--
```js
/**
Backend challenges don't need solutions,
because they would need to be tested against a full working project.
Please check our contributing guidelines to learn more.
*/
```

View File

@@ -3,6 +3,7 @@ id: 587d8247367417b2b2512c39
title: 使用 helmet.xssFilter() 降低跨站点脚本XSS攻击的风险
challengeType: 2
forumTopicId: 301583
dashedName: mitigate-the-risk-of-cross-site-scripting-xss-attacks-with-helmet-xssfilter
---
# --description--
@@ -38,3 +39,10 @@ HTTP header 的 X-XSS-Protection 字段就可以为我们提供最基本的保
# --solutions--
```js
/**
Backend challenges don't need solutions,
because they would need to be tested against a full working project.
Please check our contributing guidelines to learn more.
*/
```

View File

@@ -3,6 +3,7 @@ id: 587d8248367417b2b2512c3b
title: 使用 helment.ieNoOpen() 防止 IE 打开不受信任的 HTML
challengeType: 2
forumTopicId: 301584
dashedName: prevent-ie-from-opening-untrusted-html-with-helmet-ienoopen
---
# --description--
@@ -30,3 +31,10 @@ forumTopicId: 301584
# --solutions--
```js
/**
Backend challenges don't need solutions,
because they would need to be tested against a full working project.
Please check our contributing guidelines to learn more.
*/
```

View File

@@ -3,6 +3,7 @@ id: 587d8249367417b2b2512c3f
title: 使用 helment.contentSecurityPolicy() 设置内容安全策略
challengeType: 2
forumTopicId: 301585
dashedName: set-a-content-security-policy-with-helmet-contentsecuritypolicy
---
# --description--
@@ -61,3 +62,10 @@ forumTopicId: 301585
# --solutions--
```js
/**
Backend challenges don't need solutions,
because they would need to be tested against a full working project.
Please check our contributing guidelines to learn more.
*/
```

View File

@@ -3,6 +3,7 @@ id: 58a25bcef9fc0f352b528e7c
title: 了解 BCrypt 的哈希加密
challengeType: 2
forumTopicId: 301586
dashedName: understand-bcrypt-hashes
---
# --description--
@@ -60,3 +61,10 @@ BCrypt 的哈希结果会是这样 `$2a$13$ZyprE5MRw2Q3WpNOGZWGbeG7ADUre1Q8QO.uU
# --solutions--
```js
/**
Backend challenges don't need solutions,
because they would need to be tested against a full working project.
Please check our contributing guidelines to learn more.
*/
```

View File

@@ -2,6 +2,7 @@
id: 5ea9997bbec2e9bc47e94db0
challengeType: 11
videoId: ugYfJNTawks
dashedName: creating-a-tcp-client
---
# --question--
@@ -26,8 +27,3 @@ Which socket object method lets you set the maximum amount of data your client a
1
# --hints--
# --solutions--

View File

@@ -2,6 +2,7 @@
id: 5ea9997bbec2e9bc47e94db3
challengeType: 11
videoId: CeGW761BIsA
dashedName: developing-a-banner-grabber
---
# --question--
@@ -39,8 +40,3 @@ B: `int(port)`
3
# --hints--
# --solutions--

View File

@@ -2,6 +2,7 @@
id: 5ea9997bbec2e9bc47e94db4
challengeType: 11
videoId: z_qkqZS7KZ4
dashedName: developing-a-port-scanner
---
# --question--
@@ -26,8 +27,3 @@ If there is an error or if no host is found, `.connect()` raises an exception wh
3
# --hints--
# --solutions--

View File

@@ -2,6 +2,7 @@
id: 5ea9997bbec2e9bc47e94db1
challengeType: 11
videoId: jYk9XaGoAnk
dashedName: developing-an-nmap-scanner-part-1
---
# --question--
@@ -26,8 +27,3 @@ What is the correct command to install the Python 3 version of the `python-nmap`
3
# --hints--
# --solutions--

View File

@@ -2,6 +2,7 @@
id: 5ea9997bbec2e9bc47e94db2
challengeType: 11
videoId: a98PscnUsTg
dashedName: developing-an-nmap-scanner-part-2
---
# --question--
@@ -26,8 +27,3 @@ Which of the following allows you to scan for UDP ports between 21 to 443?
1
# --hints--
# --solutions--

View File

@@ -2,6 +2,7 @@
id: 5ea9997bbec2e9bc47e94dae
challengeType: 11
videoId: XeQ7ZKtb998
dashedName: introduction-and-setup
---
# --question--
@@ -26,8 +27,3 @@ Sublime Text and the Anaconda package.
2
# --hints--
# --solutions--

View File

@@ -2,6 +2,7 @@
id: 5ea9997bbec2e9bc47e94daf
challengeType: 11
videoId: F1QI9tNuDQg
dashedName: understanding-sockets-and-creating-a-tcp-server
---
# --question--
@@ -26,8 +27,3 @@ Which of the following functions creates a socket object?
3
# --hints--
# --solutions--