Skip to content

Instantly share code, notes, and snippets.

View DineshSolanki's full-sized avatar
:octocat:
Looking for java roles

Dinesh Solanki DineshSolanki

:octocat:
Looking for java roles
View GitHub Profile
@DineshSolanki
DineshSolanki / getRemotes.bat
Created April 5, 2024 04:02
Get remote links of a multi-repo folder
@echo off
setlocal EnableDelayedExpansion
cd /D "C:\Projects\multi-repo"
REM Create a new CSV file or clear the existing one:
echo. > repos.csv
REM Loop over each subfolder (each individual repository)
for /D %%d in (*) do (
cd %%d
@DineshSolanki
DineshSolanki / ChangeRemote.bat
Last active April 5, 2024 04:23
Change remote based on file generated from getRemote.bat
@echo off
setlocal EnableDelayedExpansion
REM Define your multi-repo folder path here:
set "multiRepoDir=path\to\your\multi-repo\folder"
cd /D "%multiRepoDir%"
REM Get the script directory
set "scriptDir=%~dp0"
@DineshSolanki
DineshSolanki / intellijAi.md
Last active June 28, 2024 08:07
Commit generation AI prompt

commit

  Avoid overly verbose descriptions or unnecessary details.
  Start with a short sentence in imperative form, no more than 50 characters long.
  Then leave an empty line and continue with a more detailed explanation.
  Write only one sentence for the first part starting with the type of commit such as chore:,fix:,feature:, and two or three sentences at most for the detailed explanation.

Check proper logging

Check the following code for proper logging practices:
@DineshSolanki
DineshSolanki / export.ps1
Created January 12, 2025 08:45
Save Windows environment variables to restore to another PC
# Export current environment variables
$currentDate = Get-Date -Format "yyyyMMdd_HHmmss"
$exportPath = ".\env_backup_$currentDate"
# Create export directory if it doesn't exist
New-Item -ItemType Directory -Force -Path $exportPath
# Get all environment variables from different scopes
$machineEnv = [System.Environment]::GetEnvironmentVariables('Machine')
$userEnv = [System.Environment]::GetEnvironmentVariables('User')