Skip to content

Instantly share code, notes, and snippets.

View rambabu-patidar's full-sized avatar
🎯
Focusing

Rambabu Patidar rambabu-patidar

🎯
Focusing
View GitHub Profile
@rambabu-patidar
rambabu-patidar / Kafka-Learnings.md
Created September 5, 2026 13:22
This gist contain how I ran kafka locally in my windows machine and used console-consumer and console-producers to learn it's raw version.

Kafka Local Setup & Learning Notes (Windows, KRaft Mode)

Personal revision notes — includes exact commands run, concepts explained, and the reasoning/misconceptions along the way (so future-me doesn't repeat the same wrong turns).


0. Setup Context

  • OS: Windows (using .bat scripts under bin\windows\, not the .sh scripts)
  • Mode: KRaft (no ZooKeeper) — the broker manages its own metadata/consensus internally instead of relying on an external ZooKeeper ensemble.
@rambabu-patidar
rambabu-patidar / Docker_PostgreSql.md
Last active August 29, 2026 14:06
This quick gist shows how we can start the PostgreSQL Server with PGAdmin UI in Docker.

Docker Installation of PostgreSQL with PGAdmin UI for quick Setup

NOTE: If docker is not installed in your machine first do that before following next.

Step 01 (Run the Database Server Container)

Official Docker Image: https://hub.docker.com/_/postgres

docker run -d \
  --name postgres-db \
  -p 5432:5432 \
 -e POSTGRES_USER=myuser \
@rambabu-patidar
rambabu-patidar / RadixSort.md
Created July 4, 2026 15:04
Understanding and Implementing the Radix Sort

Radix Sort

This is a sorting algorithm that sorts the array in stable, non-comparision way. We never compare anything in this.

This is based on the the Count Sort. Learn about this it's very very simple. Count sort usually works best when we have small range of number that we want to sort. Why only small range?? Because in the algorithm we find the maximum number from array and create the array of size MaxNumber + 1 which is used to keep the count/freq of each element that is present in the array. Go and learn yourself.

@rambabu-patidar
rambabu-patidar / NodeJs-Performance.md
Last active June 21, 2026 19:09
Inner understanding of how clustering work in Nodejs and how js single threaded can run multiple logical processors.

Wrote notes by self reformatted by chatgpt

Understanding Node.js Clustering from an OS Perspective

Forget Node.js for a Moment: Focus on the Computer and Operating System

A computer contains a CPU (Central Processing Unit), which has one or more physical cores. These are the actual hardware cores present on the processor.

For example:

@rambabu-patidar
rambabu-patidar / Docker_Commands.md
Last active August 30, 2026 08:15
Important docker commands and notes.

Docker

Docker is a tool that help us to work with the containers. We can pull the images from it's public docker hub repo and run the images in our machine to work with softwares like nodejs, mongodb, linux which otherwise needs to be installed on our Operating System manually.

Containers are the isolated environments in your system that runs on the top of your systems infrastructure but are in isolation. Containers itself doesn't contain the full operating system but rather it contains some binaries. Docker sits in between our machine Operating system and the Container to manage how we use the our computer resources.

to share the container we create the Images of our container which can be replicted on other machine. Images can also be created from Dockerfile.

@rambabu-patidar
rambabu-patidar / How to setup Redis in Windows.md
Created May 24, 2026 10:20
Notes for setting up Redis in window. By default Redis doesn't support windows support.

Redis does not natively support Windows, the recommended and easiest way to run it is by using Windows Subsystem for Linux (WSL) or Docker. Alternatively, you can use Memurai, which is an officially supported native port for Windows.

Method 1: Using WSL (Recommended by Redis)

  • This method installs a lightweight Linux environment directly on your Windows machine.
  • Open PowerShell or Command Prompt as Administrator and run the command: wsl --install
  • Restart your computer when prompted.
  • Open your newly installed Linux distribution (usually Ubuntu) from your Start menu and set up your username and password.
  • Update the package list and install Redis by running these commands: bashsudo apt-get update
@rambabu-patidar
rambabu-patidar / linux-commands.md
Created February 27, 2026 19:27
Learning Linux Commands

Linux Notes(TechWorld with NANA)

These notes move from basic commands to more advanced command composition. The goal is to understand how simple commands combine to form powerful pipelines.


Basic Shell Symbols

.

@rambabu-patidar
rambabu-patidar / websocket.md
Created January 24, 2026 14:33
Very very simple example of how you can use websocket for bi-directional communication between client and server.

WebSocket

This code comes from this youtube channel The Complete Guide to WebSockets one of the best channel to learn Networking and Deep dive concepts of System Design etc.

const http = require("http");
const WebSocket = require("websocket").server;

let connection = null;
@rambabu-patidar
rambabu-patidar / Sunday-leetcode-trauma.md
Created January 18, 2026 11:34
The day when Leetcode decided to put everyone on depression.

My Trauma:

What long code I have to write today to get my solution accepted. Ohh God!! But I did it.

LC 3814 : Maximum Capacity within Budget (Took Hint) : Contest Question

class Solution {
public:
@rambabu-patidar
rambabu-patidar / Dijkstra-algorithm.md
Last active January 6, 2026 17:31
Actually this has two version with slightly different ways but same functionality.

Dijkstra's Algorithm

We use Dijkstra algorithm to find the minimum distance from single srouce(src) to all other vertex in the given graph. It works only on Undirected Weighted Graph which are not having negative edge weights. It uses a greedy approach that repeatedly minimize the distances to other vertices.

We use priority queue to implement Dijkstra's algorithm.

The theory part you can learn on the Internet.

Approach 01: Using the Visited Array