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 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 / 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 / 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 / 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 / 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 / Serve Custom static resource locations in Spring Boot.md
Last active November 16, 2021 00:13
Serve Custom static resource locations in Spring Boot

Configure Spring Boot Application to serve Custom Static Resource locations

Static resources can be configured using two approaches in Spring Boot

  • Add custom path in application.properties/application.yaml
  • Implement WebMvcConfigurer addResourceHandlers() method

First configure your SpringSecurity class to accept requests to this resources

@Override
public void configure(WebSecurity web)
@pavankjadda
pavankjadda / Maven Install Directions macOS.md
Last active January 16, 2019 14:01
Maven Install Directions on macOS

Maven Install Directions on macOS

$ brew update
$ brew install maven

Check version

$mvn -v
@pavankjadda
pavankjadda / Cuckoo Instructions.md
Created November 19, 2018 19:51
Cuckoo Instructions.md

Create NIC and assign IP Address

VBoxManage hostonlyif create

VBoxManage hostonlyif ipconfig vboxnet0 --ip 192.168.56.1 --netmask 255.255.255.0

Remove NIC from VM

VBoxManage hostonlyif remove

@pavankjadda
pavankjadda / Mysql Change password.md
Created November 5, 2018 17:28
MySQL Change password on Ubuntu when default password not provided

MySQL Change password on Ubuntu when default password not provided

  1. Open terminal and tyfollowing commands one by one. Do not close the terminal after you are done
sudo mysql
USE mysql;
UPDATE user SET authentication_string=PASSWORD('YOUR_PASSWORD') WHERE User='root';
UPDATE user SET plugin="mysql_native_password";
FLUSH PRIVILEGES;
quit;
@pavankjadda
pavankjadda / Create Windows USB bootable on macOS.md
Last active December 30, 2024 08:07
Create Windows USB bootable drive on macOS

Create Windows bootable drive on macOS

  1. Download Windows ISO (Windows 7 or latest) from Official Windows store
  2. Once download finished, double click on ISO image. Mac will mount this ISO images in Volumes.
  3. Skip to step 5 if you like command line options. Open 'Disk Utility' application, select your USB device under 'external' category. Look for field Device and copy that value (ex. disk4)
  4. Right click on your device and select Erase then use following information to fill popup window
Name => WINDOWS10
Format => MS-DOS (FAT)
Scheme => GUID Partition Map