Stay away from Riot.js for production grade work

If you are looking for template engines for web-development, then Riot.js looks very promising. It is indeed very easy to learn and a lightweight library that offers web-components in a nice to use way. The only problem is, it is good enough for toy applications, but once you get into any serious development with it, […]

Adding and Removing classes for a DOM node without JQuery

Now one may ask why do one need to add/remove classes from DOM nodes, and why not do it the easy way with JQuery. The answer to the first part of (why add/remove the classes from DOM nodes), the primary reason is to modify the behavior of the DOM node on the fly. For example, […]

Resetting your fork with the original on github

Many a times our students face the need to reset their fork completely to make it equal to the original repository. On github, they fork the original project and make some changes, commits and even pushes and then all of sudden realize that they are not happy with the end results and they want to […]

Singleton websocket publisher with Autobahn pubsub & Crossbar.io Meta events

In the bigdata analytics architectures centered around Hadoop ecosystem, Zookeeper plays an important role of coordinating the resources and resource ownership. For example, in a distributed cluster with multiple nodes serving the same resource, you can implement fault-tolerance by selecting a dormant node as active resource-owner whenever the active node goes down. How do you […]

How to use Handlebars.precompile API in Javascript

There are many resources on the internet that explain how to compile Handlebars templates on the fly in Javascript, but not much explanation can be found on how to use Handlebars precompile through API (and not through CLI command-line interface). Below is the right way of doing it. Assuming you have your Handlebars template as […]

Meteor: No plugin found named “ensureSignedIn”

Problem: If you are using iron:router, after updating Meteor to version 1.1.0.3 you may start to encounter below errors in case you are using protective pages with ‘ensureSignedIn’ W20150812-18:40:06.912(5.5)? (STDERR) You now need a routing package like useraccounts:iron-routing or useraccounts:flow-routing to be able to configure routes! W20150812-18:40:06.943(5.5)? (STDERR) W20150812-18:40:06.943(5.5)? (STDERR) \.meteor\packages\meteor-tool\1.1.4\mt-os.windows.x86_32\dev_bundle\server-lib\node_modules\fibers\future.js:245 W20150812-18:40:06.943(5.5)? (STDERR) throw(ex); W20150812-18:40:06.943(5.5)? […]

How to customize Edx Theme in Bitnami Distribution

Once you setup the bitnami Edx distribution, you can ssh into your machine and go to themes folder: cd ~/apps/edx/themes/ Clone your theme git repository: sudo git clone https://github.com/Stanford-Online/edx-theme.git stanford Make sure the directory name is same as the name of the theme. Also rename the .scss file to have the same name as the […]

C/C++ interoperability with other languages

C is close to the heart of many system programmers, and then there is this object oriented variant of it, namely C++, which once again has proven its worth in building large scale systems. Now with the emergence of plethora of languages out there (some of those even making the white-space as a valid token […]

Prevent Form Submission when Pressing Enter Key in Meteor Templates

Form layout is nice and if you are using Meteor Templates with forms to collect some data just for internal processing, then the chances are your forms may be come with unwanted submit behaviors for Enter key presses. For example, consider this below template: <template name=”InputForm”> <form id=”URIForm” class=”form-horizontal”> <div class=”form-group”> <label class=”col-md-2 control-label” for=”esURI”>URL</label> […]

Configure MySQL for real-time bigdata frontend

Big Data does not always mean NOSQL. Sometimes you have to use a combination of NOSQL databases with Relational databases to get what you want. The key is knowing when (not) to use what. Usually one clever trick is to use NOSQL databases for backend purposes and relying upon the ACID properties of relational databases […]