This script fetches all users from Intercom and sets the name
and address
custom attributes to null
.
- run
npm i intercom-client
INTERCOM_ID=id INTERCOM_API_KEY=apikey node intercom.js
const fs = require('fs') | |
const emailRegex = /@[A-z0-9\.-]{3,50}/g | |
const phoneRegex = /\+[\d\s-]{4}/g | |
const liveRegex = /live/g | |
const file = '/path/to/big/json/file.json' | |
const outputFile = '/path/to/output/redacted.json' | |
const inputStream = fs.createReadStream(file, {encoding: 'utf8'}) | |
const outputStream = fs.createWriteStream(outputFile, {encoding: 'utf8'}) |
// load the AWS SDK | |
const AWS = require('aws-sdk') | |
// load CloudFront key pair from environment variables | |
// Important: when storing your CloudFront private key as an environment variable string, | |
// you'll need to replace all line breaks with \n, like this: | |
// CF_PRIVATE_KEY="-----BEGIN RSA PRIVATE KEY-----\nMIIE...1Ar\nwLW...2eL\nFOu...k2E\n-----END RSA PRIVATE KEY-----" | |
const cloudfrontAccessKeyId = process.env.CF_ACCESS_KEY_ID | |
const cloudFrontPrivateKey = process.env.CF_PRIVATE_KEY | |
const signer = new AWS.CloudFront.Signer(cloudfrontAccessKeyId, cloudFrontPrivateKey) |
./node_modules/.bin/engage -p '$distinct_id' -k MIXPANEL_KEY -s MIXPANEL_SECRET | jq -c -M '[.[] | {"$distinct_id","$delete":"","$ignore_alias":true}]' >> todelete.json; | |
cat todelete.json | ./node_modules/.bin/engagepost -k MIXPANEL_KEY -s MIXPANEL_SECRET -t MIXPANEL_TOKEN |
This script fetches all users from Intercom and sets the name
and address
custom attributes to null
.
npm i intercom-client
INTERCOM_ID=id INTERCOM_API_KEY=apikey node intercom.js
This script queries all users in Mixpanel and $unset
s people properties.
npm i mixpanel mixpanel-data-export-node
MIXPANEL_API_KEY=key MIXPANEL_API_SECRET=secret MIXPANEL_HASH=hash node mixpanel.js
/** | |
* This patch works around iOS9 UIWebView regression that causes infinite digest errors in Angular. | |
* | |
* The patch can be applied to Angular 1.2.0 – 1.4.5. Newer versions of Angular have the workaround baked in. | |
* | |
* To apply this patch load/bundle this file with your application and add a dependency on the "ngIOS9Patch" module | |
* to your main app module. | |
* | |
* For example: | |
* |