Skip to content

Instantly share code, notes, and snippets.

View idevz's full-sized avatar
🎯
WeiboMesh

周晶 idevz

🎯
WeiboMesh
View GitHub Profile
@idevz
idevz / copy.lua
Created May 9, 2018 21:27 — forked from tylerneylon/copy.lua
How to deep copy Lua values.
-- copy.lua
--
-- Functions of varying complexity levels to achieve
-- a deep copy in Lua.
--
-- 1. The Problem.
--
-- Here's an example to see why deep copies are useful.
@idevz
idevz / simple.lua
Created September 8, 2015 15:56
A Simple route for vanilla
-- perf
local sgmatch = string.gmatch
-- init Simple and set routes
local Simple = {}
function Simple:new(request)
local instance = {
route_name = 'Simple',