Skip to content

Instantly share code, notes, and snippets.

View appurist's full-sized avatar

Paul Whittemore appurist

  • Cellbie Inc. / Appurist Software Inc.
  • Nova Scotia, Canada
  • 06:24 (UTC -03:00)
  • X @Appurist
View GitHub Profile
@kellyrmilligan
kellyrmilligan / s3Sync.sh
Created June 8, 2017 13:38
Sync files to s3 and set cache control headers
#!/bin/bash
if [[ "$1" != "" ]]; then
S3BUCKETNAME="$1"
else
echo ERROR: Failed to supply S3 bucket name
exit 1
fi
aws s3 sync build s3://$S3BUCKETNAME --delete --cache-control max-age=31536000,public
@sotaan
sotaan / VuexComputed.js
Last active June 30, 2018 00:00
this Vue plugin will create a new computed property with getter/setter binded to a Vuex state property and a mutation
// bind a computed property getter&setter to Vuex state&mutation
// install it with `Vue.use(VuexComputed)` after `Vue.use(Vuex, ...)` line
const VuexComputed = {
install (Vue) {
/**
* computed property factory
* @param {String} statePropName state property name in Vuex store
* @param {String} mutationType name of mutation updating state property
* @param {Number} [debounce=false] wait time argument passed to lodash debounce function
* @return {Object} the new computed property to inject