Skip to content

Instantly share code, notes, and snippets.

View pavankjadda's full-sized avatar
😀
Follow me on Twitter @pavankjadda

Pavan Kumar Jadda pavankjadda

😀
Follow me on Twitter @pavankjadda
View GitHub Profile
@pavankjadda
pavankjadda / Sonarqube with Postgres database using docker.md
Last active January 22, 2025 13:05
Setup Sonarqube with Postgres database using docker

Setup Sonarqube with Postgres database using docker

Both Sonarqube and Postgres database should be same network in order communicate with each other. First create docker network using the following commands

Create docker network

Delete existing docker network and create new docker network sonarqube

docker network rm sonarqube_network
docker network create sonarqube_network

Run PostGres DB container

@pavankjadda
pavankjadda / Sql Server with Spring Boot.md
Last active April 2, 2020 04:45
Sql Server with Spring Boot and Spring Data

Sql Server with Spring Boot and Spring Data

In order to use SQL server with Spring Boot and Data JPA, we need to do the following

  1. Add SQL server jdbc driver to pom.xml. Change the jre11 value to your JRE version
    <dependency>
         <groupId>com.microsoft.sqlserver</groupId>
         <artifactId>mssql-jdbc</artifactId>
         <version>8.2.2.jre11</version>
     </dependency>
    
@pavankjadda
pavankjadda / Liquibase Demo pom.xml
Last active July 15, 2020 21:04
Liquibase Demo pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.3.1.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
@pavankjadda
pavankjadda / redisson-dev.yaml
Created February 17, 2020 05:59
redisson-dev.yaml
singleServerConfig:
address: "redis://localhost:6379"
@pavankjadda
pavankjadda / application.yml
Created February 17, 2020 05:50
application.yml
### Server information
server:
port: 8080
### Spring Properties
spring:
application:
name: PRES 2.0
@pavankjadda
pavankjadda / HazelCastConfig.java
Last active May 12, 2020 04:07
HazelCastConfig.java
package com.pj.hazelcastdemo.config;
import com.hazelcast.config.Config;
import com.hazelcast.config.NetworkConfig;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
public class HazelCastConfig
{
@pavankjadda
pavankjadda / docker-hazelcast.yml
Last active February 14, 2020 05:18
docker-hazelcast.yml
version: '3'
services:
hazelcast1:
image: hazelcast/hazelcast
environment:
- 'JAVA_OPTS=-Dhazelcast.local.publicAddress=192.168.1.157:5701 -Dhazelcast.mancenter.url=http://mancenter:8090/mancenter -Dgroup.name=hz-compose -Dgroup.password=s3crEt'
ports:
- '5701:5701'
links:
- 'management-center:mancenter'
@pavankjadda
pavankjadda / Clean uninstall and install MySql on MacOS.md
Last active December 2, 2019 05:43
Clean uninstall and install MySql on MacOS

Clean uninstall MySql from MacOS

  1. ps -ax | grep mysql
  2. stop and kill any MySQL processes
  3. brew remove mysql
  4. brew cleanup
  5. sudo rm /usr/local/mysql
  6. sudo rm -rf /usr/local/var/mysql
  7. sudo rm -rf /usr/local/mysql*
  8. sudo rm ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
@pavankjadda
pavankjadda / SSH key authentication in Linux.md
Last active September 16, 2023 13:26
SSH key authentication in Linux
  1. Open Terminal on local machine

  2. Paste the text below, substituting in your email address.

  ssh-keygen -t rsa -b 4096 -C "[email protected]"
  1. Copy the key to remote server using the following command. Enter the password when prompted
  ssh-copy-id username@server_ip_address
@pavankjadda
pavankjadda / How to create Spring Boot app as Ubuntu service.md
Created September 27, 2019 04:16
How to create Spring Boot app as Ubuntu service?

How to create Spring Boot app as Ubuntu service?

  1. Create service named employee using vi command
    sudo vim /etc/systemd/system/employee.service
    
  2. Copy paste the following content into the file and make sure to change the ExecStart command arguments
    [Unit]
    Description=Employee Spring Boot application service