Skip to content

Instantly share code, notes, and snippets.

View sarvsav's full-sized avatar
🌲
golang - green developer

Sarvsav Sharma (Max) sarvsav

🌲
golang - green developer
View GitHub Profile
@sarvsav
sarvsav / main.go
Created August 31, 2025 18:40
Script to generate the vault secret store path
// For generating vault secret store path
// It is a part of medium blog
package main
import (
"fmt"
"os"
"regexp"
"strings"
@sarvsav
sarvsav / process_checker.sh
Created August 4, 2025 15:49
A script to check whether the process is alive or running
#!/bin/bash
# ==============================================================================
# Script Name: process_checker.sh
# Description: Checks if a specific process is currently running.
# This script uses 'pgrep' for a reliable check and returns a
# clear exit code.
# Usage: ./process_checker.sh <process_name>
#
# Exit Codes:
@sarvsav
sarvsav / monthly-release-cycle.md
Last active July 23, 2025 08:54
monthly-release-cycle

Every month on 21st, we take the features that are highly voted.

We mark them, if they are ready to be released in next cycle. We release a new version every 20th of the month.

Version Strategy

YYYY.MM, for example: 2025.07 for July release

@sarvsav
sarvsav / tools_for_life.md
Last active August 5, 2025 08:01
Bookmarks tools for daily life
@sarvsav
sarvsav / engineering_quotes.md
Created March 10, 2025 08:19
List of good engineering quotes found over the internet, books, and other places

A little copying is better than little dependency.

#SoftwareEngineering #BestPractices #programming #golang


Laws of Software Architecture:

  1. Everything in software architecture is a trade-off.
  2. Why is more important than how.
  1. How to map the git bash home folder in windows?

Open git bash and cd to root folder and type explorer . and it will open the folder in windows.

@sarvsav
sarvsav / download_latest_release.sh
Created March 5, 2024 20:12
Download the latest release from the github repo
#!/bin/bash
# Check if jq is installed
if ! command -v jq &> /dev/null; then
echo "jq is required but it's not installed. Please install jq first."
exit 1
fi
# Check if curl is installed
if ! command -v curl &> /dev/null; then
@sarvsav
sarvsav / packages.sh
Created April 15, 2023 20:57
Installing packages to bin directory
## Create a bin directory in your home directory, if not exists
mkdir -p ~/bin
## find the url for latest version of the hadolint
latest_hadolint=$(curl -sL https://api.github.com/repos/hadolint/hadolint/releases/latest | jq -r '.assets[].browser_download_url' | grep -i windows | grep -iv 256)
## Download the hadolint binary to the bin directory
curl -sL $latest_hadolint -o ~/bin/hadolint.exe
@sarvsav
sarvsav / Makefile
Created April 10, 2023 20:00 — forked from thomaspoignant/Makefile
My ultimate Makefile for Golang Projects
GOCMD=go
GOTEST=$(GOCMD) test
GOVET=$(GOCMD) vet
BINARY_NAME=example
VERSION?=0.0.0
SERVICE_PORT?=3000
DOCKER_REGISTRY?= #if set it should finished by /
EXPORT_RESULT?=false # for CI please set EXPORT_RESULT to true
GREEN := $(shell tput -Txterm setaf 2)
@sarvsav
sarvsav / Information.md
Created January 27, 2022 15:51
Excel data

Step 1: Export the file to csv format.
Step 2: Remove the empty rows from the file by running below command:

grep -iv ",,,,," file_name.csv > data_clean.csv

Step 3: Run below script

#!/usr/bin/env bash
echo "" > data_cleaned.csv
counter=0