Skip to content

Instantly share code, notes, and snippets.

View mehdi89's full-sized avatar
💭
looking for new opportunities

Mehedi Hasan mehdi89

💭
looking for new opportunities
  • TubeOnAI
  • Dhaka, Bangladesh
  • 15:55 (UTC -12:00)
View GitHub Profile
@mehdi89
mehdi89 / README.md
Last active June 4, 2026 10:13
smokeping-connectivity — one-shot internet disconnect monitor (Docker, Linux/macOS). Graphs latency+loss to Google/Cloudflare/Quad9 every 60s; gaps show when/how long you were offline. Localhost-only dashboard.

smokeping-connectivity

A one-command internet disconnect monitor. It runs SmokePing in Docker and graphs your connection to Google, Cloudflare, and Quad9 (plus your LAN gateway, if detectable) every 60 seconds.

The graphs tell you when your internet dropped and how long it was out — the "smoke" bands show latency jitter and packet loss, and flat gaps mark full outages. The dashboard is bound to localhost only, so it's private by default.

Works on Linux and macOS. The only requirement is Docker.


@mehdi89
mehdi89 / framework.md
Created November 3, 2025 07:41
qa-automation-framework-for-big-projects

Automation Framework - Complete Architecture Analysis

📋 Executive Summary

This is a BDD (Behavior-Driven Development) E2E Testing Framework that combines:

  • Playwright for browser automation
  • Cucumber.js for BDD testing with Gherkin syntax
  • TypeScript for type-safe development
  • Qase Test Management System for test case management and reporting
  • Page Object Model (POM) design pattern for maintainability
@mehdi89
mehdi89 / ios app attestation.md
Created June 29, 2024 10:32
ios app attestation.md

To implement and test App Attestation for iOS using DeviceCheck and a Next.js backend, you can follow these steps:

iOS Implementation

  1. Add DeviceCheck to your project:

    • Ensure your project has the DeviceCheck framework.
  2. Request DeviceCheck token:

    import DeviceCheck

Here is you Trip Plan

Here is the detailed 7-day itinerary for the trip to Kashmir, India from Jan 25-Feb 15:

Day 1: Arrival and Check-in

  • Arrive at Srinagar Airport and transfer to Hotel Snow Land Srinagar, one of the popular luxury hotels in Kashmir. Get settled in and relax after the long journey.
  • Enjoy the local cuisine for dinner at the hotel's restaurant.
  • Budget: Flight cost - $166, Hotel - $120 per night, Meals - $30
@mehdi89
mehdi89 / create a user as ubuntu after creating a new droplet in digital ocean and allow ssh sudo.md
Created December 20, 2023 16:29
create a user as ubuntu after creating a new droplet in digital ocean and allow ssh sudo

To create a new user with sudo privileges and enable SSH access on an Ubuntu system after creating a new droplet, follow these steps:

  1. Log in to the Droplet: Use SSH to log in to the droplet as the root user.

    ssh root@your_droplet_ip
  2. Create a New User: Replace username with the desired username.

@mehdi89
mehdi89 / install_node_exporter.sh
Last active December 16, 2022 11:34
Install latest node_exporter in ubuntu with one command
wget https://github.com/prometheus/node_exporter/releases/download/v1.5.0/node_exporter-1.5.0.linux-amd64.tar.gz
tar xvzf node_exporter-*.tar.gz
mv node_exporter-*/node_exporter /usr/local/bin/
# Create a node_exporter user
useradd --no-create-home --shell /bin/false node_exporter
# Set the ownership of the node_exporter binary to the node_exporter user
@mehdi89
mehdi89 / mysql_root.sh
Last active November 24, 2022 07:12
How to set mysql root password after install mysql-server in Ubuntu 22.04
# For DEV Server
sudo systemctl stop mysql.service
sudo systemctl status mysql.service
sudo systemctl set-environment MYSQLD_OPTS="--skip-networking --skip-grant-tables"
sudo systemctl start mysql.service
sudo systemctl status mysql.service
sudo mysql -u root
flush privileges;
@mehdi89
mehdi89 / generateDeployKey.sh
Created May 26, 2022 07:33
generate separate deploy keys for github repos in a os
#!/bin/sh
# This script generates a ssh key for a single repository
# and adds a custom configuration to the users (not global) ssh config file,
# and outputs the public key for you to copy and paste as the repo deploy key
# and outputs the url for you to clone the repo on the machine.
# Github docs ref:
# https://docs.github.com/en/developers/overview/managing-deploy-keys#using-multiple-repositories-on-one-server
#
# 1. Add the script to the user account of the machine. The home directory is fine.
# 2. Make the script executable by running the following command as the user:
@mehdi89
mehdi89 / pro_zsh.sh
Last active December 20, 2022 09:52
Pro ZSH
#!/bin/bash
sudo sed -i 's/auth required pam_shells.so/auth sufficient pam_shells.so/' /etc/pam.d/chsh
sudo apt install curl wget git zsh -y
sudo chsh -s $(which zsh)
#install ohmyzsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended
/usr/bin/zsh
@mehdi89
mehdi89 / change_instance.sh
Last active February 11, 2023 07:42
Stop and start a AWS EC2 instance from terminal
#! /bin/bash
INSTANCEID="i-08b39a2442179285a"
INSTANCETYPE=$1
echo "instance id: $INSTANCEID"
echo "instance type: $INSTANCETYPE"
#2>&1 > /dev/null to suppress the cli output
# get instance details to check the current instance type