Skip to content

Instantly share code, notes, and snippets.

@nanyaks
nanyaks / exampleController.js
Last active May 18, 2016 15:08
DS pagination using the response service.
listPayout: function (req, res) {
var pagination = {
page: parseInt(req.query.page) || 1,
limit: parseInt(req.query.perPage) || 10
};
var criteria = {
isDeleted: false
};
AppService.paginate('modelName', criteria, pagination).spread(function (err, count, results){
@nanyaks
nanyaks / Place.js
Created May 3, 2016 14:10 — forked from PascalAnimateur/Place.js
Geospatial example in Sails.js using native MongoDB query
/* Place model */
module.exports = {
attributes: {
name: {
type: 'string',
required: true
},
@nanyaks
nanyaks / .block
Last active April 22, 2016 06:33
Simple stacked chart
license: none
@nanyaks
nanyaks / .block
Last active April 20, 2016 11:32
Stacked group chart graph
license: none