Skip to content

Instantly share code, notes, and snippets.

View davideast's full-sized avatar
💜
Working on Project IDX (and Firebase too)

David East davideast

💜
Working on Project IDX (and Firebase too)
View GitHub Profile
@davideast
davideast / index.ts
Last active February 8, 2019 18:08
syncWithElements
// https://stackblitz.com/edit/typescript-h68plq?file=index.ts
import firebase from 'firebase/app';
import 'firebase/firestore';
import { syncWithElements } from './sync';
const app = firebase.initializeApp({ projectId: "alwaysbecaching" });
const unsub = syncWithElements(app, {
parent: document.querySelector('.container'),
@davideast
davideast / firestore.gs
Last active September 23, 2019 03:08
Export to Firestore in AppScript
function main() {
var sheet = SpreadsheetApp.getActiveSheet();
// This is set as the collection name
var sheetName = sheet.getName();
var properties = getProperties(sheet);
var records = getData(sheet);
var firestore = getFirestore();
exportToFirestore(firestore, sheetName, records, properties);
}