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
// initialise various variables | |
var page = require('webpage').create(), | |
system = require('system'), | |
address; | |
// how long should we wait for the page to load before we exit | |
// in ms | |
var WAIT_TIME = 5000; | |
// if the page hasn't loaded after this long, something is probably wrong. |
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
// from https://brianclifton.com/blog/2017/09/07/remove-pii-from-google-analytics/ | |
function() { | |
return function(model) { | |
// Add the PII patterns into this array as objects | |
var piiRegex = [ | |
{ | |
name: 'EMAIL', | |
regex: /\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}\b/gi, | |
group: '' | |
},{ |
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
#!/bin/bash | |
# [email protected] 2020-02-07 | |
# display S3 usage by bucket & type from cloudwatch billing info, not inspecting bucket itself | |
# requires aws-cli & jq | |
# usage ./s3_usage.sh profile | |
# profile is optional, region follows from profile. s3 is region-less but cloudwatch isn't | |
if [ -z $1 ]; then | |
PROFILE='default' |
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
#!/bin/bash | |
## run this with . | |
# your IAM user | |
IAM='xx:mfa/xx' # get from console or `aws sts get-caller-identity` | |
# uses macosx gnu version of utils like numfmt, grep, etc. | |
if [[ $(uname -s) = *Darwin* ]]; then | |
DATE='gdate' |