$ sudo yum install -y pcre-devel
$ sudo yum install xz-devel
$ cd /usr/local/src
This file contains 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
// development error handler | |
// will print stacktrace | |
if (app.get('env') === 'development') { | |
app.use(function(err, req, res, next) { | |
res.status(err.status || 500); | |
function err2JSON (err) { | |
var obj = JSON.parse( | |
JSON.stringify(err, Object.getOwnPropertyNames(err)) |
This file contains 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
{ | |
// http://eslint.org/docs/rules/ | |
"ecmaFeatures": { | |
"arrowFunctions": false, // enable arrow functions | |
"binaryLiterals": false, // enable binary literals | |
"blockBindings": false, // enable let and const (aka block bindings) | |
"classes": false, // enable classes | |
"defaultParams": false, // enable default function parameters | |
"destructuring": false, // enable destructuring |
This file contains 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 parseString = require('xml2js').parseString; | |
var fs = require('fs'); | |
var _ = require('underscore'); | |
require.extensions['.xml'] = function (module, filename) { | |
module.exports = fs.readFileSync(filename, 'utf8'); | |
}; | |
var zh = require("./LocList-zh.xml"); | |
var en = require("./LocList-en.xml"); |
This file contains 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 AV = require('avoscloud-sdk').AV; | |
AV.Query.prototype.findAll = function () { | |
var self = this, | |
data = []; | |
self._limit = 1000; | |
self._order = 'createdAt'; | |
return loop(avpromise(0), function (skip) { | |
self._skip = skip; |
NewerOlder