Skip to main content


Showing posts from October, 2014

Angular Js Examples codes

<!DOCTYPE html>
<script src=""></script>
<!--Example 1 -->
 <div ng-app="" ng-controller="personController">
 First Name: <input type="text" ng-model="firstName"><br>
 Last Name: <input type="text" ng-model="lastName"><br>
Full Name: {{firstName + " " + lastName}}
personController($scope) {
    $scope.firstName = "";
    $scope.lastName = "";

<!--Example 2 -->

<div ng-app="">
first expression {{5*6}}

<!--Example 3 -->
<div data-ng-app="" data-ng-init="firstName='John'">
<p>The name is <span data-ng-bind="firstName"></span></p>

<!--Example 4 -->
<div ng-app=&q…

Rails 3, Devise, Omniauth, and Google

Getting authentication through Google in a Rails application is a breeze with the right tools. To get a simple, no-frills authentication system up and running in a Rails 3 application, all you really need is Devise, Omniauth, and a Google API account.

Step 1: Signing up for Google API access

Before being able to wire up authentication in your rails app, you will need to set up a Google App. First, get your API key at:
If you don’t already have a Google account, you will need to set one up, after that create a project and give it any name you like.

Once you create a project, click on “API Access” and provide details for your OAuth Client. For development purposes, the Home Page URL can be “localhost”.

After all of the details have been set, you will then get access to the screen with all of the information you will for your Rails app. For now, locate the section that contains your Client ID and Client Secret, you will need these later to configure…