Skip to content

Instantly share code, notes, and snippets.

client = Google::APIClient.new
path_to_key_file = 'xxxx-privatekey.p12'
passphrase = 'xxxx'
key = Google::APIClient::PKCS12.load_key(path_to_key_file, passphrase)
asserter = Google::APIClient::JWTAsserter.new(
'[email protected]',
'https://www.googleapis.com/auth/calendar.readonly',
key)
client.authorization = asserter.authorize("[email protected]")
#!/bin/bash
# [Purpose]
# execute a command on remote servers
# note: we are basically rolling our own pssh here, without the parallelism
#Example: command.sh -tv -c "date" server1 special@server2 server3
# command.sh -tv -c "date" -i key.pem -l "user" server1 special@server2 server3
# command.sh -tv -s get_date.sh -i key.pem server2 server3
# command.sh -tbv -s build.sh -l cap -i ~/keys/cap.pem ${app_[@]}
@sroaj
sroaj / cb.click.newmongo.txt
Created June 6, 2012 18:11
NEW API benchmark on 2012/06/06 [$date] $BASHPID $REQUESTTYPE $reported_content_length $timetaken $curl_errorcode $validation"
This is ChartBench, Version 0.01
Copyright 2012 Chartboost, Inc, http://chartboost.com/
Benchmarking chartboost.com/ (be patient)
Completed 200 requests
Completed 400 requests
Completed 600 requests
Completed 800 requests
Completed 1000 requests
Completed 1200 requests
@sroaj
sroaj / cb.click.txt
Created June 6, 2012 17:46
API benchmark on 2012/06/06 [$date] $BASHPID $REQUESTTYPE $reported_content_length $timetaken $curl_errorcode $validation"
This is ChartBench, Version 0.01
Copyright 2012 Chartboost, Inc, http://chartboost.com/
Benchmarking chartboost.com/ (be patient)
Completed 200 requests
Completed 400 requests
Completed 600 requests
Completed 800 requests
Completed 1000 requests
Completed 1200 requests