View 01-local-settings-min.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Values": { | |
"FUNCTIONS_WORKER_RUNTIME": "dotnet" | |
} | |
} |
View 01-func-start.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func start |
View 01-kill-process.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
process_id=$(sudo lsof -nP -i4TCP:7071 | grep LISTEN | awk '{print $2}') | |
sudo kill -9 $process_id |
View kill-process.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
View 01-install-oh-my-zsh.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sh -c "$(curl -fsSL \ | |
https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" |
View 01-fncapp-31-package-reference.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Project Sdk="Microsoft.NET.Sdk"> | |
... | |
<ItemGroup> | |
<!-- .NET Core 2.1 or 3.1: In-process Worker --> | |
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.OpenApi" Version="1.0.0" /> | |
</ItemGroup> | |
... | |
</Project> |
View 01-original-workflow.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### original workflow: azure-static-web-apps-xxxx-xxxx-xxxx.yml ### | |
name: Azure Static Web Apps CI/CD | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
types: [opened, synchronize, reopened, closed] | |
branches: |
View 01-remove-sdk.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sdkVersion="6.0.100" | |
sudo rm -rf /usr/local/share/dotnet/sdk/$sdkVersion | |
sudo rm -rf /usr/local/share/dotnet/sdk-manifests/$sdkVersion |
View 01-run-byte-array.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class BinaryDataHttpTrigger | |
{ | |
[FunctionName(nameof(BinaryDataHttpTrigger.RunByteArray))] | |
[OpenApiOperation(operationId: "run.bytearray", tags: new[] { "bytearray" }, ...)] | |
[OpenApiSecurity("function_key", SecuritySchemeType.ApiKey, Name = "code", In = OpenApiSecurityLocationType.Query)] | |
[OpenApiRequestBody(contentType: "text/plain", bodyType: typeof(byte[]), ...)] | |
[OpenApiResponseWithBody(statusCode: HttpStatusCode.OK, contentType: "image/png", bodyType: typeof(byte[]), ...)] |
View 01-apikey-in-query-auth-flow-httptrigger.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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")] |
NewerOlder