Skip to content

Instantly share code, notes, and snippets.

View sandeepkv93's full-sized avatar

Sandeep Vishnu sandeepkv93

View GitHub Profile
@sandeepkv93
sandeepkv93 / python3-leetcode-wiki.md
Created October 27, 2025 02:03
Python3 LeetCode Complete Wiki
@sandeepkv93
sandeepkv93 / graphite-cli-guide.md
Created July 14, 2025 14:06
Graphite CLI for Stacked Pull Requests - Complete Guide
@sandeepkv93
sandeepkv93 / cleanup_sensitive_files.md
Created July 12, 2025 01:26
Remove File from All Git Commits

Complete Guide: Remove File from All Git Commits

This guide shows how to permanently delete a file from all commits in a Git repository, including its entire history.

Prerequisites

  • Git installed
  • Python 3.x installed (for git-filter-repo)
  • Administrator/owner access to the repository

✨ Move Top Commit to Stash and Rebase on Latest main

This guide shows how to take the top commit from your current branch, temporarily stash it, update your branch to match the latest main, and then re-apply the stashed changes.


🔧 Use Case

You’ve made one local commit on a feature branch but later realize you want that commit to apply on top of the latest main instead. Rather than rebasing or cherry-picking, you want to:

✅ Use Case: Apply Only Top Commit from a Branch on Top of main

🎯 Goal

From a feature branch, apply only the latest commit on top of the latest main branch — and discard all earlier commits in that branch.


📌 Assumptions

Advanced HashMap Methods in Java - Use Cases & Examples

1. getOrDefault(K key, V defaultValue)

Use Cases:

  • Counting occurrences efficiently.
  • Handling missing keys.
  • Providing default responses.

Example: Word Frequency Counter

@sandeepkv93
sandeepkv93 / maven-google-java-format-guide.md
Last active January 29, 2025 20:19
Automated Java Code Formatting with Maven using google-java-format

Automated Java Code Formatting with Maven using google-java-format

This guide explains how to set up automated code formatting in a Java Maven project using Google's Java code formatter via the fmt-maven-plugin.

Overview

The setup combines two key components:

  • Google Java Format (google-java-format): Google's Java code formatter that enforces Google Java Style
  • Spotify's fmt-maven-plugin: A Maven plugin that integrates google-java-format into the Maven build lifecycle
@sandeepkv93
sandeepkv93 / Setup-Guide.md
Created September 6, 2024 01:18
Software Engineer's Mac Setup Guide

Software Engineer's Mac Setup Guide for 2021 Intel-based Mac

Essential Software and Tools

  1. Xcode Command Line Tools
  2. Homebrew
  3. iTerm2
  4. Zsh and Oh My Zsh
  5. Powerlevel10k
  6. Python 3
@sandeepkv93
sandeepkv93 / settings.json
Created December 6, 2023 10:56
VSCode User Settings
{
"workbench.startupEditor": "newUntitledFile",
"editor.suggestSelection": "first",
"editor.rulers": [160],
"files.exclude": {
"**/.classpath": true,
"**/.project": true,
"**/.settings": true,
"**/.factorypath": true
},