Skip to content

Instantly share code, notes, and snippets.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@karlospn
karlospn / Dockerfile
Created April 3, 2023 19:58
A Dockerfile using sonarscanner with Pull Request data
FROM mcr.microsoft.com/dotnet/sdk:5.0-buster-slim AS build-env
WORKDIR /app
# Agument for PR
ARG IS_PR
# Argument for the PAT
ARG AZDO_PAT
# Arguments for setting the Sonarqube Token and the Project Key
{
"data": "something"
}
@karlospn
karlospn / .NET6Migration.md
Created November 23, 2021 18:13 — forked from davidfowl/.NET6Migration.md
.NET 6 ASP.NET Core Migration
param (
[Parameter(Mandatory=$true)][string]$personal_access_token,
[Parameter(Mandatory=$true)]$pipelines_permissions,
[Parameter(Mandatory=$true)][string]$group_descriptor,
[Parameter(Mandatory=$true)][string]$project_id,
[Parameter(Mandatory=$true)][string]$repository_name)
# Set the organization
$organization = "cponsn"
// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation
{
"$schema": "https://aka.ms/terminal-profiles-schema",
"copyOnSelect": true,
"theme":"dark" ,
"confirmCloseAllTabs": false,
"launchMode": "maximized",
param (
[Parameter(Mandatory=$true)][string]$gatewayName,
[Parameter(Mandatory=$true)][string]$resGroup,
[Parameter(Mandatory=$true)][string]$appName,
[Parameter(Mandatory=$true)][string]$protocol,
[Parameter(Mandatory=$true)][string]$appServiceHostname,
[Parameter(Mandatory=$true)][string]$pathRulePath)
function GetApplicationGateway($gatewayName, $resGroup)
{
@karlospn
karlospn / Dynamic Sonarqube QualityProfile allocation
Created November 15, 2019 13:51
How to assign a project into a sonarqube qualityprofile using the API
param (
[Parameter(Mandatory=$true)][string]$SonarUrl,
[Parameter(Mandatory=$true)][string]$ProjectName,
[Parameter(Mandatory=$true)][string]$ProjectKey,
[Parameter(Mandatory=$true)][string]$QualityProfile,
[Parameter(Mandatory=$true)][string]$SSMName)
function Get-Credentials{
Parameters:
Ec2Name:
Description: ec2 name
Type: String
Ec2AvailZone:
Description: availability zone
Type: AWS::EC2::AvailabilityZone::Name
RdsAvailZone1:
Description: availability zone
Type: AWS::EC2::AvailabilityZone::Name
@karlospn
karlospn / my-simple-cf-example
Created February 10, 2019 23:14
Simple cloudformation example
Parameters:
ec2Name:
Description: ec2 name
Type: String
availZone:
Description: availability zone
Type: AWS::EC2::AvailabilityZone::Name
myKeyPair:
Description: Amazon EC2 Key Pair
Type: "AWS::EC2::KeyPair::KeyName"