Skip to content

Instantly share code, notes, and snippets.

Grant Timmerman grant

Block or report user

Report or block grant

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@grant
grant / index.js
Last active Oct 17, 2019
Cloud Tasks – Create HTTP Task
View index.js
const parent = client.queuePath(project, location, queue);
const task = {
httpRequest: {
httpMethod: 'POST',
url,
},
};
const [response] = await client.createTask({parent, task});
@grant
grant / pizza.json
Created Sep 25, 2019
Maps Find Place API Result
View pizza.json
[
{
"formatted_address":"11 Park Pl, New York, NY 10007, United States",
"geometry":{
"location":{
"lat":40.7130634,
"lng":-74.0082771
},
"viewport":{
"northeast":{
@grant
grant / cities.txt
Created Sep 18, 2019
cities.txt – small
View cities.txt
Viti, Kosovo
Shtërpcë, Kosovo
Shtime, Kosovo
Vushtrri, Kosovo
Bonney Lake, United States
Spokane Valley, United States
Bellevue, United States
Marysville, United States
Newcastle, United States
North Bend, United States
View cities.txt
Malishevë, Kosovo
Prizren, Kosovo
Zubin Potok, Kosovo
Kamenicë, Kosovo
Viti, Kosovo
Shtërpcë, Kosovo
Shtime, Kosovo
Vushtrri, Kosovo
Dragash, Kosovo
Podujevë, Kosovo
@grant
grant / index.html
Last active Sep 4, 2019
Docs Quickstart
View index.html
<!DOCTYPE html>
<html>
<head>
<title>Google Docs API Quickstart</title>
<meta charset="utf-8" />
</head>
<body>
<p>Google Docs API Quickstart</p>
<!--Add buttons to initiate auth sequence and sign out-->
<button id="authorize_button" style="display: none;">Authorize</button>
@grant
grant / script.js
Last active Sep 3, 2019
gapi script
View script.js
// 1. Load the JavaScript client library.
gapi.load('client', init);
async function init() {
// 2. Initialize the JavaScript client library.
await gapi.client.init({
discoveryDocs: ['https://discovery.googleapis.com/$discovery/rest']
});
start();
}
View error.json
{
"error": {
"code": 401,
"message": "Request is missing required authentication credential. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.",
"status": "UNAUTHENTICATED"
}
}
View index.html
<!DOCTYPE html>
<html lang="en">
<head>
<title>Hello, GAPI</title>
</head>
<body>
Hello, GAPI!
<script src="https://apis.google.com/js/api.js"></script>
</body>
</html>
View index.html
<script src="https://apis.google.com/js/api.js"></script>
@grant
grant / index.js
Last active Aug 27, 2019
Express Routing: Router
View index.js
const express = require('express');
// Create an Express object and routes (in order)
const app = express();
app.use('/users/:id', getUser);
app.use('/users/', getAllUsers);
app.use(getDefault);
// Set our GCF handler to our Express app.
exports.users = app;
You can’t perform that action at this time.