This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static String inferTypeName(String raw) { | |
if (raw == null || raw.isBlank()) return CellType.BLANK.name(); | |
if (isBoolean(raw)) return CellType.BOOLEAN.name(); | |
if (isNumeric(raw)) return CellType.NUMERIC.name(); | |
if (isDateLike(raw)) return "DATE"; // Excel stores dates as NUMERIC + date format | |
return CellType.STRING.name(); | |
} | |
private static boolean isBoolean(String s) { | |
return "true".equalsIgnoreCase(s) || "false".equalsIgnoreCase(s); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Requires -Version 5.1 | |
<# | |
Flattens a Maven multi-module Spring Boot project into a single module structure. | |
Namespace-safe: avoids invalid POM XML node access by using local-name() XPath. | |
#> | |
[CmdletBinding()] | |
param( | |
[Parameter(Mandatory = $false)] | |
[string]$ProjectPath = (Get-Location).Path, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Requires -Version 5.1 | |
<# | |
.SYNOPSIS | |
Flattens a Maven multi-module Spring Boot project into a single module structure. | |
.DESCRIPTION | |
This script safely converts a Maven multi-module project into a single module by: | |
- Creating backups | |
- Merging source code from all submodules | |
- Consolidating dependencies from all POMs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Remove-GitBranch { | |
param ( | |
[Parameter(Mandatory = $true)] | |
[string]$BranchName, | |
[Parameter(Mandatory = $false)] | |
[string]$RepoPath = (Get-Location).Path, | |
[Parameter(Mandatory = $false)] | |
[switch]$Force |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Update-GitRepositoriesInParallel { | |
param ( | |
[Parameter(Mandatory = $false)] | |
[string]$RootPath = (Get-Location).Path, | |
[Parameter(Mandatory = $false)] | |
[int]$MaxThreads = 8, | |
[Parameter(Mandatory = $false)] | |
[switch]$FetchOnly |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Get-DockerStatus { | |
[CmdletBinding()] | |
param() | |
# Check if Docker is running | |
try { | |
$null = docker info 2>&1 | |
} | |
catch { | |
Write-Host "🔴 Docker service is not running!" -ForegroundColor Red |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[alias] | |
# Interactive rebase with the given number of latest commits | |
reb = "!r() { git rebase -i HEAD~$1; }; r" | |
# Find commits by commit message | |
find = "!f() { git log --pretty=format:'%C(yellow)%h %Cblue%ad %Creset%s%Cgreen [%cn] %Cred%d' --decorate --date=short --grep=$1; }; f" | |
# List contributors with number of commits | |
contributors = shortlog --summary --numbered |