Skip to content

Instantly share code, notes, and snippets.


Justin Yoo justinyoo

View GitHub Profile
justinyoo / 01-install-azuread.ps1
Last active Apr 8, 2021
Automatic Provisioning Power Platform Hands-on-Labs Environment
View 01-install-azuread.ps1
Install-Module -Name AzureAD `
-Scope AllUsers -Repository PSGallery `
-Force -AllowClobber
justinyoo /
Last active Mar 9, 2021
Enabling Open API on Azure Functions
func init MyFunctionApp --worker-runtime dotnet
View 01-counter.razor
@page "/counter"
<p>Current count: @currentCount</p>
<button class="btn btn-primary" @onclick="IncrementCount">Click me</button>
@code {
private int currentCount = 0;
justinyoo /
Created Feb 21, 2021
Event-Driven KeyVault Secrets Rotation Management
func new --name DisableSecretHttpTrigger --template HttpTrigger --language C#
justinyoo / 01-keyvault-reference.txt
Last active Feb 16, 2021
KeyVault Secrets Rotation Management
View 01-keyvault-reference.txt
justinyoo / 01-callback-1.cs
Last active Jan 20, 2021
WebSub to EventGrid via CloudEvents and Beyond
View 01-callback-1.cs
public async Task<IActionResult> CallbackAsync(
[HttpTrigger(AuthorizationLevel.Function, "GET", "POST", Route = "callback")] HttpRequest req,
ILogger log)
if (HttpMethods.IsGet(req.Method))
string challenge = req.Query["hub.challenge"];
var result = new ObjectResult(challenge) { StatusCode = 200 };
justinyoo / 01-scraping-article-id.cs
Last active Jan 18, 2021
Dev.To Article Publish Scheduler
View 01-scraping-article-id.cs
var pattern = "<div.+data-article-id=\"(\\d+)\"\\s*id=\"article-body\">";
var regex = new Regex(pattern, RegexOptions.Compiled | RegexOptions.IgnoreCase);
var url = "<username>/xxxx-****-temp-slug-xxxx?preview=xxxx";
var http = new HttpClient();
var html = await http.GetStringAsync(url);
var match = regex.Match(html);
var articleId = Convert.ToInt32(match.Groups[1].Value);
justinyoo /
Last active Jan 10, 2021
Dealing CloudEvents with Azure Functions for Azure EventGrid
dotnet add package Azure.Messaging.EventGrid --version 4.0.0-beta.4
justinyoo /
Last active Jan 7, 2021
Provisioning EventGrid Subscription and LogicApp Handler Using Azure CLI
logicAppResourceId=$(az logic workflow show \
-g <resource_group_name> \
-n <logic_app_name> \
--query "id" -o tsv)
justinyoo / 01-v1-legacy.cs
Last active Mar 15, 2021
Open API Extension to Support Azure Functions v1
View 01-v1-legacy.cs
namespace MyV1LegacyFunctionApp
public static class LoremIpsumHttpTrigger
public static async Task<HttpResponseMessage> Run(
[HttpTrigger(AuthorizationLevel.Function, "GET", Route = "lorem/ipsum")] HttpRequestMessage req,
ILogger log)
var content = new MyReturnObject();