Skip to content

Instantly share code, notes, and snippets.

View Antardas's full-sized avatar
๐Ÿ–ฅ๏ธ
๐‘ป๐’“๐’š๐’Š๐’๐’ˆ ๐’•๐’ ๐’”๐’‚๐’—๐’† ๐’•๐’Š๐’Ž๐’† โ‰กโ‰ก ๐’Ž๐’๐’๐’†๐’š

Antar Das Antardas

๐Ÿ–ฅ๏ธ
๐‘ป๐’“๐’š๐’Š๐’๐’ˆ ๐’•๐’ ๐’”๐’‚๐’—๐’† ๐’•๐’Š๐’Ž๐’† โ‰กโ‰ก ๐’Ž๐’๐’๐’†๐’š
View GitHub Profile

MQTT (Message Queuing Telemetry Transport)

MQTT is a lightweight publish/subscribe messaging protocol designed for constrained devices and low-bandwidth, high-latency networks. It's the backbone of many IoT applications.


Core Concepts

1. Publish/Subscribe Model

@Antardas
Antardas / solution.md
Last active March 16, 2026 20:22
Two Sum - LeetCode Problem #1

Two Sum - LeetCode Problem #1

Given an array of integers nums and an integer target, return the indices of the two numbers that add up to target. You may assume each input would have exactly one solution.

Example:

Input: nums = [2, 7, 11, 15], target = 9
Output: [0, 1]
Explanation: nums[0] + nums[1] = 2 + 7 = 9
@Antardas
Antardas / solution.md
Created March 16, 2026 20:20
LeetCode Problem #49

Group Anagrams - LeetCode Problem #49

Given an array of strings strs, group the anagrams together. You can return the answer in any order.

Problem Understanding

An anagram is a word formed by rearranging the letters of another word (e.g., "eat", "tea", "ate" are all anagrams).

Example:

@Antardas
Antardas / docker-compose.yaml
Created January 12, 2024 15:57
Redis Data Persistent AOF
version: '3'
services:
redis:
image: redis:latest
container_name: docs-cache
restart: on-failure
ports:
- 6379:6379
volumes:
@Antardas
Antardas / eslint_prettier_airbnb.md
Created January 13, 2023 16:43 — forked from geordyjames/eslint_prettier_airbnb.md
VSCode - ESLint, Prettier & Airbnb Setup for Node.js Projects

VSCode - ESLint, Prettier & Airbnb Setup for Node.js Projects

1. Install ESLint & Prettier extensions for VSCode

Optional - Set format on save and any global prettier options

2. Install Packages

npm i -D eslint prettier eslint-plugin-prettier eslint-config-prettier eslint-config-airbnb-base eslint-plugin-node eslint-config-node

Setup Eslint Prettier and Husky in Node JS Typescript Project

1. ESLint

  • Step 1 - Install the dependencies

    • eslint
      • ESLint is a tool for identifying and reporting on patterns found in ECMAScript/JavaScript code.
      • npm install --save-dev eslint
    • typescript-eslint/parser
#include <bits/stdc++.h>
using namespace std;
const int N = 1e5;
vector<int>adj_list[N];
int visited[N], inDegree[N];
int n, m;
bool detect_cycle(int node) {