This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is an annotated subset of the Nginx configuration from our Magento production platform @ www.hypernode.com | |
# See https://www.byte.nl/blog/magento-cacheleak-issue | |
# !!!! If you are a Hypernode customer, do not use this config as it will result in duplicate statements. !!!!! | |
user app; | |
worker_processes 4; | |
pid /var/run/nginx.pid; | |
events { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo -i | |
cat > /etc/sudoers.d/10_vagrant <<EOF | |
Cmnd_Alias VAGRANT_EXPORTS_ADD = /usr/bin/tee -a /etc/exports | |
Cmnd_Alias VAGRANT_NFSD_CHECK = /etc/init.d/nfs-kernel-server status | |
Cmnd_Alias VAGRANT_NFSD_START = /etc/init.d/nfs-kernel-server start | |
Cmnd_Alias VAGRANT_NFSD_APPLY = /usr/sbin/exportfs -ar | |
Cmnd_Alias VAGRANT_EXPORTS_REMOVE = /bin/sed -r -e * d -ibak /*/exports | |
Cmnd_Alias VAGRANT_EXPORTS_REMOVE_2 = /bin/cp /*/exports /etc/exports | |
%sudo ALL=(root) NOPASSWD: VAGRANT_EXPORTS_ADD, VAGRANT_NFSD_CHECK, VAGRANT_NFSD_START, VAGRANT_NFSD_APPLY, VAGRANT_EXPORTS_REMOVE, VAGRANT_EXPORTS_REMOVE_2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Marko Martinović | |
# https://devgenii.com/ | |
# | |
# Workaround for issue where Vagrant fails to install plugins due to RubyGems > v2.3.0 and Bundler Gem v1.12.0: | |
# | |
# ... `block in sort_dependencies': undefined method `payload' for nil:NilClass (NoMethodError) | |
# | |
# For example Vagrant 1.8.3 installed from .deb package @ HashiCorp website on Ubuntu 16.04 LTS. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- app/code/core/Mage/Core/Block/Abstract.php 2016-03-25 14:22:51.934883000 +0100 | |
+++ app/code/local/Mage/Core/Block/Abstract.php 2016-03-25 14:39:53.806883000 +0100 | |
@@ -1,4 +1,17 @@ | |
<?php | |
+/* | |
+ * Prevent unnecessary requests to cache storage on | |
+ * | |
+ * core_block_abstract_to_html_after | |
+ * | |
+ * due to |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
grep -Ein "get(Singleton|(Resource)?Model)" $(find -name "*.phtml") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Product Attribute Installer | |
*/ | |
try { | |
/* @var $installer Mage_Catalog_Model_Resource_Setup */ | |
$installer = $this; | |
$installer->startSetup(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
redis-cli -p 6379 | |
127.0.0.1:6380> SELECT 0 | |
OK | |
127.0.0.1:6380> KEYS *CAHCE* | |
1) "zc:k:446_FPC_CACHE_SIZE_CAHCE_KEY" | |
127.0.0.1:6380> HGET zc:k:446_FPC_CACHE_SIZE_CAHCE_KEY d | |
"3439338" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Debug SOAP requests | |
*/ | |
$client = new SoapClient( | |
'http://example.loc/index.php/api/v2_soap/?wsdl' | |
); | |
// Set yourself debug session cookie, for Xdebug and Phpstorm |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once 'abstract.php'; | |
class Mmartinovic_Shell_Resave extends Mage_Shell_Abstract | |
{ | |
protected $_stores = []; | |
protected $_types = []; | |
public function __construct() { | |
parent::__construct(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2015-10-30T10:54:10+00:00 DEBUG (7): SELECT `main_table`.* FROM `permission_variable` AS `main_table` WHERE (`variable_name` = 'web/unsecure/base_url') AND (`is_allowed` = 1) | |
2015-10-30T10:54:11+00:00 DEBUG (7): SELECT `main_table`.* FROM `permission_variable` AS `main_table` WHERE (`variable_name` = 'web/unsecure/base_url') AND (`is_allowed` = 1) | |
2015-10-30T10:54:11+00:00 DEBUG (7): SELECT `main_table`.* FROM `permission_variable` AS `main_table` WHERE (`variable_name` = 'web/unsecure/base_url') AND (`is_allowed` = 1) | |
2015-10-30T10:54:11+00:00 DEBUG (7): SELECT `main_table`.* FROM `permission_variable` AS `main_table` WHERE (`variable_name` = 'web/unsecure/base_url') AND (`is_allowed` = 1) | |
2015-10-30T10:54:11+00:00 DEBUG (7): SELECT `main_table`.* FROM `permission_variable` AS `main_table` WHERE (`variable_name` = 'web/unsecure/base_url') AND (`is_allowed` = 1) | |
2015-10-30T10:54:11+00:00 DEBUG (7): SELECT `main_table`.* FROM `permission_variable` AS `main_table` WHERE (`variable_name` = 'web/unsecure/base_url |