Skip to content

Instantly share code, notes, and snippets.

View shibayan's full-sized avatar
🩼
Broken left leg

Tatsuro Shibamura shibayan

🩼
Broken left leg
View GitHub Profile
@shibayan
shibayan / durable-functions.bicep
Created May 3, 2022 08:17
Deploying Durable Functions to Azure Container Apps
param appName string
param location string = resourceGroup().location
resource logAnalyticsWorkspace 'Microsoft.OperationalInsights/workspaces@2020-10-01' = {
name: 'log-${appName}'
location: location
properties: {
retentionInDays: 30
sku: {
name: 'PerGB2018'
@shibayan
shibayan / web.config
Created May 13, 2021 07:28
HttpPlatformHandler configuration for nuxt app
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<handlers>
<add name="httpPlatformHandler" path="*" verb="*" modules="httpPlatformHandler" resourceType="Unspecified" />
</handlers>
<httpPlatform processPath="node" arguments="./node_modules/nuxt/bin/nuxt.js start">
<environmentVariables>
<environmentVariable name="PORT" value="%HTTP_PLATFORM_PORT%" />
</environmentVariables>
@shibayan
shibayan / Program.cs
Last active April 18, 2021 17:35
cskawari
using System;
using System.Collections.Generic;
using System.Text.RegularExpressions;
namespace ConsoleApp15
{
class Program
{
static void Main(string[] args)
{
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"webAppName": {
"type": "string",
"metadata": {
"description": "Base name of the resource such as web app name and app service plan"
},
"minLength": 2
@shibayan
shibayan / resource-providers.sh
Last active August 27, 2024 07:49
Script to bulk register frequently used Resource Providers with an Azure subscription
#!/bin/sh
resourceProviders=(\
"Github.Network" \
"Microsoft.AVS" \
"Microsoft.AlertsManagement" \
"Microsoft.ApiManagement" \
"Microsoft.AppConfiguration" \
"Microsoft.AppPlatform" \
"Microsoft.Authorization" \
@shibayan
shibayan / ApplicationVersionInitializer.cs
Created October 12, 2020 11:08
Azure Functions App Version Initializer
using System.Reflection;
using Microsoft.ApplicationInsights.Channel;
using Microsoft.ApplicationInsights.Extensibility;
namespace FunctionApp19
{
public class ApplicationVersionInitializer<TStartup> : ITelemetryInitializer
{
public ApplicationVersionInitializer()
@shibayan
shibayan / azuredeploy.json
Created August 11, 2020 18:01
Acmebot preview template
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"appNamePrefix": {
"type": "string",
"maxLength": 14,
"metadata": {
"description": "The name of the function app that you wish to create."
}
2020-07-19T16:06:58 PID[20456] Critical System.InvalidOperationException: Unknown key type 'EC'
at Microsoft.Azure.AppService.Middleware.JsonWebKey.GetSecurityKeys()
at Microsoft.Azure.AppService.Middleware.Modules.OpenIdConnectConfig.get_TokenSigningKeys()
at Microsoft.Azure.AppService.Middleware.OpenIdConnectProvider.GetTokenValidationParameters()
at Microsoft.Azure.AppService.Middleware.OpenIdConnectProvider.TryValidateIdToken(String idToken, HttpContextBase context, AuthenticatedPrincipal& user, Exception& tokenValidationException)
at Microsoft.Azure.AppService.Middleware.OpenIdConnectProvider.<HandleServerDirectedLoginAsync>d__10.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Azure.AppService.Middleware.IdentityProviderBase.<OnCompleteServerDirectedLoginAsync>d__53.MoveNext()
@shibayan
shibayan / Program.cs
Last active July 25, 2024 02:56
Generate "Sign in with Apple" client_secret using .NET Core (C#)
using System.IdentityModel.Tokens.Jwt;
using System.Security.Claims;
using System.Security.Cryptography;
using Microsoft.IdentityModel.Tokens;
namespace ConsoleApp
{
class Program
{
@shibayan
shibayan / libwebp_arm64.patch
Created June 27, 2020 15:25
libwebp patch for Windows on ARM (ARM64)
diff --git a/Makefile.vc b/Makefile.vc
index 886f981f..d9b1ba4b 100644
--- a/Makefile.vc
+++ b/Makefile.vc
@@ -11,6 +11,8 @@ LIBWEBPDEMUX_BASENAME = libwebpdemux
ARCH = x86
!ELSE IF ! [ cl 2>&1 | find "x64" > NUL ]
ARCH = x64
+!ELSE IF ! [ cl 2>&1 | find "ARM64" > NUL ]
+ARCH = ARM64