Skip to content

Instantly share code, notes, and snippets.

View Gilbishkosma's full-sized avatar
🐱
Let me code

gilbish Gilbishkosma

🐱
Let me code
View GitHub Profile
## Typescript project start
yarn create react-app . --template typescript
## Add material UI
yarn add @mui/material @emotion/react @emotion/styled
## Add React Testing library
yarn add @testing-library/react
## Required
yarn add koa koa-router koa-views koa-body ejs nodemon
## If type orm used
yarn add -D @types/koa @types/koa-router @types/koa-views
## TypeScript sometimes not able to transcript body from ctx.request.body
For that add this in tscongig:
"compilerOptions": {
@Gilbishkosma
Gilbishkosma / gist:313b9ca1dc6d9e3ee3a2845a5f0112cc
Last active March 16, 2020 07:53
NodeJs Installation system
#step1 : Get NVM (Node Version Manger)
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.2/install.sh | bash
#step2 : Install the version of node.js you need
nvm install v12.16.1
#step3 : Enjoy the rest of your day!
gatsby-plugin-emotion #https://www.gatsbyjs.org/packages/gatsby-plugin-emotion/ #for styled components
gatsby-plugin-sharp #https://www.gatsbyjs.org/packages/gatsby-plugin-sharp/ #Exposes several image processing functions
gatsby-transformer-sharp #https://www.gatsbyjs.org/packages/gatsby-transformer-sharp/?=gatsby%20transformer #Creates ImageSharp nodes from image types that are supported by the Sharp image processing library
gatsby-plugin-typography #https://www.gatsbyjs.org/packages/gatsby-plugin-typography/?=gatsby-plugin-typography #for typography
typography-theme-fairy-gates #https://github.com/KyleAMathews/typography.js/tree/master/packages/typography-theme-fairy-gates #typo library
gatsby-source-filesystem #https://www.gatsbyjs.org/packages/gatsby-source-filesystem/?=`gatsby-source-filesystem` #to get data about files
@Gilbishkosma
Gilbishkosma / Header
Last active February 26, 2020 12:27
Simple and descent header component
import React from 'react';
import styled from "@emotion/styled"
import { css } from "@emotion/core"
import {Link} from 'gatsby';
const NavLink = styled(Link)`
color:#222;
font-size:1rem;
font-weight: ${props => props.fontWeight || 'normal'};
line-height:1;