Skip to content

Instantly share code, notes, and snippets.

View prashantdivate's full-sized avatar
🏠
Working from home

Prashant Divate prashantdivate

🏠
Working from home
  • Banglore
View GitHub Profile
@prashantdivate
prashantdivate / ztest
Created November 1, 2025 08:52
ZRAM test utility
#!/bin/sh
set -eu
SIZE_MB="${1:-900}" # MB to write into tmpfs (default 900)
TMPFS_MB="${TMPFS_MB:-1024}" # tmpfs size
MOUNT_DIR="/mnt/zramtest"
FILE="$MOUNT_DIR/bigfile"
need() { command -v "$1" >/dev/null || { echo "missing: $1"; exit 1; }; }
@prashantdivate
prashantdivate / eMMC-health-check
Created November 18, 2024 17:02
This script is designed to monitor the health and performance of an eMMC storage device by analyzing key metrics such as: Remaining Life Percentage: Estimates the remaining lifespan of the eMMC based on life estimation registers. Erase Count Statistics: Provides the maximum and average erase counts for both MLC and SLC areas. Wear-Leveling Effic…
#!/bin/sh
fetch_erase_count(){
echo -e "\nfetch eMMC erase count to calculate wear-level efficiency...\n"
erase_output=$(mmc kioxia erase-count $mmcdev)
# Parse max and avg erase counts from the output
max_erase=$(echo "$erase_output" | awk '/Maximum value of erase count in MLC area:/ {print $NF}')
avg_erase=$(echo "$erase_output" | awk '/Average value of erase count in MLC area:/ {print $NF}')
@prashantdivate
prashantdivate / .tmux.conf
Created August 22, 2024 03:46
tmux configurations for better terminal visuals
# ~/.tmux.conf
# unbind default prefix and set it to ctrl-a
unbind C-b
set -g prefix C-a
bind C-a send-prefix
bind r source ~/.tmux.conf\\; display "~/.tmux.conf sourced!"
# make delay shorter
set -sg escape-time 0
@prashantdivate
prashantdivate / Bitbake-cheatsheet.md
Last active August 22, 2024 03:44
Helpful bitbake commands while working with Yocto project

Bitbake Cheatsheet

Verbose logs of your recipe

bitbake -vDDD 

List recipes

bitbake -s
@prashantdivate
prashantdivate / git-cheat-sheet.md
Last active August 22, 2024 03:44
Use git like a pro using command line cheats

Creating new tag for git repo:

  git checkout <branch-name>                  # checkout the branch you want to add the tag
  git tag -a <tag-name> -m "added new Tag"    # create new tag
  git push origin <tag-name>                  # push the new tag to remote repo

For open-source contribution create and submit patch using git commands

 git checkout -b