Skip to content

Instantly share code, notes, and snippets.

@durchanek
durchanek / setUploadedObjectMetadata.js
Created August 8, 2019 14:10
Node Google Cloud function for setting uploaded files cache-policy
/**
* Triggered from a change to a Cloud Storage bucket.
*
* @param {!Object} event Event payload.
* @param {!Object} context Metadata for the event.
*/
exports.setUploadedObjectMetadata = (event, context) => {
// Create a client
var storage = require('@google-cloud/storage')();
@durchanek
durchanek / README.md
Last active March 25, 2016 10:40
gulpfile.js for website frontend development: image optimisation, styles compilation, javascript uglify, static assets revisioning, browser-sync

Purpose:

This is the gulpfile I use for automating tasks involved in developing non-modular website front-end.

Directory structure:

- dist
- src
  |- images
  |- scripts
 |- vendor