Skip to content

Instantly share code, notes, and snippets.

View justinyoo's full-sized avatar

Justin Yoo justinyoo

View GitHub Profile
@justinyoo
justinyoo / 01-remove-sdk.sh
Last active February 23, 2024 17:03
Removing .NET SDKs from MacOS Manually
sdkVersion="6.0.100"
sudo rm -rf /usr/local/share/dotnet/sdk/$sdkVersion
sudo rm -rf /usr/local/share/dotnet/sdk-manifests/$sdkVersion
@justinyoo
justinyoo / 01-apikey-in-query-auth-flow-httptrigger.cs
Last active February 9, 2024 16:06
Securing Azure Functions Endpoints via OpenAPI Auth
public static class ApiKeyInQueryAuthFlowHttpTrigger
{
[FunctionName(nameof(ApiKeyInQueryAuthFlowHttpTrigger))]
[OpenApiOperation(operationId: "apikey.query", tags: new[] { "apikey" }, Summary = "API Key authentication code flow via querystring", Description = "This shows the API Key authentication code flow via querystring", Visibility = OpenApiVisibilityType.Important)]
[OpenApiSecurity("apikeyquery_auth",
SecuritySchemeType.ApiKey,
In = OpenApiSecurityLocationType.Query,
Name = "code")]
@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 / _event-sourcing-cqrs-sample
Last active August 4, 2023 10:20
Event Sourcing and CQRS Pattern for Angular App
This is a sample code for Event Sourcing and CQRS pattern.
* http://blog.aliencube.org/ko/2015/11/12/building-applications-on-cloud-with-event-sourcing-pattern-and-cqrs-pattern/
@justinyoo
justinyoo / kill-process.sh
Created January 26, 2022 15:21
This script kills the Azure Functions process for IntelliJ IDEA on Mac
#!/bin/bash
# Even after IntelliJ IDEA stops running the function app,
# the process is still alive. It only happens on IntelliJ IDEA on Mac.
# This script finds the Azure Functions process and kill it.
#
# You don't need this script if you use terminal or Visual Studio Code.
# You don't need this script if you run IntelliJ IDEA on Windows.
#
# Usage: ./kill-process.sh -p 7071
var json = "{ \"message\": \"Hello World!\"}";
dynamic deserialised = JsonConvert.DeserializeObject<object>(json);
Console.WriteLine(deserialised.message);
@justinyoo
justinyoo / README.md
Created April 18, 2023 01:58
애저 OpenAI 서비스 배워보기
@justinyoo
justinyoo / aad-response.json
Last active May 26, 2023 07:56
Converting Tick or Epoch to Timestamp in Logic App
{
"token_type": "Bearer",
"access_token": "[ACCESS_TOKEN_VALUE]",
"expires_on": "1536543296",
"not_before": "[ANOTHER_EPOCH_VALUE]"
}
@justinyoo
justinyoo / functionapp.tf
Created January 16, 2019 12:32
Terraforming Azure PaaS
# functionapp.tf
#
# Configure the Azure Provider
provider "azurerm" {
version = "=1.20.0"
}
locals {
name = "${var.name}"
location = "${var.location}"
@justinyoo
justinyoo / 01-remote.js
Created August 18, 2020 03:31
Remote Controlling Home Appliances Using Raspberry PI and Power Platform
let lirc_node = require('lirc_node');
lirc_node.init();
const remote = (device, command) => {
lirc_node.irsend.send_once(device, command, () => {
console.log(command);
});
}