On the fly (and free) SSL registration and renewal inside OpenResty/nginx with Let’s Encrypt.
This OpenResty plugin automatically and transparently issues SSL certificates from Let’s Encrypt (a free certificate authority) as requests are received. It works like:
- A SSL request for a SNI hostname is received.
- If the system already has a SSL certificate for that domain, it is immediately returned (with OCSP stapling).
- If the system does not yet have an SSL certificate for this domain, it issues a new SSL certificate from Let’s Encrypt. Domain validation is handled for you. After receiving the new certificate (usually within a few seconds), the new certificate is saved, cached, and returned to the client (without dropping the original request).
This uses the
ssl_certificate_by_lua functionality in OpenResty 188.8.131.52+.
luaver helps to manage and switch between different versions of Lua, LuaJIT and Luarocks.
- Installs/Uninstalls any version of Lua, LuaJIT or luarocks with a single command.
- Switches between different versions of ‘Lua’, ‘LuaJIT’ or ‘Luarocks’ easily, without glitches.
- Consistency between ‘Lua’ and ‘Luarocks’ maintained – Rocks and configurations for different lua versions are stored differently.
- Every terminal session can have a different environment configured. Default versions can also be configured.
It provides a suite of source, sink, and processing blocks, with a simple API for defining flow graphs, running flow graphs, creating blocks, and creating data types. LuaRadio is built on LuaJIT, has a small binary footprint of under 750 KB (including LuaJIT), has no external hard dependencies, and is MIT licensed.
LuaRadio can be used to rapidly prototype software radios, modulation/demodulation utilities, and signal processing experiments. It can also be embedded into existing radio applications to serve as a user scriptable engine for processing samples.
LuaRadio blocks are written in pure Lua, but can use LuaJIT’s FFI to wrap external libraries, like VOLK, liquid-dsp, and others, for computational acceleration, more sophisticated processing, and interfacing with SDR hardware.
Use GNU Radio? See how LuaRadio compares to GNU Radio.
A pure Lua client library for Apache Cassandra (2.0+), compatible with ngx_lua/OpenResty and plain Lua.
It is implemented following the example of the official Datastax drivers, and tries to offer the same behaviors, options and features.
Open source Torchnet helps researchers and developers build rapid and reusable prototypes of learning systems in Torch.
Building rapid and clean prototypes for deep machine-learning operations can now take a big step forward with Torchnet, a new software toolkit that fosters rapid and collaborative development of deep learning experiments by the Torch community.
Introduced and open-sourced this week at the International Conference on Machine Learning (ICML) in New York, Torchnet provides a collection of boilerplate code, key abstractions, and reference implementations that can be snapped together or taken apart and then later reused, substantially speeding development. It encourages a modular programming approach, reducing the chance of bugs while making it easy to use asynchronous, parallel data loading and efficient multi-GPU computations.
The new toolkit builds on the success of Torch, a framework for building deep learning models by providing fast implementations of common algebraic operations on both CPU (via OpenMP/SSE) and GPU (via CUDA).
Hi folks, this post aims to offer a clear introduction to the topic of metatables in Lua for those who are not yet familiar with them. I originally wrote this for the forums of PICO-8, a ‘fantasy console’ with limitations inspired by classic 8-bit computers, which uses a modified flavour of Lua 5.2.
Without further ado, let’s go!
A table is a mapping of keys to values. They’re explained quite well in the PICO-8 manual and the Lua reference manual so I won’t go into more detail. In particular you should know that
t.foo is just a nicer way of writing
t["foo"] and also that
t:foo() is a nicer way of calling the function
A metatable is a table with some specially named properties defined inside. You apply a metatable to any other table to change the way that table behaves. This can be used to:
- define custom operations for your table (+, -, etc.)
- define what should happen when somebody tries to look up a key that doesn’t exist
- specify how your table should be converted to a string (e.g. for printing)
- change the way the garbage collector treats your table (e.g. tables with weak keys)
Point #2 is especially powerful because it allows you to set default values for missing properties, or specify a prototype object which contains methods shared by many tables.
You can attach a metatable to any other table using the setmetatable function.
All possible metatable events are explained on the lua-users wiki:
>>> list of metatable events <<<
which is, as far as I’m aware, the best reference for everything that metatables can be used for.
And that’s really all you need to know!