Skip to content

Instantly share code, notes, and snippets.

View justinyoo's full-sized avatar

Justin Yoo justinyoo

View GitHub Profile
@justinyoo
justinyoo / 01-feed-reader.cs
Last active July 2, 2020 02:28
5 Ways Injecting Multiple Instances of Same Interface on ASP.NET Core
public interface IFeedReader
{
string Name { get; }
string GetSingleFeedTitle();
}
public class BlogFeedReader : IFeedReader
{
public BlogFeedReader()
{
@justinyoo
justinyoo / 01-api-list.txt
Last active June 24, 2020 12:53
Building GraphQL Server on ASP.NET Core
GET /posts
GET /posts/{postId}
GET /authors
GET /authors/{authorId}
GET /tags
...
@justinyoo
justinyoo / 01-dotnet-run.sh
Last active June 17, 2020 08:05
Hosting Blazor Web Assembly App on Azure Static Web App
dotnet run -p BlazorNpmSample
@justinyoo
justinyoo / 01-dotnet-new.sh
Created June 8, 2020 08:05
Adding React UI Components, by node.js/npm packages, to Blazor Web Assembly Application
dotnet new blazorwasm -n BlazorNpmSample
@justinyoo
justinyoo / 01-dotnet-new.sh
Created May 31, 2020 12:21
Adding React UI Components to Blazor Web Assembly Application
dotnet new blazorwasm -n BlazorJsSample
@justinyoo
justinyoo / 01-pr-flow-1.yaml
Last active May 6, 2020 03:11
Publishing JAM Stack Web Apps with GitOps and GitHub Actions
name: Pull Request
on:
pull_request:
branches:
- dev
types:
- opened
jobs:
@justinyoo
justinyoo / 01-kv-reference-1.txt
Created April 30, 2020 02:50
3 Ways Referencing Azure Key Vault from Azure Functions
@Microsoft.KeyVault(SecretUri=https://<key-vault-name>.vault.azure.net/secrets/<secret-name>/<secret-version>)
@justinyoo
justinyoo / 01-create-bin.cs
Created April 22, 2020 15:03
Building RequestBin with Durable Functions
[FunctionName(nameof(CreateBin))]
public async Task<IActionResult> CreateBin(
[HttpTrigger(AuthorizationLevel.Anonymous, "post", Route="bins")] HttpRequest req,
[DurableClient] IDurableClient client)
{
...
}
@justinyoo
justinyoo / 01-embedded-request.cs
Created April 14, 2020 14:45
Building Online Check-in App with Power Apps
public class EmbeddedRequest
{
public virtual string PersonGroup { get; set; }
public virtual string Image { get; set; }
}
@justinyoo
justinyoo / 00-environment-variables.cs
Last active April 8, 2020 01:05
Identifying Faces through Azure Functions Using Face API
var sasToken = Environment.GetEnvironmentVariable("Blob__SasToken");
var containerName = Environment.GetEnvironmentVariable("Blob__Container");
var personGroup = Environment.GetEnvironmentVariable("Blob__PersonGroup");
var numberOfPhotos = Convert.ToInt32(Environment.GetEnvironmentVariable("Blob__NumberOfPhotos"));
var tableName = Environment.GetEnvironmentVariable("Table__Name");
var authKey = Environment.GetEnvironmentVariable("Face__AuthKey");
var endpoint = Environment.GetEnvironmentVariable("Face__Endpoint");
var confidence = Convert.ToDouble(Environment.GetEnvironmentVariable("Face__Confidence"));