Skip to content

Instantly share code, notes, and snippets.

@thomas-optimove
thomas-optimove / gist:8f00f1db3a979f4de44d0946cd039c23
Created April 8, 2026 09:39
Big Query metrics by day for a given month aggregated by day/channel/event type
SELECT
JSON_EXTRACT_SCALAR(context, '$.execution_gateway'),
DATE(insertion_time_bq),
event,
count(distinct customer)
@thomas-optimove
thomas-optimove / README.md
Last active January 27, 2025 13:25
Minimum Code To Run Partytown

This gist describes the minimum code to get partytown running in a simple pure HTML page

Run the following (note you will have to paste in the demo.html when nano runs).

# Setup folder for our demo
mkdir ./demo
mkdir ./demo/~partytown
cd demo/~partytown
@thomas-optimove
thomas-optimove / count_csv_distinct.sh
Created November 21, 2024 14:03
Show unique values in CSV column
#!/bin/bash
# Check for the correct number of arguments
if [[ $# -ne 2 ]]; then
echo "Usage: $0 <csv_file> <column_number>"
exit 1
fi
# Arguments
CSV_FILE="$1"
@thomas-optimove
thomas-optimove / code-coverage.json
Last active March 20, 2024 16:52
An updated gist description
{"schemaVersion":1,"label":"Unit Test Coverage","message":"76.69%","color":"brightgreen"}