Why ?

  • Ring js helps to create class system which supports multiple inheritance in a classical object oriented way.
  • As such , javascript supports prototypal inheritance which is not that flexible in supporting multiple inheritance or mixin way of reusing classes which is addressed by this.
  • Ring js is inspired by python’s classical multiple inheritance system.

Info -

Why ?

  • Underscore js is nothing but a simple js library that gives a number of js functional programming helpers which can be used in your js code. It works well with your own js libraries like prototypejs, jQuery or backbone.
  • Simplifies your code to a good extent. Well defined functional helpers are a great advantage for programming languages like python and ruby. Underscore does the same for JS.
  • More importantly, it does not modify any bui...
    Continue reading

When you are building a web app that involves dealing with a lot of time related information and presenting it to the user, you would like to show the time information in user’s time zone so users don’t have to do the timezone conversions.

In this post, i’ll try to solve this problem keeping Ruby on Rails as my web app framework. The approach would be same fo...
Continue reading

Why ?

This is a jQuery plugin that confirms an action on click of an element and executes separate js code based on the confirmation.

Can be used to confirm users actions in a pretty way without having to use browser confirm box / alert box.

Info -

Setup &...
Continue reading

Problem -

We have been hosting some of our apps on the cloud provided by Op source (formally Dimension Data now.). While trying to automate a number of things with it, there was a particular scenario where we had to create a new ip and add a NAT rule for it when a new site is created from one of our webapps. This is quite an interesting task where network and server related tasks of a cloud provider need to be automated from the web UI of another app.

Continue reading

This article covers basics of OAuth 2 and explains how to implement oAuth provider for authenticating a set of REST APIs. Implementation is explained keeping rails (2.3.x) in mind.

Scope -

To provide a way for other applications to use our APIs by authenticating and authorizing through Oauth.

This should cover the following -

  • Server flow as described in Oauth 2.0 (We follow v22 spec of Oauth - Continue reading

Why ? -

Embedded js is a client side templating library, which is used to write cleaner HTML and JS code in the places that render html dynamically with javascript. Results in easy to write, clean, readable and maintainable code base.

Problem -

We have been working on a simple ajax based messaging app where as messages come they are updated in the UI through ajax. The messages are of different t...
Continue reading

Problem -

It all started with a little bit of inspection into the logs where we observed that a particular rails action is randomly taking more time than expected. There were not many queries and simple view rendering was taking time. For example when 10 hits were made to the end point with no other load on the machine, every 4 hits were taking 20ms but the next hit was taking 100ms as such.

A little more introspection revealed that a particular partial was...
Continue reading

Problem -

Build a simple file upload progress bar for a web app (ruby on rails app running on apache with pushion passenger).

Implementation -

The file upload progress bar can be implemented using the Upload progress module for apache https://github.com/drogus/apache-upload-progress-module.

Installation & Con...
Continue reading

Below is just about everything you’ll need to style in the theme. Check the source code to see the many embedded elements within paragraphs.

Heading 1

Heading 2

Heading 3

Heading 4

Heading 5
Heading 6

Body text

Lorem ipsum dolor sit amet, test link adipiscing elit. This is strong. Nullam digni...
Continue reading