Skip to content

Instantly share code, notes, and snippets.

View disouzam's full-sized avatar
🚲

Dickson Souza disouzam

🚲
View GitHub Profile
# Long command with many parameters all on one line
Send-MailMessage -From "[email protected]" -To "[email protected]" -Subject "Test Email" -Body "This is a test email." -SmtpServer "smtp.example.com" -Port 587 -UseSsl -Credential (Get-Credential) -Attachments "C:\path\to\file.txt" -Priority High -DeliveryNotificationOption OnSuccess, OnFailure
# Equivalent command using splatting for readability
$mailParams = @{
From = "[email protected]"
To = "[email protected]"
Subject = "Test Email"
Body = "This is a test email."
SmtpServer = "smtp.example.com"
@fernandobarbalho
fernandobarbalho / servidores_nivel_superior.sql
Created April 11, 2025 16:48
Busca a proporção de servidores com nível superior para os municípios brasileiros usando dados da RAIS
# Os dados estão presentes no repositório big query da base dos dados
SELECT id_municipio,
count(*) as quantidade_nivel_superior,
( select count(*)
from `basedosdados.br_me_rais.microdados_vinculos` vinc_sub
where vinc_sub.id_municipio = vinc.id_municipio and
ano = 2023 and
vinculo_ativo_3112 ="1" and
natureza_juridica = "1244") as total_servidores_municipio, #1244= município