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
//place script in countly root folder (if anywhere else fix path to pluginManager and common) | |
//Use this script to delete or update segment Values. | |
var pluginManager = require('./plugins/pluginManager.js'), | |
crypto = require('crypto'), | |
async = require('async'), | |
Promise = require("bluebird"), | |
common = require('./api/utils/common.js'), | |
countlyDb = pluginManager.dbConnection(), | |
countly_drill = pluginManager.dbConnection("countly_drill"); |
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
//place script in countly root folder | |
//Use this script to delete or update segment Keys. | |
var pluginManager = require('./plugins/pluginManager.js'), | |
crypto = require('crypto'), | |
Promise = require("bluebird"), | |
countlyDb = pluginManager.dbConnection(), | |
countly_drill = pluginManager.dbConnection("countly_drill"); |
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
#!/bin/sh | |
# Use of this script is deprecated | |
echo | |
echo "WARNING: THIS SCRIPT WILL STOP WORKING AT THE END OF 2016" | |
echo | |
echo "WARNING: THIS SCRIPT IS NO LONGER REQUIRED ON MOST 64-BIT LINUX SYSTEMS WHEN USING SHARP V0.12.0+" | |
echo | |
echo "See http://sharp.dimens.io/page/install#linux" |
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
server { | |
listen 80; | |
server_name localhost; | |
access_log off; | |
rewrite ^ https://yourdomain.com$request_uri? permanent; | |
} | |
server { | |
listen 443; | |
server_name localhost; |
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
//run on mongodb server as | |
//mongo < expireData.js | |
var COUNTLY_DRILL = 'countly_drill', | |
COUNTLY = 'countly', | |
EXPIRE_AFTER = 31536000, | |
INDEX_NAME = "cd_1"; | |
var PROCESS = [ | |
/^drill_events\.*/, |
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 request = require('request'); | |
function makeRequest(cnt){ | |
var options = { | |
uri: 'http://localhost/i?app_key=ccab3e6e1b5ca7b42fc2194b57358b115edb45fc&device_id='+Math.random()+'&begin_session=1&events=[{%22key%22:%22click%22,%22count%22:1,%22segmentation%22:{%22message%22:%22a%22}},{%22key%22:%22go%22,%22count%22:1,%22segmentation%22:{%22message%22:%22b%22}},{%22key%22:%22do%22,%22count%22:1,%22segmentation%22:{%22message%22:%22c%22}}]', | |
method: 'GET' | |
}; | |
request(options, function (error, response, body) { | |
if(!error){ | |
try{ |
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 stores = {}; | |
db.stores.find({meta:{$exists:true}}).forEach(function(doc){ | |
if(doc && doc.meta && doc.meta.stores){ | |
for(var i = 0; i < doc.meta.stores.length; i++){ | |
if(!stores[doc.meta.stores[i]]) | |
stores[doc.meta.stores[i]] = 1; | |
else | |
stores[doc.meta.stores[i]]++; | |
} |