Common RxJS Pipe Operators with Simple Examples

 

1. map()

Transforms each value.

of(1, 2, 3).pipe(
map(x => x * 10)
)
.subscribe(console.log);

Output:

10
20
30

Meaning:

  • Takes each value
  • Changes it
  • Returns new value

Kubernetes kubectl Commands

 

🔧 1. Cluster Info and Context

kubectl cluster-info # Display cluster endpoint info kubectl config get-contexts # List contexts kubectl config use-context <context-name> # Switch to a specific context kubectl get nodes # List all worker/master nodes kubectl describe node <node-name> # Detailed info about a node

📦 2. Pods

kubectl get pods # List all pods in the current namespace kubectl get pods -A # List all pods in all namespaces kubectl describe pod <pod-name> # Show detailed info about a pod kubectl logs <pod-name> # View logs of a pod kubectl logs -f <pod-name> # Stream logs kubectl exec -it <pod-name> -- /bin/bash # Get shell access inside a pod kubectl delete pod <pod-name> # Delete a pod

Quick Guide to Kubernetes

Kubernetes is a container orchestration system. It helps you deploy, scale, manage, and heal your containerized applications (like Docker containers) automatically.


⚙️ High-Level Architecture:

+------------------+ | User (You) | +--------+---------+ | v +--------+----------+ +----------------+ | Kubernetes API | <----> | kubectl | | (Control Plane)| +----------------+ +--------+----------+ | v +--------+----------+---------------------------+ | Scheduler | Controller Manager | etcd (DB) | +-----------+--------------------+--------------+ | v +--------+----------+ | Kubelet | <--- On each worker node | (runs on nodes) | +--------+----------+ | v +------------------+ | Container Runtime (Docker/containerd) | | Runs Pods with app containers inside | +------------------+

Step-by-step guide to install Kubernetes (K8s) on Red Hat Enterprise Linux (RHEL) 9.5

 Here’s a step-by-step guide to install Kubernetes (K8s) on Red Hat Enterprise Linux (RHEL) 9.5, using kubeadm, the official Kubernetes tool.


✅ Prerequisites

  1. Root / sudo access

  2. Swap disabled

  3. Docker or containerd installed

  4. Firewall open for Kubernetes ports

  5. Unique hostname, static IP, and DNS resolution for each node


🔧 Step 1: Disable Swap

sudo swapoff -a sudo sed -i '/swap/d' /etc/fstab

What is the difference between devDependencies and dependencies in package.json?

 

🔹 dependencies

Packages your app needs to run in production.

  • Used in the app's runtime code

  • Installed on both development and production environments

  • Example: Frameworks, HTTP clients, database drivers

Example:

"dependencies": {
"express": "^4.18.2", "axios": "^1.6.0" }

📊 Mutual Funds vs Equity vs Futures vs Options: What Should You Choose?

In the world of investing and trading, there are multiple vehicles to grow your money — but they’re not all the same. Here's a clear comparison to help you understand which instrument suits your needs, skills, and risk profile.

🔎 Comparison Table

Feature Mutual Funds Equity (Stocks) Futures Options
Ownership Indirect (via fund manager) Direct (you own shares) Contract-based (buy/sell later) Right to buy/sell, not obligation
Capital Required Low (₹500 SIP possible) Moderate (per share price) High (lot size × price) Low (just the premium)
Risk Level Low to Medium Medium to High High Very High
Return Potential Moderate, stable High (if selected well) High but risky Very high (or zero)
Time Involvement Passive Moderate (needs research) Active, short-term Very active, time-sensitive
Charges Fund fees, exit load STT, brokerage, taxes STT, brokerage, margin fees STT, premium cost, brokerage
Who Manages It? Professional fund manager You You You
Leverage No No Yes (margin) Yes (in-built)
Best For Passive long-term investors Active long-term investors Experienced short-term traders Speculators, hedgers

💸 Why Retail Traders Struggle in the Stock Market: The Charges No One Talks About

Most beginners enter the stock market dreaming of financial freedom. They follow YouTube gurus, try "proven" intraday strategies, and set out to double their capital.

But soon, reality hits — not because they are wrong in analysis, but because the game is rigged with charges that no one talks about.

🧾 The Hidden Cost of Trading: Charges Explained

Let’s say you do a basic intraday Nifty options trade:

  • Buy 1 lot (75 qty) at ₹100
  • Sell at ₹105
  • You make ₹5 x 75 = ₹375 gross profit

Now the charges kick in:

Charge TypeApprox. Amount
Brokerage (₹20 x 2)₹40
STT (on Sell)₹19.69
Exchange Transaction Charges₹5.62
GST (18% on ₹45.62)₹8.21
SEBI Charges₹0.15
Stamp Duty (Buy side only)₹4.50
Total Charges₹78.17
Net Profit₹296.83

🔻 So, even when you're right, you lose 20%+ of your profits to charges.