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
| { action_id: 53510, | |
| action_code: 'https://tracking.crobo.com/aff_c?offer_id=29257&aff_id=19699', | |
| network_id: 1052, | |
| action_subid: 'UK-TTT5_17822', | |
| random_ref: 1, | |
| idfa_gaid: 1 } |
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 maxmind = require('maxmind'); | |
| const Promise = require('bluebird'); | |
| const geoip = {}; | |
| Promise.promisifyAll(maxmind); | |
| geoip.userGeoInfo = function () { | |
| //Async db calls |
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
| let ispsArr = mysql.IspWhitelist.findAll({ | |
| where:{iso_code:'GB'}, | |
| attributes: ['isp_name'], | |
| }).then((isps) => { | |
| let ispsArr=[]; | |
| isps.forEach(function(isp) { | |
| ispsArr.push(isp.isp_name) | |
| }) | |
| console.log(ispsArr) //Gives me the array | |
| return ispsArr; |
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 ispsArr = mysql.IspWhitelist.findAll({ | |
| where:{iso_code:'GB'}, | |
| attributes: ['isp_name'], | |
| }).then((isps) => { | |
| let ispsArr=[]; | |
| isps.forEach(function(isp) { | |
| ispsArr.push(isp.isp_name) | |
| }) | |
| //console.log(ispsArr) | |
| return ispsArr; |
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
| actionFilter.filterVisited = function (actions) { | |
| actions.forEach(function (action_id) { | |
| let actioncookiecap_key = 'actioncookiecap-'+action_id; | |
| return cache.has(actioncookiecap_key).then(function(val){ | |
| if(val!==false){ | |
| let index = actions.indexOf(action_id); | |
| actions.splice(index, 1); |
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
| async function has(id) { | |
| const val = await cache.has(`actioncookiecap-${id}`); | |
| return { val, id }; | |
| } | |
| actionFilter.filterVisited = async function (actions) { | |
| const results = await Promise.all(actions.map(has)); | |
| console.log(results) //Returns [ { val: false, id: 39708 }, { val: false, id: 39709 } ] | |
| return results.filter(v => v.val).map(v => v.id); | |
| } |
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
| const Promise = require('bluebird'); | |
| const mysql = require("../modules/mysql.js"); | |
| const es = require("../modules/es.js"); | |
| const cache = require("../modules/memcached.js"); | |
| const redis = require("../modules/redis.js"); | |
| const helpers = require("../modules/helpers.js"); | |
| const FpToMemcache = require("../modules/fptomemcache.js"); | |
| exports.iframe = function(req, res) { |
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
| FROM ubuntu:trusty | |
| RUN apt-get update; apt-get clean | |
| # Add a user for running applications. | |
| RUN useradd apps | |
| RUN mkdir -p /home/apps && chown apps:apps /home/apps | |
| # Install x11vnc. | |
| RUN apt-get install -y x11vnc |
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
| FROM ubuntu:trusty | |
| RUN apt-get update; apt-get clean | |
| # Add a user for running applications. | |
| RUN useradd apps | |
| RUN mkdir -p /home/apps && chown apps:apps /home/apps | |
| # Install x11vnc. | |
| RUN apt-get install -y x11vnc |
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
| Hericks-Mac-Pro:docker-chrome-vnc herickpaiva$ docker run -p 5900:5900 hmpmarketing/chrome-vnc:2 | |
| (EE) | |
| Fatal server error: | |
| (EE) Server is already active for display 1 | |
| If this server is no longer running, remove /tmp/.X1-lock | |
| and start again. | |
| (EE) | |
| xvfb failed to start. |