Skip to content

Instantly share code, notes, and snippets.

@mohanpedala
mohanpedala / JDK_installation_macOS_windows_installation.md
Last active March 28, 2019 17:55
Java SE Development Kit Installation on Mac and Windows

macOS

Install the binary files provided by Oracle

  • Download JDK 8 from Oracle WebSite. [jdk-8u65-macosx-x64.dmg for Mac].
  • Double click on jdk-8u65-macosx-x64.dmg and follow the screen instructions.
  • Once the JDK package is installed check the below output
$ ls -l /Library/Java/JavaVirtualMachines
total 0
drwxr-xr-x  3 root  wheel  96 Mar  5 09:53 jdk1.8.0_201.jdk
@mohanpedala
mohanpedala / Maven_windows_installation.md
Last active December 6, 2021 20:25
Maven windows installation

Maven Installation

Prerequisites:
  • jdk 1.8 or 1.7

To verify jdk on your machine

  • Open command prompt and enter java -version
  • you can also check JAVA_HOME path in environment variables
JAVA_HOME C:\Program Files\Java\jdk1.8.x.x_xx
@mohanpedala
mohanpedala / generate_public_key_from_private.md
Created January 6, 2018 20:03
Generate public key from private key

While it is not possible to generate a private key from a public key(obvisouly), it is possible to generate public key if you have private key.

Run the below command to generate the public key.

ssh-keygen -f ~/.ssh/private_key_file -y > ~/.ssh/public_key_file.pub

From the 'man ssh-keygen'

-y      This option will read a private OpenSSH format file and print an
 OpenSSH public key to stdout.
@mohanpedala
mohanpedala / What_is_docker.md
Last active January 6, 2018 20:10
What is Docker

Docker is a tool designed to create, deploy and run applications in an isolated environemt which are called as containers. Containers allow a developer to package an application or a service with all the libraries and other dependencies and ship it as a package.

@mohanpedala
mohanpedala / Jenkins_Ins_Config_manual.txt
Created January 16, 2018 04:55
Jenkins configuration manual
Jenkins installation manual
Pre req's
1. Virtual Box
2. Centos 7
3. Apache tomcat
4. Jenkins
Procedure
1. Created a new vm in virtual box "Jenkins build server" allocated 3GB of ram and changed the network to "Bridged mode" linking "Intel dual band wireless" AC as the adapter
@mohanpedala
mohanpedala / Git.md
Last active March 19, 2018 17:08
Git
  • Git revert commit
git reset HEAD~

This will place the head to the previous commit

git reset --hard <SOME-COMMIT>

This will make your current branch (typically master) back to point at . Then make the files in your working tree and the index ("staging area") the same as the versions committed in .

https://stormpath.com/blog/what-the-heck-is-oauth
@mohanpedala
mohanpedala / force_delete_user_in_mac.md
Last active March 9, 2022 09:14
Force Delete user in mac

Can’t Delete Original Admin User on macOS High Sierra

I recently migrated to a new MacBook Pro. The old one was on High Sierra, but the new one wasn’t. So I created a temp “admin” account to do the upgrade, then do the migration with Migration Assistant.

All seemed okay, but when I went to delete the original user account, I couldn’t. And I don’t mean “you don’t know how to delete accounts” couldn’t. I mean, I tried every possible way, and it wouldn’t couldn’t.

I found this thread on the Apple forums with people having the same problem. After trying everything else, this is the solution shared in one of the replies that worked. Warning, I have no idea of the side effects this might have, but so far so good for me. Also, do not come crying to me if it totally hoses your machine. You’ve been warned!

@mohanpedala
mohanpedala / port_scan.md
Last active February 11, 2018 03:36
Port Scan

Netcat is a simple but useful tool used for TCP, UDP, Unix-domain sockets. Netcat can listen or connect specified sockets easily. Netcat is a platform independent command supported by Linux, Unix, Windows, BSD, MacOS etc. Common use cases for netcat are;

Syntax

nc [options] [destination] [port]

Help information about netcat can be get with -h option like below.

$ nc -h