Skip to content

Instantly share code, notes, and snippets.

View seanmodd's full-sized avatar
🏠
Working from home

Sean Modd seanmodd

🏠
Working from home
View GitHub Profile
{"tags":[{"id":"6922372972987","name":"clone"},{"id":"7247701445842","name":"showriyad"},{"id":"7587323352689","name":"study"},{"id":"7939952271161","name":"iranian"},{"id":"0985690917559","name":"boilerplate"},{"id":"3793539864574","name":"product"},{"id":"3799517156312","name":"demo"},{"id":"3905033669807","name":"senpex"},{"id":"4629627280752","name":"Node.js"},{"id":"4631535446067","name":"Education"},{"id":"4671123981206","name":"Product"},{"id":"4677034360618","name":"Demo"},{"id":"5947635317927","name":"Boilerplate"},{"id":"6064499907181","name":"UI Framework"},{"id":"6074276930276","name":"VS Code Extension"},{"id":"9380916021766","name":"Vue"},{"id":"9842439713527","name":"Youtube"},{"id":"6725542963407","name":"react"},{"id":"0604918036643","name":"javascript"},{"id":"0609283388535","name":"database"},{"id":"1434721890573","name":"admin panel"},{"id":"1579155049225","name":"html"},{"id":"1594146979767","name":"framework"},{"id":"1596278738204","name":"responsive"},{"id":"1597613896267","name":"desig
@seanmodd
seanmodd / shortcuts.md
Last active August 12, 2021 21:10
Shortcuts to Remember

Shortcuts to always remember

Shorcut Action Shortcut Action
1. ^⌥G Google Search! --- 2. ⌥⌘K Bookmark Line of Code!
3. ⌥⌘L Jump to Next Bookmark! --- 4. ⌥⌘J Jump to Previous Bookmark!
5. ⌥⌘P Takes a CodeSnap! --- 6. ⌥⌘O Opens settings.json file!
7. ^⌥↑ Fast Move Upwards! --- 8. ^⌥↓ Fast Move Downwards!
9. ⌥⌘C Add CodeTour Step! --- 10. ^⌥↓ Fast Move Downwards!
@seanmodd
seanmodd / main.tour
Created August 7, 2021 19:59
summer2021-codetour
{
"$schema": "https://aka.ms/codetour-schema",
"title": "Legend",
"steps": [
{
"file": "pages/_app.js",
"description": "The loading indicator is here",
"line": 33,
"selection": {
"start": {
@seanmodd
seanmodd / theme.js
Last active August 23, 2021 18:43
My Chakra Theme
// import { theme as defaultTheme, extendTheme, Button } from '@chakra-ui/react';
// import { createBreakpoints } from '@chakra-ui/theme-tools';
// const breakpoints = createBreakpoints({
// sm: '425px',
// md: '768px',
// lg: '960px',
// xl: '1280px',
// '2xl': '1440px',
// });
@seanmodd
seanmodd / DarkModeSwitch.js
Last active August 19, 2021 23:05
DarkModeSwitch for Chakra UI
// import { useColorMode, IconButton } from '@chakra-ui/core';
import {
useColorMode,
IconButton,
Button,
HStack,
Flex,
Stack,
Box,
} from '@chakra-ui/react';
@seanmodd
seanmodd / ScollToTop.js
Created August 19, 2021 18:59
ScrollToTop Component
import { useState, useEffect } from "react";
import styles from "@/styles/Scroll.module.css";
import { FaArrowCircleUp } from "react-icons/fa";
export default function ScrollToTop() {
const [isVisible, setIsVisible] = useState(false);
const toggleVisibilty = () => {
if (window.pageYOffset > 250) {
setIsVisible(true);
@seanmodd
seanmodd / Scoll.module.css
Created August 19, 2021 18:59
CSS for ScollToTop.js
.scroll {
position: fixed;
bottom: 0.5rem;
right: 0.5rem;
animation: fadeIn 700ms ease-in-out 1s both;
cursor: pointer;
font-size: 40px;
margin-right: 2rem;
}
@seanmodd
seanmodd / AuthContext.js
Created August 19, 2021 19:01
AuthContext for _app.js
import { createContext, useState, useEffect } from 'react';
import { useRouter } from 'next/router';
import { API_URL, NEXT_URL } from '@/config/index';
const AuthContext = createContext();
export const AuthProvider = ({ children }) => {
const [user, setUser] = useState(null);
const [error, setError] = useState(null);
const router = useRouter();
@seanmodd
seanmodd / jsconfig.json
Created August 19, 2021 19:02
jsconfig.json file for path routes!!!
{
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@/components/*": ["components/*"],
"@/styles/*": ["styles/*"],
"@/config/*": ["config/*"],
"@/context/*": ["context/*"],
"@/utils/*": ["utils/*"]
}
@seanmodd
seanmodd / next.config.json
Created August 19, 2021 19:02
next.config.json file for Cloudinary
module.exports = {
images: {
domains: ['res.cloudinary.com'],
},
};