Skip to content

Instantly share code, notes, and snippets.

Avatar

Edzo Blaauw eblaauw

View GitHub Profile
View terraform_foreach.tf
resource "google_bigquery_dataset" "mapped_datasets" {
for_each = local.datasets
dataset_id = each.key
description = each.value.description
location = "EU"
labels = {
is_critical = each.value.is_critical
team = each.value.team
created_by = "terraform"
}
View terraform_variables.tf
locals {
datasets = {
"transactions" = {
"description" = "A list of transactions",
"is_critical" = "true",
"team" = "post_order"
},
"products" = {
"description" = "A list of products",
"is_critical" = "false",
@eblaauw
eblaauw / Dockerfile
Created Jun 21, 2021
Amundsen port forwarding
View Dockerfile
FROM nginx:latest
COPY ./index.html /usr/share/nginx/html/index.html
COPY ./nginx/nginx.conf /etc/nginx/conf.d/default.conf
View bq-top-spenders.sql
SELECT
protopayload_auditlog.authenticationInfo.principalEmail as user,
sum(CAST(5.0* (protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.job.jobStatistics.totalProcessedBytes/POWER(2,40)) AS numeric )) AS queryCostInUSD,
FROM
`PROJECT_ID.stackdriver_logging.cloudaudit_googleapis_com_data_access_202012*`
WHERE
protopayload_auditlog.servicedata_v1_bigquery .jobCompletedEvent.eventName="query_job_completed"
AND protopayload_auditlog.servicedata_v1_bigquery .jobCompletedEvent.job.jobStatistics.totalProcessedBytes IS NOT NULL
GROUP BY
View keybase.md

Keybase proof

I hereby claim:

  • I am eblaauw on github.
  • I am edzo (https://keybase.io/edzo) on keybase.
  • I have a public key ASBeEk4DyAMAATalfzvSU4xAkZU7gYnKB4Y3bJQh1w1gxgo

To claim this, I am signing this object:

View JSON.swift
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
let urlPath = "http://telize.com/geoip"
let url = NSURL(string: urlPath)
let session = NSURLSession.sharedSession()
let task = session.dataTaskWithURL(url!, completionHandler: {data, response, error -> Void in
@eblaauw
eblaauw / JSON.js
Last active Aug 29, 2015
Toetsweek
View JSON.js
//simpele versie
{
"firstName": "John" ,
"lastName": "Doe"
}
//versie met array
{
"employees": [
{
"firstName": "John" ,