brew uninstall --ignore-dependencies node icu4c
brew install node
A handful of BigQuery SQL queries that you can use to analyze your own Google Analytics for Firebase data. To find out more about how they work, check out our presentation from Cloud Next 2018 (Video link to be added soon)
Please note that these scripts have been updated to make sure of the new Firebase schema, which was rolled out to Analytics products in July of 2018.
Note that none of these scripts will work out of the box -- you'll need to update the values in brackets with the names of your actual datasets, and you'll most likely also need to replace the names of events and event properties with ones that are appropriate for your app.
The contents of this gist are licensed under the Apache License, version 2.0
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
<?php | |
// Converts a number into a short version, eg: 1000 -> 1k | |
// Based on: http://stackoverflow.com/a/4371114 | |
function number_format_short( $n, $precision = 1 ) { | |
if ($n < 900) { | |
// 0 - 900 | |
$n_format = number_format($n, $precision); | |
$suffix = ''; | |
} else if ($n < 900000) { |
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
#!/usr/bin/env bash | |
# This script prints out all of your Redis keys and their size in a human readable format | |
# Copyright 2013 Brent O'Connor | |
# License: http://www.apache.org/licenses/LICENSE-2.0 | |
human_size() { | |
awk -v sum="$1" ' BEGIN {hum[1024^3]="Gb"; hum[1024^2]="Mb"; hum[1024]="Kb"; for (x=1024^3; x>=1024; x/=1024) { if (sum>=x) { printf "%.2f %s\n",sum/x,hum[x]; break; } } if (sum<1024) print "1kb"; } ' | |
} |