Skip to content

Instantly share code, notes, and snippets.

Viktor Zhuromskyy viktor-zhuromskyy

Block or report user

Report or block viktor-zhuromskyy

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@chexov
chexov / nginx.conf
Last active May 23, 2019
nginx wide open CORS with Range requests
View nginx.conf
#
# 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';
@hollodotme
hollodotme / Install-php7.md
Last active Oct 10, 2019
Installing php7-fpm with phpredis and xdebug extension on Ubuntu 14.04
View Install-php7.md

Install php7.0-fpm

# remove php5 modules
apt-get autoremove --purge php5-*
# add php-7.0 source list by [Ondřej Surý](https://github.com/oerdnj)
add-apt-repository ppa:ondrej/php
# Update index
apt-get update
# Install php7.0-fpm with needed extensions
@tovic
tovic / php-html-css-js-minifier.php
Last active Nov 13, 2019
PHP Function to Minify HTML, CSS and JavaScript
View php-html-css-js-minifier.php
<?php
// Based on <https://github.com/mecha-cms/extend.minify>
define('MINIFY_STRING', '"(?:[^"\\\]|\\\.)*"|\'(?:[^\'\\\]|\\\.)*\'|`(?:[^`\\\]|\\\.)*`');
define('MINIFY_COMMENT_CSS', '/\*[\s\S]*?\*/');
define('MINIFY_COMMENT_HTML', '<!\-{2}[\s\S]*?\-{2}>');
define('MINIFY_COMMENT_JS', '//[^\n]*');
define('MINIFY_PATTERN_JS', '/[^\n]+?/[gimuy]*');
define('MINIFY_HTML', '<[!/]?[a-zA-Z\d:.-]+[\s\S]*?>');
@ck-on
ck-on / hhvminfo.php
Last active Mar 12, 2018
HHVMinfo - phpinfo for HHVM HipHop Virtual Machine
View hhvminfo.php
<?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
@SchumacherFM
SchumacherFM / Stats.md
Last active Oct 9, 2018
Comparing different storage systems for Magento
View Stats.md

Magento Caching Test

Testing three type of caches: persistent, non-persistent and two-level.

Prerequisites

  • MacBook Air
  • 13-inch, Mid 2012
  • Processor 1.8 GHz Intel Core i5
  • Memory 8 GB 1600 MHz DDR3
@surjikal
surjikal / nginx-cors.conf
Last active Mar 10, 2016 — forked from algal/nginx-cors.conf
Nginx CORS include file
View nginx-cors.conf
#
# 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
View README.md
@mystix
mystix / magento-reset-dashboard.sql
Last active Jan 31, 2018
Magento: reset dashboard data
View magento-reset-dashboard.sql
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;
@leek
leek / README.md
Last active Nov 1, 2019
Magento 1 - Delete All Test Data
View README.md

These set of scripts are for Magento 1. For Magento 2, see this Gist.

You can’t perform that action at this time.