View gist:1388321
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Part of this code up to END OF (c) is: | |
/* | |
Copyright 2011 Martin Hawksey | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 |
View gist:1170597
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function onOpen() { | |
var menuEntries = [ {name: "Create Diary Doc from Sheet", functionName: "createDocFromSheet"}]; | |
var ss = SpreadsheetApp.getActiveSpreadsheet(); | |
ss.addMenu("Fitness Diaries", menuEntries); | |
} | |
function createDocFromSheet(){ | |
var templateid = "1O4afl8SZmMxMFpAiN16VZIddJDaFdeRBbFyBtJvepwM"; // get template file id | |
var FOLDER_NAME = "Fitness Diaries"; // folder name of where to put completed diaries | |
// get the data from an individual user |
View gist:1276293
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Copyright 2011 Martin Hawksey | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 | |
Unless required by applicable law or agreed to in writing, software |
View Method1.gs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// @OnlyCurrentDoc | |
const FOLDER_ID = 'YOUR_FOLDER_ID'; // OR 'root' if you want your entire My Drive | |
/** | |
* Method One: Using built-in DriveApp / file iterator | |
*/ | |
function generateFolderFilesDriveApp() { | |
try { | |
const folderId = FOLDER_ID; | |
const parentFolder = (folderId === 'root') ? DriveApp.getRootFolder() : DriveApp.getFolderById(folderId); |
View gist:1442370
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getJSON(aUrl,sheetname) { | |
//var sheetname = "test"; | |
//var aUrl = "http://pipes.yahoo.com/pipes/pipe.run?_id=286bbb1d8d30f65b54173b3b752fa4d9&_render=json"; | |
var response = UrlFetchApp.fetch(aUrl); // get feed | |
var dataAll = JSON.parse(response.getContentText()); // | |
var data = dataAll.value.items; | |
for (i in data){ | |
data[i].pubDate = new Date(data[i].pubDate); | |
data[i].start = data[i].pubDate; | |
} |
View appsscriptzoneids.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
value | text | |
---|---|---|
Pacific/Midway | (GMT-11:00) Midway | |
Pacific/Niue | (GMT-11:00) Niue | |
Pacific/Pago_Pago | (GMT-11:00) Pago Pago | |
Pacific/Honolulu | (GMT-10:00) Hawaii Time | |
Pacific/Johnston | (GMT-10:00) Johnston | |
Pacific/Rarotonga | (GMT-10:00) Rarotonga | |
Pacific/Tahiti | (GMT-10:00) Tahiti | |
Pacific/Marquesas | (GMT-09:30) Marquesas | |
America/Anchorage | (GMT-09:00) Alaska Time |
View gist:3007293
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Copyright 2011 Martin Hawksey | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 | |
Unless required by applicable law or agreed to in writing, software |
View gist:193bca4037d9a48d7f58
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function fetchMyQuery() { | |
// our query object | |
var query = { | |
"optionalArgs": { | |
"dimensions": "ga:source", | |
"filters": "ga:medium==referral", | |
"sort": "-ga:pageviews", | |
"max-results": "50" | |
}, | |
"ids": "ga:82426939", |
View feed-property-feed.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* RSS2 Feed Template for displaying RSS2 Posts feed. | |
* | |
* @package WordPress | |
*/ | |
header('Content-Type: ' . feed_content_type('rss-http') . '; charset=' . get_option('blog_charset'), true); | |
$more = 1; | |
echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>'; ?> |
View gEVS.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
You are free to copy and use this sample in accordance with the terms of the | |
Apache license (http://www.apache.org/licenses/LICENSE-2.0.html) | |
--> | |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta http-equiv="content-type" content="text/html; charset=utf-8"/> | |
<title>gEVS Using Google Spreadsheet and Visualization API as a voting system wrapper</title> |
NewerOlder