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 Microsoft.AspNetCore.Authentication; | |
using Microsoft.AspNetCore.Authentication.Cookies; | |
using System.Security.Claims; | |
var signin = "/signin"; | |
var signout = "/signout"; | |
var callback = "/signin-github"; | |
var redirectUrl = "/"; | |
var builder = WebApplication.CreateBuilder(args); |
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
set-alias k kubectl | |
oh-my-posh init pwsh --config "$env:POSH_THEMES_PATH/bradyg.2024.json" | Invoke-Expression | |
Import-Module -Name Terminal-Icons | |
cd c:\src | |
cls | |
Import-Module PSReadLine | |
Set-PSReadLineOption -PredictionSource History | |
Set-PSReadLineOption -PredictionViewStyle ListView | |
Set-PSReadLineOption -EditMode Windows |
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
{ | |
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json", | |
"blocks": [ | |
{ | |
"alignment": "left", | |
"type": "prompt", | |
"segments": [ | |
{ | |
"background": "#0078d4", | |
"foreground": "#ccc", |
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
#include <RK002.h> | |
RK002_DECLARE_INFO("BeatStep Pro to Digitakt 1.3","[email protected]",".1","01bbe92b-f211-46e0-b635-c591254251b6") | |
boolean RK002_onNoteOn(byte channel, byte key, byte velocity) | |
{ | |
if(channel == 0) | |
{ | |
if(key == 24) | |
{ |
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
az apim api import --specification-format Swagger | |
--subscription-required false | |
--path "recipes/v1" | |
--resource-group RecipeApiGroup | |
--service-name recipe-apis | |
--api-id RecipeApi | |
--service-url "https://recipe-api-host.azurewebsites.net" | |
--specification-path "/home/runner/work/Recipe-Api/Recipe-Api/RecipeApi/bin/Release/net5.0/swagger.json" | |
dotnet swagger tofile --output [output] [startupassembly] [swaggerdoc] |
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 Microsoft.AspNetCore.Builder; | |
using Microsoft.AspNetCore.Hosting; | |
using Microsoft.AspNetCore.Mvc; | |
using Microsoft.Extensions.DependencyInjection; | |
using Microsoft.Extensions.Hosting; | |
using Microsoft.Extensions.Logging; | |
using Carter; | |
using Carter.Response; | |
using Carter.OpenApi; |
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 | |
Set-Variable -Name ResourceGroupName "SomeApi" | |
Set-Variable -Name ApimInstance "my-app-apis" | |
Set-Variable -Name SwaggerFilePath "C:\Users\brady\source\repos\brady\SomeApi\bin\Debug\netcoreapp3.1\swagger.json" | |
Set-Variable -Name ServiceUrl "https://some-api-123.azurewebsites.net" | |
Set-Variable -Name ApiId "SomeApi" | |
Set-Variable -Name ApiVersion "v1" | |
Set-Variable -Name AzureSubscriptionId "" | |
# select the subscription |
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
public void AddRating(string productId, int rating) | |
{ | |
var products = GetProducts(); | |
var query = products.First(x => x.Id == productId); | |
if(query.Ratings == null) | |
{ | |
query.Ratings = new int[] { rating }; | |
} | |
else |