Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Tadeusz Stępnikowski versedi

🎯
Focusing
View GitHub Profile
@versedi
versedi / webpack.config.js
Last active Nov 28, 2021
Webpack Encore + Sass + MiniCSSExtractPlugin + PurgeCSS + OptimizeCss + Babel + Typescript
View webpack.config.js
/* eslint-disable no-useless-escape */
const Encore = require('@symfony/webpack-encore');
const TerserPlugin = require('terser-webpack-plugin');
const CircularDependencyPlugin = require('circular-dependency-plugin');
const HtmlCriticalWebpackPlugin = require('html-critical-webpack-plugin');
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const PurgeCssPlugin = require('purgecss-webpack-plugin');
const WebpackBar = require('webpackbar');
const path = require('path');
View gist:c81c29ee96a8fa3dd39beeb17edaa737
;The key (or mouse button) you press to activate the script. For a list of supported "keys" and combinations, see https://autohotkey.com/docs/Hotkeys.htm
;XButton1 = "Back"-Button on my mouse. For a complete list of special keys, see https://autohotkey.com/docs/KeyList.htm
#IfWinActive Last Epoch
#SingleInstance force
#NoEnv
#Warn
#Persistent
#MaxThreadsPerHotkey 2
@versedi
versedi / kill-ssh-agents.bat
Created Aug 30, 2015
Kill all ssh-agents Windows
View kill-ssh-agents.bat
taskkill /F /IM ssh-agent.exe /T
@versedi
versedi / bs3-media-desktop-lg.sublime-snippet
Last active Sep 10, 2017
Sublime Text 3 Snippets with Bootstrap 3 media queries
View bs3-media-desktop-lg.sublime-snippet
<snippet>
<content><![CDATA[
/* Large Desktop */
@media only screen and (min-width: ${1:@screen-lg-min})
{
${3:}
}
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>bs3-media-lg-desktop,bs3-media-lg</tabTrigger>
@versedi
versedi / MagentoScenarios.md
Last active Jan 26, 2017
MagentoScenarios
View MagentoScenarios.md

Issues with tax calculation in Magento 1.9

Product tax class

  1. Make sure that product tax class is set to Taxable Goods on product edit page, tab Prices.

Customer groups >< tax class assignment

  1. Make sure customer groups are saved with proper customer tax class assigned (Customer > Customer Groups)

=====================

@versedi
versedi / MagentoEvents.md
Last active Jan 23, 2017
magento events table
View MagentoEvents.md
File Line Event
cron.php 46 default
Mage/Adminhtml/Controller/Action.php 159 adminhtml_controller_action_predispatch_start
Mage/Adminhtml/Block/Customer/Edit/Tab/Carts.php 61 adminhtml_block_html_before
Mage/Adminhtml/Block/Report/Grid.php 186 adminhtml_widget_grid_filter_collection
Mage/Adminhtml/Block/Cms/Page/Edit/Tab/Meta.php 76 adminhtml_cms_page_edit_tab_meta_prepare_form
Mage/Adminhtml/Block/Cms/Page/Edit/Tab/Design.php 125 adminhtml_cms_page_edit_tab_design_prepare_form
Mage/Adminhtml/Block/Cms/Page/Edit/Tab/Main.php 119 adminhtml_cms_page_edit_tab_main_prepare_form
Mage/Adminhtml/Block/Cms/Page/Edit/Tab/Content.php 98 adminhtml_cms_page_edit_tab_content_prepare_form
@versedi
versedi / .bash_aliases
Created Jan 23, 2017
Disable xdebug when running composer
View .bash_aliases
alias composer='php -n -d memory_limit=-1 -d extension=json.so -d extension=phar.so -d extension=pdo.so -d extension=tokenizer.so -d extension=ctype.so -d extension=dom.so -d extension=mbstring.so -d extension=mcrypt.so -d extension=xmlreader.so -d extension=xmlrpc.so -d extension=xmlwriter.so -d extension=curl.so -d extension=xml.so ~/bin/composer'
@versedi
versedi / activate-coupon-rules.php
Created Dec 29, 2016
Activate coupons sale rules by specific expiration date.
View activate-coupon-rules.php
<?php
$collection = Mage::getModel('salesrule/coupon')->getCollection()->addFieldToFilter('expiration_date', array('eq' => '2016-12-30 00:00:00'));
foreach($collection as $coupon) {
$rule = Mage::getModel('salesrule/rule')->load($coupon->getRuleId());
$rule->setIsActive(true)->save();
}
@versedi
versedi / prices_per_store.sql
Created Dec 2, 2016
GetPricesPerStores-MagentoSQL
View prices_per_store.sql
SELECT
CPE.sku,
CPED.value,
CPED.attribute_id,
CPED.store_id,
EAV.attribute_code
FROM
catalog_product_entity AS CPE
INNER JOIN catalog_product_entity_decimal AS CPED ON CPED.entity_id = CPE.entity_id AND CPED.attribute_id IN (75,76) AND CPED.store_id IN (1,2,3,4,5,14,15,0)
INNER JOIN eav_attribute AS EAV ON CPED.attribute_id = EAV.attribute_id
@versedi
versedi / Subscriber.php
Last active Oct 7, 2016
FIX-Magento-Untranslated-NonStyled-Newsletter-Subscription-Unsubscription-Emails-InlineCss-Not-Rendered-From-Backend.php
View Subscriber.php
<?php
// app/code/core/Mage/Core/Model/Email/Template/Abtract.php
//example on sendUnsubscriptionEmail but has to be done everywhere.
/**
* Sends out unsubsciption email
*
* @return Mage_Newsletter_Model_Subscriber