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 / DockerCommands.md
Last active September 16, 2023 13:30
Most Common Docker Commands

List Docker Images

docker images

List All Docker Images

docker images -a

List dangling images (orphan images)

docker images -f dangling=true

Remove dangling images

@pavankjadda
pavankjadda / KubernetesCommands.md
Last active October 12, 2018 18:17
Kubernetes Commands

Get all pods in a namespace

kubectl get pods --namespace=kube-system

Get all services in a namespace

kubectl get services --namespace=kube-system

@pavankjadda
pavankjadda / KafkaCommands.md
Last active February 1, 2019 01:12
Kafka Commands

Kafka Topic Commands

bin/kafka-topics.sh --list --zookeeper 172.19.0.8:2181

bin/kafka-topics.sh --describe --zookeeper 172.19.0.8:2181 --topic customChannel

bin/kafka-topics.sh --zookeeper 172.19.0.8:2181 --delete --topic customChannel

bin/kafka-topics.sh --create --zookeeper 172.19.0.8:2181 --replication-factor 1 --partitions 1 --topic greetings
@pavankjadda
pavankjadda / Generate Custom SSH Key.md
Last active October 27, 2023 16:54
Generate SSH Key with custom name

Create new Private and Public key on Host machine (Ex.macOS)

$ssh-keygen -t rsa
# Enter location and file name like (/Users/pjadda/.ssh/minishift_rsa), do not use default files
#Passphrase is optional

Create .ssh folder in Guest OS even if it exists

$ssh docker@192.168.64.3 mkdir -p .ssh
@pavankjadda
pavankjadda / Git Commands and Tips.md
Last active November 20, 2018 05:07
Git Commands and Tips

Git Commands and Tips

Enable Git autocomoplete in macOS or Ubuntu

  1. Download git autocompletion script using following CURL command
curl https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash -o ~/.git-completion.bash
  1. Open ~/.bash_profile file (~/.bash_rc if use Linux) and add the following
if [ -f ~/.git-completion.bash ]; then
 . ~/.git-completion.bash
@pavankjadda
pavankjadda / Create Windows USB bootable on macOS.md
Last active July 10, 2023 11:53
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
@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 / 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 / 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 / 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)