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 / 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


<!-- 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" />

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
@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:
========
@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 / git commands
Created February 22, 2019 15:24
useful command for git
################################################################################
**************** INITIALIGE AND MANAGE GIT ************************
################################################################################
source: https://git-scm.com/doc
# Create a git repo using git API
curl -u 'USER' https://api.github.com/user/repos -d '{"name":"REPO", "private":"true"}'
# Here 'USER' is the username and 'REPO' is the repository name
# Configure git settings in the machine
@Sakib37
Sakib37 / How to install Arch linux
Created February 22, 2019 15:30
Arch linux installation instruction
https://bbs.archlinux.org/viewtopic.php?id=148038
https://www.youtube.com/watch?v=mHX9UIll014
######################################################
######### Arch Linux Installation ####################
######################################################
@Sakib37
Sakib37 / covert_ubuntu_server_into_light_desktop
Created February 22, 2019 15:31
How to convert ubuntu server inot a light desktop
# source: https://digitz.org/blog/install-gui-ubuntu-server/
http://en.ig.ma/notebook/2012/virtualbox-guest-additions-on-ubuntu-server
https://linuxconfig.org/how-to-install-gui-desktop-environment-on-ubuntu-linux-14-04-lts-trusty-thar
# Install lxde in server
sudo apt-get install --no-install-recommends lxde lxdm -y
# Install virtualbox_guest_edition
# Install necessary build tools and build dependencies:
sudo apt-get install -y dkms xorg build-essential linux-headers-generic
#!/bin/bash
# Maintainer: Mohammad Badruzzaman
#set -xe
# Environments
bold=$(tput bold)
red=$(tput setaf 1)
green=$(tput setaf 2)
@Sakib37
Sakib37 / MySQL commands
Last active April 9, 2019 09:42
Frequently used Mysql commands
List user:
SELECT user, host FROM mysql.user;
Delete user:
DROP USER 'USER'@'host';
Create user:
CREATE USER 'USER'@'10.%' IDENTIFIED BY 'PASSWORD' ;
GRANT SELECT ON *.* TO 'USER'@'host' ;
flush privileges;