Skip to content

Instantly share code, notes, and snippets.


Bruno Martins brunomartinspro

View GitHub Profile
brunomartinspro / UpdateallGitRepositoriesInFolder.ps1
Created Nov 7, 2019
Update all Git Repositories in a Folder
View UpdateallGitRepositoriesInFolder.ps1
$currentLocation = get-location
Write-Host("Current Location: $currentLocation")
$directories = Get-Childitem -Path $currentLocation -Directory
foreach($directory in $directories)
Write-Host("-------------- Starting $directory --------------")
brunomartinspro / development.reg
Last active Aug 7, 2019
Add development files to New section of Windows Context Menu
View development.reg
Windows Registry Editor Version 5.00
View delete_nuget_cache_using_powershell.ps1
$Regex = "PROJECTNAME*."
$Path = "$env:LOCALAPPDATA\NuGet"
Get-ChildItem "$Path" -Recurse | Where{$_.Name -Match "$Regex"} | Remove-Item -Recurse -Verbose
Write-Output("Cleaned: $Path")
$Path = "C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\"
Get-ChildItem "$Path" -Recurse | Where{$_.Name -Match "$Regex"} | Remove-Item -Recurse -Verbose
brunomartinspro / modify_net_core_nuget_package_version_using_powershell.ps1
Last active Aug 14, 2019
Modify .Net Core Nuget Package Version using Powershell
View modify_net_core_nuget_package_version_using_powershell.ps1
$filePath = "$(Build.SourcesDirectory)"
$projectNameFilter = "MYBASEPROJECTNAME.*"
Write-Output ("package version: $(NugetVersion)")
Get-ChildItem "$filePath" -Filter "$projectNameFilter.csproj" -recurse | Foreach-Object {
Write-Output ("----------------- CSPROJ FILTER: " + $_.FullName + "----------------------")
try {
$regex = '(?<=<Version>)[^<]*'
View gitflow_branch_regex.txt
brunomartinspro / npm-gui.bat
Last active Dec 12, 2018
NPM Package Manager Graphic User Interface
View npm-gui.bat
npm install -g npm-gui
cd c:\your-prject-folder
npm-gui localhost:9000
brunomartinspro / sqlserverlargecommand
Last active Sep 6, 2018
run large sql server sql queries
View sqlserverlargecommand
sqlcmd -S <server> -i C:\<your file here>.sql
Sqlcmd [-U login id] [-P password]
[-S server] [-H hostname] [-E trusted connection]
[-d use database name] [-l login timeout] [-t query timeout]
[-h headers] [-s colseparator] [-w screen width]
[-a packetsize] [-e echo input] [-I Enable Quoted Identifiers]
[-c cmdend] [-L[c] list servers[clean output]]
[-q "cmdline query"] [-Q "cmdline query" and exit]
View ClearGitCredentials.bat
git config --global credential.helper wincred
brunomartinspro / IISPoolViewer.bat
Last active Aug 22, 2018
View process id of IIS Application Pools
View IISPoolViewer.bat
cd %windir%\system32\inetsrv\
appcmd list wp
brunomartinspro / ADErrorUtils.cs
Created Aug 7, 2018
Reproduce System.AccessViolationException exception when using Active Directory Searcher
View ADErrorUtils.cs
using System;
using System.DirectoryServices;
namespace BrunoMartinsPro.TriggerErrors
public class AdErrorUtils
public void TriggerError()
//Define connection properties