added first cheatsheets
This commit is contained in:
45
Cheatsheets/yaml.md
Normal file
45
Cheatsheets/yaml.md
Normal file
@@ -0,0 +1,45 @@
|
||||
# YAML Ain't Markup Language
|
||||
|
||||
```
|
||||
# Comment
|
||||
|
||||
key: value
|
||||
key: "string\nstring"
|
||||
key: string
|
||||
key: 'string'
|
||||
key: 123
|
||||
|
||||
object:
|
||||
key: value
|
||||
key2: value2
|
||||
|
||||
object-list:
|
||||
- list-item: value
|
||||
key: value
|
||||
- list-item: value2
|
||||
key: value2
|
||||
|
||||
object-list: [value1, value2, value3]
|
||||
|
||||
key: |
|
||||
This is a multiline value
|
||||
it takes everything untill the next key
|
||||
|
||||
key: >
|
||||
This is a single line value
|
||||
but it is written on multiple lines
|
||||
just for readability
|
||||
|
||||
key: "$USER" #Yes Variables work
|
||||
|
||||
--- File divider to put multiple YAML configs in 1 file
|
||||
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
- |
|
||||
#!/bin/bash
|
||||
printf "Hello World!"
|
||||
exit
|
||||
- echo "Yes I just ran a bash script using YAML"
|
||||
```
|
||||
Reference in New Issue
Block a user