This file contains hidden or 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 std::path::PathBuf; | |
| use std::result::Result; | |
| use std::{error::Error, ops::Index}; | |
| use clap::{arg, command, value_parser, Arg}; | |
| use msi::{self, Expr, Select, Value}; | |
| fn main() -> Result<(), Box<dyn Error>> { | |
| let matches = command!() | |
| .arg( |
This file contains hidden or 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
| [CmdletBinding(DefaultParameterSetName = 'Path')] | |
| param ( | |
| [Parameter(ParameterSetName = 'Path', Position = 0, Mandatory = $true)] | |
| [string[]] $Path, | |
| [Parameter(ParameterSetName = 'LiteralPath', Mandatory = $true, ValueFromPipelineByPropertyName = $true)] | |
| [Alias('PSPath')] | |
| [string[]] $LiteralPath | |
| ) | |
This file contains hidden or 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
| [CmdletBinding(DefaultParameterSetName = 'Repositories', SupportsShouldProcess = $true)] | |
| param ( | |
| [Parameter(Mandatory = $true, Position = 0)] | |
| [int] $ProjectNumber, | |
| [Parameter(Mandatory = $true, Position = 1)] | |
| [string[]] $Labels, | |
| [Parameter(ParameterSetName = 'Repositories')] | |
| [Alias("repos")] |
This file contains hidden or 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
| [CmdletBinding()] | |
| param ( | |
| [Parameter(Mandatory=$true)] | |
| [string] $ServiceDirectory, | |
| [Parameter(Mandatory=$true)] | |
| [string] $ResourceProvider, | |
| [Parameter(Mandatory=$true)] | |
| [string] $SourceVersion, |
This file contains hidden or 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
| #Requires -Version 5 | |
| #Requires -PSEdition Desktop | |
| # Gets information about the number of public types, and public and protected members. | |
| [CmdletBinding(DefaultParameterSetName = 'Path')] | |
| param ( | |
| [Parameter(ParameterSetName = 'Path', Position = 0)] | |
| [string[]] $Path, | |
| [Parameter(ParameterSetName = 'LiteralPath', Mandatory = $true, ValueFromPipelineByPropertyName = $true)] |
This file contains hidden or 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
| #Requires -Version 5.0 | |
| function Protect-SecureFile { | |
| [CmdletBinding(DefaultParameterSetName = 'Path')] | |
| param ( | |
| [Parameter(ParameterSetName = 'Path', Mandatory = $true, Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] | |
| [string] $Path, | |
| [Parameter(ParameterSetName = 'LiteralPath', Mandatory = $true, ValueFromPipelineByPropertyName = $true)] | |
| [Alias('PSPath')] |
This file contains hidden or 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
| [CmdletBinding()] | |
| param ( | |
| [Parameter(Mandatory=$true, Position=0)] | |
| [string] $Path, | |
| [Parameter(Mandatory=$true, Position=1)] | |
| [string] $OutFile, | |
| [Parameter()] | |
| [ValidateNotNullOrEmpty()] |
This file contains hidden or 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
| # Aliases allow you to create nicknames for gh commands | |
| aliases: | |
| co: pr checkout | |
| # The following aliases require https://github.com/cli/cli/pull/3519 | |
| issues: |- | |
| issue list --json number,title,labels,updatedAt --template '{{range .}}{{if .labels}}{{row (printf "#%v" .number | autocolor "green") .title (pluck "name" .labels | join ", " | printf "(%s)" | autocolor "gray+h") (timeago .updatedAt | printf "about %s" | autocolor "gray+h")}}{{else}}{{row (printf "#%v" .number | autocolor "green") .title "" (timeago .updatedAt | printf "about %s" | autocolor "gray+h")}}{{end}}{{end}}' | |
| users: |- | |
| api graphql --paginate | |
| --template '{{range .data.repository.assignableUsers.nodes}}{{if .status}}{{row (autocolor "green" .login) .name (autocolor "gray+h" .email) (autocolor "yellow" .status.message)}}{{else}}{{row (autocolor "green" .login) .name (autocolor "gray+h" .email) ""}}{{end}}{{end}}' |
This file contains hidden or 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
| [CmdletBinding(DefaultParameterSetName='Path')] | |
| param ( | |
| [Parameter(ParameterSetName='Path', Position=0, Mandatory=$true, ValueFromPipelineByPropertyName=$true)] | |
| [string[]] $Path, | |
| [Parameter(ParameterSetName='LiteralPath', Mandatory=$true, ValueFromPipelineByPropertyName=$true)] | |
| [Alias('PSPath')] | |
| [string[]] $LiteralPath, | |
| [Parameter()] |
This file contains hidden or 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
| #!/usr/bin/env pwsh | |
| # Copyright (c) Microsoft Corporation. All rights reserved. | |
| # Licensed under the MIT License. | |
| #Requires -Version 6.0 | |
| #Requires -PSEdition Core | |
| #Requires -Modules @{ModuleName='Az.Accounts'; ModuleVersion='1.6.4'} | |
| #Requires -Modules @{ModuleName='Az.Resources'; ModuleVersion='1.8.0'} |