Skip to content

Instantly share code, notes, and snippets.

View saurabhnative's full-sized avatar
🎯
Focusing

Saurabh Mhatre saurabhnative

🎯
Focusing
View GitHub Profile
@saurabhnative
saurabhnative / App.js
Created March 31, 2023 08:54
Personal Finance App using React.js and ChatGPT
import React from 'react';
import { BrowserRouter as Router, Switch, Route } from 'react-router-dom';
import Navigation from './components/Navigation';
import Home from './components/Home';
import Transactions from './components/Transactions';
import Budgets from './components/Budgets';
import Settings from './components/Settings';
function App() {
return (
export default function generateSeries(x) {
const series = [x];
let n = x;
while (n !== 1) {
if (n % 2 === 0) {
n = n / 2;
} else {
n = 3 * n + 1;
}
series.push(n);
@saurabhnative
saurabhnative / LoginComponent.js
Created October 4, 2021 12:53
Firebase web version 9 authentication forms
import React, { useState, useEffect } from "react";
import { useHistory } from "react-router-dom";
import { auth } from "../firebase";
import { signInWithEmailAndPassword } from "firebase/auth";
export default function LoginForm(props) {
const [emailId, updateEmailId] = useState("");
const [password, updatePassword] = useState("");
useEffect(() => {
if (props.isLoggedIn) {
history.push("/app");
@saurabhnative
saurabhnative / Programming basics
Created May 23, 2021 15:16
Basics of javascript language
// Print values using console log keywords
// console.log("Welcome to javascript session");
// console.log("Today is Sunday");
// console.log("hello world");
// Comments in Javascript
// Single line comment
/*
This is a multiline comment
JS is an interpreted language
@saurabhnative
saurabhnative / githubJobscors.js
Created September 26, 2020 01:45
Github jobs access with cors
const express = require('express')
const cors = require('cors')
const app = express()
const axios = require('axios')
app.use(cors())
app.use(express.json())
app.get('/jobs_list', async function (req, res) {
const skill = req.query.skill;
axios.get(`https://jobs.github.com/positions.json?search=${skill}`)
.then(function (response) {
.alert { color: #000;}
.alert__title { padding: 10px;}
.track__title:hover, .track-title:focus { color: blue}
.alert {
color: #000;
&__title {
paddding: 10px;
&:hover {
color: blue;
}
}
}
.list {
color: beige;
}
.alert {
color: beige;
}
$primary-color: beige
.list
color: $primary-color
.alert
color: $primary-color
/* SCSS */
$primary-color: beige;
.list {
color: $primary-color;
}
.alert {
color: $primary-color;
}