raj

Technology

Vimium : Mouseless browsing

Vimium is a chrome extension that provides keyboard shortcuts for web page navigation. So, if you also love mouseless browsing just like me, then you will definitely find vimium useful. Just to give an insight, for example, pressing f key will show a shortcut key corresponding to every link on the web page. Pressing the indicated shortcut...

by raj
28-Feb-2013

Technology

Copying Redis Database from one server to another

In my recent project, I needed to copy the redis database from one server to another. Although redis provides SAVE and BGSAVE commands, I found another cool way of doing it. Log in to the new server and execute the following command in terminal: [bash] redis-cli slaveof IP-ADDRESS-OF-OLD-SERVER 6379 [/bash] The above command...

by raj
20-Feb-2013

Technology

Apache : Password Protecting Folders using .htaccess

When a user requests a site hosted on apache, Apache first looks for the default file which is generally named “index.html” or “index.php” or something like that in the root directory. We can set/change this order by adding the following directive in the configuration file (present in /etc/apache2/sites-available folder in ubuntu)...

by raj
27-Dec-2012

Grails

Using Category in groovy

In one of my projects, I needed to save file from a particular url. I found a groovier way of doing this using category. [java] class FileBinaryCategory { def static leftShift(File file, URL url) { url.withInputStream {is -> file.withOutputStream {os -> def bs = new...

by raj
30-Nov-2012

Technology

Regular Expression – Slides Uploaded on SlideShare

Hi Guys,   I took a session on Regular Expressions in the company, i have shared my slide on slideshare. You can see it here : http://www.slideshare.net/rajdgreat007/regular-expressions-14971247   I have discussed following topics in that slide : What are regular expressions Need for regular expressions ...

by raj
31-Oct-2012

Android

Using Yahoo Query Language (YQL) to Monitor a Web Page

I keep on experimenting on new things. So this time I thought of experimenting on something which I can use in my daily routine. I regularly visit a deals webpage. So, I thought of making an android mobile app for my android device that can track the deals webpage and notifies me whenever a new deal is added. The deals website does...

by raj
27-Oct-2012

AngularJS, Front End Development

AngularJS: Implementing Routes And Multiple Views

We have already seen the concept of routes and multiple views in my previous blog. Now let's see how to implement it in code. To implement the concept of routing in AngularJS, we need to create modules. Inside a module config, we can define routes. [javascript] File : js/modules.js angular.module('videoModule', []). ...

by raj
12-Oct-2012

AngularJS, Front End Development

AngularJS : Multiple Views, Layout Template and Routing

Need For Multiple Views In all previous examples which I used on AngularJS, there was only a single view, i.e. the view displaying the list of youtube videos. Now let's say we wan't to display a detail page when a video is clicked. On the detail page, we will display more details about the video like author name, comments etc. In this...

by raj
26-Sep-2012

Grails

Accessing remote data through cross-domain ajax call in jquery

While developing a mobile app using phonegap ( or otherwise also :) ), we can access remotely hosted mysql database using jquery ajax calls. But this interaction between jquery and mysql database cannot happen directly. We will need to specify a server side script (in PHP terminology) or a controller action (in Grails Terminology) that...

by raj
24-Sep-2012

AngularJS, Front End Development

AngularJS : Fetching data from the server

In all previous blogs on AngularJS, we used hard coded data. Now, its the time to get more dynamic and play with the data fetched from the server. For this, we will use AngularJS dependency injection which injects various services into the controller. To use a service is even more simpler. We just declare the name of the service as an...

by raj
21-Sep-2012

AngularJS, Front End Development

AngularJS : Sorting objects on various attributes

In last blog on AngularJS, we implemented text suggestions functionality. Now, let's consider that we have a list of objects with each object having two or more attributes with their corresponding values. The problem is to get the sorted list of objects based on an attribute selected by user at run time. AngularJS provides us a very quick...

by raj
21-Sep-2012

AngularJS, Front End Development

AngularJS : Text Suggestions

Let's implement text suggestions functionality using AngularJS. It provides suggestions while we type into the text field. For example, if we have a list of fruits and the user types 'ap', it will show all fruit names that contain these letters. [html] <!Doctype html> <html ng-app> <head> ...

by raj
16-Sep-2012