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
'use strict'; | |
/*globals require, console, process */ | |
var nconf = require('nconf'); | |
var async = require('async'); | |
var winston = require('winston'); | |
nconf.file({ |
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
/*globals require, console, process */ | |
'use strict'; | |
var nconf = require('nconf'); | |
var async = require('async'); | |
nconf.file({ | |
file: 'config.json' | |
}); |
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
/*globals require, console, process */ | |
'use strict'; | |
var nconf = require('nconf'); | |
var async = require('async'); | |
nconf.file({ | |
file: 'config.json' | |
}); |
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
'term' - The term you are searching | |
'in' - Use this to search in different content, it can be titles, posts, titlesposts, users or tags. | |
'by' - used to search for posts that are posted by a specific username | |
'categories' - list of category ids to search in | |
'searchChildren' - if this query param is present children categories are also searched | |
'hasTags' - if a list of tags are passed then only topics that has these tags are returned | |
'sortBy' - sort the results, it can be 'relevance', 'timestmap', 'teaser.timestamp', 'topic.title', 'topic.postcount', 'topic.viewcount', 'topic.timestamp', 'user.username', 'category.name'. | |
'sortDirection' - 'asc' or 'desc' |
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 uids = []; | |
db.objects.find({_key: /^user:\d+:settings/, showemail: 1}).forEach(function(obj) { | |
uids.push(obj._key.split(':')[1]); | |
}); | |
var userKeys = uids.map(function (uid) { | |
return 'user:' + uid; | |
}); | |
print(uids); |
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
module.sortIt = function (params, callback) { | |
var source = params.source; | |
var target = params.target; | |
var start = params.hasOwnProperty('start') ? params.start : 0; | |
var stop = params.hasOwnProperty('stop') ? params.stop : -1; | |
var limit = stop - start + 1; | |
if (limit <= 0) { | |
limit = 0; | |
} |
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
/*globals require, console, process */ | |
'use strict'; | |
var nconf = require('nconf'); | |
var async = require('async'); | |
nconf.file({ | |
file: 'config.json' | |
}); |
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
/*globals require, console, process */ | |
'use strict'; | |
var nconf = require('nconf'); | |
var async = require('async'); | |
nconf.file({ | |
file: 'config.json' | |
}); |
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
/* globals require, console, process */ | |
'use strict'; | |
const nconf = require('nconf'); | |
nconf.file({ | |
file: 'config.json', | |
}); |
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
/* globals require, console, process */ | |
'use strict'; | |
const nconf = require('nconf'); | |
nconf.file({ | |
file: 'config.json', | |
}); |