Skip to content

Instantly share code, notes, and snippets.

import java.io.IOException;
import java.util.List;
import com.google.api.client.googleapis.batch.BatchRequest;
import com.google.api.client.googleapis.batch.json.JsonBatchCallback;
import com.google.api.client.googleapis.json.GoogleJsonError;
import com.google.api.client.googleapis.json.GoogleJsonErrorContainer;
import com.google.api.client.http.HttpHeaders;
import com.google.api.services.admin.directory.Directory;
import com.google.api.services.admin.directory.DirectoryRequest;
package com.shin1ogawa.controller;
import java.io.IOException;
import java.io.PrintWriter;
import java.io.UnsupportedEncodingException;
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLEncoder;
import java.util.Map;
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head> <meta charset="utf-8"> </head>
<body>
<div> <button id="show-docs-picker">Select Documents in Google Docs</button> </div>
<div> <ul id="picked"></ul> </div>
<script src="https://www.google.com/jsapi"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>
<script type="text/javascript">
(function () {
@shin1ogawa
shin1ogawa / googlepicker.html
Created September 3, 2012 16:57
Google Picker is very conveinience especially for Google Apps Developer.
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head> <meta charset="utf-8"> </head>
<body>
<div> <button id="show-docs-picker">Select Documents in Google Docs</button> </div>
<div> <ul id="picked"></ul> </div>
<script src="http://www.google.com/jsapi"></script>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>
<script type="text/javascript">
(function () {
module.exports = function (grunt) {
grunt.initConfig({
clean:{
js:{
files:[
'<config:concat.src.dest>',
'<config:concat.tests.dest>',
'<config:min.dist.dest>'
],
@shin1ogawa
shin1ogawa / GDataCalendarExample.java
Created February 24, 2012 08:31
Apps API Japan #3 Javaサンプル
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";
import java.io.IOException;
import java.net.URL;
import java.net.URLEncoder;
import java.util.List;
import org.junit.Test;
import com.google.gdata.client.GoogleService;
import com.google.gdata.client.appsforyourdomain.AppsPropertyService;
import com.google.gdata.client.appsforyourdomain.UserService;
package appengine.util;
import java.io.UnsupportedEncodingException;
import java.net.HttpURLConnection;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
/**
* @author shin1ogawa
*/
function onOpen() {
SpreadsheetApp.getActiveSpreadsheet()
.addMenu('gasja2', [{name: '勤怠入力補助', functionName: 'timesheet'}]);
}
function timesheet() {
try {
SpreadsheetApp.getActiveSpreadsheet().show(_createUI());
} catch(e) {
Logger.log(e);
package apps.activity.util;
import java.io.IOException;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Map;
import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;