To create an anchor to a heading in github flavored markdown.
Add - characters between each word in the heading and wrap the value in parens (#some-markdown-heading) so your link should look like so:
[create an anchor](#anchors-in-markdown)
| #!/usr/bin/python | |
| # demo from here: http://pymotw.com/2/urllib2/index.html#uploading-files | |
| import itertools | |
| import mimetools | |
| import mimetypes | |
| from cStringIO import StringIO | |
| import urllib | |
| import urllib2 |
| """ | |
| Simple demonstration of how to implement Server-sent events (SSE) in Python | |
| using Bottle micro web-framework. | |
| SSE require asynchronous request handling, but it's tricky with WSGI. One way | |
| to achieve that is to use gevent library as shown here. | |
| Usage: just start the script and open http://localhost:8080/ in your browser. | |
| Based on: |
| -- show running queries (pre 9.2) | |
| SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
| FROM pg_stat_activity | |
| WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
| ORDER BY query_start desc; | |
| -- show running queries (9.2) | |
| SELECT pid, age(clock_timestamp(), query_start), usename, query | |
| FROM pg_stat_activity | |
| WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |