Skip to content

Instantly share code, notes, and snippets.

View bnymn's full-sized avatar
🎯
Focusing

Bünyamin Inan bnymn

🎯
Focusing
View GitHub Profile
@bnymn
bnymn / index.tsx
Created October 10, 2021 18:07
The final version of index.tsx
import type { NextPage } from 'next'
import Head from 'next/head'
import LoginForm from '../components/login-form'
const Home: NextPage = () => {
return (
<div>
<Head>
<title>Login Page</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
@bnymn
bnymn / login-form.module.css
Created October 10, 2021 17:54
The login-form css module
.login_box {
width: 340px;
background-color: #fff;
}
@bnymn
bnymn / partial-login-form.tsx
Last active October 10, 2021 18:06
Partial login form after bootstrap applied
import { Formik, Field, Form, FormikHelpers } from 'formik';
import styles from './login-form.module.css'
interface Values {
username: string;
password: string;
}
export default function LoginForm() {
return (
@bnymn
bnymn / login-form.tsx
Created October 10, 2021 17:14
Username and password fields are added
import { Formik, Field, Form } from 'formik';
export default function LoginForm() {
return (
<Formik
initialValues={{
username: '',
password: '',
}}
@bnymn
bnymn / login-form.tsx
Created October 10, 2021 17:07
Empty LoginForm component
export default function LoginForm() {
return (
<>
</>
)
}
@bnymn
bnymn / index.tsx
Created October 10, 2021 17:06
LoginForm component is added
import type { NextPage } from 'next'
import Head from 'next/head'
import LoginForm from '../components/login-form'
const Home: NextPage = () => {
return (
<div>
<Head>
<title>Login Page</title>
<link rel="icon" href="/favicon.ico" />
@bnymn
bnymn / index.tsx
Created October 10, 2021 10:05
Empty index.tsx of login page
import type { NextPage } from 'next'
import Head from 'next/head'
const Home: NextPage = () => {
return (
<div>
<Head>
<title>Login Page</title>
<link rel="icon" href="/favicon.ico" />
</Head>
@bnymn
bnymn / how-to-nestjs-1.md
Created August 31, 2021 05:15
How to generate a new library within a monorepo in NestJS

You can use the following command to generate a new library in your NestJS monorepo. It is going to create links in your tsconfig.json file.

nest g lib <library_name>
# Install Oh-my-zsh
sudo apt-get install -y zsh
sudo usermod -s /usr/bin/zsh $(whoami)
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
# Install PHP 7.4
sudo apt-get install -y software-properties-common
sudo add-apt-repository -y ppa:ondrej/php
sudo apt-get update
sudo apt-get install -y php7.4-bcmath \
For those of you having a performance problem, please drop a message, so I can return you back.