Skip to content

Instantly share code, notes, and snippets.

Julien Valéry darul75

View GitHub Profile
@darul75
darul75 / Google_oAuth.js
Created Jan 15, 2019 — forked from entaq/Google_oAuth.js
Google oAuth 2.0 sample
View Google_oAuth.js
/**
reference -
https://developers.google.com/accounts/docs/OAuth2WebServer
https://code.google.com/apis/console/
https://developers.google.com/+/api/latest/
**/
////handle all requests here
function doGet(e) {
@darul75
darul75 / async.js
Created Mar 14, 2019 — forked from bschwartz757/async.js
Async/await function to fetch data from multiple URLs in parallel
View async.js
/* Client side, works in Chrome 55 and Firefox 52 without transpilation */
//https://blogs.msdn.microsoft.com/typescript/2016/11/08/typescript-2-1-rc-better-inference-async-functions-and-more/
async function fetchURLs() {
try {
// Promise.all() lets us coalesce multiple promises into a single super-promise
var data = await Promise.all([
/* Alternatively store each in an array */
// var [x, y, z] = await Promise.all([
// parse results as json; fetch data response has several reader methods available:
//.arrayBuffer()
You can’t perform that action at this time.