Aug 22, 2016
Moving new Git branch with different history to master

Today I’ve learned a new thing about Git. Actually some days back, we started re-implementation of one of our old web app. Previously, the app was written with Jquery. Some days back, we felt that, it would be better, if we could use ReactJs for the app, as it only shows updates, and each of the updates has it’s own life cycle. So, thought this would be a good use case to leverage the powerful features of ReactJs.

Apr 27, 2016
Show modal dialog in IE with IFrame

We had used modal dialog of IE, in one of our old projects. What we did there, opened one modal dialog, with one url to a external website. In the external page (not maintained by us), one variable returnValue was set to window with the intended value (one object actually), and we used to get the resultant from the return value of showModalDialog, as this returns the value present in window.returnValue of the modal.

Apr 22, 2016
JavaScript 'bind': a less used magic

There is a method bind available in function.prototype of JavaScript. Do you know? May be.

I got to know about this in detail at quite a later time in my programming carrier. I heard and read about the method. But couldn’t find good example/use-case to use. Recently one of my colleagues came with a puzzle question, how to write this multiply function so that the following would return 120 the product of the numbers passed.

multiply(1)(2)(3)(4)(5);
Apr 20, 2016
JavaScript: What is the type of 'return'

When we think of the return type, we think of the type of data, returned by the concerned function in JavaScript.

function welcome() {
return "Welcome!!!"; /// Return type is 'String'
}

But, sometimes back came accross an example of a function.

function add(a, b) {
return (
console.log(a + b),
console.log(arguments),
a + b
);
};

console.log(add(2, 2));

What would be the output???

Mar 2, 2016
Security Concerns To Build One AngularJS App

An AngularJS web app finally results in a Single Page Web Application, managing it’s own routes, states (models), incorporating workflows, CRUD operations and much more around some tasks. So, primarily we have to concentrate on the common flaws found in an web app and then figure out what kind of direct or derived vulnerability may be caused in our app.

Dec 13, 2015
Install Deluge on Ubuntu Server

Deluge is a very efficient torrent download/seeding client with a moderately good standard web ui. Though torrent is not acceptable to some extent on the moral ground, I can accept it to download software, songs, movies etc. for small personal uses. Actually why not. I live in India. Most of the Hollywood movies does not release in the theaters. The price of a Western music label is more than per capita income in this country. And I’m not going to sell or do some kind of business with the downloaded digital assets. And most of the movies are not that good to view multiple times. So download-watch-delete cycle is destined for them. With these logic I can justify my use of torrents.

There are several clients to use torrent. Why do we need one client with web ui. To remotely administer the download. Why? Personally I don’t like to keep my pc turned on whole night-n-day to download large files. And sometimes it really takes a painfully long time to download. Therefore we need to have a low cost solution for this task. You can setup one Raspberry PI in your home for this. Or you can buy one cheap VPS or if you are damn serious about seeding you can get one dedicated server with a good bandwidth allocation from a p2p allowing provider. In any of this cases you need one sufficiently robust torrent client with an acceptable ui. Deluge is one of the best in this category.

Let’s start.

Dec 4, 2015
Create new tab/window from JavaScript

Yesterday I was stuck in a very strange situation. It was required to open a tab from a success handler of a server call. Actually browser lets open a new tab/window from JavaScript if the ‘opening code’ is directly inside of a user event handler. May be a click, may be blur event or focus event, even page load. Otherwise it understands that the client side code is trying to open a new tab/window unauthorized; and the in-built popup blocker blocks the opening of the same; one browser specific indication of-course shown that a popup has been blocked.

Nov 28, 2015
Hello world!

After thinking a lot and checking the amount of free time I get, finally decided to start a blog. I know after a short period of time eventually I would get bored and just stop to update this site. There is a risk of this to happen. But at-least let’s just start it. Later, we will see. There must be something, I can say, I’ve done this. After working for a long time in service sector, I think this is a common trait built in every software engineers to do something, that s/he can take credit of.