initial commit: fork

This commit is contained in:
2023-10-27 10:31:20 +02:00
commit a52dbbc103
195 changed files with 17484 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
math.randomseed(tonumber(ARGV[1]))
local function shuffle(t)
for i = #t, 1, -1 do
local rand = math.random(i)
t[i], t[rand] = t[rand], t[i]
end
return t
end
local KEY = KEYS[1]
local list = redis.call('lrange', KEY, 0, -1)
if #list > 0 then
shuffle(list)
redis.call('del', KEY)
redis.call('lpush', KEY, unpack(list))
end
return 'OK'