apt doesn’t support architecture i386

After adding facebook hhvm repository on Ubuntu 16.04, i get following error when running “apt update” command.

This is fixed by editing


Replace with


add-apt-repository command can be used to add repository in ubuntu.

To install, run



rvm is ruby version manager. Allow you to have multiple ruby version.

To install rvm, run

To install a ruby version, run

To set it default, use

Disable WordPress wp-cron.php

WordPress run its sheduled tasks using wp-cron.php, this get called every time visitor visits web site. This is not efficient method for high traffic web sites. Since this have to be loaded using web server, it can cause web server process hang if your cronjob take more time to finish. It is better disable wordpress cronjob and set a real cronjob.

To disable wordpress cronjob, edit wp-config.php file, add following

Now set a cronjob as follows


rsync command with exclude option, full server backup to remote server.

Transfer a file

I normally use scp to do single file transfer. It may be better to it with rsync as you will be able to resume.

-P == –partial –progress

If you use non standard SSH port, then replace -e ssh with “-e ssh -p PORT_NUMBER”.


See backup


To check hard disk for errors, run

Here is an example of HDD with errors

To get detailed, result, run


aws s3 cp command


Prevent an EC2 Instance getting Terminated by AutoScale
Amazon RDS ERROR 1040 (08004): Too many connections
Install Amazon AWS awscli
Amazon Workmail
AWS Cloud​Formation
Getting Started with Amazon Elastic Beanstalk
Deploy Docker Image using Elastic Beanstalk
Amazon Route 53 DKIM error
Resize Amazon EC2 Boot Disk
Amazon S3 CORS

AWS Price calculator

To backup a folder to Amazon S3 bucket, run


aws s3 cp command

To sync (download) a s3 bucket to your local computer, run

To list all s3 buckets, run