Skip to content

Instantly share code, notes, and snippets.

View giulianobr's full-sized avatar

Giuliano Ribeiro giulianobr

View GitHub Profile
@giulianobr
giulianobr / bq_per_table_storage_billing_recommendation.sql
Created March 4, 2024 11:37 — forked from sayle-doit/bq_per_table_storage_billing_recommendation.sql
BigQuery storage billing model recommender on a per table basis
/*
* This query will look at a single project (by default in US multi-region) and
* calculate the logical and physical billing prices for each table in all datasets
* contained inside of it then provide a recommendation on if it is better to put it
* into a dataset that uses the logical (uncompressed) or physical (compressed)
* storage billing models.
*
* Physical (also called compressed) Storage went GA on July 5, 2023. It is set at
* the dataset level, so if two or more tables are better suited for different
* billing models in the same dataset it may be best to split them into separate
@giulianobr
giulianobr / script-template.sh
Created December 15, 2020 14:05 — forked from m-radzikowski/script-template.sh
Minimal safe Bash script template - see the article with full description: https://betterdev.blog/minimal-safe-bash-script-template/
#!/usr/bin/env bash
set -Eeuo pipefail
cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1
trap cleanup SIGINT SIGTERM ERR EXIT
usage() {
cat <<EOF
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">

Keybase proof

I hereby claim:

  • I am giulianobr on github.
  • I am giulianobr (https://keybase.io/giulianobr) on keybase.
  • I have a public key ASBayVpDs36gYaKkhk3-lV64YdvLSK9E2tOdd0yPMJSjAAo

To claim this, I am signing this object: