Hi! If you see an error or something is missing (like :focus-within for few years :P) please let me know ❤️
Element -- selects all h2 elements on the page
h2 {| // Ah, Big Gulp's eh? Welp, see ya later. | |
| var gulp = require('gulp'), | |
| gutil = require('gulp-util'), | |
| c = require('chalk'), | |
| clean = require('gulp-clean'), | |
| imagemin = require('gulp-imagemin'), | |
| concat = require('gulp-concat'), | |
| uglify = require('gulp-uglify'), | |
| jshint = require('gulp-jshint'), | |
| map = require('map-stream'), |
| // TODO: watch for renaming of files or adding/deleting files | |
| // Requirements | |
| var gulp = require('gulp') | |
| , changed = require('gulp-changed') | |
| , clean = require('gulp-clean') | |
| , coffee = require('gulp-coffee') | |
| , compass = require('gulp-compass') | |
| , concat = require('gulp-concat') | |
| , minifyCSS = require('gulp-minify-css') |
| # Automatically instal the latest nginx | |
| wget -O - http://nginx.org/keys/nginx_signing.key | sudo apt-key add - | |
| #Make a backup copy of your current sources.list file | |
| sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak | |
| #Now copy the following repositories to the end of ` /etc/apt/sources.list` | |
| echo "deb http://nginx.org/packages/mainline/ubuntu/ trusty nginx" | sudo tee -a /etc/apt/sources.list | |
| echo "deb-src http://nginx.org/packages/mainline/ubuntu/ trusty nginx" | sudo tee -a /etc/apt/sources.list |
| <?php | |
| /** | |
| * Use ACF image field as avatar | |
| * @author Mike Hemberger | |
| * @link http://thestizmedia.com/acf-pro-simple-local-avatars/ | |
| * @uses ACF Pro image field (tested return value set as Array ) | |
| */ | |
| add_filter('get_avatar', 'tsm_acf_profile_avatar', 10, 5); | |
| function tsm_acf_profile_avatar( $avatar, $id_or_email, $size, $default, $alt ) { |
I've had the opertunity to try a variety of different server configurations but never really got around to trying HHVM with Magento until recently. I thought I would share a detailed walkthrough of configuring a single instance Magento server running Nginx + Fast CGI + HHVM / PHP-FPM + Redis + Percona. For the purpose of this blog post I'm assuming you are using Fedora, CentOS, or in my case RHEL 6.5.
Please note: I'm 100% open to suggestions. If you see something I did that needs to be done a different way, please let me know. I haven't included my Perconca my.conf file yet. I will shortly. Also I plan on trying this same test with HHVM 3.3 and PHP 7.
rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm| // Reference: http://stackoverflow.com/questions/4822471/count-number-of-lines-in-a-git-repository | |
| $ git ls-files | xargs wc -l |
| <?php | |
| /** | |
| * Custom error handling for hhvm | |
| * Implemented in EPSInventory-API(https://github.com/epsclubs/EPSInventory-API) on Jan 5, 2015 | |
| * Referenced from: http://stackoverflow.com/questions/24524222/display-fatal-notice-errors-in-browser | |
| */ | |
| // Usage: Call `set_error_handler(error_handler);` at the top of any php or hh file running on hhvm | |
| set_error_handler(error_handler); |
| /* | |
| Another way of splitting a gulpfile into multiple files based on: | |
| http://macr.ae/article/splitting-gulpfile-multiple-files.html | |
| https://github.com/gulpjs/gulp/blob/master/docs/recipes/split-tasks-across-multiple-files.md | |
| */ | |
| 'use strict'; | |
| var gulp = require('gulp'), | |
| plugins = require('gulp-load-plugins')(), |
| check process hhvm with pidfile /var/run/hhvm/pid | |
| group hhvm | |
| start program = "/usr/sbin/service hhvm start" with timeout 60 seconds | |
| stop program = "/usr/sbin/service hhvm stop" | |
| if failed unixsocket /var/run/hhvm/hhvm.sock then restart | |
| if mem > 400.0 MB for 1 cycles then restart | |
| if 5 restarts with 5 cycles then timeout |