Skip to content

Instantly share code, notes, and snippets.

@pilbot
pilbot / ChunkyCache.gs
Created January 6, 2016 11:47
Using the Google Apps Script Cache Service for objects above 100Kb
function ChunkyCache(cache, chunkSize){
return {
put: function (key, value, timeout) {
var json = JSON.stringify(value);
var cSize = Math.floor(chunkSize / 2);
var chunks = [];
var index = 0;
while (index < json.length){
cKey = key + "_" + index;
chunks.push(cKey);
@psychemedia
psychemedia / googDynChartControl.html
Created June 6, 2011 13:56
Google Dynamic Chart control, feeding off Google Spreadsheet/visualisation API query
<html><head>
<title>Google visualisation demo: chart query controls</title>
<!--Load the AJAX API-->
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<script type="text/javascript">
// Load the Visualization API and the controls package.
// Packages for all the other charts you need will be loaded
// automatically by the system.