Skip to content

Instantly share code, notes, and snippets.

@wienczny
wienczny / enable.sh
Created June 11, 2021 10:26
Magento 2 Queue Consumer with Systemd
systemctl enable magento-queue-consumers@async.operations.all.service
@wienczny
wienczny / add-checkout-form-key.sh
Created June 2, 2017 13:59 — forked from schmengler/add-checkout-form-key.sh
Magento SUPEE-9767 Checkout Form Key Theme Patch
find -L app/design/frontend -regex '.*\(shipping\|billing\|shipping_method\|payment\).phtml' -exec grep -L formkey {} \; \
| xargs sed -i 's/<\/form>/<?php echo $this->getBlockHtml("formkey") ?><\/form>/g'
find -L skin/frontend -name 'opcheckout.js' -exec grep -L form_key {} \; \
| xargs sed -i 's/if (elements\[i\].name=='\''payment\[method\]'\'') {/if (elements[i].name=='\''payment[method]'\'' || elements[i].name == '\''form_key'\'') {/g'
@wienczny
wienczny / magento-ce-1.9.1.0-swatchfix.patch
Created April 4, 2016 13:04 — forked from splendidinternet/magento-ce-1.9.1.0-swatchfix.patch
Patch for Magento 1.9.1.0 swatches image swap
diff --git a/skin/frontend/rwd/default/js/configurableswatches/product-media.js b/skin/frontend/rwd/default/js/configurableswatches/product-media.js
index 17fd81f..5726200 100644
--- a/skin/frontend/rwd/default/js/configurableswatches/product-media.js
+++ b/skin/frontend/rwd/default/js/configurableswatches/product-media.js
@@ -65,8 +65,11 @@ var ConfigurableMediaImages = {
});
});
+ compatibleProducts.sort();
+
@wienczny
wienczny / phabricator-aphlict.service
Created November 17, 2015 15:18
Phabricator Systemd Units
[Unit]
Description=Phabricator Aphlict
After=syslog.target network.target mysql.service
[Service]
Type=forking
User=phabricator
Group=phabricator
ExecStart=/srv/http/phabricator/bin/aphlict start
ExecStop=/srv/http/phabricator/bin/aphlict stop
@wienczny
wienczny / pwdhash.py
Created November 14, 2015 12:33
Python3 pwdhash.py for https://www.pwdhash.com/
#!/usr/bin/env python
import base64
import re
import hashlib
import hmac
import itertools
def b64_hmac_md5(key, data):
"""
@wienczny
wienczny / exampleBehavior.html
Last active September 16, 2015 21:11 — forked from garlicnation/exampleBehavior.js
behavior singleton model
<script>
// Resolve / declare namespace
window.MyCustomBehaviors = window.MyCustomBehaviors || {};
// This is a globally shared connection.
var singletonConnection = null;
window.MyCustomBehaviors.SocketConnectionBehavior = {
properties: {
connection: {
@wienczny
wienczny / multi-ipn.php
Last active September 8, 2015 13:42 — forked from anointed/multi-ipn.php
Paypal multiple IPN's
<?php
/*
* This is a PayPal IPN (Instant Payment Notification) broadcaster
* Since PayPal does not provide any straightforward way to add
* multiple IPN listeners we'll have to create a central IPN
* listener that will broadcast (or filter and dispatch) Instant
* Payment Notifications to different destinations (IPN listeners)
*
* http://codeseekah.com/2012/02/11/how-to-setup-multiple-ipn-receivers-in-paypal/
*
file_put_contents('/tmp/trace' . microtime(), var_export(debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS), true));
ini_set('display_errors', 1);
ini_set('error_reporting', E_ERROR);
register_shutdown_function("fatal_handler");
function fatal_handler() {
$error = error_get_last();
echo("<pre>");
print_r($error);
}
@wienczny
wienczny / .gitignore
Last active August 29, 2015 14:27
Magento .gitignore File
# Exclude backups, archives and logs
*.tar
*.gz
*.sql
*.log
*.tar.gz
*.zip
*.rar
*.tgz