Skip to content

Instantly share code, notes, and snippets.

Avatar

Bindu Chinnasamy binduchinnasamy

  • Microsoft
  • Bangalore - India
View GitHub Profile
@binduchinnasamy
binduchinnasamy / AppInsightQuery.sql
Created Aug 19, 2019
Azure AppInsight query to get Azure function logs
View AppInsightQuery.sql
traces
| project customDimensions, message, cloud_RoleName, cloud_RoleInstance, operation_Name, timestamp
| where message contains "<<error log or message >>"
| where cloud_RoleName =~ '<<Function App Name>>' and operation_Name == '<<Function name>>'
| where timestamp > ago(30m)
@binduchinnasamy
binduchinnasamy / FunctionEnableDisable.ps1
Last active Jan 14, 2021
Powershell run book to enable or disable azure function
View FunctionEnableDisable.ps1
$connectionName = "AzureRunAsConnection"
$servicePrincipalConnection=Get-AutomationConnection -Name $connectionName
Add-AzureRmAccount -ServicePrincipal -TenantId $servicePrincipalConnection.TenantId -ApplicationId $servicePrincipalConnection.ApplicationId -CertificateThumbprint $servicePrincipalConnection.CertificateThumbprint
$functionname="<<FunctionAppName>>"
$resourceGroupName ="<<Resource Group Name>>"
$webApp = Get-AzureRmWebApp -ResourceGroupName $resourceGroupName -Name $functionname
$appSettingList =$webApp.SiteConfig.AppSettings
$appSettings = @{}
ForEach ($kvp in $appSettingList) {
$appSettings[$kvp.Name] = $kvp.Value
@binduchinnasamy
binduchinnasamy / MQReader.cs
Created Jun 26, 2018
Read IBM MQ message from Azure Service Fabric Stateless service
View MQReader.cs
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Fabric;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.ServiceBus.Messaging;
using Microsoft.ServiceFabric.Services.Communication.Runtime;
using Microsoft.ServiceFabric.Services.Runtime;
@binduchinnasamy
binduchinnasamy / ibmmqdocker.txt
Last active Jun 26, 2018
Docket Command to create local IBM MQ
View ibmmqdocker.txt
docker run --env LICENSE=accept --env MQ_QMGR_NAME=QM1 --publish 1414:1414 --publish 9443:9443 --detach --volume qm1data:/mnt/mqm ibmcom/mq
Qm1data - is a local volume
Ibmcom/mq - is the docker image name
@binduchinnasamy
binduchinnasamy / aspnetcore-webapp-deployment.yaml
Last active Jan 15, 2022
Sample: Kubernetes deployment file to deploy MySQL DB with persistence storage, deploy PHP MyAdmin tool to manage data in MySQL DB and a sample ASP.NET Core web application that interacts with MySQLDB
View aspnetcore-webapp-deployment.yaml
apiVersion: v1
kind: Service
metadata:
name: aspnetcore
labels:
name: aspnetcore
owner: Bindu
spec:
type: NodePort
ports:
@binduchinnasamy
binduchinnasamy / docker-compose.yml
Last active Mar 16, 2018
Docker Compose File for MySQL and phpmyadmin
View docker-compose.yml
version: '3'
services:
db:
image: mysql
ports:
- "3306:3306"
# This sets the root password for MYSQL DB
environment:
MYSQL_ROOT_PASSWORD: <<My sql root pwd>>