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'; | |
import fire from '../fire'; | |
import { Link } from "react-router-dom"; | |
import ShowProfile from './showprofile'; | |
export default class Login extends Component{ | |
constructor(props){ | |
super(props); | |
this.state = { | |
email : '', |
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'; | |
export default class ShowProfile extends Component{ | |
constructor(props){ | |
super(props); | |
this.state = { | |
...props | |
} | |
console.log('state', this.state) | |
} |
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'; | |
import fire from '../fire'; | |
import ShowProfile from './showprofile'; | |
export default class Register extends Component{ | |
constructor(props){ | |
super(props); | |
this.state = { | |
email : '', |
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'; | |
import { BrowserRouter as Router, Route, Switch} from "react-router-dom"; | |
import './App.css'; | |
import Register from './component/register'; | |
import Login from './component/login'; | |
import Navbar from './component/navbar'; | |
class App extends Component { | |
render() { |
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
{ | |
"extends": ["airbnb-base"], | |
"env": { | |
"node": true, | |
"es6": true, | |
"browser": true | |
}, | |
"rules": { | |
"no-console": "off" | |
} |
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 fs = require('fs'); | |
const nodemailer = require('nodemailer'); | |
const sendmail = (todaydate) => { | |
let filename = `geckoboard_${todaydate}.jpg`; | |
nodemailer.createTestAccount((err, account) => { | |
let transporter = nodemailer.createTransport({ | |
host: env.EMAIL_HOST, // smtp host | |
port: 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
const cron = require('node-cron'); | |
cron.schedule('0 59 23 * * *', async function (){ | |
let today = new Date(); | |
let dd = today.getDate(); | |
let mm = today.getMonth()+1; | |
let yyyy = today.getFullYear(); | |
todaydate = `${dd}_${mm}_${yyyy}`; | |
filename = `geckoboard_${todaydate}.jpg`; | |
const browser = await puppeteer.launch({ |
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
(async () => { | |
const browser = await puppeteer.launch({headless: false}); | |
const page = await browser.newPage(); | |
await page.setViewport({ width: 1200, height: 926 }); | |
await page.goto('https://www.youtube.com'); | |
await page | |
.waitForSelector('#search') | |
.then((selector)=> selector.type('cat vs cucumber')) | |
.then(()=> page.click('#search-icon-legacy')); | |
await page.waitFor(1000); |
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'); | |
(async () => { | |
const browser = await puppeteer.launch({headless: false}); // headless false will open chrome. | |
const page = await browser.newPage(); | |
await page.goto('https://www.google.com'); | |
await page.screenshot({path: 'example.png'}); | |
await browser.close(); | |
})(); |