Skip to content

Instantly share code, notes, and snippets.

Debugging "Object reference not set to an instance of an object." 😬

Sajeetharan sajeetharan

Debugging "Object reference not set to an instance of an object." 😬
View GitHub Profile
View Test.ps1
FUNCTION GenerateMasterKeyAuthorizationSignature
[Parameter(Mandatory=$true)][String] $verb, # HTTP verb, such as GET, POST, or PUT
[Parameter(Mandatory=$true)][String] $resourceLink, # Case SeNsItIvE!!! (this is the parent path for the $resourceType)
[Parameter(Mandatory=$true)][String] $resourceType, # type of resource that the request is for, Eg. "dbs", "colls", "docs"
[Parameter(Mandatory=$true)][String] $dateTime, # Must exactly match x-ms-date in header (and be lower case)
[Parameter(Mandatory=$true)][String] $key, #
View gist:8213f9c160ab5bc53111bc7047ca81c6
locals {
global_resource_group = "stackover"
resource_group = "stackover-${var.env_prefix}"
cluster_name = "stackover-${var.env_prefix}-cluster"
ingress_address_res_name = "stackover-${var.env_prefix}-ingress-ip"
# --- Existing resources -----------------------------------------------------
data "azurerm_container_registry" "container_registry" {
sajeetharan / Install tye
Created Dec 20, 2020
Install Project Tye
View Install tye
dotnet tool install -g Microsoft.Tye --version "0.2.0-alpha.20258.3"
View gist:de85e9cce3b5aa2bd0647a8ddae68b98
using System;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.Azure.WebJobs;
using Microsoft.Extensions.Logging;
using Microsoft.Azure.Management.Fluent;
namespace AciManagerFuncApp
View Deploy function
⚡ C:\processOrder>func kubernetes deploy --name processorder --registry sajeetharan
sajeetharan / EnableKeda
Last active Sep 27, 2020
Enable KEDA on AKS
View EnableKeda
⚡ C:\processOrder>func kubernetes install --namespace kube-system --dry-run > keda.yaml
kubectl apply -f keda.yaml --namespace="kube-system"
sajeetharan / newfnKeda
Created Sep 27, 2020
Create new function
View newfnKeda
C:\processOrder>func new
sajeetharan / fnkeda
Created Sep 27, 2020
Create a containerized azure function
View fnkeda
⚡ C:\processOrder>func init --docker
sajeetharan / akskeda
Created Sep 27, 2020
Create AKS cluster for KEDA
View akskeda
⚡ C:\keda
C:\>az aks create --resource-group "rgKeda" --name "aksKeda" --node-count 2 --generate-ssh-keys
sajeetharan / sqkeda
Created Sep 27, 2020
Create Storage Queue
View sqkeda
⚡ C:\keda
❯ az storage queue create --name "sqkeda" --account-name "sakeda"