Cloud computing is delivering comuting services over the internet.
Types of Cloud services provided by Amazon
- Computing example: EC2, Lambda
- Netwroking example: VPC, Direct Connect
- Storage example: S3, EBS
- Analytics
<?php | |
$ideal = exec('echo ""$(vmstat 1 2|tail -1|awk \'{print $15}\')""'); | |
$cpu = 100 - $ideal; | |
echo $cpu; | |
exec('ps -eo pcpu,pid,user,args | sort -k 1 -r | head -10',$top); | |
echo '<pre>'.json_encode($top); |
Cloud computing is delivering comuting services over the internet.
Types of Cloud services provided by Amazon
$ COMPOSER_MEMORY_LIMIT=-1 composer require <package name> | |
$ COMPOSER_MEMORY_LIMIT=-1 composer update |
docker community installation | |
$ curl -fsSL https://get.docker.com -o get-docker.sh | |
$ sudo sh get-docker.sh | |
Basic docker commands | |
======================= | |
Run - Start a container | |
e.g | |
docker run nginx | |
Above command will download nginx latest image and run the container. |
Switch php version from x.y to p.q in apache | |
sudo a2dismod php7.2 | |
sudo a2enmod php5.6 | |
sudo service apache2 restart | |
---------------------------------------- | |
Switch php cli version | |
sudo update-alternatives --config php | |
There are 3 choices for the alternative php (providing /usr/bin/php). |
sudo apt-get update | |
sudo apt-get install software-properties-common | |
sudo add-apt-repository universe | |
sudo add-apt-repository ppa:certbot/certbot | |
sudo apt-get update | |
sudo apt-get install certbot python-certbot-apache | |
sudo certbot --apache |
Install angular cli | |
> npm install -g @angular/cli | |
Create project with Angual CLI | |
> ng new <project-name> | |
eg. | |
> ng new blog | |
Start Angular server and open app in browser | |
> ng serve --open |
class Characters { | |
firstname: string; | |
lastname: string; | |
constructor(fs: string, ls: string) { | |
this.firstname = fs; | |
this.lastname = ls; | |
} | |
getFullname() : string { |
<!--Start Popunder--> | |
<script> | |
var puShown = false; | |
var PopWidth = 1370; | |
var PopHeight = 800; | |
var PopFocus = 0; | |
var _Top = null; | |
function GetWindowHeight() { |