Setup android environment var on mac os

Whenever you start with new OS installation or with a new machine and leading to android app development, we need to setup PATH environment variables. So maybe you have ‘android SDK’ downloaded or ‘android studio’ running. To add environment variables permanently, need to add those in .bash_profile file, which doesn’t exist, we need to make one by typing… Continue reading Setup android environment var on mac os

Firebase Cloud Messaging in ionic apps

People who are used to integarte GCM in ionic apps, its time to migrate to FCM( Firebase Cloud Messaging ) App/Device/Client side steps : Use plugin STEP 1 cordova plugin add cordova-plugin-fcm STEP 2 if(window.cordova) { FCMPlugin.onNotification( function(data){ if(data.wasTapped){ // $state.go(‘message’, {id:data.pageId}); // $location.path(‘app/userList’); alert(‘onNotification tapped true’); } else { alert(“xxxxxxxxxxxx”+data); } }, function(msg){ //… Continue reading Firebase Cloud Messaging in ionic apps

install redis server on CentOS 7

While implementation,( server clusters case ), simple socket server will not work and you need to use socket with redis server. So how to install redis on centos os, follow steps below. *Sudo user required. yum install redis // install redis server systemctl start redis.service // start redis server systemctl status redis.service // check server status redis-cli… Continue reading install redis server on CentOS 7

fix npm permissions

After installing nodejs, we need to install npm packages to include module likes async, request, etc. We need to fix npm permissions for a current so he can have permissions to write to directories that npm will use to store global packages. You will get this permission error while installing npm packages globally without ‘sudo’. npm ERR! Error: EACCES, ….… Continue reading fix npm permissions

Youtube share video – remove title and controls

Usually we share youtube videos using iframe in website, sometime we do not need default controls and title, its very easy to remove them. Just pass following “get” parameters to youtube url. showinfo=0&controls=0 ex.

WordPress custom post type endpoint

Requirement: If you want to add endpoint, let say “books” to  CPT author, and wants to change view in template. Solutions: No need to use “add_rewrite_endpoint” function because as of today, we can not add endpoint to CPT only ( we can add endpoints to either page or archives or all links, etc using  add_rewrite_endpoint function )… Continue reading WordPress custom post type endpoint