Skip to content

Instantly share code, notes, and snippets.

@udacityandroid
udacityandroid / shoppinglistplusplus.json
Created Dec 17, 2015
Firebase - Lesson 4 - New Database Schema Design
View shoppinglistplusplus.json
{
"sharedWith" : {
"<list pid>" : {
"<person to share with email>" : {
"email" : "the user's encoded email; this should match the key",
"hasLoggedInWithPassword" : true,
"name" : "the first and last name of the user",
"timestampJoined" : {
"timestamp" : 1447801490493
}
@udacityandroid
udacityandroid / shoppinglistplusplus.json
Created Dec 23, 2015
Firebase - Lesson 4 - Failed Schema
View shoppinglistplusplus.json
{
"users" : {
"americanguyw1521@gmail,com" : {
"email" : "americanguyw1521@gmail,com",
"hasLoggedInWithPassword" : true,
"name" : "Walter Latimer",
"timestampJoined" : {
"timestamp" : 1447801255394
},
"userFriends" : {
@udacityandroid
udacityandroid / shoppinglistplusplus.json
Created Dec 23, 2015
Firebase - Lesson 4 - Fix Nests : Suggestion 1
View shoppinglistplusplus.json
{
"users" : {
"americanguyw1521@gmail,com" : {
"email" : "americanguyw1521@gmail,com",
"hasLoggedInWithPassword" : true,
"name" : "Walter Latimer",
"timestampJoined" : {
"timestamp" : 1447801255394
},
"userFriends" : {
@udacityandroid
udacityandroid / shoppinglistplusplus.json
Created Dec 23, 2015
Firebase - Lesson 4 - Fix Nests : Suggestion 2
View shoppinglistplusplus.json
{
"users" : {
"americanguyw1521@gmail,com" : {
"email" : "americanguyw1521@gmail,com",
"hasLoggedInWithPassword" : true,
"name" : "Walter Latimer",
"timestampJoined" : {
"timestamp" : 1447801255394
},
"userFriends" : {
@udacityandroid
udacityandroid / shoppinglistplusplus.json
Created Dec 23, 2015
Firebase - Lesson 4 - Fix Nests : Suggestion 3
View shoppinglistplusplus.json
{
"users" : {
"americanguyw1521@gmail,com" : {
"email" : "americanguyw1521@gmail,com",
"hasLoggedInWithPassword" : true,
"name" : "Walter Latimer",
"timestampJoined" : {
"timestamp" : 1447801255394
},
"userFriends" : {
@udacityandroid
udacityandroid / shoppinglistplusplus.json
Created Dec 23, 2015
Firebase - Lesson 4 - Fix Nests : Suggestion 4
View shoppinglistplusplus.json
{
"users" : {
"americanguyw1521@gmail,com" : {
"email" : "americanguyw1521@gmail,com",
"hasLoggedInWithPassword" : true,
"name" : "Walter Latimer",
"timestampJoined" : {
"timestamp" : 1447801255394
},
"activeLists" : {
@udacityandroid
udacityandroid / shoppinglistplusplus.json
Created Dec 23, 2015
Firebase - Lesson 4 - Many to Many : Current Data Schema
View shoppinglistplusplus.json
{
"users" : {
"americanguyw1521@gmail,com" : {
"email" : "americanguyw1521@gmail,com",
"hasLoggedInWithPassword" : true,
"name" : "Walter Latimer",
"timestampJoined" : {
"timestamp" : 1447801255394
}
},
@udacityandroid
udacityandroid / acknowledge.js
Created Jan 26, 2016
Firebase - Lesson 5 - Javascript for Account Merge Example
View acknowledge.js
var ref = new Firebase('https://yours.firebaseio.com/acknowledge');
var users = [];
function $(selector) {
var result = document.querySelectorAll(selector);
return (result.length > 1) ? Array.prototype.slice.call(result) : result[0];
}
function handleAuthResult(error, authData) {
if (error) {
@udacityandroid
udacityandroid / rules.bolt
Created Jan 20, 2016
Firebase - Lesson 5 - Example Bolt File
View rules.bolt
/** NOTE: This is just an example file for what Bolt code looks like. The rules.json file does not
mirror the output of this file **/
// Objects for ShoppingList++
type User {
name : String,
email : EncodedEmail,
timestampJoined : Timestamp,
hasLoggedInWithPassword : Boolean
}
@udacityandroid
udacityandroid / shoppinglistplusplus.json
Created Dec 23, 2015
Firebase - Lesson 4 - Many to Many : Option E
View shoppinglistplusplus.json
{
"users" : {
"americanguyw1521@gmail,com" : {
"email" : "americanguyw1521@gmail,com",
"hasLoggedInWithPassword" : true,
"name" : "Walter Latimer",
"timestampJoined" : {
"timestamp" : 1447801255394
}
},