Skip to content

Instantly share code, notes, and snippets.

View justinyoo's full-sized avatar

Justin Yoo justinyoo

View GitHub Profile
@justinyoo
justinyoo / create-dotnet-project.sh
Last active January 12, 2023 01:12
Tools for .NET Developers on Mac
dotnet new sln --name MySolution
dotnet new classlib --name MyClassLib --language c#
dotnet sln add MyClassLib
@justinyoo
justinyoo / 01-func-new-http-trigger.sh
Created February 21, 2021 14:56
Event-Driven KeyVault Secrets Rotation Management
func new --name DisableSecretHttpTrigger --template HttpTrigger --language C#
@justinyoo
justinyoo / appmodule.cs
Last active October 7, 2022 07:35
AutoMapper DI into Azure Functions
public class AppModule : Module
{
public override void Load(IServiceCollection services)
{
...
services.AddAutoMapper(Assembly.GetAssembly(this.GetType()));
...
}
}
@justinyoo
justinyoo / 01-az-logic-workflow-show.sh
Last active July 29, 2022 14:00
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
justinyoo / LogicApp.json
Last active July 4, 2022 08:53
List of Access Keys from Output Values after ARM Template Deployment
{
"variables": {
"logicApp": {
"name": "my-logic-app",
"trigger": "manual"
},
"resourceId": "[resourceId('Microsoft.Logic/workflows/triggers', variables('logicApp').name, variables('logicApp').trigger)]",
"apiVersion": "[providers('Microsoft.Logic', 'workflows').apiVersions[0]]"
},
"resources": [],
@justinyoo
justinyoo / local-settings.json
Last active May 9, 2022 08:01
Introducing Swagger UI on Azure Functions
{
"IsEncrypted": false,
"Values": {
...
"OpenApi__Info__Version": "2.0.0",
"OpenApi__Info__Title": "Open API Sample on Azure Functions",
"OpenApi__Info__Description": "A sample API that runs on Azure Functions either 1.x or 2.x using Open API specification.",
"OpenApi__Info__TermsOfService": "https://github.com/aliencube/AzureFunctions.Extensions",
"OpenApi__Info__Contact__Name": "Aliencube Community",
"OpenApi__Info__Contact__Email": "no-reply@aliencube.org",
@justinyoo
justinyoo / ServiceBus.json
Created January 4, 2018 11:36
List of Access Keys from Output Values after ARM Template Deployment
{
"variables": {
"serviceBus": {
"name": "my-service-bus",
"sasKeyName": "RootManageSharedAccessKey"
},
"resourceId1": "[resourceId('Microsoft.ServiceBus/namespaces', variables('serviceBus').name)]",
"resourceId2": "[resourceId('Microsoft.ServiceBus/namespaces/authorizationRules', variables('serviceBus').name, variables('serviceBus').sasKeyName)]",
"apiVersion": "[providers('Microsoft.ServiceBus', 'namespaces').apiVersions[0]]"
},
{
"Values": {
"FUNCTIONS_WORKER_RUNTIME": "dotnet"
}
}
func start
@justinyoo
justinyoo / 01-kill-process.sh
Last active February 15, 2022 07:02
Things to Know When Writing Azure Functions in Java
process_id=$(sudo lsof -nP -i4TCP:7071 | grep LISTEN | awk '{print $2}')
sudo kill -9 $process_id