Update the Gist plugin usage 2014-04-10

Sharing Code Snippets

Backtick Code Blocks

Syntax:(insert enter before and after the two “““)

1
2
``` [language] [title] [url] [link text]
code snippet ```

Example(plain):

1
``` $ sudo make me a sandwich ```
1
$ sudo make me a sandwich

Example With Syntax Highlighting a Caption and Link

1
2
3
4
5
6
```ruby Discover if a number is prime http://www.noulakaz.net/weblog/2007/03/18/a-regular-expression-to-check-for-prime-numbers/ Source Article
class Fixnum
  def prime?
    ('1' * self) !~ /^1?$|^(11+?)\1+$/
  end
end```
Discover if a number is primeSource Article
1
2
3
4
5
class Fixnum
  def prime?
    ('1' * self) !~ /^1?$|^(11+?)\1+$/
  end
end

More: http://octopress.org/docs/blogging/code/

Codeblock

Syntax
asdf
1
2
NSObject *obj = [NSObject new];
NSObject *obj = [[]NSObject alloc] init];

Gist

2462760为ID,如果是多个文件的话,可在后面跟上文件名。(但现在好像不太能用啊)

Discover if a number is primeSource Article
1
·{·% gist 9828745 %·}·