Commit a2564e0c authored by Amy Qualls's avatar Amy Qualls Committed by Marcel Amirault

Add language declarations to various code blocks

This MR adds language declarations to several pages in the /user
subdirectory.
parent 81ea8c44
...@@ -581,7 +581,7 @@ Quote break. ...@@ -581,7 +581,7 @@ Quote break.
GFM extends the standard Markdown standard by also supporting multiline blockquotes GFM extends the standard Markdown standard by also supporting multiline blockquotes
fenced by `>>>`: fenced by `>>>`:
``` ```markdown
>>> >>>
If you paste a message from somewhere else If you paste a message from somewhere else
...@@ -630,7 +630,7 @@ def function(): ...@@ -630,7 +630,7 @@ def function():
3-backtick fences. 3-backtick fences.
~~~ ~~~
``` ```plaintext
~~~ ~~~
Tildes are OK too. Tildes are OK too.
~~~ ~~~
...@@ -638,20 +638,20 @@ Tildes are OK too. ...@@ -638,20 +638,20 @@ Tildes are OK too.
The three examples above render as: The three examples above render as:
``` ```python
def function(): def function():
#indenting works just fine in the fenced code block #indenting works just fine in the fenced code block
s = "Python code" s = "Python code"
print s print s
``` ```
``` ```plaintext
Using 4 spaces Using 4 spaces
is like using is like using
3-backtick fences. 3-backtick fences.
``` ```
~~~ ~~~plaintext
Tildes are OK too. Tildes are OK too.
~~~ ~~~
...@@ -668,7 +668,7 @@ code when it is inline. ...@@ -668,7 +668,7 @@ code when it is inline.
Blocks of code are fenced by lines with three back-ticks ```` ``` ```` or three tildes `~~~`, and have Blocks of code are fenced by lines with three back-ticks ```` ``` ```` or three tildes `~~~`, and have
the language identified at the end of the first fence: the language identified at the end of the first fence:
~~~ ~~~markdown
```javascript ```javascript
var s = "JavaScript syntax highlighting"; var s = "JavaScript syntax highlighting";
alert(s); alert(s);
...@@ -714,7 +714,7 @@ markdown = Redcarpet.new("Hello World!") ...@@ -714,7 +714,7 @@ markdown = Redcarpet.new("Hello World!")
puts markdown.to_html puts markdown.to_html
``` ```
``` ```plaintext
No language indicated, so no syntax highlighting. No language indicated, so no syntax highlighting.
s = "There is no highlighting for this." s = "There is no highlighting for this."
But let's throw in a <b>tag</b>. But let's throw in a <b>tag</b>.
...@@ -756,7 +756,7 @@ dealing with code and names that often appear with multiple underscores. As a re ...@@ -756,7 +756,7 @@ dealing with code and names that often appear with multiple underscores. As a re
GFM extends the standard Markdown standard by ignoring multiple underlines in words, GFM extends the standard Markdown standard by ignoring multiple underlines in words,
to allow better rendering of Markdown documents discussing code: to allow better rendering of Markdown documents discussing code:
```md ```markdown
perform_complicated_task perform_complicated_task
do_this_and_do_that_and_another_thing do_this_and_do_that_and_another_thing
...@@ -852,7 +852,7 @@ The IDs are generated from the content of the header according to the following ...@@ -852,7 +852,7 @@ The IDs are generated from the content of the header according to the following
Example: Example:
``` ```markdown
# This header has spaces in it # This header has spaces in it
## This header has a :thumbsup: in it ## This header has a :thumbsup: in it
# This header has Unicode in it: 한글 # This header has Unicode in it: 한글
...@@ -1148,7 +1148,7 @@ A new line due to the previous backslash. ...@@ -1148,7 +1148,7 @@ A new line due to the previous backslash.
There are two ways to create links, inline-style and reference-style: There are two ways to create links, inline-style and reference-style:
```md ```markdown
- This is an [inline-style link](https://www.google.com) - This is an [inline-style link](https://www.google.com)
- This is a [link to a repository file in the same directory](index.md) - This is a [link to a repository file in the same directory](index.md)
- This is a [relative link to a readme one directory higher](../README.md) - This is a [relative link to a readme one directory higher](../README.md)
...@@ -1319,7 +1319,7 @@ the paragraph will appear outside the list, instead of properly indented under t ...@@ -1319,7 +1319,7 @@ the paragraph will appear outside the list, instead of properly indented under t
Example: Example:
``` ```markdown
1. First ordered list item 1. First ordered list item
Paragraph of first item. Paragraph of first item.
......
...@@ -39,7 +39,7 @@ conan --version ...@@ -39,7 +39,7 @@ conan --version
You should see the Conan version printed in the output: You should see the Conan version printed in the output:
``` ```plaintext
Conan version 1.20.5 Conan version 1.20.5
``` ```
......
...@@ -49,7 +49,7 @@ npm --version ...@@ -49,7 +49,7 @@ npm --version
You should see the NPM version printed in the output: You should see the NPM version printed in the output:
``` ```plaintext
6.10.3 6.10.3
``` ```
...@@ -67,7 +67,7 @@ yarn --version ...@@ -67,7 +67,7 @@ yarn --version
You should see the version printed like so: You should see the version printed like so:
``` ```plaintext
1.19.1 1.19.1
``` ```
......
...@@ -26,7 +26,7 @@ nuget help ...@@ -26,7 +26,7 @@ nuget help
You should see something similar to: You should see something similar to:
``` ```plaintext
NuGet Version: 5.2.0.6090 NuGet Version: 5.2.0.6090
usage: NuGet <command> [args] [options] usage: NuGet <command> [args] [options]
Type 'NuGet help <command>' for help on a specific command. Type 'NuGet help <command>' for help on a specific command.
......
...@@ -91,7 +91,7 @@ It is possible to use [quick actions](quick_actions.md) within description templ ...@@ -91,7 +91,7 @@ It is possible to use [quick actions](quick_actions.md) within description templ
Here is an example for a Bug report template: Here is an example for a Bug report template:
``` ```plaintext
Summary Summary
(Summarize the bug encountered concisely) (Summarize the bug encountered concisely)
......
...@@ -56,7 +56,7 @@ We are working on making this configurable in the future. ...@@ -56,7 +56,7 @@ We are working on making this configurable in the future.
For example, to show the issue number `1001` under the `gitlab-org/gitlab` For example, to show the issue number `1001` under the `gitlab-org/gitlab`
project, you would do: project, you would do:
``` ```plaintext
/gitlab gitlab-org/gitlab issue show 1001 /gitlab gitlab-org/gitlab issue show 1001
``` ```
......
...@@ -25,7 +25,7 @@ allow GitLab to send messages only to *one* room. ...@@ -25,7 +25,7 @@ allow GitLab to send messages only to *one* room.
1. In the "Send messages to this room by posting this URL" column, you should 1. In the "Send messages to this room by posting this URL" column, you should
see a URL in the format: see a URL in the format:
``` ```plaintext
https://api.hipchat.com/v2/room/<room>/notification?auth_token=<token> https://api.hipchat.com/v2/room/<room>/notification?auth_token=<token>
``` ```
......
...@@ -11,7 +11,7 @@ See the project homepage for further info: <https://gitlab.com/esr/irker> ...@@ -11,7 +11,7 @@ See the project homepage for further info: <https://gitlab.com/esr/irker>
You will first need an Irker daemon. You can download the Irker code from its You will first need an Irker daemon. You can download the Irker code from its
repository on <https://gitlab.com/esr/irker>: repository on <https://gitlab.com/esr/irker>:
``` ```shell
git clone https://gitlab.com/esr/irker.git git clone https://gitlab.com/esr/irker.git
``` ```
......
...@@ -119,7 +119,7 @@ link back to GitLab. This means that in comments in merge requests and commits ...@@ -119,7 +119,7 @@ link back to GitLab. This means that in comments in merge requests and commits
referencing an issue, e.g., `PROJECT-7`, will add a comment in Jira issue in the referencing an issue, e.g., `PROJECT-7`, will add a comment in Jira issue in the
format: format:
``` ```plaintext
USER mentioned this issue in RESOURCE_NAME of [PROJECT_NAME|LINK_TO_COMMENT]: USER mentioned this issue in RESOURCE_NAME of [PROJECT_NAME|LINK_TO_COMMENT]:
ENTITY_TITLE ENTITY_TITLE
``` ```
......
...@@ -13,13 +13,13 @@ integration services must be enabled. ...@@ -13,13 +13,13 @@ integration services must be enabled.
- Average Memory Usage (MB): - Average Memory Usage (MB):
``` ```prometheus
avg(sum(container_memory_usage_bytes{container_name!="POD",pod_name=~"^%{ci_environment_slug}-([^c].*|c([^a]|a([^n]|n([^a]|a([^r]|r[^y])))).*|)-(.*)",namespace="%{kube_namespace}"}) by (job)) without (job) / count(avg(container_memory_usage_bytes{container_name!="POD",pod_name=~"^%{ci_environment_slug}-([^c].*|c([^a]|a([^n]|n([^a]|a([^r]|r[^y])))).*|)-(.*)",namespace="%{kube_namespace}"}) without (job)) /1024/1024 avg(sum(container_memory_usage_bytes{container_name!="POD",pod_name=~"^%{ci_environment_slug}-([^c].*|c([^a]|a([^n]|n([^a]|a([^r]|r[^y])))).*|)-(.*)",namespace="%{kube_namespace}"}) by (job)) without (job) / count(avg(container_memory_usage_bytes{container_name!="POD",pod_name=~"^%{ci_environment_slug}-([^c].*|c([^a]|a([^n]|n([^a]|a([^r]|r[^y])))).*|)-(.*)",namespace="%{kube_namespace}"}) without (job)) /1024/1024
``` ```
- Average CPU Utilization (%): - Average CPU Utilization (%):
``` ```prometheus
avg(sum(rate(container_cpu_usage_seconds_total{container_name!="POD",pod_name=~"^%{ci_environment_slug}-([^c].*|c([^a]|a([^n]|n([^a]|a([^r]|r[^y])))).*|)-(.*)",namespace="%{kube_namespace}"}[15m])) by (job)) without (job) / count(sum(rate(container_cpu_usage_seconds_total{container_name!="POD",pod_name=~"^%{ci_environment_slug}-([^c].*|c([^a]|a([^n]|n([^a]|a([^r]|r[^y])))).*|)-(.*)",namespace="%{kube_namespace}"}[15m])) by (pod_name)) avg(sum(rate(container_cpu_usage_seconds_total{container_name!="POD",pod_name=~"^%{ci_environment_slug}-([^c].*|c([^a]|a([^n]|n([^a]|a([^r]|r[^y])))).*|)-(.*)",namespace="%{kube_namespace}"}[15m])) by (job)) without (job) / count(sum(rate(container_cpu_usage_seconds_total{container_name!="POD",pod_name=~"^%{ci_environment_slug}-([^c].*|c([^a]|a([^n]|n([^a]|a([^r]|r[^y])))).*|)-(.*)",namespace="%{kube_namespace}"}[15m])) by (pod_name))
``` ```
...@@ -48,12 +48,12 @@ These metrics expect the [Deployment](https://kubernetes.io/docs/concepts/worklo ...@@ -48,12 +48,12 @@ These metrics expect the [Deployment](https://kubernetes.io/docs/concepts/worklo
- Average Memory Usage (MB) - Average Memory Usage (MB)
``` ```prometheus
avg(sum(container_memory_usage_bytes{container_name!="POD",pod_name=~"^%{ci_environment_slug}-canary-(.*)",namespace="%{kube_namespace}"}) by (job)) without (job) / count(avg(container_memory_usage_bytes{container_name!="POD",pod_name=~"^%{ci_environment_slug}-canary-(.*)",namespace="%{kube_namespace}"}) without (job)) /1024/1024 avg(sum(container_memory_usage_bytes{container_name!="POD",pod_name=~"^%{ci_environment_slug}-canary-(.*)",namespace="%{kube_namespace}"}) by (job)) without (job) / count(avg(container_memory_usage_bytes{container_name!="POD",pod_name=~"^%{ci_environment_slug}-canary-(.*)",namespace="%{kube_namespace}"}) without (job)) /1024/1024
``` ```
- Average CPU Utilization (%) - Average CPU Utilization (%)
``` ```prometheus
avg(sum(rate(container_cpu_usage_seconds_total{container_name!="POD",pod_name=~"^%{ci_environment_slug}-canary-(.*)",namespace="%{kube_namespace}"}[15m])) by (job)) without (job) / count(sum(rate(container_cpu_usage_seconds_total{container_name!="POD",pod_name=~"^%{ci_environment_slug}-canary-(.*)",namespace="%{kube_namespace}"}[15m])) by (pod_name)) avg(sum(rate(container_cpu_usage_seconds_total{container_name!="POD",pod_name=~"^%{ci_environment_slug}-canary-(.*)",namespace="%{kube_namespace}"}[15m])) by (job)) without (job) / count(sum(rate(container_cpu_usage_seconds_total{container_name!="POD",pod_name=~"^%{ci_environment_slug}-canary-(.*)",namespace="%{kube_namespace}"}[15m])) by (pod_name))
``` ```
...@@ -101,14 +101,14 @@ allowing pulling and pushing Docker images from within the CI job. ...@@ -101,14 +101,14 @@ allowing pulling and pushing Docker images from within the CI job.
GitLab would create a special checkout URL like: GitLab would create a special checkout URL like:
``` ```plaintext
https://gitlab-ci-token:<project-runners-token>/gitlab.com/gitlab-org/gitlab-foss.git https://gitlab-ci-token:<project-runners-token>/gitlab.com/gitlab-org/gitlab-foss.git
``` ```
And then the users could also use it in their CI jobs all Docker related And then the users could also use it in their CI jobs all Docker related
commands to interact with GitLab Container Registry. For example: commands to interact with GitLab Container Registry. For example:
``` ```shell
docker login -u gitlab-ci-token -p $CI_JOB_TOKEN registry.gitlab.com docker login -u gitlab-ci-token -p $CI_JOB_TOKEN registry.gitlab.com
``` ```
...@@ -173,14 +173,14 @@ As a user: ...@@ -173,14 +173,14 @@ As a user:
The [Job environment variable][jobenv] `CI_JOB_TOKEN` can be used to The [Job environment variable][jobenv] `CI_JOB_TOKEN` can be used to
authenticate any clones of dependent repositories. For example: authenticate any clones of dependent repositories. For example:
``` ```shell
git clone https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.com/<user>/<mydependentrepo>.git git clone https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.com/<user>/<mydependentrepo>.git
``` ```
It can also be used for system-wide authentication It can also be used for system-wide authentication
(only do this in a docker container, it will overwrite ~/.netrc): (only do this in a docker container, it will overwrite ~/.netrc):
``` ```shell
echo -e "machine gitlab.com\nlogin gitlab-ci-token\npassword ${CI_JOB_TOKEN}" > ~/.netrc echo -e "machine gitlab.com\nlogin gitlab-ci-token\npassword ${CI_JOB_TOKEN}" > ~/.netrc
``` ```
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment