This file contains hidden or 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
/** | |
* Split out the async/await createTable function into its own method | |
* | |
* @param {knex} knex | |
* @returns {Promise} | |
*/ | |
async function makeTable(knex) { | |
console.log("In async method attempting to create table documents"); | |
await knex.schema.createTable('documents', function (table) { | |
table.increments('id').primary(); |
This file contains hidden or 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
import { getFirestore, doc, setDoc } from "firebase/firestore"; | |
/** | |
* basic database operations used with firebase-index.js | |
* and sign-in-elf-js included in these gists | |
*/ | |
// Add a new document in collection "cities" | |
async function runSantaCruz(firebaseApp) { | |
const db = getFirestore(firebaseApp); |
This file contains hidden or 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
// src/index.js | |
import { initializeApp } from 'firebase/app'; | |
import { getFirestore } from 'firebase/firestore/lite'; | |
import { firebaseConfig } from './configure'; | |
import { runSacramento } from './set_document'; | |
import { signInElf } from './sign-in-elf'; | |
const firebaseApp = initializeApp(firebaseConfig); | |
const db = getFirestore(firebaseApp); | |
signInElf(firebaseApp); |
This file contains hidden or 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
import { signIn, signOutElf } from './auth_google_signin_popup'; | |
import { getAuth } from "firebase/auth"; | |
function signInElf(firebaseApp) { | |
const auth = getAuth(firebaseApp); | |
signInBtn.onclick = () => { | |
signIn(); | |
} |
This file contains hidden or 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
{ | |
"editor.fontSize": 16, | |
"editor.accessibilitySupport": "off", | |
"editor.renderWhitespace": "all", | |
"workbench.tree.indent": 26, | |
"editor.codeActionsOnSave": { | |
"source.fixAll.eslint": true | |
}, | |
"eslint.validate": [ | |
"javascriptreact", |
This file contains hidden or 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
#! /usr/bin/env bash | |
if [[ -z $2 ]]; then | |
echo -e "You must pass in a commit message and the project name" | |
exit | |
fi | |
if [[ ! -z $3 ]]; then | |
echo -e "Too many parameters" | |
exit |
This file contains hidden or 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
import React, {Component} from 'react'; | |
class ElfApp extends Component { | |
render() { | |
return ( | |
<div> | |
<h1>Welcome to Elf App</h1> | |
</div> | |
); |
This file contains hidden or 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
import React from 'react'; | |
import ListItem from '@material-ui/core/ListItem'; | |
import ListItemIcon from '@material-ui/core/ListItemIcon'; | |
import ListItemText from '@material-ui/core/ListItemText'; | |
import InboxIcon from '@material-ui/icons/MoveToInbox'; | |
import DraftsIcon from '@material-ui/icons/Drafts'; | |
import StarIcon from '@material-ui/icons/Star'; | |
import SendIcon from '@material-ui/icons/Send'; | |
function ListItemLink(props) { |
This file contains hidden or 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
import React from 'react'; | |
import ListItem from '@material-ui/core/ListItem'; | |
import ListItemIcon from '@material-ui/core/ListItemIcon'; | |
import ListItemText from '@material-ui/core/ListItemText'; | |
import InboxIcon from '@material-ui/icons/MoveToInbox'; | |
import DraftsIcon from '@material-ui/icons/Drafts'; | |
import StarIcon from '@material-ui/icons/Star'; | |
import SendIcon from '@material-ui/icons/Send'; | |
import { Link } from 'react-router-dom'; |
This file contains hidden or 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
import React, { useState } from "react"; | |
import PropTypes from 'prop-types'; | |
import { withStyles } from '@material-ui/core/styles'; | |
import AppBar from '@material-ui/core/AppBar'; | |
import Drawer from '@material-ui/core/Drawer'; | |
import IconButton from '@material-ui/core/IconButton'; | |
import Toolbar from '@material-ui/core/Toolbar'; | |
import Typography from '@material-ui/core/Typography'; | |
import MenuIcon from '@material-ui/icons/Menu'; | |
import Divider from '@material-ui/core/Divider'; |
NewerOlder