Skip to content

Instantly share code, notes, and snippets.

View dng-dev's full-sized avatar

Daniel Niedergesäß dng-dev

View GitHub Profile
@dng-dev
dng-dev / sqlexception
Created October 26, 2019 11:58
sqlexception
sqlexception
@dng-dev
dng-dev / gtm-utilities.js
Created August 1, 2019 09:13 — forked from chrisgoddard/gtm-utilities.js
Google Tag Manager Utility Library
function(){
"use strict";
/**
* Constants
*/
var VERSION = '2.1';
@dng-dev
dng-dev / Mage_Eav_Model_Entity_Abstract
Created September 28, 2017 18:02
improves eav based loads
<?php
/**
* Magento
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
@dng-dev
dng-dev / Z_Disables.xml
Created March 4, 2017 21:47 — forked from vkerkhoff/Z_Disables.xml
Disable Magento modules not used (check if you really don't use any of them), place this file in app/etc/modules/, also disables the logging of visits (can break product compare)
<?xml version="1.0" ?>
<config>
<modules>
<Find_Feed>
<active>false</active>
</Find_Feed>
<Phoenix_Moneybookers>
<active>false</active>
</Phoenix_Moneybookers>
<Mage_XmlConnect>
@dng-dev
dng-dev / jenkins-git-backup.sh
Created March 1, 2017 17:15 — forked from choldrim/jenkins-git-backup.sh
Example of a script for backing up Jenkins config in git.
#!/bin/bash
# Copies certain kinds of known files and directories from a given Jenkins master directory
# into a git repo, removing any old ones, adds 'em, commits 'em, pushes 'em.
set -ex
if [ $# -ne 3 ]; then
echo usage: $0 jenkins_home git_repos_url git_repos_name
exit 1
fi
@dng-dev
dng-dev / jenkins-git-backup.sh
Created August 9, 2016 21:45 — forked from abayer/jenkins-git-backup.sh
Example of a script for backing up Jenkins config in git.
#!/bin/bash
#
# Copies certain kinds of known files and directories from a given Jenkins master directory
# into a git repo, removing any old ones, adds 'em, commits 'em, pushes 'em.
#
set -ex
if [ $# -ne 2 ]; then
echo usage: $0 root_dir jenkins_master
@dng-dev
dng-dev / fishpig-config.patch
Created August 2, 2016 10:56
this small patch fixes 3 DB queries for the fishpig magento wordpress integration
diff --git a/app/code/community/Fishpig/Wordpress/Helper/Config.php b/app/code/community/Fishpig/Wordpress/Helper/Config.php
index 51f7d7d..742fe6a 100644
--- a/app/code/community/Fishpig/Wordpress/Helper/Config.php
+++ b/app/code/community/Fishpig/Wordpress/Helper/Config.php
@@ -83,26 +83,34 @@ class Fishpig_Wordpress_Helper_Config extends Fishpig_Wordpress_Helper_Abstract
);
}
- $resource = Mage::getSingleton('core/resource');
- $db = $resource->getConnection('core_read');
@dng-dev
dng-dev / fastcgi_finish_request.patch
Created July 26, 2016 19:47
implementation for fastcgi_finish_request in Magento
diff --git a/app/code/core/Mage/Core/Controller/Varien/Front.php b/app/code/core/Mage/Core/Controller/Varien/Front.php
index 75d0e17..890ba9d 100755
--- a/app/code/core/Mage/Core/Controller/Varien/Front.php
+++ b/app/code/core/Mage/Core/Controller/Varien/Front.php
@@ -182,6 +182,12 @@ class Mage_Core_Controller_Varien_Front extends Varien_Object
Mage::dispatchEvent('controller_front_send_response_before', array('front'=>$this));
Varien_Profiler::start('mage::app::dispatch::send_response');
$this->getResponse()->sendResponse();
+ //This function flushes all response data to the client and finishes the request.
+ // This allows for time consuming tasks to be performed without leaving the connection
@dng-dev
dng-dev / sql-no-cache.diff
Created March 14, 2016 10:55
SQL No Cache Support for Varien DB select
diff --git a/lib/Varien/Db/Select.php b/lib/Varien/Db/Select.php
index 4af0818..e7c01c5 100755
--- a/lib/Varien/Db/Select.php
+++ b/lib/Varien/Db/Select.php
@@ -59,6 +59,12 @@ class Varien_Db_Select extends Zend_Db_Select
const SQL_STRAIGHT_JOIN = 'STRAIGHT_JOIN';
/**
+ * define callback for rendering sql no cache support***
+ */