Skip to content

Instantly share code, notes, and snippets.

View nunorbatista's full-sized avatar

Nuno Batista nunorbatista

View GitHub Profile
#/!/bin/bash
# update system
yum update -y
# install bind-utils
sudo yum install bind-utils
# Bring repos in
rpm -Uvh https://mirror.webtatic.com/yum/el7/epel-release.rpm
@nunorbatista
nunorbatista / php_performance_test.php
Created December 16, 2015 18:00
Script to measure PHP Performance Test
<?php
function test_Math($count = 140000) {
$time_start = microtime(true);
$mathFunctions = array("abs", "acos", "asin", "atan", "bindec", "floor", "exp", "sin", "tan", "pi", "is_finite", "is_nan", "sqrt");
foreach ($mathFunctions as $key => $function) {
if (!function_exists($function)) unset($mathFunctions[$key]);
}
for ($i=0; $i < $count; $i++) {
foreach ($mathFunctions as $function) {
$r = call_user_func_array($function, array($i));
@nunorbatista
nunorbatista / centos_php7_fresh.sh
Last active November 14, 2019 17:43
PHP7 Centos 7 fresh install script
#/!/bin/bash
# update system
yum update -y
# install bind-utils
sudo yum install bind-utils
# Apache
yum install nano wget curl vim git httpd -y