Codeblocks in markdown make it very easy for tech people to copy, paste, share code. A good Cloud engineer uses Codeblocks whenever possible.
Because it allows others to copy and paste their code to replicate or research issues.
In order to create codeblocks in markdown, you need three backticks (`) Not to be confused with quotation.
# Define the Person class
class Person
attr_accessor :name
def initialize(name)
@name = name
end
def greet
"Hello, #{@name}! Nice to meet you."
end
end
# Create an instance of the Person class
john = Person.new("John")
# Print out a greeting
puts john.greet # Output: Hello, John! Nice to meet you.
- When you can you should attempt to apply syntax highlighting to your codeblocks.
# Define the Person class
class Person
attr_accessor :name
def initialize(name)
@name = name
end
def greet
"Hello, #{@name}! Nice to meet you."
end
end
# Create an instance of the Person class
john = Person.new("John")
# Print out a greeting
puts john.greet # Output: Hello, John! Nice to meet you.- Make note of where that learning never ends.
- It is a constant challenge to develop yourself and strive for excellence.
- You are the master of your destiny.
Good cloud engineers use code blocks for both Code and Errors that appear in the console. Here is an example of y=using a codeblock that appweras in bash.
RuntimeError: Division by zero error!
from (irb):2:in `divide'
from (irb):5
from /usr/bin/irb:11:in `<main>'Here is an example of y=using a codeblock that appears in bash.
A screenshot is when you capture part of your screen from your laptop, desktop or phone.
This is not to be confused with a photo with your phone.
DON'T DO THIS
Github extends Markdown to have a list where you can check off items. [1]
- Finish Step 1
- [] Finish Step 2
- Finish Step 3
Github Flavoured Markdown (GFM) supports emoji shortcodes. Here are some examples:
| Name | Shortcode | Emoji |
|---|---|---|
| Cloud | :cloud: |
☁️ |
| Alarm Clock | :alarm_clock: |
⏰ |
| Cloud with Loghtning | :cloud_with_lightning: |
🌩️ |
You can use the following markdown format to create tables.
| Name | Shortcode | Emoji |
| --- | --- | --- |
| Cloud | `:cloud:`| :cloud:|
| Alarm Clock | `:alarm_clock:`| :alarm_clock:|
| Cloud with Loghtning | ` :cloud_with_lightning:`| :cloud_with_lightning:|Github extends the functionality of Markdown tables to provide more alignment and table cell formatting options. [2]