JSConf.eu opening song - JavaScript Will Listen - Bella Morningstar
- Plask - Dean McNamee
- Plask
| # | |
| # Wide-open CORS config for nginx | |
| # | |
| location / { | |
| if ($request_method = 'OPTIONS') { | |
| add_header 'Access-Control-Allow-Origin' '*'; | |
| # |
| ### | |
| **IMPORTANT** Make shure moment.js is available. | |
| **ARGUMENTS** | |
| * `timestamps` *( Array )*:An arry of timestamps. | |
| * `type` *( String )*: A moment time type like `minute`, `hour`, `day` | |
| * `pastCursor` *( Number )*: A number to define the maximum time to the past. If lower than `0` all given timestamps will be returned. | |
| ### |
| # Build dependencies for OpenResty. | |
| sudo apt-get install build-essential libpcre3-dev libssl-dev libgeoip-dev | |
| # Install standard Nginx first so that you get the relevant service scripts installed too | |
| sudo apt-get install nginx | |
| # If you want to access Postgres via Nginx | |
| sudo apt-get install libpq-dev |
| ### USEAGE | |
| crypto = require( "./crypto" )() | |
| _crypted = crypto.crypt( "myPassowrd", "data123" ) | |
| crypto.decrypt( "myPassowrd", _crypted ) # data123 | |
| ### | |
| crypto = require( "crypto" ) |
| // Restify Server CheatSheet. | |
| // More about the API: http://mcavage.me/node-restify/#server-api | |
| // Install restify with npm install restify | |
| // 1.1. Creating a Server. | |
| // http://mcavage.me/node-restify/#Creating-a-Server | |
| var restify = require('restify'); |