Skip to content

Instantly share code, notes, and snippets.

@tangnotes
Created May 26, 2017 15:48
Show Gist options
  • Save tangnotes/1dd082df8565f622cdcc6907289ca3f5 to your computer and use it in GitHub Desktop.
Save tangnotes/1dd082df8565f622cdcc6907289ca3f5 to your computer and use it in GitHub Desktop.
Markdown samples, generally used for editor & markdown convertor testing.

Title (H1)

Title (H2)

List

  • option 1
  • option 2

Table

ID Name Email
1 James [email protected]
2 Peter Just for Test [email protected]

Emphasis

Emphasis, aka italics, with asterisks or underscores.

Strong emphasis, aka bold, with asterisks or underscores.

Combined emphasis with asterisks and underscores.

Strikethrough uses two tildes. Scratch this.

Link

I'm an inline-style link

I'm an inline-style link with title

I'm a reference-style link

I'm a relative reference to a repository file

You can use numbers for reference-style link definitions

Or leave it empty and use the link text itself.

URLs and URLs in angle brackets will automatically get turned into links. http://www.example.com or http://www.example.com and sometimes example.com (but not on Github, for example).

Some text to show that the reference links can follow later.

Image

Here's our logo (hover to see the title text):

Inline-style: alt text

Reference-style: alt text

Code

Java

package com.example.java;

import java.util.Date;

public static void main(String[] args) {
    Date date = new Date();
    System.out.println(date.toString());
}

Go

package main

import (
    import (
	"bufio"
	"encoding/base64"
	"fmt"
	"log"
	"net"
	"strings"
)

type Client struct {
	conn      net.Conn
	localName string
	br        *bufio.Reader
}

func Dial(addr string) (*Client, error) {
	conn, err := net.Dial("tcp", addr)
	if err != nil {
		return nil, err
	}
	c := &Client{conn: conn, localName: "localhost", br: bufio.NewReader(conn)}
	code, msg, _, err := c.parseResp()
	if err != nil {
		conn.Close()
		return nil, err
	}
	log.Printf("Dial: %s#%s\n", code, msg)
	return c, nil
}
)

Horizontal Rule

Three or more...


Hyphens


Asterisks


Underscores

Blockquotes

Blockquotes are very handy in email to emulate reply text. This line is part of the same quote.

Quote break.

This is a very long line that will still be quoted properly when it wraps. Oh boy let's keep writing to make sure this is long enough to actually wrap for everyone. Oh, you can put Markdown into a blockquote.

Github markdown

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