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 mimetypes | |
import pprint | |
import requests # pip install requests | |
import simplejson as json | |
from os.path import basename, expanduser | |
base_url = 'https://alpha-api.app.net/stream/0' | |
token = 'USER ACCESS TOKEN' | |
image_path = 'PATH TO FILE' |
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 twoleggedOAuth() { | |
var action = "https://www.google.com/calendar/feeds/default/private/full?xoauth_requestor_id={user mail address}"; | |
var accessor = { consumerSecret: '{consumerSecret}' }; | |
var message = { method: 'get', action: action, parameters: {}, }; | |
OAuth.setParameter(message, 'oauth_version', '1.0'); | |
OAuth.setParameter(message, 'oauth_nonce', OAuth.nonce(32)); | |
OAuth.setParameter(message, 'oauth_timestamp', OAuth.timestamp()); | |
OAuth.setParameter(message, 'oauth_consumer_key', '{your domain}'); | |
OAuth.SignatureMethod.sign(message, accessor); |
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() { | |
//oauth の設定 | |
var oauth = UrlFetchApp.addOAuthService(Session.getActiveUser().getEmail()); | |
oauth.setConsumerKey("anonymous"); //ちゃんとしたのを使ったほうがいいとおもふ | |
oauth.setConsumerSecret("anonymous"); //ちゃんとしたのを使ったほうがいいとおもふ | |
oauth.setRequestTokenUrl("https://www.google.com/accounts/OAuthGetRequestToken?scope=https%3A%2F%2Fwww.google.com%2Fcalendar%2Ffeeds%2F"); | |
oauth.setAuthorizationUrl("https://www.google.com/accounts/OAuthAuthorizeToken"); | |
oauth.setAccessTokenUrl("https://www.google.com/accounts/OAuthGetAccessToken"); |
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
for f in $(find $1 -iname "*.wsp"); do | |
if [ -a $f ]; | |
then /opt/graphite/bin/whisper-set-aggregation-method.py $f max; | |
fi; | |
done |