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
const puppeteer = require('puppeteer'); | |
const firebase = require('firebase'); | |
if(!firebase.apps.length) { | |
let config = { | |
apiKey: "xxxxxxxxxxxxxxxxxxxxx", | |
authDomain: "xxxxxxxxxxxxxxxxxxxxxxxx", | |
databaseURL: "xxxxxxxxxxxxxxxxxxxxx", | |
projectId: "xxxxxxxxx", | |
storageBucket: "xxxxxxxxxxxxxxxxxxxx", |
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
function makeResizableDiv(div) { | |
const element = document.querySelector(div); | |
const resizers = document.querySelectorAll(div + ' .resizer') | |
for (let i = 0;i < resizers.length; i++) { | |
const currentResizer = resizers[i]; | |
currentResizer.addEventListener('mousedown', function(e) { | |
currentResizer.addEventListener('mousemove', resize) | |
}) | |
function resize(e) { |
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
function makeResizableDiv(div) { | |
const element = document.querySelector(div); | |
const resizers = document.querySelectorAll(div + ' .resizer') | |
for (let i = 0;i < resizers.length; i++) { | |
const currentResizer = resizers[i]; | |
currentResizer.addEventListener('mousedown', function(e) { | |
e.preventDefault() | |
window.addEventListener('mousemove', resize) | |
window.addEventListener('mouseup', stopResize) | |
}) |
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 url('https://fonts.googleapis.com/css?family=Lato'); | |
* { | |
box-sizing: border-box; | |
font-family: 'Lato', sans-serif; | |
} | |
.autocomplete-search-box { | |
width: 50%; | |
margin-left: 25%; |
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 {Command} from '@oclif/command' | |
export default class Add extends Command { | |
static description = 'Add new todo to list' | |
static args = [{name: 'todo'}] | |
async run() { | |
const {args} = this.parse(Add) | |
const todo = args.todo |
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 {Command} from '@oclif/command' | |
import chalk from 'chalk' | |
export default class Add extends Command { | |
static description = 'Add new todo to list' | |
static args = [{name: 'todo'}] | |
async run() { | |
const {args} = this.parse(Add) |
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 * as fs from 'fs' | |
import * as path from 'path' | |
import * as os from 'os' | |
const todoFile = path.join(os.homedir(), 'checkme', 'todos.json') | |
interface Todo { | |
done: boolean; | |
todo: string; | |
} |
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 {Command} from '@oclif/command' | |
import chalk from 'chalk' | |
import todoAPI from '../api/todoAPI' | |
export default class Add extends Command { | |
static description = 'Add new todo to list' | |
static args = [{name: 'todo'}] | |
async run() { |
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 {Command} from '@oclif/command' | |
import todoAPI from '../api/todoAPI' | |
import chalk from 'chalk' | |
const Table = require('cli-table') | |
export default class List extends Command { | |
static description = 'Print out all todos' | |
async run() { | |
const table = new Table({ |
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 {Command} from '@oclif/command' | |
import chalk from 'chalk' | |
import todoAPI from '../api/todoAPI' | |
export default class Remove extends Command { | |
static description = 'Remove a todo from list' | |
static args = [{name: 'index'}] | |
async run() { |