When placing nginx web servers behind a Elastic load balancer , the client IP address from the browser is replaced with the IP address of the load-balancer. This makes difficult to analysis the location of IP Here’s how you can fix it and capture the real IP. Prerequisite Make sure you have http_realip_module with nginx . You can check […]
In my previous blog we studied the scope in AngularJS(we read three types of scope in a directive, Parent Scope, Inherited Scope and Isolated Scope). Isolated Scope was completely Isolated after AngularJS-1.2 so we can not access Parent Scope directly. But sometimes we face a requirement where we want to access Parent Scope property/methods into […]
The AWS CLI provides built-in output filtering capabilities with the –query option. To demonstrate how it works, I’ll start with JSON output of aws ec2 describe-volumes aws ec2 describe-volumes –output json Suppose we have to print all availability zones, aws ec2 describe-volumes –query ‘Volumes[*].AvailabilityZone Here, aws ec2 describe-volumes : Shows descriptive information for one or […]
When we work on AngularJS, scope become very important concept. So today we will understand the Scope in AngularJS. In almost every AngularJS Controller we use scope object which is auto injected by AngularJS in $scope named parameter. And that scope gets visible to marked HTML and its inner/child HTML, because of which HTML can […]
Being a CQ5 developer, I have to register components and services almost everyday. Knowing how powerful Groovy is, I wanted to replace all Java code with Groovy. First step towards it was being able to compile Groovy. I got it to work with the help of this blog. Although I was facing following problem even […]
MongoDb introduced free text search beta in its v2.4 but it was in experimental phase. In v.2.6, MongoDb has finally made its free text search (the most requested feature) production ready. In this post, we will have a look at how can we use this pretty useful feature that MongoDb offers us. To enable Free […]
PageSpeed speeds up your site and reduces page load time. This open-source webserver module automatically applies web performance best practices to pages and associated assets (CSS, JavaScript, images) without requiring that you modify your existing content or workflow.Click here for more technical information . By Default , nginx does not support dynamic loading of modules ,therefore we have […]
When we are working on MVC (or MVVM for AngularJS) Design-Patterns, our application is loosely coupled because of different independent components defined for e.g. Controller, View, Services, Modal/Data etc. All the components have their own work/role but today we will discuss only Services. Services are that part of application where we write our business logic […]
PhantomJS is used to emulate browsers through command line, for generating PDFs, web page manipulation, headless testing and much more interesting stuff. Npm provides us a module called “node-phantom” which helps us to use PhantomJS in our NodeJS application in a non-fussy way. A prerequisite for using this module is, you must have PhantomJS binary […]
In this post I’ll discuss how to integrate Adobe CQ 5.6.1 with Apache CXF. This post is based on the discussion in adaptTo() conference 2011. Brief Introduction to Apache CXF “Apache CXF is an open source services framework. It uses JAX-WS and JAX-RS APIs so that it can handle a variety of protocols such as SOAP, […]
In my Grails app project, I had a requirement to make an HTTP call from the server’s end. After a lot of searching, I found some old fashioned Java code to achieve what I was looking for. But I was looking for something more clean, concise and more importantly a groovier way of doing it. […]
Any well written piece of code should be defensive by nature with defensive error handling understanding that things could go wrong. Things would be great if we can define our own custom error classes which we can pass or throw in order to distinguish various errors. Custom error constructors helps in: ⇒ Identifying which error was […]