How to update a Redis value without affecting the remaining TTL

Very self explanatory title, this beauty it's a Lua script running inside Redis interpreter, it will basically grap the ttl from the passed key if exist »

How to Authenticate against Moltin API

Series This constitutes a series of blogs about the Moltin API, an incredible eCommerce > API for developers, using powerful & flexible building blocks with no steep »

How to first steps with Moltin API

Series This constitutes a series of blogs about the Moltin API, an incredible eCommerce > API for developers, using powerful & flexible building blocks with no steep »

How to use a class's constructor on Lua

We add the following bits of code to our class: setmetatable(MyClass, { __call = function (cls, ...) return cls.new(...) end, }) function MyClass.new(init) local self = setmetatable( »

Lua sugar syntax double dots :

Using the sugar syntax : on Lua will allow us to access to the self table instance and for consecuent all methods and variables inside that specific »

Return JSON responses when using OpenResty + Lua

Related posts I've written few related post that may be interesting have a look to first: Returning status code with OpenResty + Lua When ngx.exit using »

Returning status code with OpenResty + Lua

If we want to return specific status codes from our Lua code we should have the following in mind: ngx.say("hello") return ngx.exit(404) »

When ngx.exit using OpenResty precede it with return

It is recommended than when using ngx.exit precede it with return to reinforce the fact that request will end. Few notes from Yichun Zhang about »

How to access nano from inside our Docker containers

If you have seen the imagen below... You know what I'm talking about, you are trying to use nano or other console editor that needs to »

How to show all invisible characters in a string like \n or \r\n

As the stackoverflow question said: To see all the invisible characters not only \r, \n etc... It's good to see json_encodeed version and everything is »