Categories
Uncategorized

Monitor EC2 using crontab

If you want to monitor your Amazon Web Services (AWS) Elastic Cloud Compute (EC2) instances using crontab and AWS SDK. Here in this example I have chosen php (7.1).

Install AWS SDK

Install composer

Categories
Uncategorized

Monitor services (Apache, MySQL, HHVM) using crontab

Want to ensure that your services (Apache, MySQL, HHVM) on your linux instance are running 24*7? Then you can use crontab for that. This job runs every minute to check the status of the service and if it is not running then, it starts the service.

Categories
Uncategorized

Redirect users based on the HTTP Request Header – Node.js

For this example it is recommended that you have the latest most stable release of Node.js + npm installed.
Now you will need express to run a simple server.

Categories
Uncategorized

Create an Observable the right way – Angular 5

Using a subject to create an observable is the recommended method of inter-component communication by the official angular documentation.
The following code was tested with Angular 5.2.2.

Categories
Uncategorized

Add Google Analytics to WordPress in 2 minutes

The following is the fastest way to integrate Google Analytics with your self hosted WordPress website without using any external applications or plugins. By injecting plain javascript into your tag, you won’t have to worry about incurring the overhead of adding a new plugin to your site for a small 2 line code addition.