Skip to content

Instantly share code, notes, and snippets.

@mooreniemi
mooreniemi / combine.lua
Last active November 22, 2020 01:21 — forked from RavenZZ/combine.lua
combine two request by openresty
cjson = require "cjson"
ngx. req. read_body() -- explicitly read the req body
local data = ngx. req. get_body_data()
local jsonBody = cjson. decode(data);
if data then
local reqs = { }
--ngx. say("body data:")
for key, value in pairs(jsonBody) do
--ngx.print(key)
@mooreniemi
mooreniemi / emoji.rb
Created October 2, 2015 14:53 — forked from everm1nd/emoji.rb
Print Emoji in Ruby
# all emoji
# 1000.times { |i| emoji(127740 + i) + ' ' }
# moon phases
# 8.times { |i| emoji(127761 + i) }
DELAY = 0.3;
# clean screen
def clean