Skip to content

Instantly share code, notes, and snippets.

View marpontes's full-sized avatar

Marcello Pontes marpontes

View GitHub Profile
@marpontes
marpontes / meet.jit.si-speaker-time-chart.js
Created April 29, 2020 15:44
Aggregates and charts speaker time using the meeting tool https://meet.jit.si
const aggSpeakerTime = () => $(".speaker-stats-item ")
.map((i, a) => ({
name: $(a).find('.speaker-stats-item__name').text(),
time: $(a).find('.speaker-stats-item__time').text()
}))
.toArray()
.sort((a, b) => a.name.substring(0, 1).toLowerCase() < b.name.substring(0, 1).toLowerCase() ? -1 : 1)
.reduce((acc, curr) => {
let data = acc[curr.name] || { seconds: 0 };
let mins = curr.time.match(/\d+m/) ? parseInt(curr.time.match(/\d+m/)[0].replace('m', ''), 10) : 0;
@marpontes
marpontes / gcloud-compose-squish.sh
Created July 22, 2021 14:10
Bash function that overcomes the limit of 32 files that `gsutil compose` can handle.
#!/bin/bash
# Based on:
# - https://stackoverflow.com/questions/66482517/how-to-append-more-than-33-files-in-a-gcloud-bucket#answer-66484002
GSUTIL="gsutil compose"
BATCH_SIZE="32"
BUCKET_BASE="gs://my-shiny-bucket/path/to/intermediate/composites"
# Will compose files in groups of maximum 32