Changing apache2 document root in ubuntu 14.x

Having the default Apache document root to “/etc/www” can be sometimes annoying because of permissions. I strongly recommend to use a folder into your “home” folder. To do so you will need to change Apache default document root.
2 minutes to read

AngularJS memory stats

If you are familiar with AngularJS development, you know that memory consumption is one of the highest challenge you must face using it. angular-memory-stats is a module that helps you with this very problematic!
One minute to read

D3.js Responsive Word Cloud

There are few examples of word cloud using D3js, the best known is the one from Jason Davies but the code is difficult to understand as it is coupled with the cloud form (angle, number of words etc) and has many functions.
One minute to read

AngularJs, Browserify Polymer and Sass boilerplate

Source available on Github : https://github.com/shprink/angularjs-browserify-polymer-boilerplate

Two way data biding

Using Polymer and AngularJs at the same time is a bit problematic. The two way data biding (AngularJs feature) cannot natively work with Polimer web components. Some project are emerging though:

Those projects are not mature enought to use, so I decided to directly use AngularJs's resources within Polymer elements.

Using AngularJs's services within Polymer

var userService = angular.injector(['boilerplate']).get('UserService');

Polymer('user-list', {
    ready: function() {
        this.list = userService.getList();
    },
    tapAction: function(e) {
        console.log('tap', e);
    }
});

Using AngularJs's scope within Polymer

Polymer('boilerplate-login', {
    ready: function() {
        this.angularScope = angular.element(this).scope();
    },
    sendForm: function(){
        this.angularScope.goToHome();
    }
});
One minute to read

Introduction to Gulp.js with practical examples

Gulp.js is what we call a JavaScript Task Runner, it is Open Source and available on GitHub. It helps you automate repetitive tasks such as minification, compilation, unit testing, linting, etc. Gulp.js does not revolutionize automation but simplifies it tremendously.
6 minutes to read