Skip to content

Instantly share code, notes, and snippets.

View shukla2112's full-sized avatar
๐Ÿ‘‹
Hi!

Nikunj Shukla shukla2112

๐Ÿ‘‹
Hi!
View GitHub Profile
@shukla2112
shukla2112 / fileCopy.sh
Created July 19, 2017 18:23
copy 30 files from every directory and copy to one level up directory with same folder struct
#!/bin/bash
for dir in $(ls -l | grep '^d' | awk '{print $9}')
do
count=0
for entry in "$dir"/*
do
if [ -f "$entry" ] && [ $count -lt 30 ];then
echo "$entry"
count=$(expr $count + 1)
@shukla2112
shukla2112 / rabbitmq-crash-sys.log
Created May 23, 2017 08:44
rabbitmq-crash-sys.log
May 23 05:32:36 ip-10-179-149-27 kernel: [74404369.256535] [22304] 109 22304 40743 3939 80 1488 0 python
May 23 05:32:36 ip-10-179-149-27 kernel: [74404369.256537] [22305] 109 22305 23147 3958 50 1008 0 python
May 23 05:32:36 ip-10-179-149-27 kernel: [74404369.256540] [20068] 108 20068 1111 0 5 25 0 rabbitmq-server
May 23 05:32:36 ip-10-179-149-27 kernel: [74404369.256542] [20111] 108 20111 2651053 1795277 3918 103824 0 beam.smp
May 23 05:32:36 ip-10-179-149-27 kernel: [74404369.256544] [20224] 108 20224 1865 0 9 23 0 inet_gethost
May 23 05:32:36 ip-10-179-149-27 kernel: [74404369.256546] [20225] 108 20225 3446 2 12 38 0 inet_gethost
May 23 05:32:36 ip-10-179-149-27 kernel: [74404369.256548] [27739] 0 27739 26407 238 55 5 0 sshd
May 23 05:32:36 ip-10-179-149-27 kernel: [74404369.256550]
@shukla2112
shukla2112 / elasticsearch.yml
Created April 20, 2017 11:38 — forked from reyjrar/elasticsearch.yml
ElasticSearch config for a write-heavy cluster
##################################################################
# /etc/elasticsearch/elasticsearch.yml
#
# Base configuration for a write heavy cluster
#
# Cluster / Node Basics
cluster.name: logng
# Node can have abritrary attributes we can use for routing
@shukla2112
shukla2112 / benchmark.md
Last active April 15, 2017 09:56
tools and commands for benchmarking different software and hardware

Apache benchmark tool

AB is used for making parallel request to web service

Install

sudo apt-get install apache2-utils

Usage

ab -c 500 -n 500 http://localhost:1234/

@shukla2112
shukla2112 / README.md
Created October 3, 2016 10:34 — forked from brunogaspar/README.md
Install wkhtmltopdf on Ubuntu 14.04 64-bit

Install wkhtmltopdf on Ubuntu

This was tested on:

  • Ubuntu 14.04 x64
  • Ubuntu 16.04 x64

Step 1

Install the xvfb server by running

@shukla2112
shukla2112 / Instructions_to_login.md
Last active April 28, 2020 02:36 — forked from sahilsk/Instructions_to_login.md
Instructions to login to servers

How to access server

  • Edit ssh config of your system

    vim ~/.ssh/config

Paste the following content:

@shukla2112
shukla2112 / grant_select.sh
Last active November 17, 2016 07:28
Give select access to multiple tables and multiple columns in remote mysql database
#!/bin/bash
# file.txt contains the table name in everyline
# Example -
# practice_doctors
# practice_groups
# vn_practices
# attribute_values
# give access to multiple column on a table
# GRANT SELECT (col1), INSERT (col1,col2) ON mydb.mytbl TO 'someuser'@'somehost';
@shukla2112
shukla2112 / IAMforS3readonly.json
Last active July 6, 2016 09:40
Read Only console access to the specific bucket
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "Stmt1463384662000",
"Effect": "Allow",
"Action": [
"s3:GetBucketAcl",
"s3:GetBucketCORS",
"s3:GetBucketLocation",