Lua Script Library

Public domain Lua scripts for your use or reference.

  1. hgetsmembers
    Look up the contents of a Set in a Hash
  2. hincrbyex
    Increment a value in a hash only if it exists
  3. hmsetnx
    Set multiple values of a hash only if the key does not exist
  4. incrbyex
    Increment a value only if it exists
  5. ratelimit
    Simple rate limiter
  6. runningavg
    Keep a running calculation of the average value of a series
  7. sismembermulti
    Check for membership in any number of sets.
  8. smemhashes
    Gets the contents of all the Hashes whose keys are in a Set
  9. zpop
    Removes and returns the top value in a zset, with its score.

Want to share your own? Fork us on GitHub.

Special thanks to Aaron Blohowiak for letting us give some new life to the scripts from his old EVALSHA site.