Skip to content

Instantly share code, notes, and snippets.

View rohit-lakhanpal's full-sized avatar

Rohit Lakhanpal rohit-lakhanpal

  • Melbourne, VIC, Australia
  • 03:03 (UTC +10:00)
View GitHub Profile
@rohit-lakhanpal
rohit-lakhanpal / Embed-ADX-In-App.html
Created December 16, 2021 06:48
Use this to embed Azure Data Explorer's Web UI within your application. Learn more at https://docs.microsoft.com/en-us/azure/data-explorer/kusto/api/monaco/host-web-ux-in-iframe.
<iframe
width="1000"
height="800"
src="https://dataexplorer.azure.com/clusters/my-app.eastus/databases?ibizaPortal=true"
title="Analytics"
frameborder="0"
allowfullscreen>
</iframe>
<script>
@rohit-lakhanpal
rohit-lakhanpal / AcquireTokenForClientFromAD.cs
Created December 16, 2021 06:37
Use the Microsoft.Identity.Client to acquire a token from AD for your daemon or service (using client credentials).
namespace GetToken.Console
{
using Microsoft.Extensions.Configuration;
using Microsoft.Identity.Client;
using Microsoft.Identity.Web;
using System;
using System.Globalization;
public class Program
@rohit-lakhanpal
rohit-lakhanpal / panviva-document.css
Created February 3, 2021 03:43
Sample CSS to style your panviva documents.
/* -- Only for Print Media, NOT change to LESS-- */
/* Heading */
div.documents {
font-family: 'Raleway', sans-serif;
padding: 0px 50px;
}
.documents h1 {
font-size: 1.2em;
@rohit-lakhanpal
rohit-lakhanpal / sample-panviva-document.css
Created November 30, 2020 06:18
Sample style sheets for panviva documents.
/* Heading */
div.documents {
font-family: 'Raleway', sans-serif;
padding: 0px 50px;
}
.documents h1 {
font-size: 1.2em;
line-height: 1.4em;
font-weight: normal;
@rohit-lakhanpal
rohit-lakhanpal / CreateReactAppWithMaterialUiTypescript.md
Created October 2, 2020 09:58
Create-React-App with material-ui for typescript

Create React App example with TypeScript

How to use

Download the example or clone the repo:

curl https://codeload.github.com/mui-org/material-ui/tar.gz/master | tar -xz --strip=2 material-ui-master/examples/create-react-app-with-typescript
cd create-react-app-with-typescript
@rohit-lakhanpal
rohit-lakhanpal / web.config
Created August 11, 2020 12:37
Configuring Azure to reconcile client and server side routing. [In the public folder, let’s add a web.config XML file with the following content:]
<?xml version="1.0"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="React Routes" stopProcessing="true">
<match url=".*" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
@rohit-lakhanpal
rohit-lakhanpal / bot.html
Created October 15, 2019 20:49
A direct line bot user interface.
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
html,
body {
height: 100%
}
@rohit-lakhanpal
rohit-lakhanpal / Dockerfile
Created September 17, 2018 04:10 — forked from ju2wheels/Dockerfile
Docker Dockerfile reference template
# Last updated: 08/24/2916
#
# Total instructions available: 18
#
# https://docs.docker.com/engine/reference/builder/
#
# You can use a .dockerignore file in the same context directory as
# your Dockerfile to ignore files in the context before sending them
# to the Docker daemon for building to speed up building.
@rohit-lakhanpal
rohit-lakhanpal / Speakers.json
Last active August 14, 2017 00:52
Speakers from NDC Sydney.
[
{
"name":"Aaron Powell",
"website":"http://ndcsydney.com/speaker/aaron-powell/",
"bio":"I like long walks on the beach talking about JavaScript"
},
{
"name":"Adam Cogan",
"website":"http://ndcsydney.com/speaker/adam-cogan/",
"bio":"Chief Architect at SSW"
@rohit-lakhanpal
rohit-lakhanpal / Speakers.json
Created August 14, 2017 00:42
Speakers from NDC Sydney. Extracted by running the following code on http://ndcsydney.com/speakers/ var speakers = []; var id = 1; $(".boxed-speaker").each(function (e, i){ var website = $(i).attr("href"); var name = $(i).find(".title > h2").html(); var bio = $(i).find(".title > p").html(); speakers.push({ "name": name, "website":website, "bio":…
[
{
"name":"Aaron Powell",
"website":"http://ndcsydney.com/speaker/aaron-powell/",
"bio":"I like long walks on the beach talking about JavaScript",
"id":1
},
{
"name":"Adam Cogan",
"website":"http://ndcsydney.com/speaker/adam-cogan/",