Skip to content

Instantly share code, notes, and snippets.


Tadeusz Stępnikowski versedi

View GitHub Profile
versedi / gist:c81c29ee96a8fa3dd39beeb17edaa737
Created August 19, 2021 20:53
Numpad autocast with autohotkey
View gist:c81c29ee96a8fa3dd39beeb17edaa737
;The key (or mouse button) you press to activate the script. For a list of supported "keys" and combinations, see
;XButton1 = "Back"-Button on my mouse. For a complete list of special keys, see
#IfWinActive Last Epoch
#SingleInstance force
#MaxThreadsPerHotkey 2
versedi / webpack.config.js
Last active January 6, 2023 09:28
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');
versedi / .bash_aliases
Created January 23, 2017 09:58
Disable xdebug when running composer
View .bash_aliases
alias composer='php -n -d memory_limit=-1 -d -d -d -d -d -d -d -d -d -d -d -d -d ~/bin/composer'
versedi / activate-coupon-rules.php
Created December 29, 2016 16:32
Activate coupons sale rules by specific expiration date.
View activate-coupon-rules.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());
versedi / prices_per_store.sql
Created December 2, 2016 11:54
View prices_per_store.sql
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 /
Last active January 23, 2017 19:03
magento events table
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 /
Last active January 26, 2017 10:29

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 / Subscriber.php
Last active October 7, 2016 06:26
View Subscriber.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
versedi /
Last active August 2, 2016 07:21
Css Class Use Case / Error Message
validate-no-html-tags HTML tags are not allowed
validate-select Please select an option.
required-entry This is a required field.
validate-number Please enter a valid number in this field.
validate-number-range The value is not within the specified range.
validate-digits Please use numbers only in this field. Please avoid spaces or other characters such as dots or commas.
validate-digits-range The value is not within the specified range.
validate-alpha Please use letters only (a-z or A-Z) in this field.
versedi /
Last active June 1, 2016 12:09
Shell script to automatically create new dev sites in Apache2, Usage: ./newsite /home/mysites/optional-full-path-to-site
NC='\033[0m' # No Color
if [ `id -u` != 0 ]; then
echo -e "${RED}-- ERROR --${NC}"
echo -e "-- This script should be run as root so that files"
echo -e "-- can be created freely."