This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Long command with many parameters all on one line | |
Send-MailMessage -From "admin@example.com" -To "user@example.com" -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 = "admin@example.com" | |
To = "user@example.com" | |
Subject = "Test Email" | |
Body = "This is a test email." | |
SmtpServer = "smtp.example.com" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT 'ALTER TABLE ' + QUOTENAME(ss.name) + '.' + QUOTENAME(st.name) + ' ADD created_date DATETIME NULL;' | |
FROM sys.tables st | |
INNER JOIN sys.schemas ss on st.[schema_id] = ss.[schema_id] | |
WHERE st.is_ms_shipped = 0 | |
AND NOT EXISTS ( | |
SELECT 1 | |
FROM sys.columns sc | |
WHERE sc.[object_id] = st.[object_id] | |
AND sc.name = 'created_date' | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Colors | |
RED='\033[0;31m' | |
GREEN='\033[0;32m' | |
NO_COLOR='\033[0m' | |
BLUE='\033[0;34m' | |
YELLOW='\033[0;33m' | |
NO_COLOR='\033[0m' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[*.{cs,vb}] | |
dotnet_diagnostic.CA1062.severity = none | |
# IDE0022: Use block body for method | |
csharp_style_expression_bodied_methods = true | |
# IDE0032: Use auto property | |
dotnet_style_prefer_auto_properties = true | |
#CSharpier Incompatible Rules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<PropertyGroup> | |
<PathMap>$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)'))=./</PathMap> | |
</PropertyGroup> |