Posts

Install XWIKI

Image
Hey everyoneπŸ˜€, today I want to share another interesting tool called XWiki. An amazing tool for enterprise level. For those who don't know about this tool, I recommended clicking this Wikipedia URL . So Let's see how to configure XWiki. Step 1 Install JDK Check JAVA:-   java -version Update the repositories:- sudo apt-get update Install OpenJDK:- sudo apt-get install openjdk-8-jdk Verify the version of the JDK:- java -version Step 2 Set up the XWiki LTS APT repo Log in as a sudo user, and then download and set up the XWiki LTS (Long Term Support) APT repo on your server instance  (source:- internet) : cd wget -q "https://maven.xwiki.org/public.gpg" -O- | sudo apt-key add - sudo wget "https://maven.xwiki.org/lts/xwiki-lts.list" -P /etc/apt/sources.list.d/ sudo apt update Note : If you want to try out the latest stable XWiki release (but NOT LTS), you can download the below XWiki APT repo instead (source:- internet): cd wget -q "https://maven.xwiki.org...

Balanced Paranthesis

For a given a string expression containing only round brackets or parentheses, check if they are balanced or not. Brackets are said to be balanced if the bracket which opens last, closes first. Example: Expression: (()()) Since all the opening brackets have their corresponding closing brackets, we say it is balanced and hence the output will be, 'true'. You need to return a boolean value indicating whether the expression is balanced or not. Note: The input expression will not contain spaces in between. Input Format: The first and the only line of input contains a string expression without any spaces in between.  Output Format: The only line of output prints 'true' or 'false'. Note: You don't have to print anything explicitly. It has been taken care of. Just implement the function. Constraints: 1 <= N <= 10^7 Where N is the length of the expression. Time Limit: 1sec Sample Input 1 : (()()()) Sample Output 1 : true Sample Input 2 : ()()(() Sample Outp...

How to trigger "Scan Multibranch Pipeline Now"

Image
 Hey everyone πŸ˜€, Sometimes developers face a common issue related to trigger a job using the Jenkins pipeline. As we all know to trigger Freestyle Job using pipeline  we write code something similar which is mention below build JOB_NAME; but what if we want to trigger a multi-branch job or trigger   Scan Multibranch Pipeline Now. If we try to trigger a multibranch job by using the above code  it gives an error, something similar like  ERROR: Waiting for non-job items is not supported As we see it doesn't work, the reason is that it is a non-wait type job item, so the only thing we need to do is to add a wait=false statement in the code. I know it's not so big thing but sometimes people missed this little thing. Hope you enjoyed my blog post.😎 

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✌

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