Posts

A chessboard

In this version of chess, only two kings pieces are placed on the chessboard. Initially, the coordinates of the first king piece are generated   ( X 1 ,   Y 1 ) , it is placed on the chessboard at the generated position. Now, the coordinates of the second king piece are generated   ( X 2 ,   Y 2 ) , it is placed on the chessboard at the generated position. These pieces can be moved in a sequential manner, that is, one by one, starting from the first piece. Both the kings want to win if they can not, at least draw. Rules The chessboard is a standard   8 × 8   board. The kings can move from one cell to another if they have an edge or corner in common. If the generated coordinates of the second king are exactly equal to the first, then the second king wins. Both players play optimally. The game is considered to be won by the first king piece if after it moves, then it can have the same coordinates as the second. The second king pi...

How to pass parameters in webhook?

Image
Hey everyone 😊, Today I want to share another interesting thing which I found in StackOverflow and that is how to pass parameters in webhook. Those who don't know about webhook I advise you to google about it before going further reading.  So for demonstration purpose, I am going to use Jenkins and Generic Webhook plugin . I created a job and called it testing  and select Generic Webhook  Trigger . Thereafter I add Request Parameter   and in the request parameter I added the name of the request which is name Thereafter I added a token to specify that this job can only be triggered. After this, I select Execute Shell from Build  and write the following code  After doing this add webhook URL in bitbucket repository or  GitHub repository with the parameter. The URL is look something like this  Webhook URL:- https://[YOUR_JENKINS_URL]/generic-webhook-trigger/invoke?token=trigger&name=Svastikkka  The configuration will something like this ...

How to fetch all repositories of any workspace in bitbucket using bitbucket APIs

Image
Hey everyone πŸ˜„ recently I completed a team project regarding set up some CI/CD with Rest API and because it should have CI/CD so we use Jenkins but in here I am going to demonstrate that "How to fetch all repositories of any workspace in bitbucket ". So here, we use bash script and bitbucket rest API  But first, we need to understand curl command. Well according to GfG:- "curl is a command-line tool to transfer data to or from a server, using any of the supported protocols (HTTP, FTP, IMAP, POP3, SCP, SFTP, SMTP, TFTP, TELNET, LDAP or FILE). This tool is preferred for automation since it is designed to work without user interaction. curl can transfer multiple files at once." So hey we know, we need curl for sending/receiving request and response from bitbucket server. The other thing we need is bitbucket APIs which can found in here Bitbucket API . In the website, there are lots of APIs available but we need only this one  {workspace} .  So ...

How to do ssh login to push/pull code on bitbucket

Hey everyone πŸ˜€  Tonight (11:43 pm) I am writing this blog post for those who find difficulty in ssh login on bitbucket and also for those who loves learn new thinsgs. Please follow the steps to add ssh key into bitbucket account to solve your issue. Open git bash terminal and enter the command ssh-keygen -t rsa -C "your email address" Enter passphrase (leave it blank) and enter Enter the same phrase again (leave it blank) and enter Copy the  id_rsa.pub  file content from where it is residing in your system For Windows:-  C:\Users\username.ssh For Mac:- /Users/UserName(Account Name) Login to bitbucket account  Click top right-most user icon -> bitbucket settings -> ssh keys under security menu  Paste into key-field and save it.  Restart your git bash terminal and now you are able to push your work, clone others work and pull your repos✌

Configure 5099 rpm packages using Yum Without Internet

Image
Hey everyone πŸ˜€, Today I want to share an exciting configuration tool which is called YUM "not Yumraj " but RHEL's Yum . Yum is the default package management utility in RHEL/Centos Linux. For your knowledge aptitude (apt) is a  default package manager for Debian GNU/Linux systems. Note :- Without Yum or apt you will face difficulty to manually install the packages in a Linux system. Why we need Yum?  Yum is used to searching, installing, updating and removing necessary rpm files from the system. RHEL/Centos Linux use .rpm file to manage the software. A . rpm file extension represents the Linux software package file. Yum uses a repository to manage the rpm files. A repository is the collection of RPM files. Since Yum depends on the repository, there must be at least one working repository before it can be used. A repository can be configured either locally (on local hard) or remotely (on network or internet). KeyPoints To Remember YUM stands for Yellow Dog Updater Man...

Docker command cheatsheet

Image
The reason for creating this cheat sheet is because a long time ago I was called for an interview and he asked me some basic command questions regarding docker and in reply, I said "I forget the actual command πŸ˜‘" yeah you read it right I know it sounds not good so for the next time I make sure this won't happen again in my life that is why I wrote down below some basic commands that every docker user should know. Hope this cheat sheet is also helpfully for you.πŸ˜€ To see all commands of docker  Write down  docker on the command line. You will see all the commands of docker in the image below. Get the status of the docker daemon Docker information:- docker info C reate a container without  starting It Creates container:- docker create [image name] Docker run commands  Run container:- docker run [image name] Run container with specified image version:- docker run [image name]:[version] Docker run in background/detach mode image :- docker run -d [image name] Docker...

Popular posts from this blog

MySQL Multi Source Master Slave Replication using GTID

Setting Up PostgreSQL Logical Replication with Docker Compose

Regex 101: An Introduction to Regular Expressions for Developers