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
files: | |
"/tmp/nginx.conf": | |
content: | | |
# Elastic Beanstalk Managed | |
# Elastic Beanstalk managed configuration file | |
# Some configuration of nginx can be by placing files in /etc/nginx/conf.d | |
# using Configuration Files. | |
# http://docs.amazonwebservices.com/elasticbeanstalk/latest/dg/customize-containers.html |
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
/* | |
12590 = 10592 (sort array. ignore 0. 1 is next smallest and already in front. pay attention to 0. swap with number after 1 ) | |
21045 = 12045 (sort array. ignore 0. 1 is next smallest but not in front. swap with number in front) | |
21450 = 12450 (sort array. ignore 0. 1 is next smallest but not in front. swap with number in front) | |
10390 = 10039 (sort array. ignore 0. 1 is next smallest and already in front. pay attention to 0. we have a 0 after 1 already. move to next 0, swap with third number) | |
20305 = 20035 (sort array. ignore 0. 2 is next smallest and already in front. pay attention to 0. we have a 0 after 2 already. move to next 0, swap with third number) | |
21352 = 12352 (sort array. no zero. 1 is smallest but not in front. swap with number in front) | |
16289 = 12689 (sort array. no zero. 1 is smallest and already in front. move to next) | |
*/ |
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
stripUniques: function(id, data, cb){ | |
this.findOne({id: id}).exec(function findCB(err, result){ | |
if (err) { | |
//bubble error back to callback | |
return cb(err); | |
} else if (!result) { | |
//id passed is invalid. return empty object and deal with this in callback | |
return cb(null, {}); | |
} else { | |
if (data) { |