Skip to content

Instantly share code, notes, and snippets.

View jeffhollan's full-sized avatar
❄️
Working

Jeff Hollan jeffhollan

❄️
Working
View GitHub Profile
# 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:
# 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:
- "*"
# storedproc.py file
def run(message):
return "hello world, v1";
@jeffhollan
jeffhollan / deploy.yaml
Created June 4, 2022 02:07
GitHub Actions and Snowflake Stored Proc
# 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:
- "*"
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)
@jeffhollan
jeffhollan / current.cs
Created October 23, 2020 22:24
TracingOptions
// 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")]
# 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 \
@jeffhollan
jeffhollan / script.sh
Created November 26, 2019 14:52
Moving premium and consumption plans
# 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
{
"$schema": "http://json.schemastore.org/proxies",
"proxies": {
"loaderio": {
"matchCondition": {
"methods": [ "GET" ],
"route": "/loaderio125125125"
},
"responseOverrides": {
"response.body": "loaderio125125125",
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Exec Command="copy /Y &quot;$(TargetDir)SupportedMediaTypes.json&quot; &quot;$(TargetDir)bin/SupportedMediaTypes.json&quot;" />
</Target>