Install flake8
$ pip install flake8`
Edit pre-commit file
$ vim .git/hooks/pre-commit`
to show and enforce styleguide conventions before commit, add the following:
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Meetup endpoints</title> | |
<ul></ul> | |
</head> | |
<body> |
var SPREADSHEET_ID = 'SHEET_ID_HERE'; | |
var SHEET_NAME = 'SHEET_NAME_HERE'; | |
function doGet() { | |
var range = SpreadsheetApp.openById(SPREADSHEET_ID).getSheetByName(SHEET_NAME).getDataRange(); | |
var json = JSON.stringify(range.getValues()); | |
return ContentService.createTextOutput(json).setMimeType(ContentService.MimeType.JAVASCRIPT); | |
} |
Install flake8
$ pip install flake8`
Edit pre-commit file
$ vim .git/hooks/pre-commit`
to show and enforce styleguide conventions before commit, add the following:
[{"plans": [{"specs": [{"disk": 3072, "dollars_per_hr": 0.01, "description": "1 vCPU (shared physical core) and 0.6 GB RAM", "dollars_per_mo": 6, "transfer": "unlimited?", "ram": 614, "id": "1000", "cpu": 1}], "name": "f1-micro", "id": "f1-micro"}, {"specs": [{"disk": 3072, "dollars_per_hr": 0.035, "description": "1 vCPU (shared physical core) and 1.7 GB RAM", "dollars_per_mo": 23, "transfer": "unlimited?", "ram": 1740, "id": "2000", "cpu": 1}], "name": "g1-small", "id": "g1-small"}, {"specs": [{"disk": 65536, "dollars_per_hr": 0.792, "description": "16 vCPUs, 14.4 GB RAM", "dollars_per_mo": 532, "transfer": "unlimited?", "ram": 14746, "id": "4016", "cpu": 16}], "name": "n1-highcpu-16", "id": "n1-highcpu-16"}, {"specs": [{"disk": 65536, "dollars_per_hr": 0.099, "description": "2 vCPUs, 1.8 GB RAM", "dollars_per_mo": 66, "transfer": "unlimited?", "ram": 1843, "id": "4002", "cpu": 2}], "name": "n1-highcpu-2", "id": "n1-highcpu-2"}, {"specs": [{"disk": 65536, "dollars_per_hr": 1.584, "description": "32 vCPUs, 28 |
#!/usr/bin/python | |
# | |
# Copyright 2014 Google Inc. All Rights Reserved. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# |
# Prevent nemo from creating a desktop window that shows icons | |
gsettings set org.nemo.desktop show-desktop-icons false |
# Snippet 1 | |
########### | |
# Copy the build folder(containing the html files) to a folder in flask's static | |
# directory and serve this way: | |
@app.route('/<dir>/<filename>', defaults={'static': True}) | |
def build_dir(dir='',filename='index.html'): | |
path = join(dir,filename) | |
return app.send_static_file(path) |
Conclusion & Review | |
Q: What cloud service level does Google App Engine sit? | |
A: App Engine is a platform (PaaS) service. | |
Q: What do you need in order to get started playing with Google App Engine? | |
A: You need to get the SDK from Google. Use this downloads link to get the one for your platform. The SDK comes with client libraries which you'll use to connect to the various App Engine APIs, a set of command-line tools for administration, and a development server. Mac and PC users also get a bonus: a GUI called the "Launcher" that gives a friendly interface to users and provides access to a subset of the command-line tool functionality. |
#!/usr/bin/env python | |
# | |
# Copyright 2007 Google Inc. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# |
Yeah it works + is awesomely cool (for 1st text test) |