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...
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...
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)...
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...
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 ...
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...
AngularJS, Front End Development
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', []). ...
AngularJS, Front End Development
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...
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...
AngularJS, Front End Development
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...
AngularJS, Front End Development
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...
AngularJS, Front End Development
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> ...