Skip to content

Instantly share code, notes, and snippets.

View Sakib37's full-sized avatar

Mohammad Badruzzaman Sakib37

  • Berlin, Germany
View GitHub Profile
@Sakib37
Sakib37 / scp commands
Created February 22, 2019 14:25
useful "scp" commands to trasfer files
# Copy ssh key to a remove server
#################################
ssh-copy-id LOCAL_PATH_TO_THE_KEY USER_NAME@REMOTE_HOST:REMOTE_LOCATION
# ssh-copy-id may not be installed in the remote server. In that case, First create .ssh directory on remote server
ssh USER_NAME@REMOTE_HOST:REMOTE_LOCATION "umask 077; test -d .ssh || mkdir .ssh"
## cat local public key file and pipe over ssh to append the public key in the remote serve. Example-
cat ~/.ssh/id_rsa.pub | ssh user@remote_ip_or_hostname "cat >> .ssh/authorized_keys"
@Sakib37
Sakib37 / linux_find_command
Created February 22, 2019 14:04
useful find commands in Linux
################################################################################
How To Use Find and Locate to Search for Files on a Linux
################################################################################
Source : www.digitalocean.com/community/tutorials/how-to-use-find-and-locate-to-search-for-files-on-a-linux-vps
=======
BY NAME:
========
#!/bin/bash
# Maintainer: Mohammad Badruzzaman
#set -xe
# Environments
bold=$(tput bold)
red=$(tput setaf 1)
green=$(tput setaf 2)

export ES_HOST=https://MY_ELASTIC_HOST

Task Command Comment
List indices: curl "${ES_HOST}/_cat/indices?v"
Delete indices: curl -XDELETE "${ES_HOST}/index1,index2" Delete index1 and index2
Cluster migration Status: curl -XGET "${ES_HOST}/_cat/recovery?v&active_only" Output of this command should vary over time period (ex- 1 mintue)
Shards Status: curl -XGET "${ES_HOST}/_cat/allocation?v" Shards are allocated to each data node and how much disk space they are using
Number of shards: curl "${ES_HOST}/_cat/shards" Shards are allocated to each data node and how much disk space they are using
<!-- AWS Region: US East (Northern Virginia) -->
<add ipAddress="72.44.32.0" subnetMask="255.255.224.0" allowed="true" />
<add ipAddress="67.202.0.0" subnetMask="255.255.192.0" allowed="true" />
<add ipAddress="75.101.128.0" subnetMask="255.255.128.0" allowed="true" />
<add ipAddress="174.129.0.0" subnetMask="255.255.0.0" allowed="true" />
<add ipAddress="204.236.192.0" subnetMask="255.255.192.0" allowed="true" />
<add ipAddress="184.73.0.0" subnetMask="255.255.0.0" allowed="true" />
<add ipAddress="184.72.128.0" subnetMask="255.255.128.0" allowed="true" />
<add ipAddress="184.72.64.0" subnetMask="255.255.192.0" allowed="true" />
<add ipAddress="50.16.0.0" subnetMask="255.254.0.0" allowed="true" />
@Sakib37
Sakib37 / README.md
Created April 29, 2017 22:39 — forked from leonardofed/README.md
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.

For more about AWS and AWS Certifications and updates to this Gist you should follow me @leonardofed