Skip to content

Instantly share code, notes, and snippets.

View vishnuatrai's full-sized avatar
🎯
Focusing

Vishnu Atrai vishnuatrai

🎯
Focusing
View GitHub Profile
@vishnuatrai
vishnuatrai / installing_cassandra.md
Created July 3, 2020 03:03 — forked from hkhamm/installing_cassandra.md
Installing Cassandra on Mac OS X

Installing Cassandra on Mac OS X

Install Homebrew

Homebrew is a great little package manager for OS X. If you haven't already, installing it is pretty easy:

ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
@vishnuatrai
vishnuatrai / openshift-cheatsheet.md
Created September 23, 2019 10:38 — forked from rafaeltuelho/openshift-cheatsheet.md
My Openshift Cheatsheet

My Openshift Cheatsheet

Openshift build secrets for cloning git repos using SSH Keys

  • To create ssh secret:
oc create secret generic sshsecret \
    --from-file=ssh-privatekey=$HOME/.ssh/id_rsa
@vishnuatrai
vishnuatrai / pom.xml
Created June 22, 2019 12:04 — forked from timmolderez/pom.xml
Adding dependencies to local .jar files in pom.xml
If you'd like to use a .jar file in your project, but it's not available in any Maven repository,
you can get around this by creating your own local repository. This is done as follows:
1 - To configure the local repository, add the following section to your pom.xml (inside the <project> tag):
<repositories>
<repository>
<id>in-project</id>
<name>In Project Repo</name>
<url>file://${project.basedir}/libs</url>
@vishnuatrai
vishnuatrai / gist:186720b3a26d2c67922f9033f22c69d8
Created December 13, 2018 08:20 — forked from zsol/gist:3682934
script to check for kafka consumer lag
from kazoo.client import KazooClient
config = {
'consumer_group': '<%= @consumer_group %>',
'topic': '<%= @topic %>'
}
def main():
zk = KazooClient()
zk.start()

Using docker container engine

To use docker as the container runtime run:

$ minikube start \
    --network-plugin=cni \
    --container-runtime=docker
@vishnuatrai
vishnuatrai / docker-compose.yml
Created July 9, 2018 08:05 — forked from yoanisgil/docker-compose.yml
Elastic Search - Docker Compose
master:
image: elasticsearch:2
ports:
- "9200:9200"
restart: always
container_name: es_master
es-node:
image: elasticsearch:2
command: elasticsearch --discovery.zen.ping.unicast.hosts=es_master

1 Background (page 2)

Today's system requirement

  • large number of request
  • huge amount of data
  • quick response time
  • (almost) 100% uptime

(page 3) If we compare the number of Internet users in the past decades with the number of users of the two afore mentioned websites, we can see that they now handle as much traffic as the entire Internet used to.

@vishnuatrai
vishnuatrai / ntp.conf
Created March 29, 2018 08:38 — forked from phillipuniverse/ntp.conf
Set up NTP with Ansible, dedicating one as a timelord
# /etc/ntp.conf, configuration for ntpd; see ntp.conf(5) for help
driftfile /var/lib/ntp/ntp.drift
# Enable this if you want statistics to be logged.
#statsdir /var/log/ntpstats/
statistics loopstats peerstats clockstats
filegen loopstats file loopstats type day enable
@vishnuatrai
vishnuatrai / install_elasticsearch_osx.md
Created March 6, 2018 10:29 — forked from djonsson/install_elasticsearch_osx.md
OS X installation instructions for Elasticsearch + Kibana + Marvel

What is this?

Following this guide will set up a local Elasticsearch with Kibana and Marvel using Homebrew and Homebrew Cask

Prerequisites

If you already have Java installed on your system, skip steps Install Cask and Install Java

If you already have Java and Homebrew installed on your system, skip steps Prerequisites, start at Install Elasticsearch and Kibana after running $ brew update

Install Homebrew

  • $ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
@vishnuatrai
vishnuatrai / simple-promise-retry.js
Created January 30, 2018 14:02 — forked from briancavalier/simple-promise-retry.js
A few general patterns for retries using promises
function keepTrying(otherArgs, promise) {
promise = promise||new Promise();
// try doing the important thing
if(success) {
promise.resolve(result);
} else {
setTimeout(function() {
keepTrying(otherArgs, promise);