Skip to content

Instantly share code, notes, and snippets.

View pranavq212's full-sized avatar
:octocat:
Forever Learning

Pranav Singh pranavq212

:octocat:
Forever Learning
View GitHub Profile
@pranavq212
pranavq212 / automation.yml
Created April 4, 2021 22:32
Final automation file
name: Build Next.js web application
on: push
jobs:
build-container:
name: Build container
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Push to GitHub Packages
@pranavq212
pranavq212 / apache_kafka_interview_questions.md
Created March 24, 2021 19:36 — forked from bansalankit92/apache_kafka_interview_questions.md
50 Apache Kafka Interview Questions and Answers for all experience level

(Q.1) What is Apache Kafka?

Apache Kafka is a publish-subscribe open source message broker application. This messaging application was coded in “Scala”. Basically, this project was started by the Apache software. Kafka’s design pattern is mainly based on the transactional logs design. For detailed understanding of Kafka, go through,
Kafka Tutorial.

(Q.2) Enlist the several components in Kafka.

The most important elements of Kafka are:

  • Topic – Kafka Topic is the bunch or a collection of messages.
  • Producer – In Kafka, Producers issue communications as well as publishes messages to a Kafka topic.
  • Consumer – Kafka Consumers subscribes to a topic(s) and also reads and processes messages from the topic(s).
@pranavq212
pranavq212 / docker_interview_question.md
Created March 24, 2021 19:36 — forked from bansalankit92/docker_interview_question.md
Docker interview questions and answers all level

What is Hypervisor?

A hypervisor is a software that makes virtualization possible. It is also called Virtual Machine Monitor. It divides the host system and allocates the resources to each divided virtual environment. You can basically have multiple OS on a single host system. There are two types of Hypervisors:

  • Type 1: It’s also called Native Hypervisor or Bare metal Hypervisor. It runs directly on the underlying host system. It has direct access to your host’s system hardware and hence does not require a base server operating system.
  • Type 2: This kind of hypervisor makes use of the underlying host operating system. It’s also called Hosted Hypervisor.

What is virtualization?

Virtualization is the process of creating a software-based, virtual version of something(compute storage, servers, application, etc.). These virtual versions or environments are created from a single physical hardware system. Virtualization lets you split one system into many different sections which act like separ

@pranavq212
pranavq212 / XmlLinqConversionExtensions.cs
Created March 26, 2020 08:03 — forked from ChuckSavage/XmlLinqConversionExtensions.cs
Convert To/From XmlDocument and XDocument/XElements
using System.Xml;
using System.Xml.Linq;
namespace XmlLib
{
/// <summary>
/// Provides extension methods for simple conversion between System.Xml and System.Xml.Linq classes.
/// </summary>
/// <remarks>From: http://brianary.blogspot.com/2010/02/converting-between-xdocument-and.html</remarks>
public static class XmlLinqConversionExtensions
@pranavq212
pranavq212 / Mandrill.cs
Created July 12, 2016 15:46 — forked from andyhuey/Mandrill.cs
sample code showing how to use the Mandrill API
/*
* Code/Mandrill.cs
* These are calls to the Mandrill email service.
* Reference: https://mandrillapp.com/api/docs/
*
* ajh 2012-08-09: new
*/
using System;
using System.Collections.Generic;
using System.Linq;
@pranavq212
pranavq212 / EMailHelper.cs
Last active December 23, 2023 00:52
Send mail via SMTP c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Net;
using System.Net.Mail;
using DomainClasses;
using System.IO;
@pranavq212
pranavq212 / MailChimpLists.cshtml
Last active July 12, 2016 13:30
Adding Mailing list using MailChimp in Asp.net/HTML
<!-- Begin MailChimp Signup Form -->
<div id="mc_embed_signup" style="float:right">
<!-- In form action u=b17f67afdefca06a0b4ebd90f is unique key for user id=248d6f0d5b is unique id for mailing list-->
<form action="//wordpress.us13.list-manage.com/subscribe/post?u=b17f67afdefca06a0b4ebd90f&amp;id=248d6f0d5b" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate>
<div id="mc_embed_signup_scroll">
<div class="mc-field-group">
<label for="mce-EMAIL">
Signup for newsletter <span class="asterisk">*</span>
</label>
<input type="email" value="" required name="EMAIL" id="mce-EMAIL" oninvalid="setCustomValidity('Please enter a valid email address.')" oninput="setCustomValidity('')">
//Message subscriber implementation
public class AuditSubscriber : IMessageSubscriber
{
public IList<string> SubscribedRouteKeys
{
get { return new List<string>()
{
"*.inceitive.attested.*"
};
}
amqp://<User Name>:<Password>@<Host>:<Port>/<vhost>
amqp://pranav:123456@NDI-LAP-462:5672/