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
from oauth2client.service_account import ServiceAccountCredentials | |
import httplib2 | |
from googleapiclient import discovery | |
import oauth2client | |
def main(): | |
"""Shows basic usage of the Google Admin SDK Directory API. | |
Creates a Google Admin SDK API service object and outputs a list of first | |
10 users in the domain. | |
""" |
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
//-------- Client side | |
var my_array = ['a', 'b', 'c']; | |
$.get('/api/end_point', {arr: JSON.stringify(my_array)}, function(data) { //note that we stringify the array before sending it | |
//we assume everything went well on the server | |
}, 'json'); | |
#--------- Server side | |
class ArrayRequestHandler(webapp2.RequestHandler): |
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
[ | |
{ | |
"ingredients":["sugar", "water"], | |
"time": 300, | |
"description": "Boil water, mix with sugar" | |
}, | |
{ | |
"ingredients":["eggs"], | |
"time": 0, | |
"description": "Break eggs, mix in mixer" |
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
from google.appengine.ext import ndb | |
from datetime import date | |
class DateTest(ndb.Model): | |
date = ndb.DateProperty() | |
d = date(2015, 10, 20) | |
dt = DateTest() |
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
Code goes here |
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
//-------- Client side | |
var my_array = ['a', 'b', 'c']; | |
$.get('/api/end_point', {arr: JSON.stringify(my_array)}, function(data) { //note that we stringify the array before sending it | |
//we assume everything went well on the server | |
}, 'json'); | |
#--------- Server side | |
import json |
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
application: woven-environs-93111 | |
version: dev | |
runtime: python27 | |
api_version: 1 | |
threadsafe: yes | |
handlers: | |
- url: /favicon.ico | |
static_files: favicon.ico | |
upload: favicon.ico |
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
Shalom, olam! |
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
hello world this, and that |
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
//Client | |
Meteor.autosubscribe(function() { | |
console.log("Subbed to request"); | |
Meteor.subscribe("requests", Session.get('player_id'), function(){ | |
var call = Requests.findOne(); | |
console.log("in request (call: " +call+")"); | |
Meteor.call("answerCall", call._id); | |
}); | |
}); |
NewerOlder