This file contains hidden or 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
# Workflow that supports versions, goes in ~/.github/workflows/deploy.yaml | |
name: CI | |
# Controls when the workflow will run | |
on: | |
# Triggers the workflow on any branch or tag commit | |
push: | |
branches: |
This file contains hidden or 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
# Very basic GitHub Action workflow, goes in ~/.github/workflows/deploy.yaml | |
name: CI | |
# Controls when the workflow will run | |
on: | |
# Triggers the workflow on any branch or tag commit | |
push: | |
branches: | |
- "*" |
This file contains hidden or 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
# storedproc.py file | |
def run(message): | |
return "hello world, v1"; |
This file contains hidden or 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
# Very basic GitHub Action workflow, goes in ~/.github/workflows/deploy.yaml | |
name: CI | |
# Controls when the workflow will run | |
on: | |
# Triggers the workflow on any branch or tag commit | |
push: | |
branches: | |
- "*" |
This file contains hidden or 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
from dapr.clients import DaprClient | |
from azure.functions import func | |
# Function to get accessories | |
@app.route('/accessories', methods=['GET']) | |
def accessories_get(): | |
with DaprClient() as d: | |
data = d.get_state(store_name='accessories') | |
return json.dumps(data) |
This file contains hidden or 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
// this is what an output binding approach would do | |
// downsides are that everything added is only resolved once the execution finishes | |
// so the timestamps and stuff may be bad | |
namespace Company.Function | |
{ | |
public class HttpTrigger | |
{ | |
[FunctionName("HttpTrigger")] |
This file contains hidden or 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
# akscreate myClusterName | |
akscreate() { | |
echo "Master password: " | |
read -s pswd | |
export BW_SESSION=$(bw unlock $pswd --raw) | |
az group create -n $1 -l ${2:-westus2} | |
az aks create \ | |
--resource-group $1 \ |
This file contains hidden or 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
# first I had to create a resource group with a premium plan so I knew the resource group / app service plan mapping supported both premium and consumption | |
# Get the plan ID for the plan you want to move to | |
planId=$(az resource show --resource-type Microsoft.Web/serverfarms -g $resourceGroupName -n $appServicePlanName --query id) | |
# Update the function app to move to that plan | |
az resource update --resource-type Microsoft.Web/sites -g $resourceGroupName -n $functionAppName --set properties.serverFarmId=$planId |
This file contains hidden or 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
{ | |
"$schema": "http://json.schemastore.org/proxies", | |
"proxies": { | |
"loaderio": { | |
"matchCondition": { | |
"methods": [ "GET" ], | |
"route": "/loaderio125125125" | |
}, | |
"responseOverrides": { | |
"response.body": "loaderio125125125", |
This file contains hidden or 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
<Target Name="PostBuild" AfterTargets="PostBuildEvent"> | |
<Exec Command="copy /Y "$(TargetDir)SupportedMediaTypes.json" "$(TargetDir)bin/SupportedMediaTypes.json"" /> | |
</Target> |
NewerOlder