Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
| <?php | |
| require_once 'abstract.php'; | |
| class Mage_Shell_Pricerules extends Mage_Shell_Abstract | |
| { | |
| public function run() | |
| { | |
| ini_set('memory_limit', '1024M'); | |
| $this->db = Mage::getSingleton('core/resource')->getConnection('core_read'); |
| ;SMBDIS.ASM - A COMPREHENSIVE SUPER MARIO BROS. DISASSEMBLY | |
| ;by doppelganger (doppelheathen@gmail.com) | |
| ;This file is provided for your own use as-is. It will require the character rom data | |
| ;and an iNES file header to get it to work. | |
| ;There are so many people I have to thank for this, that taking all the credit for | |
| ;myself would be an unforgivable act of arrogance. Without their help this would | |
| ;probably not be possible. So I thank all the peeps in the nesdev scene whose insight into | |
| ;the 6502 and the NES helped me learn how it works (you guys know who you are, there's no |
| diff -rupN mage_org/app/code/core/Mage/Catalog/Model/Url.php src_shop/app/code/core/Mage/Catalog/Model/Url.php | |
| --- mage_org/app/code/core/Mage/Catalog/Model/Url.php 2013-11-19 00:48:25.679009391 +0100 | |
| +++ src_shop/app/code/core/Mage/Catalog/Model/Url.php 2013-11-19 00:49:24.188005601 +0100 | |
| @@ -643,13 +643,24 @@ class Mage_Catalog_Model_Url | |
| $this->_rewrite = $rewrite; | |
| return $requestPath; | |
| } | |
| + | |
| + // avoid unnecessary creation of new url_keys for duplicate url keys | |
| + $noSuffixPath = substr($requestPath, 0, -(strlen($suffix))); |
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
| ################################################################################# | |
| # start and stop the vpn from the command line from now on with these two commands | |
| ################################################################################# | |
| startvpn() { | |
| sudo launchctl load -w /Library/LaunchDaemons/net.pulsesecure.AccessService.plist | |
| launchctl load -w /Library/LaunchAgents/net.pulsesecure.pulsetray.plist | |
| } | |
| quitvpn() { | |
| launchctl unload -w /Library/LaunchAgents/net.pulsesecure.pulsetray.plist | |
| sudo launchctl unload -w /Library/LaunchDaemons/net.pulsesecure.AccessService.plist |
| #!/usr/bin/env bash | |
| set -eu | |
| declare -a file_patterns=('app/code/core' 'app/Mage.php$' '^index.php$') | |
| exit_status=0 | |
| while read x file; do | |
| for file_pattern in ${file_patterns[@]}; do | |
| if [[ $file =~ $file_pattern ]]; then |
| # Idempotent way to build a /etc/hosts file with Ansible using your Ansible hosts inventory for a source. | |
| # Will include all hosts the playbook is run on. | |
| # Inspired from http://xmeblog.blogspot.com/2013/06/ansible-dynamicaly-update-etchosts.html | |
| - name: "Build hosts file" | |
| lineinfile: dest=/etc/hosts regexp='.*{{ item }}$' line="{{ hostvars[item].ansible_default_ipv4.address }} {{item}}" state=present | |
| when: hostvars[item].ansible_default_ipv4.address is defined | |
| with_items: groups['all'] |
After having many deadlocks due to a high order volumne I've applied the these fixes to the core. Some can be found in a Magento forum. Before the fixes we could only process 1 order every 5-10 secs. Updating to Magento 1.8 is currently not an option but in 1-2 months.
Mage_Sales_Model_Abstract::_afterSave must be removed and replaced with afterCommitCallback. This is important to move the grid update (of sales_flat_order_grid) out of the transaction.
Rewrite the method of the Mage_CatalogInventory_Model_Observer::reindexQuoteInventory() to remove the price reindexing from the transaction. That index process will also be fired in event sales_model_service_quote_submit_success.
| #!/bin/bash | |
| # | |
| # Copyright Colin Mollenhour 2014 | |
| dir=/root/deadlocks | |
| [ -d $dir ] || mkdir -p $dir | |
| cd $dir || { echo "Could not cd to $dir"; exit 1; } | |
| mysql -be 'show engine innodb status;' \ | |
| | sed 's/\\n/\n/g' \ |