Skip to content

Instantly share code, notes, and snippets.

View roman204's full-sized avatar
🎯
Focusing

Roman Hutterer roman204

🎯
Focusing
View GitHub Profile
@ProxiBlue
ProxiBlue / gist:ad1bc6db0f74e4494f92f94d04423b4b
Last active January 26, 2022 22:06
cypress random test from sitemap.xml that old site and new site match data
Add the following to plugins/index.js
module.exports = (on, config) => {
on('task', {
log (message) {
console.log(message)
return null
}
})
}
@peterjaap
peterjaap / lighthouse-locally.md
Last active December 15, 2020 09:26
Run Lighthouse locally

Run Lighthouse locally

You only need Docker installed. Add to ~/.zshrc, or ~/.bashrc, or whatever you're using;

lh() {
  mkdir -p lighthouse && \
  docker run --rm -it -v "$PWD":/usr/src -w /usr/src markhobson/node-chrome /bin/bash -c "npm i -g lighthouse && lighthouse --enable-error-reporting --chrome-flags=\"--headless --no-sandbox\" $1 --output html --output-path ./lighthouse/index.html" && \
  open lighthouse/index.html
}
@erikhansen
erikhansen / flush_apcu_cache.rake
Created December 13, 2019 00:04
Rake file to cache apcu cache upon each deployment. Used in conjunction with https://github.com/davidalger/capistrano-magento2#usage
# Clear APCU (unsure if this is necessary, but playing it on the safe side)
after "deploy:published", "cachetool:apcu:clear" do
on release_roles :all do
within release_path do
execute :cachetool, 'apcu:cache:info'
execute :cachetool, 'apcu:cache:clear'
end
end
end
@chranderson
chranderson / nvmCommands.js
Last active May 15, 2024 03:16
Useful NVM commands
// check version
node -v || node --version
// list locally installed versions of node
nvm ls
// list remove available versions of node
nvm ls-remote
// install specific version of node
@avoelkl
avoelkl / checks.md
Last active June 16, 2016 17:09
PayPal Security Update on June 17th 2016

So, here's the thing: PayPal is rolling out a security update on June 17th 2016. A friday, for the joy of all developers and agencies I think. Those who are not prepared and did not check the requirements first will have websites/shops with a non-working PayPal integration after June 17th.

The main 2 points are:

Support SHA-256

PayPal is upgrading SSL certificates on all Live and Sandbox endpoints from SHA-1 to the stronger and more robust SHA-256 algorithm. You will need to update your integration to support certificates using SHA-256.

Discontinue use of the VeriSign G2 Root Certificate

@cedricblondeau
cedricblondeau / ImageChooser.php
Created January 14, 2016 02:40
Image Chooser for Magento2 widgets
<?php
namespace Vendor\Module\Block\Adminhtml\Widget;
class ImageChooser extends \Magento\Backend\Block\Template
{
/**
* @var \Magento\Framework\Data\Form\Element\Factory
*/
protected $_elementFactory;
@mam08ixo
mam08ixo / data-upgrade-0.1.67-0.1.68.php
Last active October 30, 2015 22:02 — forked from avoelkl/upgrade-0.1.67-0.1.68.php
SUPEE-6788 variable + block setup script. 1.) Create a new module or extend a current one. 2.) Create a new install or setup script with the variables and blocks which are not whitelisted yet.
<?php
/**
* @category Namespace
* @package Namespace_Module
* @author Anna Völkl
* @author Christoph Aßmann
* @author Fabian Schmengler
*/
/** @var Mage_Core_Model_Resource_Setup $installer */
<?php
/*
If your products have been deleted but not your media gallery images you
can use the following SQL statement to remove these dormant records.
Please make sure you backup your installation and database before running this
SQL statement. It has been used on Mage 1.8.1 system:
DELETE `img` FROM `catalog_product_entity_media_gallery` img
@imjasonh
imjasonh / markdown.css
Last active May 17, 2024 07:30
Render Markdown as unrendered Markdown (see http://jsbin.com/huwosomawo)
* {
font-size: 12pt;
font-family: monospace;
font-weight: normal;
font-style: normal;
text-decoration: none;
color: black;
cursor: default;
}
@splendidinternet
splendidinternet / magento-ce-1.9.1.0-swatchfix.patch
Created March 26, 2015 09:59
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();
+