Gravity Form Date Field Filter

When you use “Gravity form date field” and want a user to select future dates or today’s date only, simply add one Html field and copy paste below code snippet to HTML field. This will be applied to all date fields in gravity form. <script > gform.addFilter( ‘gform_datepicker_options_pre_init’, function( optionsObj, formId, fieldId ) { // do stuff optionsObj.minDate = new … Continued

What is the difference between npm and bower?

npm is most commonly used for managing Node.js modules, but it works for the front-end too. Bower is created solely for the front-end and is optimized with that in mind. The biggest difference is that npm does nested dependency tree (size heavy) while Bower requires a flat dependency tree (puts the burden of dependency resolution on … Continued

Move AWS EC2 instance to a different availability region

Let’s say you setup one server in one AWS region,  moving that AWS EC2 instance to another region may result in a headache, who don’t know copying AMI instead of creating new instance and setup server, deploy code again. All I mean manually copying not required. Let’s change region of AWS EC2 – Step1: Create an AMI of … Continued

Installing Composer on OS X

Composer is a cross-platform dependency manager for PHP libraries. Let’s install it on OS X and add an alias/shortcut/command so you can use it from anywhere. Downloading Composer will create a Phar (PHP Archive) file called “composer.phar” From your terminal, run the following command: curl -sS | php // S option to show any errors if … Continued

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 … Continued

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){ // … Continued

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 … Continued

OS X El Capitan Virtual host setup

Sometimes we setup dev environment on locally and use ‘virtual host’, check steps below for OS X El Capitan virtual host setup. Prerequisites: working Apache server OS X El capitan Virtual host setup steps- Go to terminal login to root user if you are not root, Step 1 : Like ubuntu, we need to add domain … Continued

External hard drive file system

Lot’s of time, we confused with external hard drive file system selection, so decided to write this post for myself options available are as below: External hard drive file system Compatibility : Windows Ubuntu Mac NTFS Y Y Y -( Read-only ) to write need third party plugins like ntfs-3g FAT32 (4gb file size limit)  Y  Y … Continued

Two digit number table, easy math trick

With the growing age and less usage in daily life we forget math tables, but with the help of below trick, we can write any two digit number table is very easily. Lets try Two digit number table of 24 02 04             24 04 08 (04+0) 48 06 12 … Continued