Skip to content

Instantly share code, notes, and snippets.

View gelysis's full-sized avatar
🎯
Focusing

A Gerhards gelysis

🎯
Focusing
  • RD - ITV
  • Mitteleuropa / Central Europe
View GitHub Profile
<Files ~ "sitemap.*\.xml(\.gz)?$">
Header set X-Robots-Tag "noindex"
</Files>
echo && echo "$(git diff --name-status | wc -l) files changed:" && git diff --name-status
git filter-branch --force --index-filter 'git rm --cached --ignore-unmatch PATH-TO-YOUR-FILE-WITH-SENSITIVE-DATA' --prune-empty --tag-name-filter cat -- --all
git push -f --all && git push -f --tags
git for-each-ref --format='delete %(refname)' refs/original | git update-ref --stdin && git reflog expire --expire=now --all && git gc --prune=now
curl -u [[USERNAME]] -s https://api.github.com/orgs/[[ORGANIZATION]]/repos?per_page=200 | ruby -rubygems -e 'require "json"; JSON.load(STDIN.read).each { |repo| %x[git clone #{repo["ssh_url"]} ]}'
git for-each-ref --sort='-authordate:iso8601' --format=' %(authordate:relative)%09%(refname:short)' refs/heads # local branches only, date descending
git for-each-ref --sort='authordate:iso8601' --format=' %(authordate:relative)%09%(refname:short)' refs # both, remote and local branches, date ascending
/* Run php shell/indexer.php reindexall afterwards */
SET FOREIGN_KEY_CHECKS = 0;
UPDATE catalog_product_entity_tier_price
SET value = value * 1.15;
UPDATE catalog_product_index_price
SET price = price * 1.15, final_price = final_price * 1.15, min_price = min_price * 1.15, max_price = max_price * 1.15;
UPDATE catalog_product_index_price
SET tier_price = tier_price * 1.15
WHERE tier_price IS NOT NULL;
UPDATE catalog_product_index_price
UPDATE customer_entity
SET email = CONCAT(REPLACE(email, '@', '<-_-klammeraffe-_->'), '@gibts.nicht')
WHERE (email NOT LIKE '%firmen_domain') AND (email NOT LIKE '%andere_firmen_domain');
UPDATE customer_entity
SET email = REPLACE(REPLACE(email, '@gibts.nicht', ''), '<-_-klammeraffe-_->, '@')
WHERE (email LIKE '%@gibts.nicht');
@gelysis
gelysis / Magento: Admin 404 Fix
Last active March 31, 2017 03:11
Magento 1.9 : MySQL
SET FOREIGN_KEY_CHECKS = 0;
UPDATE `core_store` SET store_id = 0 WHERE code='admin';
UPDATE `core_store_group` SET group_id = 0 WHERE name='Default';
UPDATE `core_website` SET website_id = 0 WHERE code='admin';
UPDATE `customer_group` SET customer_group_id = 0 WHERE customer_group_code='NOT LOGGED IN';
SET FOREIGN_KEY_CHECKS = 1;
@gelysis
gelysis / Magento: Core Fixes
Last active March 31, 2017 02:37
Magento Enterprise 1.14.1.0
Enterprise_CatalogEvent_Block_Catalog_Category_Event->getEvent():
return ($this->getCategory() ? $this->getCategory()->getEvent() : NULL);