This file contains hidden or 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
Table = (function () { | |
function Table(name) { | |
var self = this; | |
self.$def = $.Deferred(); | |
Office.context.document.bindings.addFromNamedItemAsync(name, Office.BindingType.Table, null, function (asyncResult) { | |
if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { | |
return self.$def.resolve(asyncResult.value); | |
} else { | |
return self.$def.reject(); | |
} |
This file contains hidden or 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
Error = (function () { | |
function Error(nameTable) { | |
this.table = new Table(nameTable); | |
} | |
Error.prototype.add = function (err) { | |
this.table.add([[Date.now(), err.component || "[Undefined]", err.message]]); | |
}; | |
return Error; | |
}()); |
This file contains hidden or 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
# | |
# DazWilkin | |
# July 2016 | |
# | |
# Google Cloud Deployment Manager python script: | |
# Deploys Docker Engine in swarm mode to Google Cloud Platform | |
# | |
# 1. Create VM running Docker 1.12 | |
# 2. Derive a Master VM from it -- swarm init | |
# 3. Template the Worker VM |
This file contains hidden or 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
<project> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>com.google.dazwilkin</groupId> | |
<artifactId>api</artifactId> | |
<packaging>jar</packaging> | |
<version>1.0-SNAPSHOT</version> | |
<name>api</name> | |
<url>http://maven.apache.org</url> | |
<dependencies> |
This file contains hidden or 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
package com.google.dazwilkin; | |
import com.google.api.client.googleapis.auth.oauth2.GoogleCredential; | |
import com.google.api.client.googleapis.javanet.GoogleNetHttpTransport; | |
import com.google.api.client.http.HttpTransport; | |
import com.google.api.client.json.JsonFactory; | |
import com.google.api.client.json.jackson2.JacksonFactory; | |
import com.google.api.client.util.Lists; |
This file contains hidden or 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
<project> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>com.google.dazwilkin</groupId> | |
<artifactId>cld</artifactId> | |
<packaging>jar</packaging> | |
<version>1.0-SNAPSHOT</version> | |
<name>cld</name> | |
<url>http://maven.apache.org</url> | |
<properties> |
This file contains hidden or 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
package com.google.dazwilkin; | |
import com.google.cloud.storage.Blob; | |
import com.google.cloud.storage.Bucket; | |
import com.google.cloud.storage.Storage; | |
import com.google.cloud.storage.StorageOptions; | |
public class CloudStorage | |
{ |
This file contains hidden or 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 'vendor/autoload.php'; | |
define("PROJECT_ID", [[YOUR-PROJECT-ID]]); | |
define("BUCKET_NAME", [[YOUR-BUCKET-NAME]]); | |
$client = new Google_Client(); | |
$client->setApplicationName("API_Cloud_Storage"); | |
$client->useApplicationDefaultCredentials(); |
This file contains hidden or 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 "vendor/autoload.php"; | |
use Google\Cloud\Core\ServiceBuilder; | |
use Google\Cloud\Storage\StorageClient; | |
define("PROJECT_ID", [[YOUR-PROJECT-ID]]); | |
define("BUCKET", [[BUCKET]]); |
This file contains hidden or 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
package com.test; | |
import com.google.appengine.api.appidentity.AppIdentityService; | |
import com.google.appengine.api.appidentity.AppIdentityServiceFactory; | |
import com.google.auth.appengine.AppEngineCredentials; | |
import com.google.api.gax.core.CredentialsProvider; | |
import com.google.api.gax.core.FixedCredentialsProvider; |
OlderNewer