This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Use this query scope from any model/controller | |
| * It works on single table only, so for joined columns, make a mysql view and operate on that | |
| * Example request fromat | |
| */ | |
| /* | |
| [ | |
| 'query' => [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var restify = require('restify') | |
| , port = process.env.PORT || 3000 | |
| , Phantom = require('phantom') | |
| , tmpdir = require('os').tmpdir() | |
| , fs = require('fs'); | |
| var server = restify.createServer(); | |
| function setResponseHeaders(res, filename) { | |
| res.header('Content-disposition', 'inline; filename=' + filename); |