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:
- "*"
@jeffhollan
jeffhollan / PullAllLocalBranches.ps1
Last active January 6, 2022 05:30
PowerShell script to pull all local branches
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)
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")]
{
"$schema": "http://json.schemastore.org/proxies",
"proxies": {
"loaderio": {
"matchCondition": {
"methods": [ "GET" ],
"route": "/loaderio125125125"
},
"responseOverrides": {
"response.body": "loaderio125125125",
{
"$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."
# 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 \