Skip to content

Instantly share code, notes, and snippets.

View rubenve's full-sized avatar

Ruben van Engelenburg rubenve

  • Whittier, CA
View GitHub Profile
<?php
for ($x = 1; $x <= 5; $x++) {
echo "The value of x is: " . $x . "\n";
}
@rubenve
rubenve / webserver-compression-check.txt
Created August 22, 2015 00:20
Check if web server compression is working
curl -I -H 'Accept-Encoding: gzip,deflate' http://www.example.com
@rubenve
rubenve / speed-optimization-apache-nginx-plesk.txt
Created August 21, 2015 19:14
Speed optimizations Plesk 11.5 server Apache/Nginx
# Enable gzip compression in nginx (Ref: http://kb.odin.com/en/122628)
# Add this to /etc/nginx/conf.d/gzip.conf:
gzip on;
gzip_disable "MSIE [1-6]\.(?!.*SV1)";
gzip_proxied any;
gzip_types text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript image/x-icon image/bmp image/svg+xml;
gzip_vary on;
# Or dial it up a bit:
gzip on;
@rubenve
rubenve / hhvm-3.2-centos-plesk.txt
Last active May 8, 2018 06:20
Installing HHVM 3.2.0 on CentOS 6 with Plesk 11.5
# How to install the hhvm package using yum on CentOS 6.6 with Plesk 11.5
# Note that you can also install hhvm from source. For that check the official guides here:
# https://github.com/facebook/hhvm/wiki/Building-and-installing-HHVM-on-CentOS-6.6#13-install-ocaml
cd /etc/yum.repos.d
sudo wget http://www.hop5.in/yum/el6/hop5.repo
yum clean all