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
{ | |
"AWSTemplateFormatVersion": "2010-09-09", | |
"Description": "Bucket policy testing", | |
"Parameters": { | |
"ReadWriteUser": { | |
"Type": "String", | |
"Default": "", | |
"Description": "arn of read-write user to add to bucket policy" | |
}, | |
"ReadOnlyUser": { |
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
/** Multisheet Duplicate Finder ** | |
To use, paste this code into a Google Spreadsheets Apps Script (Tools - Script editor) | |
Loops through all of the sheets in the current spreadsheet. | |
Identifies duplicates in the chosen column. | |
Skips the chosen number of header rows. | |
Creates and alert box listing the duplicates, and colors the duplicate cells red. | |
The directive below limits the script to only be able to access this spreadsheet. | |
* @OnlyCurrentDoc | |
*/ |
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 | |
require_once __DIR__.'/vendor/autoload.php'; | |
date_default_timezone_set('America/New_York'); | |
define('SCOPES', implode(' ', array( | |
Google_Service_Sheets::SPREADSHEETS_READONLY) | |
)); |
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 | |
require_once realpath(dirname(__FILE__) . '/vendor/autoload.php'); | |
include_once "google-api-php-client/examples/templates/base.php"; | |
$client = new Google_Client(); | |
/************************************************ | |
ATTENTION: Fill in these values, or make sure you | |
have set the GOOGLE_APPLICATION_CREDENTIALS |
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 | |
// apitest.php | |
// by Karl Kranich - karl.kranich.org | |
// version 3.1 - edited query section | |
require_once realpath(dirname(__FILE__) . '/vendor/autoload.php'); | |
include_once "google-api-php-client/examples/templates/base.php"; | |
$client = new Google_Client(); |
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 | |
// Section 5: edit a row | |
// You'll need to get the etag and row ID, and send a PUT request to the edit URL | |
$rowid = 'cre1l'; // got this and the etag from the table data output from section 3 | |
$etag = 'NQ8VCRBLVCt7ImA.'; | |
$url = "https://spreadsheets.google.com/feeds/list/$fileId/od6/private/full/$rowid"; | |
$method = 'PUT'; | |
$headers = ["Authorization" => "Bearer $accessToken", 'Content-Type' => 'application/atom+xml', 'GData-Version' => '3.0']; | |
$postBody = "<entry xmlns=\"http://www.w3.org/2005/Atom\" xmlns:gsx=\"http://schemas.google.com/spreadsheets/2006/extended\" xmlns:gd=\"http://schemas.google.com/g/2005\" gd:etag='"$etag"'><id>https://spreadsheets.google.com/feeds/list/$fileid/od6/$rowid</id><gsx:gear>phones</gsx:gear><gsx:quantity>6</gsx:quantity></entry>"; | |
$req = new Google_Http_Request($url, $method, $headers, $postBody); |