Skip to content

Instantly share code, notes, and snippets.

View Rex-Arnab's full-sized avatar
🏑
Practising

Arnab-Biswas Rex-Arnab

🏑
Practising
View GitHub Profile
version: "3.9"
services:
db:
image: postgres:16
container_name: postgres-practice
environment:
POSTGRES_USER: practice_user
POSTGRES_PASSWORD: secret
POSTGRES_DB: practice_db
ports:
import { MongoClient } from 'mongodb';
const uri = process.env.MONGODB_URI || 'mongodb://localhost:27017';
const dbName = process.env.MONGODB_DB || 'school-management';
let cachedClient = null;
let cachedDb = null;
export async function connectToDatabase() {
if (cachedClient && cachedDb) {
---
description: Structured planning and memory offloading rule for Cline to behave like Cursor AI
author: https://github.com/rex-arnab
version: 1.0
tags: ["cursor", "planning", "step-by-step", "project-management", "todo"]
globs: ["**/*.ts", "**/*.tsx", "**/*.js", "**/*.jsx", "**/*.md"]
---
# Cline Step-by-Step Planner
<think>
Alright, so I need to create a detailed 7-month syllabus for learning the MERN stack. The user has already provided a structure that covers MongoDB, Express.js, Node.js, React, and then builds up to project development with CI/CD pipelines. They also want some additional elements like projects, analytics, hosting on AWS, Docker, and advanced topics.

Okay, first off, I need to think about what each month should cover in more detail. The user mentioned adding specific areas: projects, analytics, AWS hosting, Docker, and maybe cloud security? Wait, they didn't mention cloud security specifically, but including it makes sense since cloud platforms are essential now.

So, breaking it down:

**Month 1:** MongoDB Basics
- Introduction to MongoDB
[
{
"questionType": "single",
"title": "Identify the tense of the sentence: \"He is watching TV right now.\"",
"options": [
"Simple Present",
"Present Continuous",
"Simple Past",
"Present Perfect"

1. Discuss the difference between formal and actual parameters.

  • Formal parameters:
    • These are the variables used in the function definition to represent the values that will be passed to the function.
    • They act as placeholders and get their values from the actual parameters when the function is called.
    • Example:
      void foo(int x, int y) { // x and y are formal parameters
          printf("%d %d", x, y);
      }

Page 1

1. What is the purpose of the default case in a switch statement?

The default case in a switch statement serves as a fallback option when none of the other case labels match the given switch expression. If no case matches, the default case block is executed. If there is no default case and no case matches, then none of the code in the switch body runs.

2. Differentiate between break and continue statements with examples.

  • break:
    • Purpose: Immediately exits from the nearest enclosing loop or switch structure.

Requirements

  1. FFMPEG Package
  2. Terminal

Paste this in Terminal

ffmpeg -i "URL-HERE.m3u8" -c copy -bsf:a aac_adtstoasc "VIdeo Title HERE".mp4

Got it! For your NestJS interview, here are some key topics you might encounter: 1. Modules: The basic building blocks of a NestJS application, used to organize related components. 2. Controllers: Handle incoming requests and return responses to the client. 3. Providers: A broad concept that can include services, repositories, factories, and helpers, often injected into controllers or other providers. 4. Dependency Injection: A design pattern used throughout NestJS to manage class dependencies. 5. Middleware: Functions that are called before the route handler, used for tasks like logging, authentication, etc. 6. Guards: Determine whether a request will be handled by the route handler based on certain conditions. 7. Interceptors: Used to transform the data before it is sent to the client or after it’s received. 8. Pipes: Used for transforming input data or performing validation. 9. Exception Filters: Handle errors and provide appropriate responses to the client.

Basic Python Lesson

Introduction

Python is a high-level, interpreted programming language known for its simplicity and versatility. It’s widely used in web development, data science, automation, and more.

REPL (Read-Eval-Print Loop)

The REPL allows you to interactively execute Python commands and see immediate results.

  • Start the REPL by typing python or python3 in your terminal.