Skip to content

Instantly share code, notes, and snippets.

View justinyoo's full-sized avatar

Justin Yoo justinyoo

View GitHub Profile
@justinyoo
justinyoo / 01-install-oh-my-zsh.sh
Last active December 19, 2021 10:39
Oh My Azure Cloud Shell
sh -c "$(curl -fsSL \
https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
@justinyoo
justinyoo / extension-object.xml
Created January 6, 2019 12:42
Building XSL Mapper with Azure Functions
<ExtensionObjects>
<ExtensionObject
Namespace="http://schemas.microsoft.com/BizTalk/2003/ScriptNS0"
AssemblyName="Fully.Qualified.Assembly.Name, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d7e94ac1875c97e9"
ClassName="Fully.Qualified.Class.Name" />
</ExtensionObjects>
@justinyoo
justinyoo / 01-fncapp-31-package-reference.xml
Last active December 7, 2021 10:32
Migrating Azure Functions OpenAPI Extension to V4
<Project Sdk="Microsoft.NET.Sdk">
...
<ItemGroup>
<!-- .NET Core 2.1 or 3.1: In-process Worker -->
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.OpenApi" Version="1.0.0" />
</ItemGroup>
...
</Project>
@justinyoo
justinyoo / 01-original-workflow.yaml
Last active November 30, 2021 06:28
Refactoring GitHub Actions Workflow for Azure Static WebApps
### original workflow: azure-static-web-apps-xxxx-xxxx-xxxx.yml ###
name: Azure Static Web Apps CI/CD
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened, closed]
branches:
@justinyoo
justinyoo / 01-run-byte-array.cs
Last active October 26, 2021 06:34
Transmitting Binary Data via OpenAPI on Azure Functions
public static class BinaryDataHttpTrigger
{
[FunctionName(nameof(BinaryDataHttpTrigger.RunByteArray))]
[OpenApiOperation(operationId: "run.bytearray", tags: new[] { "bytearray" }, ...)]
[OpenApiSecurity("function_key", SecuritySchemeType.ApiKey, Name = "code", In = OpenApiSecurityLocationType.Query)]
[OpenApiRequestBody(contentType: "text/plain", bodyType: typeof(byte[]), ...)]
[OpenApiResponseWithBody(statusCode: HttpStatusCode.OK, contentType: "image/png", bodyType: typeof(byte[]), ...)]
@justinyoo
justinyoo / az-cli.txt
Last active September 29, 2021 18:15
6 Ways Passing Secrets to ARM Templates
az group deployment create `
-g "my-resource-group" `
--template-file azuredeploy.json `
--parameters `@azuredeploy.parameters.json `
--parameters servicePrincipalTenantId=$tenantId
@justinyoo
justinyoo / 01-auth-login-aad.txt
Created September 12, 2021 07:51
Accessing MSGraph from Blazor WASM Running on ASWA
https://<azure_static_webapp>.azurestaticapps.net/.auth/login/aad
public static class DefaultHttpTrigger
{
[FunctionName("DefaultHttpTrigger")]
[OpenApiOperation(operationId: "greeting", tags: new[] { "greeting" }, Summary = "Greetings", Description = "This shows a welcome message.", Visibility = OpenApiVisibilityType.Important)]
[OpenApiSecurity("function_key", SecuritySchemeType.ApiKey, Name = "code", In = OpenApiSecurityLocationType.Query)]
[OpenApiParameter("name", Type = typeof(string), In = ParameterLocation.Query, Visibility = OpenApiVisibilityType.Important)]
[OpenApiResponseWithBody(statusCode: HttpStatusCode.OK, contentType: "application/json", bodyType: typeof(Greeting), Summary = "The response", Description = "This returns the response")]
public static async Task<IActionResult> Run(
@justinyoo
justinyoo / 01-on-team-page-requested-1.yaml
Created August 20, 2021 09:51
Running Hackathon by Yourself with GitHub Actions, Microsoft 365 and Power Platform
name: On Team Page Requested
on:
workflow_dispatch:
inputs:
teamName:
description: The name of team
required: true
default: Team_HackaLearn
content:
@justinyoo
justinyoo / e2e-test-build.yaml
Last active August 13, 2021 17:34
Azure Functions SRE, The First Cut
# Release Pipeline
- stage: Release
jobs:
- deployment: HostedVs2017
...
variables:
- name: TestRunStatus
value: ''
strategy: