Skip to main content


Showing posts from December, 2016

Microservices security

In a microservices based system, and with proper security, we are limiting the privileges an attacker can get and the amount of data available in a single attack breaching one service


Nearly all GitHub projects include a file. The readme provides a lay of the land for a project with details on how to use, build and sometimes contribute to a project.

Github is a free version control system

Github is a free version control system that is often used for hosting code for software projects. There is an option for putting your code in free public repositories where everyone can see, access and download them. An alternative is to place your code in a paid private repository where only you and those you authorize can access them.

A sitemap is an absolute must.

Sitemaps are an afterthought for many webmasters. But if you want to make sure that Google and other search engines can find all of the pages on your site, a sitemap is an absolute must.

The skills that have the highest hourly rate

The skills that have the highest hourly rate are usually those that have tens of thousands of hours of practice around them. They are also things that very few other people can do … or at least there is a perception that others cannot do them.

Earn a really huge pay

In order for you to be able to earn a really huge pay you need to get hired with one of the more established companies like Google, Facebook, Amazon and the like.

Some of the worlds greatest discoveries came from mistakes

Penicillin was a Petri dish that had gone mouldy. Vulcanised rubber was when sulphur was accidentally spilled on rubber, and made it much better. The whole synthetic dye industry was started when Perkin failed to synthesise quinine. Columbus was trying to get to the Indes.

Some of the world's greatest invention started from mistakes.

How to hide description from mobile version of blogger

Search for the following block of code (It will be present inside the header widget)
Now replace this with 

Mobile apps

Dark Sky for weather, Stitcher for podcasts, Giphy Cam for making fun animations, and Afterlight for photo editing

Tiny goal

When commenting on some young people's dreams of becoming the wealthiest person in the world, China's richest businessman Wang Jianlin said during a television programme, "The direction is correct. But at first you'd better set a reachable tiny goal, for example, I can start with earning only 100 million."

spear-fishing attacks

e-mail addresses could be targeted for spear-fishing attacks, a form or social engineering attack where hackers try to fool you into clicking on a link that downloads malware onto your device.

Serverless microservices

Build applications comprised of microservices that run in response to events, auto-scale for you, and only charge you when they run. 
This lowers the total cost of maintaining your apps, enabling you to build more logic, faster.

Build your own web store to sell Amazon items or your own items.

You can build Product Advertising API applications Amazon has developed a world-class web service that millions of customers use every day. As a developer, you can build Product Advertising API applications that leverage this robust, scalable, and reliable technology.

You get access to a lot of the data used by Amazon including the items for sale, customer reviews, seller reviews, as well as most of the functionality you see on, such as finding items, displaying customer reviews, and product promotions. Product Advertising API operations open the doors to Amazon's databases so that you can take advantage of Amazon's sophisticated e-commerce data and functionality.

Facebook released Account Kit

Facebook released Account Kit, which has been in testing for some time, to developers earlier this week.  The basic idea is to minimize the pain of logging into mobile applications, particularly in instances when SMS and other tools may not be available. Facebook calls Account Kit a "complementary product" to Facebook Login; it is an instant verification component that is part of the Facebook SDK for Android.

How to Install Google Analytics in WordPress

Plugins Method (Recommended) There are tons of plugins available to add Google Analytics to your site. However, it is probably best to just use a simple light-weight plugin like:
Insert Header and Footer

Paste the Google Analytics code in the plugin’s setting page.

Direct Paste Method
Paste the Google Analytics code in your theme’s header.php right after the <body> tag.

How to See Google's cache of your site

Use the cache: operator to see an archived copy of a page indexed by Google. For example, displays the last indexed version of the Google homepage, along with information about the date the cache was created

How to get pages that link to your site

Use (You can use or, but the first search will return more complete results.)

You can also search for links to specific pages or directories:

Why doesn't Google Search Console data match Google Analytics data?

The data displayed in Search Console may differ from the data displayed in other tools, such as Google Analytics. Possible reasons for this include:
Your site has not been crawled  since the changes were last made.Search Console does some additional data processing - for example, to eliminate duplicates and visits from robots - that may cause your stats to differ from stats listed in other sources.Some tools, such as Google Analytics, track traffic only from users who have enabled JavaScript in their browser.

How to post Json using Apache HttpClient Fluent API

Gson g = new GsonBuilder().setPrettyPrinting().create();

HttpResponse response = Request.Post("").addHeader("Content-Type", "application/json").bodyString(g.toJson(jsonElement), ContentType.APPLICATION_JSON).execute().returnResponse();


How to fix: UnsupportedOperationException: JsonObject at

You had exception because you call getAsString() method on JsonObject instance. Default implementation of this method is: publicString getAsString(){thrownewUnsupportedOperationException(getClass().getSimpleName());} and it is override only on JsonArray and JsonPrimitive class.
You can get String from JsonObject or JsonElement by:
Gson g = new GsonBuilder().setPrettyPrinting().create();

Netbeans Word Wrap

Goto -> Tools-> options-> Editor-> Formatting-> language(dropdown-All languages) -> Category(dropdown-Tabs and indents) -> Line wrap(After word)

Make sure you re-open the file to see the change.

Zero Downtime Cluster Upgrades

The OpenShift Container Platform product upgrade process is really straightforward and doesn’t take much time, depending on your cluster size. It can also be customized to meet additional requirements.

Develop, Host, and Scale Your Apps in the Cloud

OpenShift is Red Hat's container application platform that allows developers to quickly develop, build, deploy, and manage containerized services and applications in a cloud environment.


Built with proven open source technologies from established communities. Red Hat OpenShift Dedicated is built around a core of application containers powered by Docker, with orchestration and management provided by Kubernetes, on a foundation of Red Hat Enterprise Linux.


Docker provides the abstraction for packaging and creating Linux-based, lightweight containers. Any application created on OpenShift can easily run anywhere that supports Docker.


Kubernetes provides the cluster management and orchestrates Docker containers on multiple hosts.


OpenShift automates source code management, application builds, deployments, scaling, health management and more.


OpenShift adds team and user tracking for lar…

Red Hat Launches OpenShift Dedicated on Google Cloud Platform

With the availability of OpenShift Dedicated on Google Cloud Platform, users can speed adoption of containers, Kubernetes, and cloud-native application patterns, benefiting from Red Hat’s deep enterprise experience.

A good shopping cart system

A good shopping cart system will have plenty of options for your store layout, discounts, coupons, loyalty program, shipping integration, payment handling integration (especially look out for PayPal integration, a lot many users prefer to pay via PayPal), etc.

Find Your Micro-Niche

Your talent is your niche.  If you're good in article writing, thats a starting point. What type of articles you are good at writing, is your micro-niche. If you like photography, what type of photography do you like? Can you do stock photography? Are you good with portraits? You may love photography, but perhaps you're even better in doing post-production work on them. That just may be your micro-niche.

Stream Analytics Real-time stream processing in the cloud

Perform real-time analytics for your Internet of Things solutions
Stream millions of events per second
Get mission-critical reliability and performance with predictable results

Create real-time dashboards and alerts over data from devices and applications
Correlate across multiple streams of data
Use familiar SQL-based language for rapid development

Using Gson with Maven

To use Gson with Maven2/3, you can use the Gson version available in Maven Central by adding the following dependency:<dependencies> <!-- Gson: Java to Json conversion --> <dependency> <groupId></groupId> <artifactId>gson</artifactId> <version>2.8.0</version> <scope>compile</scope> </dependency> </dependencies> That is it, now your maven project is Gson enabled.

Gson is a Java library that can be used to convert Java Objects into their JSON representation.

Gson can also be used to convert a JSON string to an equivalent Java object. Gson can work with arbitrary Java objects including pre-existing objects that you do not have source-code of.
There are a few open-source projects that can convert Java objects to JSON. However, most of them require that you place Java annotations in your classes; something that you can not do if you do not have access to the source-code. Most also do not fully support the use of Java Generics. Gson considers both of these as very important design goals.

You can use URIBuilder class to build the request URI for all the HTTP methods.

URI builder provides setParameter method to set the parameter. URIBuilder builder =newURIBuilder(); builder.setScheme("http").setHost("").setPath("/search").setParameter("q","httpclient").setParameter("btnG","Google Search").setParameter("aq","f").setParameter("oq",""); URI uri =;HttpGet httpget =newHttpGet(uri);System.out.println(httpget.getURI());

Apache HttpClient Simple connection manager

BasicHttpClientConnectionManager is a simple connection manager that maintains only one connection at a time.  Even though this class is thread-safe it ought to be used by one execution thread only. BasicHttpClientConnectionManager will make an effort to reuse the connection for subsequent requests with the same route. It will, however, close the existing connection and re-open it for the given route, if the route of the persistent connection does not match that of the connection request. If the connection has been already been allocated, then java.lang.IllegalStateException is thrown.

This connection manager implementation should be used inside an EJB container.