Skip to content

Instantly share code, notes, and snippets.

@hrdtbs
Last active April 12, 2018 09:16
Show Gist options
  • Save hrdtbs/736b03113d648e3d155e724c723fab0f to your computer and use it in GitHub Desktop.
Save hrdtbs/736b03113d648e3d155e724c723fab0f to your computer and use it in GitHub Desktop.
Markdown

Daring Fireball: Markdown Syntax Documentation

Github Help: Writing on Github

Headings

also called Headers

#   H1
##  H2
### H3
#### H4
##### H5
###### H6

Alternative H1
==============

Alternative H2
-------------

H1

H2

H3

H4

H5
H6

Alternative H1

Alternative H2


Blockquotes

>   ### Blockquote contained other elements.
>   
>   Blockquote with multi paragraph.
>
>   >   Blockquote nested.
>
>   Blockquote with hard-wrapped paragraph. Lorem ipsum dolor sit amet,
consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus.
Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus.

Blockquote contained other elements.

Blockquote with multi paragraph.

Blockquote nested.

Blockquote with hard-wrapped paragraph. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus.


Lists

Unordered Lists

Unordered lists use asterisks*, pluses+, and hyphens- — interchangably — as list markers

*   Unordered list item.
*   Unordered list item.
*   List item with hard-wrapped paragraph. Lorem ipsum dolor sit amet,
consectetuer adipiscing elit. 
*   List item with multiple paragraphs.

    List item with multiple paragraphs.
*   List item.
    *   List item nested.
        *   List item nested
*   list contained other elements.

    >
    >   Blockquote inside a list item.

  • Unordered list item.

  • Unordered list item.

  • List item with hard-wrapped paragraph. Lorem ipsum dolor sit amet, consectetuer adipiscing elit.

  • List item with multiple paragraphs.

    List item with multiple paragraphs.

  • List item.

    • List item nested.
      • List item nested
  • list contained other elements.

    Blockquote inside a list item.


Ordered Lists

1.   Ordered list item.
2.   Ordered list item.
3.   List item with hard-wrapped paragraph. Lorem ipsum dolor sit amet,
consectetuer adipiscing elit. 
4.   List item with multiple paragraphs

     List item with multiple paragraphs
5.   List item.
     1. List item nested.
     2. List item nested.
        1. List item nested.
        2. List item nested.
5.   List contained other elements
     >
     >   Blockquote inside a list item 

  1. Ordered list item.

  2. Ordered list item.

  3. List item with hard-wrapped paragraph. Lorem ipsum dolor sit amet, consectetuer adipiscing elit.

  4. List item with multiple paragraphs

    List item with multiple paragraphs

  5. List item.

    1. List item nested.
    2. List item nested.
      1. List item nested.
      2. List item nested.
  6. List contained other elements

    Blockquote inside a list item


Automatic numbering

7. Ordered list item.
2. Ordered list item.
8. Ordered list item.

  1. Ordered list item.
  2. Ordered list item.
  3. Ordered list item.

1. Ordered list item.
1. Ordered list item.
1. Ordered list item.

  1. Ordered list item.
  2. Ordered list item.
  3. Ordered list item.

Code blocks

```
class Hoge
    def hoge
        print 'hoge'
    end
end
```

class Hoge
    def hoge
        print 'hoge'
    end
end

Or indent every line of the block by at least 4 spaces or 1 tab.

    class Hoge
        def hoge
            print 'hoge'
        end
    end

Code inside other elements

`JavaScript` is not `Java`

JavaScript is not Java


HORIZONTAL RULES

* * *
***
*****
- - -
---------------------------------------





Styling text

Style Syntax Example Output
Bold ** ** or __ __ **bold text** bold text
Italic * * or _ _ *italic text* italic text
Strikethrough ~~ ~~ ~~mistaken text~~ mistaken text

Links

[Google](https://www.google.co.jp)

Google


Internal links

TOC
- [Headings](#headings)
- [Blockquotess](#blockquotes)
- [Lists](#lists)
    -   [Unordered Lists](#unordered-lists)
    -   [Ordered Lists](#ordered-lists)

TOC

Images

![Rose](./imgs/rose.jpg)

Rose


Task lists

- [x] Finish my changes
- [ ] Push my commits to GitHub
- [ ] Open a pull request

  • Finish my changes
  • Push my commits to GitHub
  • Open a pull request

Table

| First Header  | Second Header |
| ------------- | ------------- |
| Content Cell  | Content Cell  |
| Content Cell  | Content Cell  |

First Header Second Header
Content Cell Content Cell
Content Cell Content Cell

| Command | Description |
| --- | --- |
| git status | List all new or modified files |
| git diff | Show file differences that haven't been staged |

Command Description
git status List all new or modified files
git diff Show file differences that haven't been staged

| Left-aligned | Center-aligned | Right-aligned |
| :---         |     :---:      |          ---: |
| git status   | git status     | git status    |
| git diff     | git diff       | git diff      |

Left-aligned Center-aligned Right-aligned
git status git status git status
git diff git diff git diff

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment