Skip to content

Instantly share code, notes, and snippets.

@saml
Last active December 11, 2015 05:58
Show Gist options
  • Save saml/4555504 to your computer and use it in GitHub Desktop.
Save saml/4555504 to your computer and use it in GitHub Desktop.

This is test entry

whatever this is code

hello

and this is some code:

x = [x for x in x]
for x in x:
    print(x)
sys.exit(1)
  • this is list
  • another list
    • another
    • hello
  • yes

Here is some math: $$x = {-b \pm \sqrt{b^2-4ac} \over 2a}.$$

Have fun bro.

local cjson = require("cjson")
local method = ngx.req.get_method()
if method == 'POST' then
ngx.req.read_body()
local args = ngx.req.get_post_args()
args['json']= cjson.decode(args['json'])
ngx.say(cjson.encode(args))
else
ngx.status = ngx.HTTP_NOT_ALLOWED
ngx.say(string.format('{"status": %d, "content": "Method Not Allowed: %s"}', ngx.HTTP_NOT_ALLOWED, method))
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment