Skip to content

Instantly share code, notes, and snippets.

View Sathiyapramod's full-sized avatar
🎯
Focusing

Sathiyapramod Raghavendran Sathiyapramod

🎯
Focusing
View GitHub Profile
@Sathiyapramod
Sathiyapramod / sample-resume.json
Created November 23, 2022 10:18 — forked from ishu3101/sample-resume.json
Sample Resume in JSON Resume Format
{
"basics": {
"name": "Your first and last name",
"label": "",
"picture": "",
"email": "Your email address",
"phone": "A phone number, with any formatting you like. E.g. (555) 555-5555.",
"degree": "",
"website": "Your website URL",
"summary": "A one-sentence to one-paragraph overview text. Do not include any line-breaks.",

Creating git using terminal in VS code

git config --global user.name "Sathiyapramod"
git config --global user.email "your mail id"

Initializing a empty repository

@Sathiyapramod
Sathiyapramod / tsconfig.json
Last active February 12, 2024 14:26
tsconfig.json
{
"compilerOptions": {
"target": "es2022" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */,
"moduleDetection": "force" /* Control what method is used to detect module-format JS files. */,
/* Modules */
"module": "CommonJS" /* Specify what module code is generated. */,
"rootDir": "./" /* Specify the root folder within your source files. */,
"outDir": "./build" /* Specify an output folder for all emitted files. */,
"importsNotUsedAsValues": "remove" /* Specify emit/checking behavior for imports that are only used for types. */,
"isolatedModules": false /* Ensure that each file can be safely transpiled without relying on other imports. */,
@Sathiyapramod
Sathiyapramod / auth.js
Last active February 25, 2024 07:09
Redux variables authSlice file
// file path - redux/modules/auth.js
// To declare and initiate the redux variables
//actions
export const USERNAME = "project/signin/username";
export const PASSWORD = "project/signin/password";
//actions type
export const fetchUsername = (input) => {
return { type: USERNAME, payload: input };
};
@Sathiyapramod
Sathiyapramod / Login.jsx
Last active February 25, 2024 07:16
Login Component
"use client";
import React, { useState } from "react";
import "./Login.css";
import Link from "next/link";
import { fetchUsername, fetchPassword } from "@/redux/modules/auth";
import { useRouter } from "next/navigation";
import { useDispatch } from "react-redux";
export default function Login() {
@Sathiyapramod
Sathiyapramod / index.js
Last active February 25, 2024 07:19
Redux combineReducer
// combine reducers
import { combineReducers } from "redux";
import reducer from "./auth";
export default combineReducers({
reducer,
});
@Sathiyapramod
Sathiyapramod / provider.jsx
Created February 25, 2024 07:22
Provider Component
//redux/provider.js
"use client";
import React from "react";
import { Provider } from "react-redux";
import store from "./index";
export function ReduxProvider({ children }) {
return <Provider store={store}>{children}</Provider>;
@Sathiyapramod
Sathiyapramod / layout.jsx
Created February 25, 2024 07:23
Profile Page
import { ReduxProvider } from "@/redux/provider";
import Login from "./components/Login";
export default function RootLayout() {
return (
<html lang="en">
<body>
<ReduxProvider>
<Login />
</ReduxProvider>
@Sathiyapramod
Sathiyapramod / tsconfig.frontend.json
Created February 27, 2024 11:59
Front-end tsconfig.json
{
"compilerOptions": {
"target": "ES2020",
"useDefineForClassFields": true,
"lib": ["ES2020", "DOM", "DOM.Iterable"],
"module": "ESNext",
"skipLibCheck": true,
/* Bundler mode */
"moduleResolution": "bundler",
# Use Node.js 14 image.
# can't find one for 16
# https://hub.docker.com/_/node
FROM node:18
# Create and change to the app directory.
WORKDIR /usr/src/app
# Copy application dependency manifests to the container image.