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 / How to fix gitignore not working issue.md
Last active April 24, 2025 15:39
How to fix "gitignore not working" issue

FYI: Created blog post with more details

How to fix ".gitignore not working" issue?

Sometimes git does not exclude files/folders added .gitignore especially if you had commited them before. Here is how to fix it. I am ignoring node_modules from Angular project as an example

  1. Update .gitignore with the folder/file name you want to ignore. You can use anyone of the formats mentioned below (prefer format1)
### Format1  ###
node_modules/
@pavankjadda
pavankjadda / Create New Schema in Confluent Kafka Registry.md
Last active January 31, 2019 19:23
Create New Schema in Confluent Kafka Registry

See Confluent Registry for more information about this

Schema Files:

Customer.avsc

{"namespace": "com.kafkastream.model",
  "type": "record",
@pavankjadda
pavankjadda / Setup ELK Stack with Spring Boot.md
Created February 6, 2019 05:42
Setup ELK Stack logging with Spring Boot
  1. Download Elastic Search and unzip it
  2. Start Elastic search with the following command and go to URL http://localhost:9200
$ bin/elasticsearch
  1. Download LogStash and unzip it
  2. Create logstash-elk.conf file on logstash home directory with the following content and change the log file location and index name based on your settings
input {
 file {
@pavankjadda
pavankjadda / Add Bootstrap 4.x to Angular Project.md
Last active February 14, 2019 17:03
How to add Bootstrap 4.x to Angular Project

How to add Bootstrap 4.x to Angular Project?

  1. Bootstrap 4.x depends on jQuery and popper.js . So, install them first
$ sudo npm install jquery
$ sudo npm install popper.js
  1. Install Bootstrap and Font-Awesome dependencies to project using following command
npm install bootstrap font-awesome 
@pavankjadda
pavankjadda / How to select Spring boot profile from maven.md
Last active December 18, 2023 13:07
How to select Spring boot profile from maven.md

How to select Spring boot profile from maven?

  1. Define following profiles in pom.xml
<profiles>
   <profile>
        <id>dev</id>
        <properties>
            <activatedProperties>dev</activatedProperties>
        </properties>
        <activation>
@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
    
    
@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 / 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 / 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 / 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
{