Skip to content

Instantly share code, notes, and snippets.

Avatar
☁️
Developing

Bruno Martins brunomartinspro

☁️
Developing
View GitHub Profile
@brunomartinspro
brunomartinspro / docker_azure_ad.ps1
Created Sep 15, 2021
Setup docker with azure AD
View docker_azure_ad.ps1
net localgroup docker-users AzureAD\username /add
# then restart the computer
@brunomartinspro
brunomartinspro / install-devcerts.ps1
Created Jul 30, 2021
Install Dotnet Development Certificates
View install-devcerts.ps1
dotnet dev-certs https --trust
@brunomartinspro
brunomartinspro / GroovyWonderland.ps1
Created Aug 31, 2020
Groovy Wonderland - Enables locating parallel files in parallel universes!
View GroovyWonderland.ps1
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 Jul 23, 2020
Executes the android emulator for a image
View Execute_Android_Emulator.ps1
cd $env:LOCALAPPDATA\Android\sdk\emulator
.\emulator -avd MY_AVD_NAME
[Environment]::Exit(1)
@brunomartinspro
brunomartinspro / UpdateMasterInAllRepositories.ps1
Last active Jun 16, 2020
Update all master branches in all repositories
View UpdateMasterInAllRepositories.ps1
$currentLocation = get-location
Write-Host("Current Location: $currentLocation")
$directories = Get-Childitem -Path $currentLocation -Directory
foreach($directory in $directories)
{
Write-Host("-------------- Starting $directory --------------")
@brunomartinspro
brunomartinspro / kubernetes-remove-taints.ps1
Last active Jan 16, 2020
Remove taints from kubernetes
View kubernetes-remove-taints.ps1
#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
View kubernetes-create-service-account-with-permissions.ps1
########################################################################################################################
# Create a Service account and link it to the default namespace. #
# For example, we configure azure devops to use a Kubernetes Service Connection with a secret (yaml file) #
########################################################################################################################
# Create service account
kubectl create serviceaccount <service-account-name>
# Get secrets from the created service account
kubectl get serviceaccounts <service-account-name> -o yaml
View kubernetes-dashboard-untaint.ps1
kubectl get nodes
#View nodes that have scheduling disabled
kubectl uncordon <node-name>
#restart server
@brunomartinspro
brunomartinspro / Dockerfile
Created Nov 20, 2019
Windows Dockerfile: Installing git in silent mode
View Dockerfile
run mkdir git
COPY Dependencies\\Git-2.24.0.2-64-bit.exe git
RUN powershell . C:\\git\\Git-2.24.0.2-64-bit.exe /VERYSILENT /NORESTART /NOCANCEL /SP- /CLOSEAPPLICATIONS /RESTARTAPPLICATIONS /COMPONENTS="icons,ext\reg\shellhere,assoc,assoc_sh"