Skip to content

Instantly share code, notes, and snippets.

View nellaivijay's full-sized avatar
🎯
Focusing

Vijayakumar Ramdoss nellaivijay

🎯
Focusing
View GitHub Profile
@vasanthk
vasanthk / System Design.md
Last active May 16, 2024 20:21
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
ambari-server stop
ambari-agent stop
pkill -9 java
#################################
# Remove Packages
################################
yum -y remove ambari-\*
yum -y remove hcatalog\*
yum -y remove hive\*
@kapkaev
kapkaev / kafka_topics.sh
Last active October 1, 2018 20:08
Calculate kafka topics sizes
#!/usr/bin/ruby
require 'net/ssh'
require 'pp'
def fetch(host)
data = []
Net::SSH.start(host, 'virool') do |ssh|
index_folders = ssh.exec!("ls -d /var/lib/kafka/*").split("\n")
data = index_folders.flat_map do |ifolder|
@michellesanver
michellesanver / elasticsearch.yml
Last active August 26, 2018 01:33 — forked from anonymous/elasticsearch.yml
ElasticSearch config
############################## Network And HTTP ###############################
# Elasticsearch, by default, binds itself to the 0.0.0.0 address, and listens
# on port [9200-9300] for HTTP traffic and on port [9300-9400] for node-to-node
# communication. (the range means that if the port is busy, it will automatically
# try the next port).
# Set the bind address specifically (IPv4 or IPv6):
#
# network.bind_host: 192.168.0.1
@GaryRogers
GaryRogers / gist:8ccc6a9e711ee229efa6
Last active September 24, 2016 15:31
Setting up InfluxDB on CentOS/RHEL

Setting up InfluxDB on CentOS/RHEL

The InfluxDB Docs give you a very brief overview of installing InfluxDB on a host. It boils down to 'here's the RPM, install it.' That's fine for looking at the software, but you'll probably want to adjust the configuration a bit for a production environment.

Basic Install

https://influxdb.com/docs/v0.9/introduction/installation.html

Config changes

Modify /etc/opt/influxdb/influxdb.conf

@theskumar
theskumar / app.py
Created November 17, 2014 06:47
Database diagram using sqlalchemy
# -*- coding: utf-8 -*-
''' Generates database schema graph from a relational database.
Usages:
Add database configuation in this file and then
python app.py
Note: You must have your latest database schema in the database
engine you are running against.
'''
from __future__ import unicode_literals, absolute_import
@ralph-tice
ralph-tice / README.md
Last active January 26, 2016 21:36
SolrCloud backups

A little background on my context:

We run multiple Solr JVMs per box, which live in directories like:

/mnt/solr_8983
/mnt/solr_8984
/mnt/solr_8985
...
/mnt/solr_${PORT}
@wmealing
wmealing / C-states.md
Last active May 17, 2024 07:53
What are CPU "C-states" and how to disable them if needed?

To limit a CPU to a certain C-state, you can pass the processor.max_cstate=X option in the kernel line of /boot/grub/grub.conf.

Here we limit the system to only C-State 1:

    kernel /vmlinuz-2.6.18-371.1.2.el5 ... processor.max_cstate=1

On some systems, the kernel can override the BIOS setting, and the parameter intel_idle.max_cstate=0 may be required to ensure sleep states are not entered:

### DML ###
# Keyspace Name
keyspace: stresscql
# The CQL for creating a keyspace (optional if it already exists)
keyspace_definition: |
CREATE KEYSPACE stresscql WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1};
# Table name
@prathik
prathik / .bash_create_alias
Last active August 29, 2015 14:03
Alias code with remove alias
alias showalias='cat ~/.bash_aliases'
#Type ma <aliasname> in a directory and it will create an alias to cd into that directory
makeAlias()
{
curDir=`pwd`
echo "alias $1='cd $curDir'" >> ~/.bash_aliases
source ~/.bashrc
}