Skip to content

Instantly share code, notes, and snippets.

View binduchinnasamy's full-sized avatar

Bindu Chinnasamy binduchinnasamy

  • Microsoft
  • Bangalore - India
View GitHub Profile
@binduchinnasamy
binduchinnasamy / AppInsightQuery.sql
Created August 19, 2019 08:11
Azure AppInsight query to get Azure function logs
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 January 14, 2021 07:57
Powershell run book to enable or disable azure function
$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 June 26, 2018 08:18
Read IBM MQ message from Azure Service Fabric Stateless service
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 June 26, 2018 07:38
Docket Command to create local IBM MQ
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 January 15, 2022 04:33
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
apiVersion: v1
kind: Service
metadata:
name: aspnetcore
labels:
name: aspnetcore
owner: Bindu
spec:
type: NodePort
ports:
@binduchinnasamy
binduchinnasamy / docker-compose.yml
Last active March 16, 2018 07:40
Docker Compose File for MySQL and phpmyadmin
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>>