Monthly Archives: March 2016

Install Mcrypt PHP extension on Ubuntu (PHP-FPM + Nginx)

To install Mcrypt PHP extension on Ubuntu / Debian run following command ( this step is same for Nginx and apache )

This will create a mcrypt module in /etc/php5/mods-available directory. If it doesnt we need to create symlink for this.

Now enable mcrypt by running

After this restart php5-fpm service by

 

Upgrade Google Cloud Compute Engine VM Instance

There two ways you can upgrade or downgrade your VM instances.

a. Stop – configure – start

b. Minimum downtime ( by swapping the disk )

a. This is a very easy method to do this. The main disadvantage of this is, it requires downtime. If you are okay with a 5 – 10 minute of downtime then you can go with this method.

b. If you this to happen almost real time then follow these steps

If you have a Google cloud compute engine VM Instance and wants to upgrade or downgrade  Continue reading

How to access remote mysql server using local phpmyadmin

phpMyAdmin is a free and open source tool written in PHP intended to handle the administration of MySQL or MariaDBwith the use of a web browser. It can perform various tasks such as creating, modifying or deleting databases, tables,fields or rows; executing SQL statements; or managing users and permissions. source: wikipedia

To access remote mysql database from your local phpmyadmin, open config.inc.php file by

Add following line

You can refer this article to install phpmyadmin on Ubuntu: http://devendraverma.com/install-phpmyadmin-on-ubuntu/

Android Splash Screen

To add Splash Screen to you android application


Splashscreen.java

AndroidManifest.xml

 

activity_splash.xml

Output

laterbox_splash_screen

 

 

Deploy WordPress button is disabled in Google Cloud Launcher

Google Cloud WordPress Launcher Screen

In order to use Click to Deploy with Google Compute Engine you need to make sure “Google Cloud Deployment Manager API” is enabled on your project. You can enable this API from Developer console->APIs page.

Google Cloud API Manager Screen

Moreover, if you have multiple accounts added in your browser try using Chrome Incognito tab to login in order to make sure your email has the right permissions.

Remove # from url in Angular JS and Laravel 5

To remove # from Angular JS application built with Laravel , add following line in your config.

Add this in your head tag

Now it will work fine till you do not refresh the page. If you refresh your page at this point, you will see page not found error, it is because now browser sends request to server and server doesn’t have the route.

To do this we will add this route at the end of routes.php