Posts

Showing posts from 2015

Installing CentOS in Oracle VirtualBox Part 1: Create a New Virtual Machine For CentOS

Image
If you want to know your way around Red Hat Enterprise Linux distribution, but the you don't have the financial ability to obtain a license.  CentOS is your best bet get to the the Red Hat Enterprise Linux official experience.  Because CentOS is a binary capatible version of Red Hat Enterprise Linux.  Meaning all the things that matters are the same, only the branding and logos are different.  CentOS is open sourced and can be downloaded for free.  Although it might be a couple of versions behind Red Hat Enterprise Linux.  But, you should be able to perform everything you can with CentOS that you can with Red Hat Enterprise.  Below is a step by step instruction on how to install CentOS in Oracle VirtualBox. Step-By-Step Instructions: 1.  Type http://centos.org in your browser 2.  Click on the "Get CentOS Now" button   3.  Click on "DVD ISO" 4.  Select the mirror site that is closest to you, or whatever fancies you, then save it to a folder that you will rememb

AngularJS SPA Pt 1 : Setting Up Angular-Seed

Image
angular-seed is an AngularJS application skeleton template.  An application skeleton let's gives you a boiler plate template so that you don't have to start the application from scratch.  You can get the source code from https://github.com/angular/angular-seed .  Below are the steps to use angular-seed ass your application template for AngularJS. Step-By-Step Instructions : 1.  Go the page  https://github.com/angular/angular-seed 2. Open Git GUI.  if you don't have Git install you can follow this blog . 3.  In the Github angular-seed page copy the "HTTPS clone URL" 4.  In Git GUI click on the link "Clone Existing Repository" 5.  In "Source Location" paste the angular-seed clone URL that you've just copied, then on the "Target Directory" field type in or browse to the folder that you want to store the repository in on your local machine.  Then click "Clone" 6.  Click on "Expore Working Copy" to see the repositor

Create .gitignore for Visual Studio

Image
One of the first thing you have to do when you are creating a git repository is to create a .gitignore file that tells git to ignore the files specified in the .gitignore file.  Since Visual Studio produces all kinds of files it could take a while if you tried to create a .gitignore file from scratch.  Well there's a website that will generate a .gitignore file for you.  It's called gitignore.io   all you have to do is type in the IDE in this case it's VisualStudio without any spaces and the website will generate a .gitignore file for you automatically. Step-By-Step Instructions : Type in the URL https://www.gitignore.io   2. In the text box, type in "VisualStudio" without the double quotes 3.  Then click on the "Generate" button 4.  That's it, a .gitignore file is generated for you, save the file and put it at the root of your Visual Studio repository and you will ensure that the only thing that will get committed are the source codes Note:  You can

Hadoop Part 1: Install Hortonworks HDP Sandbox

Image
In this blog I am going to show you how to install the Hortonworks  Hadoop virtual machine on your local machine using Oracle's VirtualBox .  It is free so it's the best way to learn Hadoop if you are just starting out. Step-by-Step Instructions : 1.  Type in the url http://hortonworks.com/products/sandbox-instructions  , you will be taken to the Hortonworks sandbox download page. 2.  What you want to do is download the latest stable release.  Choose the virtual machine version that is for VirtualBox at the time of this writing the file should say VirtualBox(HDP 2.2.4 - 5.4 GB).  It's going to take a while. 3.  Now we are ready to prepare our Oracle VirtualBox for the sandbox, first open the Oracle VirtualBox application, then select "File" → "Preferences" 4. Select "Network", then select the "Host-only Networks" tab, then click the "+" icon to add a new host network adapter.  We are going to create a host-only network adapt

ASP.NET MVC 5 From Scratch : Using Conditional Comments to Support Older Versions Of IE

Older versions of IE have problems supporting the newer JavaScript libraries and HTML5 tags.  In the previous blog we've created responsive layout in ASP.NET MVC.  In this blog we are going to use conditional comments to support older versions of Internet Explorer (IE).  Since IE 9 seems to be the cutoff point we will use it in our conditional comment base condition to decide whether we want to do something different to support IE.  We will be working with the MvcApp project. Step-By-Step Instructions : 1.  Open the MvcApp application 2.  Open the _Layout.cshtml 3.  Inside the <head> tag <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script> <![endif]--> The code above

ASP.NET MVC 5 From Scratch : Create A Responsive Layout With Bootstrap

Image
In our previous blog we created a simple _Layout.cshtml file that does not have any markup just to make things simple.  In this blog we will use Bootstrap to make the layout look more professional and responsive, so that it can be viewed in any screen size.  The previous layout looks like screenshot below. The Bootstrap version will look like the screenshot below. Step-By-Step Instructions: 1.  Open the MvcApp project 2. Open the BundleConfig.cs file in the App_Start folder and type in the following code using System.Web; using System.Web.Optimization; namespace MvcApp { public class BundleConfig { public static void RegisterBundles(BundleCollection bundles) { bundles.Add(new ScriptBundle("~/bundles/jquery", "https://ajax.googleapis.com/ajax/libs/jquery/ 2.1.4/jquery.min.js").Include("~/Scripts/jquery-{version}.js")); bundles.Add(new ScriptBundle("~/bundles/bootstrap","https://maxcdn.bootstrap

JQuery : jQuery.noConflict(); Resolve the $ Conflict

Image
The JQuery library by design uses only two global namespace so that it would not conflict with other JavaScript libraries. $ - the dollar is used as a reference to JQuery namespace Also used by Prototype library, YUI and mootools jQuery - is also used to reference to jQuery namespace, this the more unique reference of the two options, but nobody really uses it So what do you do if you wanted to use jQuey and Prototype on the same page?  Well jQuery can concede the $ sign to the other libraries with the code jQuery.noConflict() function This sample code shows how jQuery gives up the $ sign to the JavaScript library Prototype <!DOCTYPE html> <head> <meta charset="UTF-8"> <title>JQuery No Conflict</title> <script src="http://ajax.googleapis.com/ajax/libs/prototype/1.7.2.0/prototype.js"></script> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script type="t