mirror of
https://gitea.com/mcereda/oam.git
synced 2026-02-09 05:44:23 +00:00
chore: improved markdown article and syntax
This commit is contained in:
@@ -82,7 +82,7 @@ sudo amdgpu-install
|
||||
|
||||
At the next restart of the boinc-client, something similar to this line should appear in the client's logs:
|
||||
|
||||
```text
|
||||
```txt
|
||||
Oct 09 23:09:40 hostnameHere boinc[1709]: 09-Oct-2022 23:09:40 [---] OpenCL: AMD/ATI GPU 0: gfx90c:xnack- (driver version 3452.0 (HSA1.1,LC), device ve>
|
||||
```
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ $
|
||||
normallookingcustomfield = "normalLookingValue"
|
||||
```
|
||||
|
||||
```plaintext
|
||||
```txt
|
||||
map[awesomecustomfield:my Awesome custom Value chezmoi:… normallookingcustomfield:normalLookingValue]
|
||||
```
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ It provides an easy set of rules for creating an explicit commit history.
|
||||
|
||||
A commit message should be structured as follows:
|
||||
|
||||
```text
|
||||
```txt
|
||||
<type>[optional scope]: <description>
|
||||
|
||||
[optional body]
|
||||
|
||||
@@ -20,7 +20,7 @@ crontab -r
|
||||
sudo crontab -r -u other_user
|
||||
```
|
||||
|
||||
```text
|
||||
```txt
|
||||
# Run 'pwd' every day at 10PM.
|
||||
0 22 * * * pwd
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@ On Non-Windows hosts, `curl` uses `getpwuid` to find the user's home directory.
|
||||
|
||||
On Windows, if curl finds no `.curlrc` file in the sequence described above, it will check for one in the same dir the curl executable is placed.
|
||||
|
||||
```text
|
||||
```txt
|
||||
# ~/.curlrc
|
||||
# Accepts both short and long options.
|
||||
# Options in long format are accepted without the leading two dashes to make it
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
When saved as plain text, emails may be saved as S/MIME files with attachments.
|
||||
In such cases the text file itself contains the multipart message body of the email, so the attachments are provided as base64 streams:
|
||||
|
||||
```text
|
||||
```txt
|
||||
1 --------------060903090608060502040600
|
||||
2 Content-Type: application/x-gzip;
|
||||
3 name="myawesomefile.tar.gz"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
## TL;DR
|
||||
|
||||
```text
|
||||
```txt
|
||||
# by label
|
||||
# e2label /dev/sdc1
|
||||
# mount -L seagate_2tb_usb /media/usb
|
||||
|
||||
@@ -1,33 +1,33 @@
|
||||
# Git
|
||||
|
||||
1. [TL;DR](#tldr)
|
||||
2. [Authentication](#authentication)
|
||||
3. [Configuration](#configuration)
|
||||
1. [Authentication](#authentication)
|
||||
1. [Configuration](#configuration)
|
||||
1. [Remotes](#remotes)
|
||||
1. [Push to multiple git remotes with the one command](#push-to-multiple-git-remotes-with-the-one-command)
|
||||
2. [Aliases](#aliases)
|
||||
4. [Manage changes](#manage-changes)
|
||||
1. [Aliases](#aliases)
|
||||
1. [Manage changes](#manage-changes)
|
||||
1. [Create a patch](#create-a-patch)
|
||||
2. [Apply a patch](#apply-a-patch)
|
||||
5. [The stash stack](#the-stash-stack)
|
||||
6. [Branches](#branches)
|
||||
1. [Apply a patch](#apply-a-patch)
|
||||
1. [The stash stack](#the-stash-stack)
|
||||
1. [Branches](#branches)
|
||||
1. [Checkout an existing remote branch](#checkout-an-existing-remote-branch)
|
||||
2. [Delete a branch](#delete-a-branch)
|
||||
3. [Delete branches which have been merged or are otherwise absent from a remote.](#delete-branches-which-have-been-merged-or-are-otherwise-absent-from-a-remote)
|
||||
4. [Merge the master branch into a feature branch](#merge-the-master-branch-into-a-feature-branch)
|
||||
5. [Rebase a branch on top of another](#rebase-a-branch-on-top-of-another)
|
||||
7. [Tags](#tags)
|
||||
8. [Convert a normal repository to a bare one](#convert-a-normal-repository-to-a-bare-one)
|
||||
9. [LFS extension](#lfs-extension)
|
||||
10. [Submodules](#submodules)
|
||||
11. [Remove a file from a commit](#remove-a-file-from-a-commit)
|
||||
12. [Remove a file from the repository](#remove-a-file-from-the-repository)
|
||||
13. [Troubleshooting](#troubleshooting)
|
||||
1. [Delete a branch](#delete-a-branch)
|
||||
1. [Delete branches which have been merged or are otherwise absent from a remote.](#delete-branches-which-have-been-merged-or-are-otherwise-absent-from-a-remote)
|
||||
1. [Merge the master branch into a feature branch](#merge-the-master-branch-into-a-feature-branch)
|
||||
1. [Rebase a branch on top of another](#rebase-a-branch-on-top-of-another)
|
||||
1. [Tags](#tags)
|
||||
1. [Convert a normal repository to a bare one](#convert-a-normal-repository-to-a-bare-one)
|
||||
1. [LFS extension](#lfs-extension)
|
||||
1. [Submodules](#submodules)
|
||||
1. [Remove a file from a commit](#remove-a-file-from-a-commit)
|
||||
1. [Remove a file from the repository](#remove-a-file-from-the-repository)
|
||||
1. [Troubleshooting](#troubleshooting)
|
||||
1. [Debug](#debug)
|
||||
2. [GPG cannot sign a commit](#gpg-cannot-sign-a-commit)
|
||||
3. [Git does not accept self-signed certificates](#git-does-not-accept-self-signed-certificates)
|
||||
14. [Further readings](#further-readings)
|
||||
15. [Sources](#sources)
|
||||
1. [GPG cannot sign a commit](#gpg-cannot-sign-a-commit)
|
||||
1. [Git does not accept self-signed certificates](#git-does-not-accept-self-signed-certificates)
|
||||
1. [Further readings](#further-readings)
|
||||
1. [Sources](#sources)
|
||||
|
||||
## TL;DR
|
||||
|
||||
@@ -418,7 +418,7 @@ git remote set-url --push --add origin https://exampleuser@example.com/path/to/r
|
||||
git remote set-url --push --add origin https://exampleuser@example.com/path/to/repo3
|
||||
```
|
||||
|
||||
```plaintext
|
||||
```txt
|
||||
[remote "origin"]
|
||||
url = https://exampleuser@example.com/path/to/repo1
|
||||
pushUrl = https://exampleuser@example.com/path/to/repo1
|
||||
@@ -429,7 +429,7 @@ git remote set-url --push --add origin https://exampleuser@example.com/path/to/r
|
||||
|
||||
To only pull from `repo1` but push to `repo1` and `repo2` for a specific branch `specialBranch`:
|
||||
|
||||
```plaintext
|
||||
```txt
|
||||
[remote "origin"]
|
||||
url = ssh://git@aaa.xxx.com:7999/yyy/repo1.git
|
||||
fetch = +refs/heads/*:refs/remotes/origin/*
|
||||
|
||||
@@ -4,31 +4,31 @@
|
||||
|
||||
- find an **exact phrase** enclosing it in _quotation marks_ (`""`); it will give back only results that include those same words in that same order:
|
||||
|
||||
```plaintext
|
||||
```txt
|
||||
mama "i just killed a man"
|
||||
```
|
||||
|
||||
- **exclude a word** from a search preceding it with a _minus sign_ (`-`); it will filter out unwanted results:
|
||||
|
||||
```plaintext
|
||||
```txt
|
||||
how to scrub -tips
|
||||
```
|
||||
|
||||
- find results that **include all of the words in a phrase** using the _asterisk symbol_ (`*`); it will give back results that include a specific phrase but may also have other words:
|
||||
|
||||
```plaintext
|
||||
```txt
|
||||
how to clean * from sheets
|
||||
```
|
||||
|
||||
- get results **from a particular website only** using the `site:` operator:
|
||||
|
||||
```plaintext
|
||||
```txt
|
||||
site:wikipedia.org obama
|
||||
```
|
||||
|
||||
use the operator alone to determine whether Google has indexed a website:
|
||||
|
||||
```plaintext
|
||||
```txt
|
||||
site:heyitsa.me
|
||||
```
|
||||
|
||||
|
||||
@@ -190,7 +190,7 @@ gpg> quit
|
||||
|
||||
One can put comments in an armored ASCII message or key block using the `Comment` keyword for each line:
|
||||
|
||||
```text
|
||||
```txt
|
||||
-----BEGIN PGP MESSAGE-----
|
||||
Comment: …
|
||||
Comment: …
|
||||
@@ -327,7 +327,7 @@ Run `ssh-add -L` to list your public keys and copy them over manually to the rem
|
||||
- `git` is instructed to sign a commit with `gpg`
|
||||
- `git commit` fails with the following error:
|
||||
|
||||
> ```plaintext
|
||||
> ```txt
|
||||
> gpg failed to sign the data
|
||||
> fatal: failed to write commit object
|
||||
> ```
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
# Markdown
|
||||
|
||||
ReadMe's Markdown engine.
|
||||
|
||||
## Table of contents <!-- omit in toc -->
|
||||
|
||||
1. [Troubleshooting](#troubleshooting)
|
||||
1. [Escape the backtick character](#escape-the-backtick-character)
|
||||
1. [Further readings](#further-readings)
|
||||
1. [Sources](#sources)
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### Escape the backtick character
|
||||
@@ -11,8 +20,26 @@ Render it in an inline code block using double backticks instead of single backt
|
||||
Alternatively, use a code block. This will wrap everything in a `<pre>` HTML tag.
|
||||
To do this, either indent 4 spaces to start a code block, or use fenced code blocks if supported.
|
||||
|
||||
## Further readings
|
||||
|
||||
- Official [documentation]
|
||||
- [Linguist supported language syntax list]
|
||||
|
||||
## Sources
|
||||
|
||||
All the references in the [further readings] section, plus the following:
|
||||
|
||||
- [Escaping Backticks]
|
||||
- [Escaping backtick in Markdown]
|
||||
|
||||
<!-- project's references -->
|
||||
|
||||
<!-- internal references -->
|
||||
|
||||
[documentation]: https://docs.readme.com/rdmd/docs
|
||||
|
||||
<!-- external references -->
|
||||
|
||||
[escaping backtick in markdown]: https://www.growingwiththeweb.com/2015/06/escaping-backtick-in-markdown.html
|
||||
[escaping backticks]: https://www.markdownguide.org/basic-syntax/#escaping-backticks
|
||||
[linguist supported language syntax list]: https://github.com/github/linguist/blob/master/lib/linguist/languages.yml
|
||||
|
||||
@@ -16,7 +16,7 @@ sudo needs-restarting -r
|
||||
sudo needs-restarting -s
|
||||
```
|
||||
|
||||
```text
|
||||
```txt
|
||||
$ sudo needs-restarting
|
||||
The following running processes use deleted files:
|
||||
|
||||
|
||||
@@ -28,12 +28,12 @@ lines:
|
||||
|
||||
The two formats below are equivalent:
|
||||
|
||||
```text
|
||||
```txt
|
||||
machine example.com login daniel password qwerty
|
||||
machine host1.austin.century.com login fred password bluebonnet
|
||||
```
|
||||
|
||||
```text
|
||||
```txt
|
||||
machine example.com
|
||||
login daniel
|
||||
password qwerty
|
||||
|
||||
@@ -89,7 +89,7 @@ cat 'server.crt' 'intermediate1.crt' 'intermediateN.crt' 'rootca.crt'
|
||||
|
||||
An `openssl s_client -connect` attempt fails with this error message:
|
||||
|
||||
```plaintext
|
||||
```txt
|
||||
CONNECTED(00000003)
|
||||
depth=0 C = US, CN = server.fqdn
|
||||
verify error:num=20:unable to get local issuer certificate
|
||||
|
||||
@@ -34,7 +34,7 @@ rsync … --exclude={"*.DS_Store","._*"}
|
||||
rsync … --filter "merge filter.txt"
|
||||
|
||||
# Delete files from the source after they have been transferred.
|
||||
rsync … --remove-source-files
|
||||
rsync … --remove-source-files
|
||||
|
||||
# Copy local files to a folder in the user's remote home over SSH on port 1234.
|
||||
# Compress the data during transfer.
|
||||
|
||||
@@ -113,7 +113,7 @@ ssh-keygen -t 'ecdsa' -b '521'
|
||||
ssh-keygen -t 'ed25519' -f '.ssh/id_ed25519' -C 'test@winzoz'
|
||||
```
|
||||
|
||||
```plaintext
|
||||
```txt
|
||||
Generating public/private ed25519 key pair.
|
||||
Enter passphrase (empty for no passphrase):
|
||||
Enter same passphrase again:
|
||||
@@ -143,7 +143,7 @@ ssh-keygen -R '192.168.1.237' -f '.ssh/known_hosts'
|
||||
ssh-keygen -R 'raspberrypi.lan' -f '.ssh/known_hosts'
|
||||
```
|
||||
|
||||
```plaintext
|
||||
```txt
|
||||
Host pi4.lan found: line 5
|
||||
/home/user/.ssh/known_hosts updated.
|
||||
Original contents retained as /home/user/.ssh/known_hosts.old
|
||||
|
||||
@@ -30,7 +30,7 @@ sudo sar -P ALL
|
||||
|
||||
Example output:
|
||||
|
||||
```text
|
||||
```txt
|
||||
Linux 5.10.17-v8+ (raspberrypi) 07/08/21 _aarch64_ (4 CPU)
|
||||
|
||||
10:24:12 LINUX RESTART (4 CPU)
|
||||
|
||||
@@ -9,13 +9,17 @@ Intro
|
||||
1. [Sources](#sources)
|
||||
|
||||
## TL:DR
|
||||
|
||||
## Further readings
|
||||
|
||||
## Sources
|
||||
|
||||
All the references in the [further readings] section, plus the following:
|
||||
|
||||
<!-- project's references -->
|
||||
|
||||
<!-- internal references -->
|
||||
|
||||
[further readings]: #further-readings
|
||||
|
||||
<!-- external references -->
|
||||
|
||||
@@ -136,7 +136,7 @@ variable "my_list" {
|
||||
}
|
||||
```
|
||||
|
||||
```text
|
||||
```txt
|
||||
Terraform will perform the following actions:
|
||||
|
||||
# null_resource.default[0] must be replaced
|
||||
@@ -191,7 +191,7 @@ Use the `-replace=resource_path` option during a `plan` or `apply`:
|
||||
terraform apply -replace=aws_instance.example
|
||||
```
|
||||
|
||||
```text
|
||||
```txt
|
||||
# aws_instance.example will be replaced, as requested
|
||||
-/+ resource "aws_instance" "example" {
|
||||
…
|
||||
|
||||
@@ -98,7 +98,7 @@ Should you want to see the state of individual devices during day but not to be
|
||||
|
||||
Create a text file in the `/etc/cron.d` directory:
|
||||
|
||||
```text
|
||||
```txt
|
||||
# File /etc/cron.d/rainbow_night.
|
||||
# Set the light intensity to the second lowest degree every day at 11 PM and set
|
||||
# it back to maximum every day at 7 AM.
|
||||
@@ -182,7 +182,7 @@ Choose one of Pi-hole's [supported operating systems][pi-hole supported operatin
|
||||
vim '/etc/config/lxc-auto'
|
||||
```
|
||||
|
||||
```text
|
||||
```txt
|
||||
config container
|
||||
option name pi-hole
|
||||
option timeout 60
|
||||
@@ -255,7 +255,7 @@ Check the module is recognized by the system like so:
|
||||
|
||||
1. If the `grep` returned results:
|
||||
|
||||
```text
|
||||
```txt
|
||||
[ 7.823007] sfp sfp: Host maximum power 3.0W
|
||||
[ 8.167128] sfp sfp: Turris RTSFP-10G rev A sn 1234567890 dc 123456
|
||||
```
|
||||
|
||||
@@ -51,7 +51,7 @@ The modeline line needs to:
|
||||
|
||||
Examples:
|
||||
|
||||
```text
|
||||
```txt
|
||||
# vim: set expandtab:
|
||||
|
||||
# -*- mode: ruby -*-
|
||||
|
||||
Reference in New Issue
Block a user