Let's say you want to host domains first.com and second.com.
Create folders for their files:
| // Fast and easy way to combine (additive mode) two RGBA colors with JavaScript. | |
| // [red, green, blue, alpha] based on these maximul values [255, 255, 255, 1]. | |
| var base = [69, 109, 160, 1]; | |
| var added = [61, 47, 82, 0.8]; | |
| var mix = []; | |
| mix[3] = 1 - (1 - added[3]) * (1 - base[3]); // alpha | |
| mix[0] = Math.round((added[0] * added[3] / mix[3]) + (base[0] * base[3] * (1 - added[3]) / mix[3])); // red | |
| mix[1] = Math.round((added[1] * added[3] / mix[3]) + (base[1] * base[3] * (1 - added[3]) / mix[3])); // green | |
| mix[2] = Math.round((added[2] * added[3] / mix[3]) + (base[2] * base[3] * (1 - added[3]) / mix[3])); // blue |
| <?php | |
| if($product->getSpecialPrice() && $product->getSpecialPrice() > 0 && $product->getSpecialPrice() < $product->getPrice()) { | |
| $specialPriceInclTax = Mage::helper('tax')->getPrice($product, $product->getSpecialPrice(), true); | |
| $conditionalSpecialPrice = '<g:sale_price>' . $specialPriceInclTax . '</g:sale_price>' . PHP_EOL; | |
| $specialFromDate = $product->getSpecialFromDate(); | |
| $specialToDate = $product->getSpecialToDate(); | |
| if($specialFromDate && !$specialToDate) { | |
| $specialToDate = '2100-01-01'; | |
| } | |
| if($specialToDate && !$specialFromDate) { |
| # Defaults / Configuration options for homebridge | |
| # The following settings tells homebridge where to find the config.json file and where to persist the data (i.e. pairing and others) | |
| HOMEBRIDGE_OPTS=-U /var/lib/homebridge | |
| # If you uncomment the following line, homebridge will log more | |
| # You can display this via systemd's journalctl: journalctl -f -u homebridge | |
| # DEBUG=* |
| #!/bin/bash | |
| # This assumes that the ~6GB mojave installer is in the /Applications folder. | |
| # If it's not, just open the App Store, search Mojave, and you can download the installer file from there. | |
| hdiutil create -o /tmp/mojave.cdr -size 6g -layout SPUD -fs HFS+J | |
| hdiutil attach /tmp/mojave.cdr.dmg -noverify -mountpoint /Volumes/install_mojave | |
| sudo /Applications/Install\ macOS\ mojave.app/Contents/Resources/createinstallmedia --volume /Volumes/install_mojave | |
| mv /tmp/mojave.cdr.dmg ~/Desktop/InstallSystem.dmg | |
| hdiutil detach /Volumes/Install\ macOS\ mojave |
With the addition of ES modules, there's now no fewer than 24 ways to load your JS code: (inline|not inline) x (defer|no defer) x (async|no async) x (type=text/javascript | type=module | nomodule) -- and each of them is subtly different.
This document is a comparison of various ways the <script> tags in HTML are processed depending on the attributes set.
If you ever wondered when to use inline <script async type="module"> and when <script nomodule defer src="...">, you're in the good place!
Note that this article is about <script>s inserted in the HTML; the behavior of <script>s inserted at runtime is slightly different - see Deep dive into the murky waters of script loading by Jake Archibald (2013)
Magento 2.3.7 and 2.4.2 ship with composer v2 support out of the box but as far as I can see the only thing that needs to happen is to use some more modern versions of certain composer plugins which are used by certain dependencies of Magento.
This means we should be able to add composer v2 support to older Magento2 versions as well if we get a bit creative.
See below for diffs of the composer.json files you can apply to your projects, be sure to keep a mental note of these things, they will need to maintained by yourself in case newer versions of these modules are released. And if one day you update to Magento 2.3.7 or 2.4.2 or higher, you can remove these changes again.
| # magento 2 disable unused modules | |
| bin/magento module:disable Vertex_AddressValidation | |
| bin/magento module:disable Vertex_AddressValidationApi | |
| bin/magento module:disable Vertex_Tax | |
| bin/magento module:disable Temando_ShippingRemover | |
| bin/magento module:disable Dotdigitalgroup_Chat | |
| bin/magento module:disable Dotdigitalgroup_Email |