Testing three type of caches: persistent, non-persistent and two-level.
- MacBook Air
- 13-inch, Mid 2012
- Processor 1.8 GHz Intel Core i5
- Memory 8 GB 1600 MHz DDR3
# | |
# A CORS (Cross-Origin Resouce Sharing) config for nginx | |
# | |
# == Purpose | |
# | |
# This nginx configuration enables CORS requests in the following way: | |
# - enables CORS just for origins on a whitelist specified by a regular expression | |
# - CORS preflight request (OPTIONS) are responded immediately | |
# - Access-Control-Allow-Credentials=true for GET and POST requests | |
# - Access-Control-Max-Age=20days, to minimize repetitive OPTIONS requests |
SET foreign_key_checks = 0; | |
-- Last 5 Search Terms / Top 5 Search Terms | |
TRUNCATE TABLE catalogsearch_fulltext; | |
TRUNCATE TABLE catalogsearch_query; | |
TRUNCATE TABLE catalogsearch_result; | |
-- Dashboard stats (e.g. "Most Viewed Products" etc) | |
TRUNCATE TABLE report_compared_product_index; | |
TRUNCATE TABLE report_event; |
<?php | |
/* | |
HHVMinfo - phpinfo page for HHVM HipHop Virtual Machine | |
Author: _ck_ | |
License: WTFPL, free for any kind of use or modification, I am not responsible for anything, please share your improvements | |
Version: 0.0.6 | |
* revision history | |
0.0.6 2014-08-02 display fix for empty vs zero | |
0.0.5 2014-07-31 try to determine config file from process command line (may not always work), style improvements |
# | |
# max requests per keepalive connection | |
keepalive_requests 55000; | |
# awesome OPTIONS header | |
if ($request_method = 'OPTIONS') { | |
add_header "Access-Control-Allow-Origin" $http_origin; | |
add_header "Vary" "Origin"; | |
add_header 'Access-Control-Allow-Credentials' 'true'; | |
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'; |
These set of scripts are for Magento 1. For Magento 2, see this Gist.
<?php | |
// Based on <https://github.com/mecha-cms/x.minify> | |
namespace x\minify\_ { // start namespace | |
$n = __NAMESPACE__; | |
\define($n . "\\token_boolean", '\b(?:true|false)\b'); | |
\define($n . "\\token_number", '-?(?:(?:\d+)?\.)?\d+'); |
Press minus + shift + s
and return
to chop/fold long lines!