Skip to content

Instantly share code, notes, and snippets.

@shakeeb91
shakeeb91 / bash_git.md
Created July 10, 2024 14:14
BASH and GIT Setting

Introduction

All OS either on windows and linuxs has there desired user. You can set the profile and bash settings from a file named as ~/.bashrc or ~/.profile.

Windows

If you have installed BASH on your windows machine using WSL and want to beautify your git terminal you need to update the ~/.bashrc

Install gitprompt.sh

Download the git prompt script in home path.

curl -o ~/.git-prompt.sh https://raw.githubusercontent.com/git/git/master/contrib/completion/git-prompt.sh
@shakeeb91
shakeeb91 / k8s.md
Last active February 12, 2024 13:17

Kubernetes

Commands to Use

kubectl get pod

kubetctl get deployment

kubetctl get replicaset

To check linux disk space. See vg-data disk is 3.3TB we will extend it to 3.7TB

root@fs1 ~ # sudo df -hT
Filesystem                         Type            Size  Used Avail Use% Mounted on
udev                               devtmpfs        3.8G     0  3.8G   0% /dev
tmpfs                              tmpfs           779M  836K  779M   1% /run
/dev/mapper/vg--system-root        ext4            9.8G  4.3G  5.2G  46% /
tmpfs                              tmpfs           3.9G     0  3.9G   0% /dev/shm
tmpfs                              tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs                              tmpfs           3.9G     0  3.9G   0% /sys/fs/cgroup

ELK stack is widely used for logging and monitoring indexes.

Kibana Dev Tools and GET/POST Request

  1. To Check the Cluster health

GET /_cluster/health

  1. To Check the indices/ List the indices

GET /_cat/indices

@shakeeb91
shakeeb91 / KB_terraform_hashicorp.md
Last active February 12, 2024 11:03
Terraform Hashicorp Exam and Learning

Commands:

  • terraform console In order to use the terraform console command, the CLI must be able to lock state to prevent changes. TRUE Acquiring state lock. This may take a few moments...
  • terraform workspace show — Show the name of the current workspace.
  • terraform workspace list — List your workspaces.
  • terraform workspace select — Select a specified workspace.
  • terraform workspace new — Create a new workspace with a specified name.
@shakeeb91
shakeeb91 / s3_object.md
Last active January 4, 2024 16:25
Cross Account S3-Bucket Object Authentication

Cross Account S3-Bucket Object Authentication

Introduction:

We can list, get and put the objects in S3 Bucket if you are using a single account on AWS by applying simple policies as you are the main account owner and the bucket too. But there are some limitations arises when you have multiple accounts and you are uploading objects from one account user/role to another account bucket. Here in this article, I am addressing multiple issues and their resolution in this regard.

@shakeeb91
shakeeb91 / Linux_Disk.md
Last active October 7, 2021 15:30
disk addition - raid configuration - partitioning

Linux Disk

Basic

Note:

nvme0 = disk ( nvme uses PCI interface )
sda   = disk ( sda uses SATA III interface )
@shakeeb91
shakeeb91 / linux_cheat_sheet.md
Last active August 26, 2021 22:18
Linux Cheat Sheet

Linux Cheat Sheet

Below are the commands tested and verfied over Linux ( Debian / Ubuntu ) Based OS.

.htaccess

Deny or Allow
<Limit GET POST>
@shakeeb91
shakeeb91 / singleuser_multiplebucket.md
Last active August 18, 2021 08:06
Single user to access Multiple Bitbucket accounts using SSH Keys

Single user to access Multiple Bitbucket accounts using SSH Keys

ISSUE: Not able to access different bitbukcet accounts from single ssh access key

It is not possible to access different bitbucket account using single ssh key. So to access it from single computer we need to create multiple SSH keys and set those accordingly in bitbucket.

Generate SSH keys

By default we havse single SSH key in out home directory. https://confluence.atlassian.com/bitbucketserver/creating-ssh-keys-776639788.html