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)
--[[ | |
Authorization logic | |
]]-- | |
function get_auth_params(where, method) | |
local params = {} | |
if where == "headers" then | |
params = ngx.req.get_headers() | |
elseif where == "basicauth" then |
def get_count(q): | |
count_q = q.statement.with_only_columns([func.count()]).order_by(None) | |
count = q.session.execute(count_q).scalar() | |
return count | |
q = session.query(TestModel).filter(...).order_by(...) | |
# Slow: SELECT COUNT(*) FROM (SELECT ... FROM TestModel WHERE ...) ... | |
print q.count() |
<?php | |
$zoom = htmlspecialchars($_GET["zoom"]); | |
$x = htmlspecialchars($_GET["x"]); | |
$y = htmlspecialchars($_GET["y"]); | |
//explanation: https://gist.github.com/tmcw/4954720 | |
$y = pow(2, $zoom)-$y-1; | |
//source: https://github.com/timwaters/whoots/blob/master/whoots.rb |
function random_text( $type = 'alnum', $length = 8 ) | |
{ | |
switch ( $type ) { | |
case 'alnum': | |
$pool = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; | |
break; | |
case 'alpha': | |
$pool = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; | |
break; | |
case 'hexdec': |
#include <iostream> | |
#include <fstream> | |
#include <string> | |
#include <stdint.h> | |
#include <pcre.h> | |
using namespace std; | |
uint32_t cpufreq() | |
{ |