Skip to content

Instantly share code, notes, and snippets.

View rupeshtiwari's full-sized avatar
🎯
Focusing

Rupesh Tiwari rupeshtiwari

🎯
Focusing
View GitHub Profile
@rupeshtiwari
rupeshtiwari / install redis on macos.md
Last active March 12, 2024 05:10
install redis on macos

Installing and running Redis on macOS can be done in several ways, including using Homebrew (a package manager for macOS), downloading and compiling from source, or running it as a Docker container. The simplest method for most users is via Homebrew.

Installing Redis with Homebrew:

  1. Install Homebrew: If you don't already have Homebrew installed on your Mac, open the Terminal app and run the following command. This script installs Homebrew itself.

    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
#!/bin/bash
# Directory structure:
# Videos/
# |-- convert_to_wav.sh
# |-- vid-en-m2/
# |-- vid-en-m3/
# `-- ... and so on for each module ...
# Script to convert MP4 to WAV, merge, and update sample rate.
@rupeshtiwari
rupeshtiwari / indexing performance in opensearch.md
Last active March 8, 2024 21:42
indexing performance in opensearch

Optimize your Elasticsearch/OpenSearch indexing performance with these key adjustments:

  1. Java Heap Size:

    • Default: Varies.
    • Recommended: 50% of RAM.
    • Example: For 32GB RAM, set heap size to 16GB.
  2. Flush Translog Threshold:

    • Default: 512MB.
  • Recommended: Increase to 25% of Java heap.
@rupeshtiwari
rupeshtiwari / getting started with python.md
Created March 7, 2024 21:53
getting started with python

Getting started with Python on a Mac with an M1 chip is a straightforward process. Below, I'll guide you through the steps to set up Python, create a simple "Hello, World!" program, and run it to see the output.

Step 1: Check Python Installation

macOS comes with Python pre-installed, but it's usually Python 2.7. Since you'll want to use Python 3, you should first check if it's already installed:

  1. Open the Terminal app (you can find it using Spotlight search by pressing Cmd + Space and typing "Terminal").
  2. Type python3 --version and press Enter. If you see a version number (e.g., Python 3.x.x), Python 3 is installed. If not, you'll need to install it.

Step 2: Install Python 3 (if necessary)

@rupeshtiwari
rupeshtiwari / mongodb atlas setup on macos.md
Last active February 23, 2024 20:15
mongodb setup on macos , installation apple, mongodb atlas, mongodb on cloud, mongodb, windows, macos, linux
@rupeshtiwari
rupeshtiwari / Amazon OpenSearch Multi-Tenancy Architecture Guideline.md
Last active February 22, 2024 01:14
Amazon OpenSearch Multi-Tenancy Architecture Guideline

When designing a multi-tenancy architecture with Amazon OpenSearch, consider the following key points:

  • Partitioning: Decide on the data partitioning strategy to effectively manage and segregate tenant data.
  • Isolation: Ensure tenant isolation for security and performance, addressing any "noisy neighbor" conditions.
  • Deployment: Strategize on deployment models that align with the scale and agility required for your SaaS solution.
  • Management: Implement management practices that streamline operations across all tenants within the service.
  • Noisy Neighbor Impact: Assess and mitigate the impact of noisy neighbors on your chosen partitioning model to maintain service quality.

Amazon OpenSearch Data Partition Models

@rupeshtiwari
rupeshtiwari / Restoration Times from S3 Snapshots for Amazon OpenSearch Clusters.md
Created February 20, 2024 18:19
Restoration Times from S3 Snapshots for Amazon OpenSearch Clusters

Quick Guide: Understanding Restoration Times from S3 Snapshots for OpenSearch Clusters

In the world of cloud computing and data management, ensuring your disaster recovery (DR) strategy is both robust and efficient is paramount. One common approach involves using Amazon S3 snapshots for backup and restoration. But a key question arises: How long does it take to restore from an S3 snapshot based on data volume? Let's dive into the factors that influence this process and some best practices to optimize your DR setup.

Key Factors Influencing Restoration Time

Restoration times can vary widely due to several factors:

@rupeshtiwari
rupeshtiwari / amazon opensearch serverless.md
Last active February 21, 2024 21:33
amazon opensearch serverless decision tree, select serverless,

Amazon OpenSearch Service Selection Guide: OpenSearch Service or Serverless which one is good for me?

Deciding between OpenSearch Domain and OpenSearch Serverless hinges on specific requirements. This guide provides a straightforward comparison based on operational capabilities, restrictions, and AWS documentation.

Detailed Key Considerations for Choosing Amazon OpenSearch Serverless:

  • Client Compatibility: OpenSearch Serverless demands OpenSearch 2.x compatibility. Incompatible clients should opt for OpenSearch Domain.
@rupeshtiwari
rupeshtiwari / ddd event storming.md
Last active February 15, 2024 00:10
ddd event storming example

📚 Monolithic BookStoreHub DDD Event Storming Details

Event Storming session for the BookStoreHub, we delved deeper into the process, meticulously identifying and defining bounded contexts through the lens of events, commands, and their interactions. Here's the detailed exploration and collaborative synthesis of our findings. In our recent Event Storming session, we gathered the team including developers, scrum masters, testers, architects, and business stakeholders as domain experts, around a whiteboard, armed with sticky notes and markers. We started mapping out the flow of events and commands within our monolithic app.

bounded-contexts

Team 1's Detailed Findings:

  • Events Identified: OrderPlaced, StockChecked, ReviewSubmitted
  • Commands: CreateOrder, CheckStock, SubmitReview
@rupeshtiwari
rupeshtiwari / IDS-IPS protection on AWS cloud.md
Last active December 14, 2023 15:38
IDS-IPS protection on AWS cloud

Defence in Depth on AWS Cloud AWS IDS/IPS Solutions

IDS/IPS detect and block the traffic at perimeter level only.

  1. AWS Guard Duty - CloudTrail, VPC Flow and DNS logs. Intelligent detect threats, Take action with SNS. Problem : It can't protect perimeter.
  2. AWS WAF - Create policy in (Amazon cloudfront, Application loadbalancer, Amazon API Gateway), Block & Filter and Monitor

image

  1. AWS Marketplace Host-based IDS/IPS solutions: