Skip to content

Instantly share code, notes, and snippets.

@mkleins
mkleins / app.js
Created July 27, 2018 10:11
Upload with XML API GCS
const uuidv4 = require("uuid/v4");
const fs = require('fs');
const crypto = require('crypto');
var key = uuidv4();
var expire = new Date;
expire.setHours(expire.getHours() + 1);
var private_key = fs.readFileSync("service_account.pem", "utf8");
var policy = '{"expiration": "' + expire.toISOString() + '",' +
'"conditions": [' +
@mkleins
mkleins / 0_reuse_code.js
Last active August 29, 2015 14:07
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console