Skip to content

Instantly share code, notes, and snippets.

@georgeOsdDev
georgeOsdDev / jakh.kql
Created April 21, 2025 08:35
My JAKH query3
// Prompt:
// Create kusto datatable which represents Data Analytics Services with sample more than 30 records.
// datatable should have datatable(ServiceName: string, Description: string, SearchMethods: dynamic, link: string) format.
// ServiceName column should have its name,
// Description column should have its blief description
// SearchMethods column should have its supported query method such as SQL, KQL, etc
// Link column should have its offical document link
let AnalyticsServices = datatable(ServiceName: string, Description: string, SearchMethods: dynamic, link: string)
[
"Microsoft Fabric", "Unified, AI-powered data platform for data management and analytics", dynamic(["KQL", "SQL"]), "https://learn.microsoft.com/en-us/fabric/",
@georgeOsdDev
georgeOsdDev / jakh.kql
Created April 7, 2025 06:47
My JAKH query2
// https://github.com/microsoft/just-another-kusto-hacker/tree/main
datatable(i1:string , i2:string)[
"😚","😇",
"😈","😋",
"😃","😋",
"😋","😋",
"😀","😀",
"😁","😅",
"😁","😍",
"😇","😌",
@georgeOsdDev
georgeOsdDev / jakh.kql
Last active April 17, 2025 09:39
My JAKH query
// https://github.com/microsoft/just-another-kusto-hacker/tree/main
datatable(codeX:string, codeY:string)[
"1.0.16.0", "41.57.96.0",
"5.188.104.0", "41.62.0.0",
"2.56.160.0", "2.56.208.0",
"1.178.4.0", "2.24.0.0",
"1.36.0.0", "5.56.64.0",
"2.56.0.0", "2.59.96.0",
"1.0.128.0", "202.44.112.0",
"41.66.0.0", "24.152.56.0",
@georgeOsdDev
georgeOsdDev / sendacsmail.sh
Last active January 16, 2025 01:21
Azure Communication Service Email sending by curl
#!/bin/sh
set -Ceu
# ACS Email API
# https://learn.microsoft.com/en-us/rest/api/communication/email/email/send?view=rest-communication-email-2023-03-31&tabs=HTTP
# How to sign the request
# https://learn.microsoft.com/en-us/rest/api/communication/authentication#signing-an-http-request
# Common headers

Tips for speed up Oryx remote build/deploy time for App Service on Linux for Node.js

Cache node_modules for each hash of package-lock.json, Node version and NPM version

/home/site/deploy_cache/node_modules-${md5 hash_of_package_lock.json}-node${NODE_VERSION}-npm${NPM_VERSION}.tar.gz

graph TB;
  Start([Start]);
  Start-->CheckLockVersion{if package-lock.json changed};
@georgeOsdDev
georgeOsdDev / AppServiceCertificateExpirationTimeCheck.kql
Created January 5, 2023 01:09
App Service Certificate Expiration time check by Azure Resource Graph
// https://learn.microsoft.com/en-us/azure/governance/resource-graph/overview
resources
| where type == "microsoft.certificateregistration/certificateorders"
| where subscriptionId == "<SubscriptionId>"
| project id, resourceGroup, name, properties["distinguishedName"] ,properties["provisioningState"], properties["expirationTime"],properties["autoRenew"],properties
@georgeOsdDev
georgeOsdDev / get container id
Created December 10, 2022 22:33
App Service on Linux: Get container id from inside container
CONTAINER_ID=$(cat /proc/self/cgroup | grep docker | grep $WEBSITE_SITE_NAME | head -1| rev | cut -d "/" -f 1 | rev)
@georgeOsdDev
georgeOsdDev / postdeploy.sh
Created November 25, 2022 17:25
How to use custom Node version on Azure App Service Linux
#!/bin/bash
# Usage
# 1.Save this file to project root directory
# 2.Defaul POST_BUILD_COMMAND in appsettings
# https://learn.microsoft.com/en-us/azure/app-service/configure-language-nodejs?pivots=platform-linux#customize-build-automation
# > az webapp config appsettings set --name <app-name> --resource-group <resource-group-name> --settings POST_BUILD_COMMAND="postbuild.sh"
# 3.Enable remote build
# https://github.com/projectkudu/kudu/wiki/Configurable-settings#enabledisable-build-actions
# 4.Update start script to use LTS binary instead of default Node.
# LTS binary path is defined in /home/site/lts_node_path
@georgeOsdDev
georgeOsdDev / test.yaml
Created August 17, 2022 14:17
artifact check
name: artifact check
on:
push:
branches:
- main
workflow_dispatch:
jobs:
test:
@georgeOsdDev
georgeOsdDev / HttpTrigger1.cs
Last active January 14, 2022 02:49
Use resx from Azure Function
using System.Globalization;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Azure.WebJobs;
using Microsoft.Azure.WebJobs.Extensions.Http;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Logging;
public class HttpTrigger1
{