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 2014 Chris Banes | |
* | |
* 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 |
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 uploadPdfOcr() { | |
authorize(); | |
var key = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; // <-- developer key | |
var file = UrlFetchApp.fetch("http://somewhere.com/path/file.pdf").getBlob(); | |
var metadata = { title: file.getName() } | |
var params = {method:"post", | |
oAuthServiceName: "drive", | |
oAuthUseToken: "always", | |
contentType: "application/pdf", | |
contentLength: file.getBytes().length, |
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
//## Moment.JS Holiday Plugin | |
// | |
//Usage: | |
// Call .holiday() from any moment object. If date is a US Federal Holiday, name of the holiday will be returned. | |
// Otherwise, return nothing. | |
// | |
// Example: | |
// `moment('12/25/2013').holiday()` will return "Christmas Day" | |
// | |
//Holidays: |
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 |
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
落書きの報告書 Twitterばかりしてる俺 | |
超高速でビルドするけど 動かないVirtual Machine | |
やさしくないJavaの本ページ破りたい | |
Chromeの裏 2ちゃんを覗いて見つかれば逃げ場もない | |
座って固まり 目を伏せながら | |
心のひとつも解りあえないプログラムをにらむ | |
そして仲間たちは今夜辞職の計画をたてる | |
とにかくもう 会社や家には帰りたくない | |
自分の業務が何なのかさえ 解らず震えている | |
25の夜 |
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 2012 Thomas Broyer <t.broyer@ltgt.net> | |
* | |
* 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 |
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
// | |
// ref https://gist.github.com/1899391 | |
import java.io.* | |
import java.net.* | |
import groovy.transform.Field | |
//see @Field's Explanation http://d.hatena.ne.jp/uehaj/20110703/1309685397 |
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 2012 Thomas Broyer <t.broyer@ltgt.net> | |
* | |
* 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 |
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
//http://www.google.sc/support/forum/p/apps-script/thread?tid=345591f349a25cb4&hl=en | |
function setUp() { | |
ScriptProperties.setProperty('active', SpreadsheetApp.getActiveSpreadsheet().getId()); | |
var svc = ScriptApp.getService(); | |
if (!svc.isEnabled()) { | |
// it's not enabled, and should be | |
svc.enable(svc.Restriction.ALL); | |
} | |
} |
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
import java.io.*; | |
import java.net.*; | |
public class GDataCalendarExample { | |
static final String CLIENT_ID = ""; | |
static final String CLIENT_SECRET = ""; | |
static final String REDIRECT_URI = "urn:ietf:wg:oauth:2.0:oob"; // InstalledApplication | |
static final String SCOPES = "https://www.googleapis.com/auth/calendar"; | |
static final String ENDPOINT = "https://accounts.google.com/o/oauth2"; |
NewerOlder