• How to understand Lua virtual machine


    Welcome to Tencent cloud + community to get more Tencent technology practice dry goods~ Author: Zheng Xiaohui, senior engineer of Tencent game client development Write in the front: all the words in this article are manually typed by me, and the demo code shared later in this article is line by line by me. Before […]

  • Android Lua calls each other


    Preface This article is based onLua 5.3. Lua is a lightweight scripting language, often used to embed other languages as a supplement. More about Lua itself is beyond the scope of this article.There are many advantages to embed Lua in Android. With the advantages of lua script language, dynamic logic control can be easily realized. […]

  • Nginx compiling and installing Lua module


    Nginx compiling and installing Lua module 1、 Install Lua environment and related libraries Website: Lua module website 1、 LuaJIT wget http://luajit.org/download/LuaJIT-2.0.2.tar.gz tar -zxvf LuaJIT-2.0.2.tar.gz cd LuaJIT-2.0.2 make install PREFIX=/usr/local/LuaJIT export LUAJIT_LIB=/usr/local/LuaJIT/lib export LUAJIT_INC=/usr/local/LuaJIT/include/luajit-2.0 2. NGX devel kit and Lua nginx module cd /opt/download wget https://github.com/simpl/ngx_devel_kit/archive/v0.3.0.tar.gz wget https://github.com/openresty/lua-nginx-module/archive/v0.10.9rc7.tar.gz #Decompress separately 3. Recompile nginx cd /opt/download wget […]

  • Compiling sass and SCSS with nginx


    The front-end partners should be familiar with sass or SCSS (hereinafter referred to as SASS), which is a CSS preprocessing language. Using sass can greatly simplify the writing and maintenance of CSS code. Usually, we aredevelopment environmentUnder the environment of webpack dev server or gulp, sass is compiled in real time by listening for file […]

  • Overall design of high concurrency red packet


    Some time ago, according to the needs of the business side, the company did a red packet snatching activity and searched a lot of information on the Internet. Record the overall design ideas and various problems in the operation process. Product requirements: 1. Red packet supports configuration of start time, end time, type (random amount […]

  • How to use Lua to expand in golang


    Preface Recently, Lua needs to be used in the project for expansion. It is found that there is a Lua virtual machine written in golang on GitHub, named gopher Lua. It’s not bad after use, so I’ll share it with you. I won’t say much about it. Let’s take a look at the detailed introduction. […]

  • Brief introduction to nginx Lua MySQL


    Need to install Nginx Install nginx‘sechoModular Install nginx’sluaModular installMysql PS: echo module, which allows us to print out parameters just like echo in PHP.However, you need to add the default “U type” text / HTML “; otherwise, the request page will be downloaded. Knowledge points: *Understanding nginx, regular matchinglocation:【http://www.cnblogs.com/zlingh…】 Nginx operation command, – s [reload|stop] […]

  • Decide whether to cache HTTP requests according to the key and URL of JWT


    Link https://stackoverflow.com/que demand Decide whether to cache HTTP requests according to the key and URL of JWT For example, in JWT. payload: { “iss”: “iss”, “sub”: “sub”, “userGroupID”: “{userGroupID}” } Then request https://myapi.example.com/group… {groupid} / cars If usergroupid is the same as groupid, it will be cached, otherwise it will not be cached Solution Using […]

  • Luakit’s past life and present life


    Historical origins of luakit Recently, a cross platform app development framework, luakit, has been released. How could you think of doing such a thing? First of all, I want to talk about some projects I have participated in, some technical points I have met in the project and the physical examination of project development. Because […]

  • Processing of openresty log output


    Recently, there was a failure. A request from an interface took tens of seconds to process. Due to the lack of logs, the network failure was eliminated, so it was impossible to reproduce the failure again. In order to trace the problem next time there is a problem, you need to add some trace logs.To […]

  • Lua modules and packages


    Lua modules and packages abstract Concept of module How to implement a module How to reference a module Module load pathpackage.path environment variableLUA_PATHSet up Cross directory module references Cache mechanism execution environment Reference resources Concept of modules in Lua Modules are similar to a package library. Starting from Lua 5.1, Lua has added a standard […]

  • Brief introduction to the combination of lua script and redis database


    Maybe you’ve heard about the script language embedded in redis, but haven’t you tried it yourself? This tutorial will let you learn to use the powerful Lua language on your Redis server. Hello, Lua! Our first redis Lua script just returns a string and doesn’t interact with redis in any meaningful way. Copy codeThe code […]