background preloader

Libraries

Facebook Twitter

GitHub - nrk/redis-lua: A Lua client library for the redis key value storage system. Documentation - Materialize. Get Started With Turbo — Turbo.lua 2.1.0 documentation. A set of simple examples to get you started using Turbo.

Get Started With Turbo — Turbo.lua 2.1.0 documentation

Installing Turbo¶ Turbo needs LuaJIT to run, because it uses the LuaJIT FFI library it will not run on ‘official/normal/vanilla’ Lua. Quick install on Debian/Ubuntu (you may need to add sudo or run these as root user): $ apt-get install luajit luarocks git build-essential libssl-dev $ luarocks install turbo You can also install Turbo use the included Makefile in the project source: $ git clone $ cd turbo && make install You can provide a PREFIX argument to the make which will install Turbo in a specified directory.

For Windows users it is recommended to use the included install.bat file or running the one-line command below from a administrative command line. Hello World¶ The traditional and mandatory ‘Hello World’ Save the file as helloworld.lua and run it with luajit helloworld.lua. Request parameters¶ A slightly more advanced example, a server echoing the request parameter ‘name’. Routes¶ Serving Static Files¶ JSON Output¶ Stylus docs. Nib - CSS3 extensions for Stylus. Nib is a small and powerful library for the Stylus CSS language, providing robust cross-browser CSS3 mixins to make your life as a designer easier.

nib - CSS3 extensions for Stylus

Installation To get started you'll first want to add nib to your package.json file, along with stylus. Once installed you can use Stylus and Nib with your Connect or Express application as shown in the following snippet. The simple .use(nib()) call is all that is required to expose itself to Stylus From within a .styl file you can then @import nib, or a portion of nib: @import 'nib' @import 'nib/gradients' @import 'nib/buttons' Rather than manually @import-ing nib within your Stylus source you can import it via the JavaScript API as well: return stylus(str) .set('filename', path) .set('compress', true) .use(nib()) .import('nib'); Gradients yields: Any number of color stops may be provided: Units may be placed before, or after the color: Position mixins fixed|absolute|relative: top|bottom [n] left|right [n] The following example will default to (0,0):

Pug docs. Installation Pug is available via npm: $ npm install pug Overview The general rendering process of Pug is simple. pug.compile() will compile the Pug source code into a JavaScript function that takes a data object (called “locals”) as an argument.

Pug docs

Call that resultant function with your data, and voilà! The compiled function can be re-used, and called with different sets of data. p #{name}'s Pug source code! Pug also provides the pug.render() family of functions that combine compiling and rendering into one step. Animo. A powerful little tool for managing transitions and animations with JavaScript.

Interact.js - JavaScript drag and drop, resizing and gestures with inertia and snapping.