Skip to content

Instantly share code, notes, and snippets.

@CsBigDataHub
CsBigDataHub / apache_kafka_interview_questions.md
Created October 17, 2024 18:24 — 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).
@CsBigDataHub
CsBigDataHub / proj2ram
Created May 17, 2022 18:12 — forked from redguardtoo/proj2ram
script to copy project to tmpfs
#!/bin/sh
if [ -z "$1" ];then
echo "Usage:"
echo " proj2ram proj-name"
echo " proj2ram restore proj-name"
exit 1
fi
@CsBigDataHub
CsBigDataHub / k8s-jprofiler-attach.sh
Created August 27, 2021 14:24 — forked from adiii717/k8s-jprofiler-attach.sh
Attach JProfiler agent to a JVM running in a Kubernetes pod
#!/bin/bash
set -ex
usage()
{
echo "usage: k8s-jprofiler-attach.sh pod_name"
}
k8s_jvm_pod="${1}"
control 'azurerm_resource_groups' do
describe azurerm_resource_groups do
its('names') { should include 'myResourcegroup' }
end
end
control 'azurerm_virtual_machine' do
describe azurerm_virtual_machine(resource_group: 'MyResourceGroup', name: 'prod-web-01') do
it { should exist }
it { should have_monitoring_agent_installed }
it { should have_only_approved_extensions(['MicrosoftMonitoringAgent']) }
its('type') { should eq 'Microsoft.Compute/virtualMachines' }
its('installed_extensions_types') { should include('MicrosoftMonitoringAgent') }
its('installed_extensions_names') { should include('LogAnalytics') }
its('properties.location') { should eq 'northeurope'}
control "subnet" do
describe azurerm_subnet(resource_group: 'MyResourceGroup', vnet: 'vnet-prod', name: 'subnet-web') do
it { should exist }
its('address_prefix') { should eq '192.168.0.0/24' }
its('nsg') { should eq 'my-nsg'}
end
end
@CsBigDataHub
CsBigDataHub / gist:48b3f4cd71833046adbdea2e6a10f704
Created June 26, 2021 02:03 — forked from daicham/gist:1955543
Print the methods of Jenkins inner object on script console
//all job name
jenkins.model.Jenkins.instance.items.each {
println "Job: ${it.name}"
}
//method list of Jenkins instance
jenkins.model.Jenkins.instance.class.methods.each {
println "Jenkins method: ${it.name}"
}
@CsBigDataHub
CsBigDataHub / pass.md
Created January 28, 2021 19:15 — forked from abtrout/pass.md
Using password-store with git repository synching

Password-store keeps your passwords (or any other sensitive information) saved in GnuPG encrypted files organized in ~/.password-store. For more information about GPG, consult the GNU Privacy Handbook.

Getting started

To get started, install pass and generate a keypair.

$ brew install pass
$ gpg --gen-key
$ gpg --list-keys
@CsBigDataHub
CsBigDataHub / gccemacs.md
Created October 15, 2020 01:35 — forked from AllenDang/gccemacs.md
Build gccemacs on MacOS catalina with gcc 10 installed by homebrew.
@CsBigDataHub
CsBigDataHub / gccemacs_osx.md
Created October 15, 2020 01:33 — forked from mikroskeem/gccemacs_osx.md
gccemacs on OSX

gccemacs on OS X

Read this first: http://akrl.sdf.org/gccemacs.html

Prerequisites

1) GCC with libgccjit enabled

For that you need to compile gcc (duh). I edited Homebrew's gcc formula: