Skip to content

Instantly share code, notes, and snippets.

View joelsodias's full-sized avatar
🏠
Working from home

Joelso Dias joelsodias

🏠
Working from home
View GitHub Profile
@joelsodias
joelsodias / context-menu.ps1
Last active March 27, 2025 19:45
Windows 11_Enable or Disable 'Show more options' context menu for Current User using Command
# Define script parameters
param (
[Parameter(Mandatory=$false)]
[ValidateSet("enable", "disable")]
[string]$Action
)
# Function to display help message
function Show-Help {
Write-Host "Usage: .\context-menu.ps1 -Action <enable|disable>" -ForegroundColor Cyan
@joelsodias
joelsodias / add-dotnet-to-context-menu.reg
Last active September 18, 2024 11:22
Add dotnet to windows shell context menu
Windows Registry Editor Version 5.00
; Add context menu for folders
[HKEY_CLASSES_ROOT\Directory\shell\Dotnet_Build]
@="Dotnet Build"
"Icon"="C:\\Program Files\\dotnet\\dotnet.exe,0"
[HKEY_CLASSES_ROOT\Directory\shell\Dotnet_Build\command]
@="cmd.exe /k cd \"%1\" && for %%I in (.) do title Build - %%~nI && dotnet build"
@joelsodias
joelsodias / local-certificate.ps1
Created February 28, 2024 11:05
Create local certificate with mkcert
mkcert local "*.local" localhost 127.0.0.1 ::1
@joelsodias
joelsodias / git-branch-aging.sh
Created February 27, 2024 11:54
GIT- bash - check branch aging
#!/bin/bash
# Fetch the latest changes from the remote repository
git fetch
# Get the list of all branches (excluding main)
branches=($(git branch -r | grep -v 'origin/main' | sed 's/origin\///' | tr -d ' '))
# Loop through each branch and compare with main
for branch in "${branches[@]}"; do
@joelsodias
joelsodias / git-branch-aging.ps1
Created February 27, 2024 11:54
GIT - Powershell - Check branch aging
# Fetch the latest changes from the remote repository
git fetch
# Get the list of all branches (excluding main)
$branches = git branch -r | Where-Object { $_ -notlike '*origin/main*' } | ForEach-Object { $_.Trim() -replace 'origin/', '' }
# Create an array to store branch information
$results = @()
# Loop through each branch and compare with main
@joelsodias
joelsodias / script-powershell-install-monhodb-docker.ps1
Last active February 3, 2024 17:10
script powershell to install mongodb using docker
docker run -d --name dev-mongodb -p 27017:27017 -e MONGO_INITDB_ROOT_USERNAME=devuser -e MONGO_INITDB_ROOT_PASSWORD=devpass12345678 mongo
@joelsodias
joelsodias / install-docker-tooling-base.sh
Created September 8, 2023 22:03
Base tooling linux docker installation
#!/bin/bash
set -e
echo "******************************************************************************************"
echo "** UPDATING BASE IMAGE TOOLS **"
echo "******************************************************************************************"
apt-get update
@joelsodias
joelsodias / install-chrome-browser-and-driver.sh
Created September 8, 2023 21:58
script to Install latest chrome and chromedriver
#!/bin/bash
set -e
echo "******************************************************************************************"
echo "** INSTALLING CHROME BROWSER **"
echo "******************************************************************************************"
ARCH=$(dpkg --print-architecture)
@joelsodias
joelsodias / script.mongo.remove.collection.field.inside.array.js
Last active February 3, 2024 17:11
script js mongo to remove a collection field inside an array
db.mycollection.updateMany({}, { $unset: { "arrayProperty.$[].fieldToRemove": "" } });
@joelsodias
joelsodias / script.mongo.remove.field.from.collection.js
Last active February 3, 2024 17:20
script js mongo to remove a field from a collection
db.mycollection.updateMany({}, { $unset: { "fieldToRemove": "" } });