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
| <# | |
| .SYNOPSIS | |
| Converts a Microsoft Edge Work/School profile to a Personal profile. | |
| .DESCRIPTION | |
| This script converts an Edge profile that was created as a Work/School profile | |
| (requiring Azure AD/Entra ID corporate accounts) to a Personal profile that | |
| accepts personal Microsoft accounts (MSA). | |
| The script: |
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
| internal class MyMiddleware : IFunctionsWorkerMiddleware | |
| { | |
| public async Task Invoke(FunctionContext context, FunctionExecutionDelegate next) | |
| { | |
| var triggerType = context.FunctionDefinition.InputBindings.Values.First(a => a.Type.EndsWith("Trigger")).Type; | |
| var logger = context.GetLogger<MyMiddleware>(); | |
| logger.LogInformation($"TriggerType: {triggerType}"); | |
| await next(context); |
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
| openapi: 3.0.0 #Ref: https://github.com/belgif/openapi-problem/blob/6d8c8839130a3e7dd459ad08989b8bec1bae982a/src/main/openapi/problem/v1/problem-v1.yaml | |
| info: | |
| title: problem types | |
| version: "${project.version}" | |
| license: | |
| name: Apache 2.0 | |
| url: https://www.apache.org/licenses/LICENSE-2.0.html | |
| servers: [] | |
| paths: {} | |
| components: |
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
| //First we define the security scheme | |
| c.AddSecurityDefinition("Bearer", //Name the security scheme | |
| new OpenApiSecurityScheme{ | |
| Description = "JWT Authorization header using the Bearer scheme.", | |
| Type = SecuritySchemeType.Http, //We set the scheme type to http since we're using bearer authentication | |
| Scheme = "bearer" //The name of the HTTP Authorization scheme to be used in the Authorization header. In this case "bearer". | |
| }); | |
| c.AddSecurityRequirement(new OpenApiSecurityRequirement{ | |
| { |
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 DotNet.Testcontainers.Builders; | |
| using DotNet.Testcontainers.Configurations; | |
| using DotNet.Testcontainers.Containers; | |
| using Microsoft.EntityFrameworkCore; | |
| using Testcontainers.MsSql; | |
| using Xunit; | |
| namespace Tests; | |
| public abstract class MsSqlTestBase : IAsyncLifetime |
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
| { | |
| "analysisServicesServers": "as", | |
| "apiManagementService": "apim-", | |
| "appConfigurationStores": "appcs-", | |
| "appManagedEnvironments": "cae-", | |
| "appContainerApps": "ca-", | |
| "authorizationPolicyDefinitions": "policy-", | |
| "automationAutomationAccounts": "aa-", | |
| "blueprintBlueprints": "bp-", | |
| "blueprintBlueprintsArtifacts": "bpa-", |
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
| Get-TimeZone | |
| w32tm /config /manualpeerlist:"pool.ntp.br" /syncfromflags:manual /reliable:YES /update | |
| Restart-Service w32time | |
| w32tm /resync | |
| w32tm /query /peers | |
| w32tm /query /status |
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
| @"C:\Program Files\Git\usr\bin\bash.exe" -l |
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
| $filePath = "C:\path\to\your\file.txt" | |
| $outputPath = "C:\path\to\output\encodedFile.txt" | |
| # Read the file content as bytes | |
| $fileContent = [System.IO.File]::ReadAllBytes($filePath) | |
| # Convert the byte array to a Base64 string | |
| $base64String = [Convert]::ToBase64String($fileContent) | |
| # Output the Base64 string to a new file |
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.Collections; | |
| using AutoFixture.Kernel; | |
| public class GenerationDepthBehavior : ISpecimenBuilderTransformation | |
| { | |
| private const int DefaultGenerationDepth = 1; | |
| private readonly int _generationDepth; | |
| public GenerationDepthBehavior(int generationDepth = DefaultGenerationDepth) | |
| { |
NewerOlder