Skip to main content

Posts

Showing posts from November, 2016

Installing Oracle Database 11g Release 2 hangs at Desktop Class (step 4) in Windows 7

The following steps should be followed to solve this problem. 1. Run cmd as Administrator. 2. Navigate to the directory where the your setup.exe resides for oracle 11g using the cmd. 3. Type the following command and press enter. Remember to give the path to where your java jdk is installed in your system here. Most importantly, I have used PROGRA~1 as a replacement for the string "Program Files". The reason for the installer to hang at step 4 is it cannot find the correct path to the JDK when the path contains spaces. Use PROGRA~2 as a replacement for the string "Program Files (x86)". This depends on where your JDK is installed. setup.exe -jreLoc C:\PROGRA~1\Java\jdk1.8.0_40 Cheers :)

How to undo an accidental git merge that has not been pushed to GitHub yet?

There are several ways to do this. You can try out one of the following commands . 1. git reset --hard <commit_sha> Check  git log  to find the commit_sha for the command above. 2. git reset --hard HEAD~5 Five here is the number of commits that you need to get back. 3. git reset --hard ORIG_HEAD   ORIG_HEAD  will point to a commit directly before merge has occurred. You don't need to find for the commit_sha. Cheers. :)

How to delete multiple files from Git at once in Git Bash or Ubuntu?

You can easily delete a single file from GitHub through the browser, but how can we delete a bunch of files altogether using Git so that you do not have to delete them one by one? The most easiest step is to type the following command to track all the files that are deleted and remove them. git ls-files --deleted -z | xargs -0 git rm   After executing the above command, when you type the following command, you will see that all the deleted files have been added to commit. They are in green. git status Now you have to make a commit and push to your origin. Note: To remove a single file or a couple of files from the command line or git bash, you type the following. git rm file1 file2 file3 Cheers. :)

How to connect my database instance with elastic beanstalk instance in AWS?

If you have deployed your web application in Elastic Beanstalk in AWS and now you need to connect a database to this instance, and your database is actually residing in a different instance, how can you actually connect them? It's easy with Elastic Beanstalk. I will explain an example scenario that I used for connecting my elastic beanstalk web application with another instance containing my MongoDB database. By looking at this, you can customize as per your need. Don't worry. This is easy. :) The only things you need here are the details about the 1. Database name that you need to connect to. Ex:- "myDB" 2. Port at which the database instance is listening. EX:- In the case of MongoDB, the listening port is 27017 3. Host name of your database instance. EX:- Like localhost, in this case, it will be the Public DNS of your database instance 4. The password of your database if exists. First these details need to be set as environment variables in Elastic Be

How to install MongoDB in Ubuntu 14.04 LTS?

This is a very quick guide to installing MongoDB in Ubuntu through the terminal. If you need a more detailed explanation and why and how of the steps, you can refer this link from which I got the source to write this blog post. Here you will finished installing MongoDB for Ubuntu 14.04 LTS in 5 steps. It is really easy. 1.  Import the public key used by the package management system. sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10 2.  Create a list file for MongoDB. echo "deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.0.list 3.  Reload local package database. sudo apt-get update 4.  Install the MongoDB packages. sudo apt-get install -y mongodb-org 5.  Start MongoDB. sudo service mongod start Cheers. :)