Blog

A list of blog posts that I have written over the years.


How to Use SVG Icon as AvatarBadge in Chakra UI

How to Use SVG Icon as AvatarBadge in Chakra UI

I was recently building a side project and I was using Chakra UI + Next.js. I wanted to put the Google logo as a Badge in the bottom right of an Avatar Image.

November 7, 2020

View Article
How File-System Based Routing Works in Next.js

How File-System Based Routing Works in Next.js

Next.js has file-system based routing built-in. You don't have to explicitly define the path in the router. It's as easy as adding a file inside the folder and you are done. There are multiple ways you can define a path using the file structure.

November 6, 2020

View Article
Linux Commands: watch

Linux Commands: watch

watch is used to run a command repeatedly and display its output and error at regular intervals. This is useful when you want to run a command repeatedly and observe its output getting changed over a period of time.

November 1, 2020

View Article
Linux Commands: env

Linux Commands: env

env can be used to print the environment variables or pass environment variables to a utility/command without setting them in the current shell session.

October 29, 2020

View Article
Linux Commands: printenv

Linux Commands: printenv

printenv is used to print out the environment variables. Environment variables are a common form of setting global values across a terminal session. Environment variables can be set by the systems, automation scripts, or by the user.

October 18, 2020

View Article
Linux Commands: du

Linux Commands: du

du is used to display disk usage statistics. It's a simple tool to calculate and print the disk space used by files or directories. Let's see how to use it. You can simply type du or du <directory-name> in your terminal and it will print the size.

October 17, 2020

View Article
Fathom vs Plausible: Which privacy-focused Google Analytics alternative should you use?

Fathom vs Plausible: Which privacy-focused Google Analytics alternative should you use?

Today 84% websites use Google Analytics on their website to track user activities. The reason for its popularity is that it's free(not literally), I mean who doesn't love free stuff. But there is always a cost and that cost in the case of Google Ana...

October 15, 2020

View Article
How to Implement HTTP Basic Auth in Go(Golang)

How to Implement HTTP Basic Auth in Go(Golang)

Today the web is full of people using various platforms. Every platform has its own authentication mechanism to identify users specific to their platform. Authentication helps your application to know that the person who sent a request to your application.

October 13, 2020

View Article
Linux Commands: wc

Linux Commands: wc

wc stands for word count. It is used to display the number of lines, words, characters, and byte for a file or input received via pipe(|).

October 11, 2020

View Article
Linux Commands: pwd

Linux Commands: pwd

pwd is one of the most helpful commands for linux newbie. Whenever you are lost just type it in your terminal and you will find where are you exactly. Let me show you how you can do it.

October 8, 2020

View Article
How to change the port of a Next.js application

How to change the port of a Next.js application

I have been building my personal website using Next.js. By default, Next.js server runs on port 3000 which is good but sometimes you want to run the server on a different port maybe because you already have a service running on it, or maybe it's not ...

October 7, 2020

View Article
Linux Commands: ls

Linux Commands: ls

ls is the Linux command to list the content of a directory. You can list all the files and folders inside a directory. Let's try it in your terminal.

October 6, 2020

View Article
How to implement concurrency in Go

How to implement concurrency in Go

Go was designed to run on modern computers with multiple cores. Go has first-hand support for concurrency through goroutines and channels. Writing a concurrent program in Go is as simple as adding a single keyword. Let's dive straight into the implementation.

October 4, 2020

View Article
Create Golang HTTP Server in 15 Lines

Create Golang HTTP Server in 15 Lines

Golang has quickly become an industry standard for creating and maintaining high scale web services. It has an inbuilt package net/http to create an HTTP server. This package reduces the barrier of creating the server.

September 22, 2020

View Article