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
param | |
( | |
[parameter(Mandatory=$true,HelpMessage="The target Azure DevOps Instance")] | |
$org, | |
[parameter(Mandatory=$true,HelpMessage="The new project name")] | |
$projectName, | |
[parameter(Mandatory=$true,HelpMessage="A PAT with access to target org")] | |
$pat |
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
variables: | |
# the variable used to filter the KeyVault secret list | |
# This can be a simple prefix and wildcard e.g. 'Config-*'' | |
# Or a more complex regex expression e.g. ^(?:Config-*|Settings-*) | |
- name: KV-Filter | |
value: '^(?:Config-*|Settings-*)' | |
# the variable used to KeyVault name | |
- name: KV-Name | |
value: 'bm-kv1' |
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
param | |
( | |
# The OWASP results XML file | |
$input = "dependancy-results.xml", | |
# The SonarCloud generic issue JSON file | |
$output = "dependancy-results.json", | |
# The file to associate issues with | |
$filename = "c:\folder\file.cs" | |
) |
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
function Get-AgentPoolForNamedAgent { | |
param | |
( | |
$pat, | |
$url, | |
$agentName | |
) | |
$patToken = [System.Convert]::ToBase64String([System.Text.Encoding]::ASCII.GetBytes(":$($pat)")) |
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
$basepath = "C:\tmp\bmBlog\content" | |
$files = Get-ChildItem -path $basepath -Filter "*.md" -Recurse | % { $_.FullName} | |
foreach ($file in $files) { | |
$f = get-item $file | |
$content = (Get-Content -path $f.FullName) | |
foreach ($l in $content) { | |
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
'use strict'; | |
/*** | |
Usage: blog2md b|w <BLOGGER/WordPress BACKUP XML> <OUTPUT DIR> | |
*/ | |
const fs = require('fs'); | |
const os = require('os'); |
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
param | |
( | |
[parameter(Mandatory = $true, HelpMessage = "Azure DevOps PAT token")] | |
$pat, | |
[parameter(Mandatory = $true, HelpMessage = "URL of Azure DevOps instance e.g. https://dev.aure.com/myinstance")] | |
$url, | |
[parameter(Mandatory = $true, HelpMessage = "Azure DevOps Agent Pool name")] | |
$pool , | |
[parameter(Mandatory = $true, HelpMessage = "Based name for agent to search for e.g MyAgent as part of B1MyAgent-123")] | |
$agentBaseName , |
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
pool: | |
vmImage: windows-latest | |
variables: | |
- name: system.debug | |
value: true | |
stages: | |
- stage: Stage1 | |
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
name: Add Issue to project | |
on: | |
issues: | |
types: [opened] | |
jobs: | |
track_issue: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Get project data |
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
function Update-AppConfig | |
{ | |
[cmdletbinding()] | |
param | |
( | |
[parameter(Mandatory = $true, HelpMessage = "Name of app.exe.config file")] | |
[string]$AppConfigFile, | |
[parameter(Mandatory = $false, HelpMessage = "Name of parameters.xml file")] | |
[string]$ParametersFile = "parameters.xml" |