Skip to content

Instantly share code, notes, and snippets.

View brunomartinspro's full-sized avatar
🚀

Bruno Martins brunomartinspro

🚀
View GitHub Profile
@brunomartinspro
brunomartinspro / gitflow_branch_regex.txt
Created April 18, 2019 14:15
GitFlow Branch Regex
(^((develop|master)(?!-.*)))|((release|feature|hotfix|task|story)(-.*))
@brunomartinspro
brunomartinspro / newSql.js
Last active April 13, 2022 11:03
Draw.io - SQL Plugin with SQL Server and MySQL Support
/**
* Parse SQL CREATE TABLE. Simple initial version for community to improve.
*/
Draw.loadPlugin(function(ui) {
function TableModel() {
this.Name = null;
this.Properties = []
}
@brunomartinspro
brunomartinspro / docker_azure_ad.ps1
Created September 15, 2021 11:40
Setup docker with azure AD
net localgroup docker-users AzureAD\username /add
# then restart the computer
@brunomartinspro
brunomartinspro / install-devcerts.ps1
Created July 30, 2021 10:22
Install Dotnet Development Certificates
dotnet dev-certs https --trust
@brunomartinspro
brunomartinspro / GroovyWonderland.ps1
Created August 31, 2020 19:44
Groovy Wonderland - Enables locating parallel files in parallel universes!
param ([switch]$delete)
$currentLocation = Get-Location
$counter = 1
if(!$delete) {
Get-ChildItem $currentLocation -Filter "*.groovy" -recurse | Foreach-Object {
Write-Output ("----------------- File Start: " + $_.FullName + "----------------------")
try {
@brunomartinspro
brunomartinspro / Execute_Android_Emulator.ps1
Created July 23, 2020 17:09
Executes the android emulator for a image
cd $env:LOCALAPPDATA\Android\sdk\emulator
.\emulator -avd MY_AVD_NAME
[Environment]::Exit(1)
@brunomartinspro
brunomartinspro / UpdateMasterInAllRepositories.ps1
Last active June 16, 2020 15:00
Update all master branches in all repositories
$currentLocation = get-location
Write-Host("Current Location: $currentLocation")
$directories = Get-Childitem -Path $currentLocation -Directory
foreach($directory in $directories)
{
Write-Host("-------------- Starting $directory --------------")
@brunomartinspro
brunomartinspro / delete_nuget_cache_using_powershell.ps1
Created August 5, 2019 14:05
Delete Nuget Cache using Powershell
$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
brunomartinspro / kubernetes-remove-taints.ps1
Last active January 16, 2020 17:36
Remove taints from kubernetes
#Find the node that has taints
kubectl get nodes
#Edit the node and delete the taint object
#Use :wq to save and quit
kubectl edit node <node-name>
# Give permissions to the dashboar
kubectl create clusterrolebinding kubernetes-dashboard --clusterrole=cluster-admin --serviceaccount=kube-system:kubernetes-dashboard