- XAMPP for Windows: https://www.apachefriends.org/download.html
- The VC14 builds require to have the Visual C++ Redistributable for Visual Studio 2015 x86 or x64 installed
- The VC15 builds require to have the Visual C++ Redistributable for Visual Studio 2017 x64 or x86 installed
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 1. Install ruby using brew | |
# 3. Run in terminal: gem install algoliasearch | |
# 4. Run this script in terminal: ruby script.rb | |
require 'json' | |
require 'algoliasearch' | |
Algolia.init(application_id: '<insert id here>', api_key: '<insert admin key here>') | |
index = Algolia::Index.new('< name of your index >') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo Enter domain: | |
read domain | |
openssl req \ | |
-newkey rsa:2048 \ | |
-x509 \ | |
-nodes \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Check if command was ran as root. | |
if [[ $(id -u) -eq 0 ]]; then | |
echo "The command \"sphp\" should not be executed as root or via sudo directly." | |
echo "When a service requires root access, you will be prompted for a password as needed." | |
exit 1 | |
fi | |
# Usage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> | |
<body> | |
... | |
<referenceBlock name="product.info.social"> | |
<block class="Magento\Catalog\Block\Product\View" name="product.info.brand" as="brand" template="Magento_Catalog::product/view/brand.phtml"></block> | |
</referenceBlock> | |
... | |
</body> | |
</page> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Copyright © Magento, Inc. All rights reserved. | |
* See COPYING.txt for license details. | |
*/ | |
// For performance use one level down: 'name/{,*/}*.js' | |
// If you want to recursively match all subfolders, use: 'name/**/*.js' | |
module.exports = function (grunt) { | |
'use strict'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="http://cdn.jsdelivr.net/g/filesaver.js"></script> | |
<script> | |
function SaveAsFile(t,f,m) { | |
try { | |
var b = new Blob([t],{type:m}); | |
saveAs(b, f); | |
} catch (e) { | |
window.open("data:"+m+"," + encodeURIComponent(t), '_blank',''); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function afterGetValue(\Magento\ConfigurableProduct\Pricing\Price\FinalPrice $subject, $result) | |
{ | |
/** | |
* @todo Add check on whether preselect is enabled | |
**/ | |
$defaultProductId = $this->defaults->getDefaultProductId($subject->getProduct()); | |
if (!$defaultProductId) { | |
$defaultProductId = (int) $this->_request->getParam('id'); | |
} | |
if ($defaultProductId) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Implements hook_commerce_product_reference_default_delta_alter(). | |
*/ | |
function test_module_commerce_product_reference_default_delta_alter(&$delta, $products) { | |
$test = 123; | |
foreach ($products as $product) { | |
if ($product->commerce_stock['und'][0]['value'] > 0){ | |
$products[1]->commerce_stock['und'][0]['value'] = "On stock"; | |
}else { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ssh-keygen -t rsa -b 4096 -f jwtRS256.key | |
# Don't add passphrase | |
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub | |
cat jwtRS256.key | |
cat jwtRS256.key.pub |
NewerOlder