Skip to content

oakzd/github-docs-Bootcamp-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Github-docs-Bootcamp-example

Writing Good Documentation

Codeblocks in markdown make it really easy for people working tech to copy,paste, and share code.

  • A good Cloud Engineer uses codeblocks whenever possible.

  • Because it allows others to view your code and try to replicate what you did!

A Ruby example (using codeblocks)

def alternating_characters?(s)
  type = [/[aeiou]/, /[^aeiou]/].cycle

  if s.start_with?(/[^aeiou]/)
    type.next
  end

  s.chars.all? { |ch| ch.match?(type.next) }
end

alternating_characters?("ateciyu")
# true

A python example (using codeblocks)

# Store input numbers
num1 = input('Enter first number: ')
num2 = input('Enter second number: ')

# Add two numbers
sum = float(num1) + float(num2)

# Display the sum
print('The sum of {0} and {1} is {2}'.format(num1, num2, sum))

Insert a image

Good Cloud engineers use codeblocks for both code and errors!

Below is an example

$ RBENV_VERSION=2.5.0 ruby division_service.rb 5 0

Traceback (most recent call last):
	2: from division_service.rb:13:in `<main>'
	1: from division_service.rb:9:in `divide'
division_service.rb:9:in `/': divided by 0 (ZeroDivisionError)

$

Step 3 - Github Flavored Markdown Task Lists

Github extends Markdown to have a list where you can check off items.[1]

  • Finish Step 1
  • Finish Step 2
  • Finish Step 3

Step 4 - Using Emjois (Optional)

Github Flavored Markdown (GFM) Supports Emojis 🤯

Examples using a table

Section 1 Section 2
Face Sports
😄 🏀
🤠 🏈
Section 1 Section 2
Code Emoji
:dog: 🐶
:owl: 🦉

Step 5 = how to create a table

You can use the following format to create tables!

| Section 1 | Section 2 |
| :-----------: | :------------: |
| **Code** | **Emoji**   |
| `:dog:` | :dog:   |
| `:owl:` | :owl:   |

GFM provides really cool formating for tables[2]

Another way to include pics

Shooting Stars!

Link to another file in your repo

ratchet and clank

External References

Links I used

  1. I used this for syntax Syntax
  2. I used this for Ruby code Ruby Example
  3. I used this for Python code Python Example 4.I used this for Ruby code Ruby Error Example [1]
  4. Emoji list!
  5. Format tables [2]

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published