UPDATE catalog_product_entity_media_gallery AS mg,
catalog_product_entity_media_gallery_value AS mgv,
catalog_product_entity_varchar AS ev
SET ev.value = mg.value
WHERE mg.value_id = mgv.value_id
This file contains 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
" Vim RC | |
" Based upon Rud5G .vimrc | |
" @link https://gist.github.com/Rud5G | |
" @link https://gist.github.com/2316255 | |
" | |
" Below some links that could help understand and edit this file | |
" @link http://vimdoc.sourceforge.net/htmldoc/options.html | |
" @link http://www.eng.hawaii.edu/Tutor/vi.html [BROKEN!] | |
" -> {@link http://www.linuxfocus.org/English/May2000/article153.shtml} | |
" |
This file contains 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
## here is the original ~/.bashrc | |
# Alias definitions. | |
# You may want to put all your additions into a separate file like | |
# ~/.bash_aliases, instead of adding them here directly. | |
# See /usr/share/doc/bash-doc/examples in the bash-doc package. | |
if [ -f ~/.bash_aliases ]; then | |
. ~/.bash_aliases | |
fi |
This file contains 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 the base of the commands below. This adds all files appearing in git status: | |
git status -s |grep -E "^.[^D] " |sed "s/^.. //" |xargs git add | |
git status -s |grep -E "^.D " |sed "s/^.. //" |xargs git rm | wc -l | |
# For a simple add all (no deletions) you probably want to use this | |
# (add all files * and all dot files .[!.]*, asterix won't match dot files): | |
git add * .[!.]* | |
# These commands rely on the short GIT status output "git status -s" | |
# Short status line syntax is "XY myfile" | |
# X (first char) displays the status for a file in the staging area |
This file contains 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
(MySQLDUMP_DATABASE=$(sed -n 's/^.*<dbname><!\[CDATA\[\(.*\)\]\]><\/dbname>.*/\1/p' app/etc/local.xml | head -n1) \ | |
&& \ | |
mysqldump -h$(sed -n 's/^.*<host><!\[CDATA\[\(.*\)\]\]><\/host>.*/\1/p' app/etc/local.xml | head -n1) \ | |
-u$(sed -n 's/^.*<username><!\[CDATA\[\(.*\)\]\]><\/username>.*/\1/p' app/etc/local.xml | head -n1) \ | |
-p$(sed -n 's/^.*<password><!\[CDATA\[\(.*\)\]\]><\/password>.*/\1/p' app/etc/local.xml | head -n1) \ | |
$MySQLDUMP_DATABASE \ | |
--ignore-table=${MySQLDUMP_DATABASE}.core_cache \ | |
--ignore-table=${MySQLDUMP_DATABASE}.core_cache_tag \ | |
--ignore-table=${MySQLDUMP_DATABASE}.log_url \ | |
--ignore-table=${MySQLDUMP_DATABASE}.log_url_info \ |
This file contains 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 | |
// Init framework | |
require 'app/Mage.php'; | |
Mage::app(); | |
// Factory methods to search for | |
$methods = array( | |
'Mage::helper', | |
'Mage::getModel', | |
'Mage::getResourceModel', |
This file contains 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
#!/usr/bin/php -q | |
<?php | |
ini_set('display_errors', 1); | |
require_once('./app/Mage.php'); | |
Mage::init(); | |
Mage_Core_Model_Resource_Setup::applyAllUpdates(); | |
Mage_Core_Model_Resource_Setup::applyAllDataUpdates(); |
This file contains 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/sh | |
# From http://www.magentocommerce.com/wiki/magento_upgrade_from_1.6.0_1.6.1_or_1.6.2._to_1.7.0.0 | |
rm -rf var/cache/* var/session/* var/full_page_cache/* | |
chmod +x ./mage | |
./mage mage-setup . | |
./mage config-set preferred_state stable | |
./mage list-installed |
This file contains 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
SELECT cw.`website_id`, cw.`code` AS `website_code`, cw.`name` AS `website_name`, | |
cw.`is_default` AS `website_is_default`, cw.`default_group_id` AS `website_default_group_id`, | |
csg.`group_id`, csg.`name` AS `group_name`, csg.`default_store_id` AS `group_default_store_id`, | |
cs.`store_id`, cs.`code` AS `store_code`, cs.`name` AS `store_name`, cs.`is_active` AS `store_is_active`, | |
ccd_base_url.`value` AS `base_url`, ccd_base_url.`scope_scope_id` AS `base_url_scope`, | |
ccd_design_package.`value` AS `design_package`, ccd_design_package.`scope_scope_id` AS `design_package_scope`, | |
ccd_design_theme_layout.`value` AS `design_theme_layout`, ccd_design_theme_layout.`scope_scope_id` AS `design_theme_layout_scope`, | |
ccd_design_theme_template.`value` AS `design_theme_template`, ccd_design_theme_template.`scope_scope_id` AS `design_theme_template_scope`, | |
ccd_design_theme_skin.`value` AS `design_theme_skin`, ccd_design_theme_skin.`scope_scope_id` AS `design_theme_skin_scope` | |
FROM `core_store` AS cs |
This file contains 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
#!/usr/bin/php | |
<?php | |
/** | |
* Debug an XML file | |
* @author Jochem Klaver <j.klaver@drecomm.nl> | |
* @link http://php.net/libxml | |
*/ | |
require('app/Mage.php'); | |
Mage::app(); |
OlderNewer