Skip to content

Instantly share code, notes, and snippets.

View nivethan-me's full-sized avatar
🎯
Focusing on how to solve my problems using software

Nivethan nivethan-me

🎯
Focusing on how to solve my problems using software
View GitHub Profile
@nivethan-me
nivethan-me / README.md
Last active October 15, 2023 05:55
Add files to an old commit in Git

Add files to an old commit in Git

Scenario

I made three commits in a project locally and realized I should have added a pnpm-lock.yaml file into the first commit.

Using git rebase to solve the issue

1. Start interactive rebase with last 3 commits. ``` git rebase -i HEAD~3 ```
@nivethan-me
nivethan-me / README.md
Last active September 30, 2023 07:38
Add Cloudflare Custom Domain to Vercel

Add Cloudflare custom domain to Vercel

  1. Sign up and sign in to Cloudflare https://dash.cloudflare.com/sign-up.
  2. In your Cloudflare dashboard, select the Domain Registration > Register Domains tab.
  3. Search for your favorite domain and purchase it. In my case, I purchased the domain https://nivethan.me/ for my portfolio.
  4. Sign in to Vercel and go to your dashboard, where you can see all your projects in the Overview tab.
  5. Click on a project and on the top right, select Domains.
  6. Type your domain in the text box, e.g., nivethan.me, and click Add.
  7. Select the recommended option: Add www.nivethan.me and redirect nivethan.me to it.
  8. Vercel will show an invalid configuration under your domains and display the relevant A record IP under nivethan.me and a CNAME IP under www.nivethan.me. These need to be set up on Cloudflare to make it work.
@nivethan-me
nivethan-me / README.md
Last active July 11, 2023 09:55
Setup a simple and elegant terminal on macOS

Setup a simple & elegant terminal on macOS

Screenshot 2023-07-11 at 3 14 40 PM

  1. (optional) install Homebrew on you mac
    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
    
@nivethan-me
nivethan-me / README.md
Last active December 3, 2023 15:35
Setup a Next.js 13 project with Eslint + Prettier with automatic tailwind class sorting