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
using System; | |
using System.Diagnostics; | |
using System.Linq; | |
using System.Net.Http; | |
using System.Threading; | |
using System.Threading.Tasks; | |
using Microsoft.Extensions.DependencyInjection.Extensions; | |
using Microsoft.Extensions.Http; | |
using Microsoft.Extensions.Http.Logging; | |
using Microsoft.Extensions.Logging; |
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
trigger: | |
paths: | |
include: | |
- infrastructure/* | |
stages: | |
- template: 'templates/deploy_infra_stage.yml' | |
parameters: | |
environment: 'test' | |
hostname: 'myservice-test.domain.com' | |
- template: 'templates/deploy_infra_stage.yml' |
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
parameters: | |
environment: '' | |
hostname: '' | |
stages: | |
- stage: deploy_infra_${{ parameters.environment }} | |
variables: | |
resourceGroupName: 'myservice-${{ parameters.environment }}-rg' | |
baseResourceName: 'myservice' | |
environment: ${{ parameters.environment }} | |
keyvaultId: 'common-${{ parameters.environment }}-kv' |
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
verboten = [ | |
'utm_source' | |
, 'utm_medium' | |
, 'utm_content' | |
, 'utm_campaign' | |
, 'utm_term' | |
, 'ei' | |
, 'gs_l' |
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
stages: | |
- stage: CreateArtifacts | |
jobs: | |
- job: CreatesArtifacts | |
steps: | |
- script: dotnet publish -c Release ./src/MyProj/MyProj.csproj | |
- upload: ./src/MyProj/bin/Release/netcoreapp3.1/publish/ | |
artifact: myprojartifact | |
- stage: Deploy | |
jobs: |
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
# https://docs.microsoft.com/en-us/azure/devops/repos/git/use-ssh-keys-to-authenticate?view=azure-devops#i-have-multiple-ssh-keys--how-do-i-use-different-ssh-keys-for-different-ssh-servers-or-repos | |
Host ssh.dev.azure.com | |
AddKeysToAgent yes | |
UseKeychain yes | |
IdentityFile ~/.ssh/id_rsa.azureaccount | |
IdentitiesOnly yes | |
User git | |
Host * |
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
FROM ubuntu:16.04 | |
ENV DOTNET_CLI_TELEMETRY_OPTOUT 1 | |
ENV DOTNET_SKIP_FIRST_TIME_EXPERIENCE 1 | |
# Enable SSL | |
RUN apt-get update \ | |
&& apt-get install -y apt-transport-https curl tzdata git \ | |
&& apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF \ | |
&& echo "deb http://download.mono-project.com/repo/ubuntu stable-xenial main" | tee /etc/apt/sources.list.d/mono-official-stable.list \ |
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
@echo off | |
SET CMDER_ROOT=C:\tools\cmder | |
"cmd" /k ""%CMDER_ROOT%\vendor\init.bat"" |
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
#Make a list with all WiFi SSID's and passwords stored locally on Windows OS. | |
$output = netsh.exe wlan show profiles | |
$profileRows = $output | Select-String -Pattern 'All User Profile' | |
$profileNames = New-Object System.Collections.ArrayList | |
#for each profile name get the SSID and password | |
for($i = 0; $i -lt $profileRows.Count; $i++){ | |
$profileName = ($profileRows[$i] -split ":")[-1].Trim() | |
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
docker ps -a -q -f status=exited -f status=created | foreach-object {docker rm -f $PSItem.toString() } | |
docker images | select-string "<none>" | ConvertFrom-String) | Select -ExpandProperty "P3" |
NewerOlder