Quantcast
Channel: Recent Gists from itamarhaber
Viewing all articles
Browse latest Browse all 36

Dump a Redis key in TCL binary string encoding

$
0
0
tcl-dump.lua
-- DUMPs a Redis key in TCL-compatible binary string encoding
local b = redis.call("DUMP",KEYS[1])
local s =""
for i =1, string.len(b), 1do
s = s ..string.format("\\x%02X",string.byte(b,i))
end
return s

Viewing all articles
Browse latest Browse all 36

Latest Images

Trending Articles





Latest Images