Skip to content

Instantly share code, notes, and snippets.


Amit Hegde amithegde

View GitHub Profile
amithegde /
Last active Apr 14, 2016
Custom stacked row chart

Built with

This chart renders custom stacked row chart to represent bunch of servers, their up time and health level at different intervlas

amithegde / CaptureEtw.cs
Created Jan 28, 2016
capturing EWT events
View CaptureEtw.cs
void Main()
//include nuget package:
using (var session = new TraceEventSession("My session", null))
using (var source = new ETWTraceEventSource("My session", TraceEventSourceType.Session))
var parser = new DynamicTraceEventParser(source);
parser.All += delegate (TraceEvent data)
Console.WriteLine("Got Event: " + data.ToString());
amithegde / LpChart.linq
Created Jan 23, 2016
Quick and easy helper to render chars in LinqPad
View LpChart.linq
<Query Kind="Program">
void Main()
amithegde / tps.cs
Created Jan 14, 2016
calls a method n number of times a second
View tps.cs
void Main()
//calls a method n number of times in a second. tps = transactions per second
var tasker = new Tasker(tps: 10, taskToRun: (x) => {Console.WriteLine("hello " + x);});
public class Tasker
private int Tps { get; set; }
View DynamicTableEntityPrettyDump.cs
void Main()
var account = "";
var key = "";
var tableName = "";
var cloudTable = GetStorageAccount(account, key).CreateCloudTableClient().GetTableReference(tableName);
var tableQuery = new TableQuery<DynamicTableEntity>().Where(filter: string.Empty);
View GroupByBasedOnTimeInterval.cs
void Main()
//my data entities
var dataList = new List<DataModel>();
for (int i = 0; i < 100; i++) {
dataList.Add(new DataModel {
SomeString = "some data",
SomeValue = i,
Timestamp = DateTimeOffset.UtcNow.AddMinutes(-(i+60))
View queryParser.htm
<script src=""></script>
<p>enter query in the format: colNam2: value. value can have double quotes for compound query</p>
<input type="text" id="queryText"/>
<div id="result"></div>
amithegde / jquery-ui-tooltip-with-user-interation.htm
Last active Aug 29, 2015
jQuery UI Tooltip which lets the user to interact with the tooltip such as copy text from the tooltip
View jquery-ui-tooltip-with-user-interation.htm
<!doctype html>
<html lang="en">
<meta charset="utf-8">
<title>jQuery UI Tooltip - Default functionality</title>
<link rel="stylesheet" href="">
<script src=""></script>
<script src=""></script>
<link rel="stylesheet" href="/resources/demos/style.css">