Sample Markdown Cheat Sheet

Sample Markdown Cheat Sheet
=========================== 


This is a sample markdown file to help you write Markdown quickly :)


If you use the fabulous [Sublime Text 2/3 editor][ST] along with the [Markdown Preview plugin][MarkdownPreview], open your ST2 Palette with `CMD+⇧+P` then choose `Markdown Preview in browser` to see the result in your browser.


## Text basics
this is *italic* and this is **bold** .  another _italic_ and another __bold__


this is `important` text. and percentage signs : % and `%`


This is a paragraph with a footnote (builtin parser only). [^note-id]


Insert `[ TOC ]` without spaces to generate a table of contents (builtin parsers only).


## Indentation
> Here is some indented text
>> even more indented


## Titles
# Big title (h1)
## Middle title (h2)
### Smaller title (h3)
#### and so on (hX)
##### and so on (hX)
###### and so on (hX)


## Example lists (1)


 - bullets can be `-`, `+`, or `*`
 - bullet list 1
 - bullet list 2
    - sub item 1
    - sub item 2


        with indented text inside


 - bullet list 3
 + bullet list 4
 * bullet list 5



## Code


It's quite easy to show code in markdown files.


Backticks can be used to `highlight` some words.


Also, any indented block is considered a code block.  If `enable_highlight` is `true`, syntax highlighting will be included (for the builtin parser - the github parser does this automatically).


    <script>
        document.location = 'http://lmgtfy.com/?q=markdown+cheat+sheet';
    </script>


## Math


When `enable_mathjax` is `true`, inline math can be included \\(\frac{\pi}{2}\\) $\pi$


Alternatively, math can be written on its own line:


$$F(\omega) = \frac{1}{\sqrt{2\pi}} \int_{-\infty}^{\infty} f(t) \, e^{ - i \omega t}dt$$


\\[\int_0^1 f(t) \mathrm{d}t\\]


\\[\sum_j \gamma_j^2/d_j\\]









Some Python code :


```python
import random


class CardGame(object):
    """ a sample python class """
    NB_CARDS = 32
    def __init__(self, cards=5):
        self.cards = random.sample(range(self.NB_CARDS), 5)
        print 'ready to play'
```


Some Javascript code :


```js
var config = {
    duration: 5,
    comment: 'WTF'
}
// callbacks beauty un action
async_call('/path/to/api', function(json) {
    another_call(json, function(result2) {
        another_another_call(result2, function(result3) {
            another_another_another_call(result3, function(result4) {
                alert('And if all went well, i got my result :)');
            });
        });
    });
})
```


The Github Markdown also brings some [nice Emoji support][emoji] : :+1: :heart: :beer:





  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值