Skip to content

Instantly share code, notes, and snippets.

View guibranco's full-sized avatar
🎯
Focusing

Guilherme Branco Stracini guibranco

🎯
Focusing
View GitHub Profile
@guibranco
guibranco / dependabot.yml
Created April 8, 2026 10:22
Production-ready Dependabot configuration for .NET repositories with support for NuGet, GitHub Actions, Docker, docker-compose, devcontainers, and multi-service src layouts. Includes dependency grouping, reviewer automation, labeling strategy, and reduced-noise container version updates using increase-if-necessary.
version: 2
updates:
#
# NuGet dependencies
#
- package-ecosystem: "nuget"
directory: "/"
@guibranco
guibranco / dependabot.yml
Last active April 21, 2026 16:56
Dependabot template for .NET projects with grouped NuGet updates and GitHub Actions support
version: 2
updates:
#
# NuGet dependencies
#
- package-ecosystem: "nuget"
directory: "/"
schedule:
@guibranco
guibranco / dependabot.yml
Created March 26, 2026 12:29
Reusable Dependabot config template for modern React + Vite projects. Groups related dependencies (React ecosystem, Vite, ESLint, TypeScript, Tailwind, i18n) and GitHub Actions updates to keep PRs organized and manageable. Designed for weekly automated dependency maintenance with reviewer assignment. ⚛️📦🛠️
version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: weekly
open-pull-requests-limit: 50
assignees:
@guibranco
guibranco / check-dep-conflicts.csx
Created September 16, 2025 16:29
Check NuGet conflicts between dependencies
#r "nuget: NuGet.Protocol, 6.9.1"
#r "nuget: NuGet.Versioning, 6.9.1"
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.IO.Compression;
using System.Net.Http;
using System.Text.Json;
@guibranco
guibranco / cleanup.ps1
Created July 1, 2025 15:21
PowerShell cleanup script to remove temporary/packages/modules files from a developer machine
param (
[switch]$DryRun,
[switch]$Verbose
)
# 🕓 Track start time
$StartTime = Get-Date
$LogEntries = @()
# 🛡️ Admin check
@guibranco
guibranco / repo_info_extractor_windows.ps1
Created May 9, 2025 14:36
Extracts developer contribution data from local Git repositories (excluding GitHub) using the CodersRank repo_info_extractor tool for Windows.
<#
.SYNOPSIS
Extracts developer contribution data from local Git repositories (excluding GitHub) using the CodersRank repo_info_extractor tool.
.DESCRIPTION
This script automates the discovery and processing of Git repositories that are **not hosted on GitHub**.
It uses the repo_info_extractor to generate JSON contribution files, which can be uploaded to CodersRank to compute your developer profile score.
.REQUIREMENTS
- The executable `repo_info_extractor_windows.exe` should be in the same directory or in your PATH.
@guibranco
guibranco / cleanup.bat
Created May 9, 2025 14:21
Development Environment Cleanup Script
@echo off
setlocal enabledelayedexpansion
:: Define the list of directories to clean
set DIR_LIST=bin obj node_modules target\debug target\tmp .angular .terraform visuals\traces visuals\videos visuals\screenshots visuals\information
set ADDITIONAL_DIR_LIST=%temp% C:\Windows\Temp C:\Users\%username%\AppData\Local\Temp C:\ProgramData\Microsoft\Windows\WER\ReportQueue C:\Windows\SoftwareDistribution\Download
set VS_CODE_DIR=%APPDATA%\Code\Cache %APPDATA%\Code\Cookies %APPDATA%\Code\LocalStorage %APPDATA%\Code\User\workspaceStorage
set VS_DIR=C:\Users\%username%\AppData\Local\Microsoft\VisualStudio
set PYTHON_CACHE_DIR=%APPDATA%\Local\pip\cache
set GO_CACHE_DIR=%GOPATH%\pkg\mod
@guibranco
guibranco / docker-compose.yml
Created April 26, 2025 14:11
A docker-compose file with: CosmosDB (noSQL), Microsoft SQL Server (SQL), RabbitMQ (queue), Redis (noSQL), SEQ (log), SonarQube (local analysis), and Azurite (storage) services, with health checks and port mappings for local development
services:
cosmosdb:
image: mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator:latest
container_name: cosmosdb
deploy:
resources:
reservations:
cpus: "0.1"
memory: 1.5G
@guibranco
guibranco / sonarcloud.yml
Last active July 19, 2024 12:22
GitHub Actions workflow to build, test, and report to SonarCloud a .NET project.
name: SonarCloud Analysis
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened]
jobs:
@guibranco
guibranco / createIssueIfContentOfFileAndFileExistsViaPostman.js
Last active January 27, 2024 02:14
Create an issue to replace part of a file based on its content (and existence).
const ghToken = pm.globals.get("GH_PAT");
const authorizationHeader = `Authorization: Bearer ${ghToken}`;
const fileName = "appveyor.yml";
const pattern = "ps: $COVERLET_FORMATS = @('cobertura', 'lcov', 'opencover')";
const issueTitle = "Run all coverage formats at once per project";
const issueBody = "**Is your feature request related to a problem? Please describe.**\r\nRun all coverage formats at once per project\r\n\r\n**Describe the solution you'd like**\r\nReplace the actual code:\r\n```ps\r\n- ps: $TEST_PROJECTS = (Get-ChildItem -Path .\Tests\**\ -Recurse -Include *.csproj).Fullname\r\n- ps: $COVERLET_FORMATS = @('cobertura', 'lcov', 'opencover')\r\n- ps: |\r\n foreach($testProject in $TEST_PROJECTS)\r\n {\r\n foreach($coverletFormat in $COVERLET_FORMATS)\r\n {\r\n dotnet test $testProject /p:CollectCoverage=true /p:CoverletOutputFormat=\"$coverletFormat\"\r\n }\r\n }\r\n```\r\n\r\nWith the following code:\r\n```ps\r\n- ps: $TEST_PROJECTS = (Get-ChildItem -Path .\