Skip to content

Instantly share code, notes, and snippets.

View DiwashDev's full-sized avatar

Diwash Dev DiwashDev

  • 06:14 (UTC +08:00)
View GitHub Profile
@DiwashDev
DiwashDev / add_website_id_to_crispchat.py
Last active August 21, 2025 03:22
MongoDB Python script to add website_id to auth_info if it doesn't exist. The website_id value will be taken from account_info.crm_id
import argparse
from pymongo import MongoClient, errors
def add_website_id_to_auth_info(mongo_uri, database_name, collection_name):
"""
MongoDB Python script to add website_id to auth_info if it doesn't exist.
The website_id value will be taken from account_info.crm_id
Only processes documents with crm_platform = "crispchat" and status = "Active"
@DiwashDev
DiwashDev / install-trivy.sh
Created October 6, 2025 05:30
Trivy Security Scanner Installation Script
#!/bin/bash
# Trivy Security Scanner Installation Script
# Supports: Ubuntu/Debian, RHEL/CentOS/Fedora, Arch, openSUSE, Alpine, macOS
# Version: Latest stable release
set -e
# Colors for output
RED='\033[0;31m'