Skip to content

Instantly share code, notes, and snippets.

View mohasinkr's full-sized avatar
🎯
Focusing

Mohasin K R mohasinkr

🎯
Focusing
View GitHub Profile
import os
import shutil
from pathlib import Path
def delete_node_modules(folder_path="."):
folder = Path(folder_path)
for root, dirs, _ in os.walk(folder):
if "node_modules" in dirs:
node_modules_path = Path(root) / "node_modules"
print(f"Deleting: {node_modules_path}")
/**
* Splits a sentence into two parts based on a focus keyword.
* Handles case-insensitivity and edge cases gracefully.
*
* @param sentence - The full sentence.
* @param focusKeyword - The keyword to highlight.
* @returns An object containing `firstWord` and `lastWord` around the keyword.
*
* 🔹 **Use Case: WordPress ACF (Advanced Custom Fields)**
* - This function can be used in a **React/Next.js frontend** to dynamically highlight keywords
@echo off
set /p input= Enter the PORT
ngrok http --domain=your-ngrok-domain %input%