Skip to content

Instantly share code, notes, and snippets.

@solitudeashok
solitudeashok / index.jsx
Created Jul 11, 2020 — forked from avinmathew/index.jsx
Multiple layouts with React Router v4
View index.jsx
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>
)} />
)
@solitudeashok
solitudeashok / kafka.md
Created Jun 17, 2020 — forked from ashrithr/kafka.md
kafka introduction
View kafka.md

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
View MessagePack.cs
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;
@solitudeashok
solitudeashok / create new file
Created Jun 19, 2016 — forked from johnpapa/create new file
Getting Started Super Fast - Angular 2 CDN'd
View create new file
npm init –y
npm i angular2 systemjs --save --save-exact
npm i typescript tsd live-server --save-dev
View array.cs
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());