Skip to content

Instantly share code, notes, and snippets.

View viktor-zhuromskyy's full-sized avatar

Viktor Zhuromskyy viktor-zhuromskyy

View GitHub Profile
@leek
leek / _Magento1_DeleteTestData.md
Last active December 29, 2023 09:51
Magento 1 - Delete All Test Data

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

@mystix
mystix / magento-reset-dashboard.sql
Last active May 3, 2022 22:16
Magento: reset dashboard data
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;
@hofmannsven
hofmannsven / README.md
Last active November 10, 2024 13:48
Git CLI Cheatsheet
@surjikal
surjikal / nginx-cors.conf
Last active March 10, 2016 01:12 — forked from algal/nginx-cors.conf
Nginx CORS include file
#
# 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
@SchumacherFM
SchumacherFM / Stats.md
Last active October 9, 2018 05:47
Comparing different storage systems for Magento

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
@ck-on
ck-on / hhvminfo.php
Last active September 18, 2022 05:44
HHVMinfo - phpinfo for HHVM HipHop Virtual Machine
<?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
@taufik-nurrohman
taufik-nurrohman / php-html-css-js-minifier.php
Last active October 12, 2024 17:10
PHP Function to Minify HTML, CSS and JavaScript
<?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+');
@hollodotme
hollodotme / Install-php7.md
Last active August 11, 2022 06:23
Installing php7-fpm with phpredis and xdebug extension on Ubuntu 14.04

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
@chexov
chexov / nginx.conf
Last active August 23, 2023 18:12
nginx wide open CORS with Range requests
#
# 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';