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
var apiKey = "Your API KEY"; | |
function myFunction() { | |
var option = googleOAuth_(); | |
option.method = "get"; | |
//Spreadsheet.getActive().getId()をそのまま使うと、エラーになるので一回DriveのFileにかえてからIDを取得 | |
var res = UrlFetchApp.fetch("https://www.googleapis.com/drive/v2/files/"+ DriveApp.getFileById(SpreadsheetApp.getActive().getId()).getId() +"/comments?key=" + apiKey , option); | |
var json = JSON.parse(res.getContentText()); | |
Logger.log(json) |
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
/** | |
* gas-github library sample codes. | |
* see https://github.com/soundTricker/gas-github | |
*/ | |
//Create new gist | |
function createOrUpdateGist(){ | |
//Create Gist API | |
var gistApi = Github.create(UserProperties.getProperty("githubApiKey")).gists(); |
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 downloadGASFiles(downloadUrl) { | |
//Google OAuth用の設定 | |
var oauthConfig = UrlFetchApp.addOAuthService('drive'); | |
var scope = 'https://www.googleapis.com/auth/drive+https://www.googleapis.com/auth/drive.file+https://www.googleapis.com/auth/drive.scripts'; | |
oauthConfig.setConsumerKey('anonymous'); | |
oauthConfig.setConsumerSecret('anonymous'); | |
oauthConfig.setRequestTokenUrl('https://www.google.com/accounts/OAuthGetRequestToken?scope='+scope); |
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
//This is a google apps script project json. | |
//The Import/Export API, that is on the Google Drive API, use this. | |
//If u have existing project, u can do update, delete, add and rename project's code and file by changing this json structure. | |
{ | |
//files property is Google Apps Script Project Files. | |
//It has some hash objects. | |
"files": [ | |
//Hash object is Google Apps Script File. | |
//It contain id, name, type, source. | |
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
var SCOPE_PLUS_ME = "https://www.googleapis.com/auth/plus.me"; | |
var SCOPE_PLUS_PROFILES_READ = "https://www.googleapis.com/auth/plus.profiles.read"; | |
var SCOPE_PLUS_CIRCLES_READ = "https://www.googleapis.com/auth/plus.circles.read"; | |
var SCOPE_PLUS_CIRCLES_WRITE = "https://www.googleapis.com/auth/plus.circles.write"; | |
var SCOPE_PLUS_STREAM_READ = "https://www.googleapis.com/auth/plus.stream.read"; | |
var SCOPE_PLUS_STREAM_WRITE = "https://www.googleapis.com/auth/plus.stream.write"; | |
var SCOPE_PLUS_MEDIA_UPLOAD = "https://www.googleapis.com/auth/plus.media.upload"; | |
var SCOPES = [SCOPE_PLUS_ME,SCOPE_PLUS_STREAM_WRITE].join("+"); | |
var USER_ID = "me"; |
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
# Fill in your AWS Access Key ID and Secret Access Key | |
# http://aws.amazon.com/security-credentials | |
accessKey= Your AWS Access Key ID | |
secretKey= Your Secret Access Key |
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
package stk; | |
import java.util.List; | |
import com.amazonaws.auth.ClasspathPropertiesFileCredentialsProvider; | |
import com.amazonaws.regions.Region; | |
import com.amazonaws.regions.Regions; | |
import com.amazonaws.services.ec2.AmazonEC2; | |
import com.amazonaws.services.ec2.AmazonEC2Client; | |
import com.amazonaws.services.ec2.model.AllocateAddressRequest; |
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
type EnumType int | |
const ( | |
One EnumType = iota //初期値を0以外にする場合は iota+1とかで調整 | |
Tow | |
Three | |
) | |
//EnumType の文字列表現 |
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
``` | |
. | |
├── credentials/ | |
│ ├── cacert.pem | |
│ ├── pkey.pem | |
│ ├── secrets.py* | |
│ └── secrets.pyc | |
├── inventory/ | |
│ ├── gce.ini | |
│ ├── gce.py* |
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 myFunction() { | |
// シートを取得 | |
var sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("シート1"); | |
// プロジェクトID、Queryを取得 | |
var projectId = sheet.getRange("B1").getValue(); | |
var query = sheet.getRange("B2").getValue(); | |
// Queryパラメータを作成 |