Skip to content

Instantly share code, notes, and snippets.

View glade-at-gigwell's full-sized avatar

Glade Luco glade-at-gigwell

  • Gigwell, Inc.
  • San Francisco, California
View GitHub Profile
#!/bin/bash
# Author: Rick Cogley
# Updated: 27 Jan 2016
# Purpose: For use in a Mac OS X automator action, set to watch a screenshot folder.
# Assumes:
# GOPATH is set
# drive is installed (https://github.com/odeke-em/drive)
# there is a folder initialized with "drive init"
DRIVEINITPATH=$HOME/gdrive
### Keybase proof
I hereby claim:
* I am glade-at-gigwell on github.
* I am gladeatgigwell (https://keybase.io/gladeatgigwell) on keybase.
* I have a public key ASANFnvq0Kbl5MJy8dVO0P0vPg1Ehh53zQ1HClSgMn5WnAo
To claim this, I am signing this object:
@glade-at-gigwell
glade-at-gigwell / ChunkyCache.gs
Last active June 21, 2019 23:31 — forked from pilbot/ChunkyCache.gs
Using the Google Apps Script Cache Service for image blobs and objects above 100Kb
function ImageCache(cache) {
cache = ChunkyCache(cache || CacheService.getScriptCache());
return {
putBlob: function (key, value, timeout) {
cache.put(key, Utilities.base64Encode(value.getBytes()), timeout);
},
getBlob: function (key) {
var rawBytes = cache.get(key);
if (rawBytes) {