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
# 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 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 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 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 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
function PullAllBranches() { | |
$branches = git branch | |
foreach($branch in $branches){ | |
$fixedBranch = $branch.Substring(2, $branch.Length - 2) | |
$trackedExpression = "branch." + $fixedBranch + ".merge" | |
$trackedBranch = git config --get $trackedExpression | |
# Write-Host($trackedBranch) | |
if(![string]::IsNullOrEmpty($trackedBranch)) | |
{ | |
Write-Host('Pulling branch: ' + $fixedBranch) |
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
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 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 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 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": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", | |
"contentVersion": "1.0.0.0", | |
"parameters": { | |
"logicAppName": { | |
"type": "string", | |
"minLength": 1, | |
"maxLength": 80, | |
"metadata": { | |
"description": "Name of the Logic App." |
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
# 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 \ |
NewerOlder