Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# this script copies iterates the VMs of a GCP project and copies
# the labels of a machine to the disks attached to it
# you can pass a filter (the same as in gcloud command line)
# eg: to exclude some machines with fufu in the name 'name!~.*fufu.*'
if [ $# -eq 0 ]
then
echo "Need to supply project ID"
@ilbambino
ilbambino / consumer.go
Last active November 25, 2019 14:33
pubsub to bigquery
package main
import (
"context"
"fmt"
"os"
"regexp"
"time"
"cloud.google.com/go/bigquery"
@ilbambino
ilbambino / gist:4038850
Created November 8, 2012 13:38
JavaScript StackMob SDK using OAuth 1.0
_.extend(StackMob, {
'ajax': function(model, params, method) {
var oauth = new OAuth({
consumerKey: 'XXXXXXXXXXXXXXXXXXXXXX',
consumerSecret: 'XXXXXXXXXXXXXXXXXXXXXXX'}
);
var success = params['success'];
var defaultSuccess = function(response, options) {