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
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| using Fare; | |
| namespace DbFillerConsole | |
| { | |
| class Program | |
| { |
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
| $ErrorActionPreference = 'Stop' | |
| function Install-DotnetTool() { | |
| <# | |
| .SYNOPSIS | |
| Ensures that the dotnet Swashbuckle CLI is installed locally in this folder. | |
| #> | |
| $configPath = "$PWD/.config/dotnet-tools.json" | |
| if (!(Test-Path $configPath)) { | |
| Write-Host "Creating dotnet tool manifest..." -NoNewline |
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
| function toValues(value: number) :string[] { | |
| const values: string[] = []; | |
| while (value) { | |
| const bit = value & (~value + 1); | |
| values.push(FileAccess[bit]); | |
| value ^= bit; | |
| } | |
| return values; | |
| } |
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
| using System.ComponentModel.DataAnnotations; | |
| using System.Diagnostics; | |
| using System.Security.Cryptography; | |
| using Microsoft.EntityFrameworkCore; | |
| using Microsoft.EntityFrameworkCore.Design; | |
| using Microsoft.Extensions.Configuration; | |
| using Microsoft.Extensions.DependencyInjection; | |
| using Microsoft.Extensions.Hosting; | |
| using Microsoft.Extensions.Logging; |
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
| { | |
| "title": "codingfreaks default init", | |
| "disableWallpaper": true, | |
| "disableSounds": true, | |
| "removeKeyboardDelay": true, | |
| "tryFullScreenTerminal": true, | |
| "requireWindowsTerminal": true, | |
| "phases": [ | |
| { | |
| "index": 0, |
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()] | |
| [string] | |
| $ExistingFile, | |
| [Parameter()] | |
| [array] | |
| $ResourceTypeFilter, | |
| [switch] | |
| $AutoFilterCurrentSubscriptionTypes |
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
| $ErrorActionPreference = 'Stop' | |
| function Invoke-AzureDevOpsRestApi { | |
| # Parameter help description | |
| [CmdletBinding()] | |
| param ( | |
| [string] | |
| $OrganizationName = '', | |
| [string] | |
| $ProjectName = '', | |
| [string] |
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
| param ( | |
| [string]$Description = "Provides a mapping with friendly names resolving to build in Azure RBAC Role Ids. See https://learn.microsoft.com/en-us/azure/role-based-access-control/built-in-roles for reference.", | |
| [string]$OutputFileUri = "$PSScriptRoot/azureBuildInRbacRoleIds.bicep", | |
| [string]$ExportVariableName = "azureBuildInRbacRoleIds" | |
| ) | |
| $prefix = @" | |
| @export() | |
| @description('$Description') | |
| var $ExportVariableName = { | |
| "@ |
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
| Connect-MgGraph -Scopes "Application.ReadWrite.All" | |
| Get-MgDirectoryDeletedItemAsApplication -All | ` | |
| ForEach-Object { Remove-MgDirectoryDeletedItem -DirectoryObjectId $_.Id } | |
| # If you want to delete just one with a specific name | |
| Get-MgDirectoryDeletedItemAsApplication -All | ` | |
| ∙ Where-Object { $_.DisplayName -eq "YOUR_APP_NAME" } | ` | |
| ∙ ForEach-Object { Remove-MgDirectoryDeletedItem -DirectoryObjectId $_.Id } |