Skip to content

Instantly share code, notes, and snippets.

@ashoktandan
ashoktandan / CpuDiagnoser.cs
Created August 31, 2022 05:10 — forked from MarkPflug/CpuDiagnoser.cs
BenchmarkDotNet CPU utilization
using BenchmarkDotNet.Analysers;
using BenchmarkDotNet.Columns;
using BenchmarkDotNet.Configs;
using BenchmarkDotNet.Diagnosers;
using BenchmarkDotNet.Engines;
using BenchmarkDotNet.Exporters;
using BenchmarkDotNet.Loggers;
using BenchmarkDotNet.Reports;
using BenchmarkDotNet.Running;
using BenchmarkDotNet.Validators;
@ashoktandan
ashoktandan / index.jsx
Created July 11, 2020 16:38 — forked from avinmathew/index.jsx
Multiple layouts with React Router v4
import React from "react"
import { Route, Switch } from "react-router-dom"
const AppRoute = ({ component: Component, layout: Layout, ...rest }) => (
<Route {...rest} render={props => (
<Layout>
<Component {...props} />
</Layout>
)} />
)
@ashoktandan
ashoktandan / kafka.md
Created June 17, 2020 21:12 — forked from ashrithr/kafka.md
kafka introduction

Introduction to Kafka

Kafka acts as a kind of write-ahead log (WAL) that records messages to a persistent store (disk) and allows subscribers to read and apply these changes to their own stores in a system appropriate time-frame.

Terminology:

  • Producers send messages to brokers
  • Consumers read messages from brokers
  • Messages are sent to a topic
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
using MessagePack;
@ashoktandan
ashoktandan / create new file
Created June 19, 2016 05:31 — forked from johnpapa/create new file
Getting Started Super Fast - Angular 2 CDN'd
npm init –y
npm i angular2 systemjs --save --save-exact
npm i typescript tsd live-server --save-dev
using System;
class Program
{
static int i, j;
static void Main(string[] args)
{
Console.WriteLine("enter no of students");
i = int.Parse(Console.ReadLine());
Console.WriteLine("enter no of subjects");
j = int.Parse(Console.ReadLine());