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
$logger = \Magento\Framework\App\ObjectManager::getInstance()->get(\Psr\Log\LoggerInterface::class); | |
$logger->debug('$randomString = "' . $randomString . '"'); |
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 | |
LATEST_RELEASE=$(curl https://api.github.com/repos/hashicorp/terraform/releases/latest | jq --raw-output '.tag_name' | cut -c 2-) | |
if [[ ! -e ${LATEST_RELEASE} ]]; then | |
echo "Installing Terraform ${LATEST_RELEASE}..." | |
rm terraform-* | |
rm terraform | |
wget https://releases.hashicorp.com/terraform/${LATEST_RELEASE}/terraform_${LATEST_RELEASE}_linux_amd64.zip | |
unzip terraform_${LATEST_RELEASE}_linux_amd64.zip | |
rm terraform_${LATEST_RELEASE}_linux_amd64.zip |
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
echo "$STRING" | iconv -t ascii//TRANSLIT | sed -r s/[^a-zA-Z0-9]+/-/g | sed -r s/^-+\|-+$//g | tr A-Z a-z |
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
if Dir.glob("#{File.dirname(__FILE__)}/.vagrant/machines/#{VM_NAME}/*").empty? || ARGV[1] == '--provision' | |
print "Please insert your credentials\n" | |
print "Username: " | |
username = STDIN.gets.chomp | |
print "Password: " | |
password = STDIN.noecho(&:gets).chomp | |
print "\n" | |
config.vm.provision :shell, :path => "provision-vagrant.sh", :args => [username, password] | |
end |
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
SELECT CONCAT(table_schema, '.', table_name), | |
CONCAT(ROUND(table_rows / 1000000, 2), 'M') rows, | |
CONCAT(ROUND(data_length / ( 1024 * 1024 * 1024 ), 2), 'G') DATA, | |
CONCAT(ROUND(index_length / ( 1024 * 1024 * 1024 ), 2), 'G') idx, | |
CONCAT(ROUND(( data_length + index_length ) / ( 1024 * 1024 * 1024 ), 2), 'G') total_size, | |
ROUND(index_length / data_length, 2) idxfrac | |
FROM information_schema.TABLES | |
ORDER BY data_length + index_length DESC | |
LIMIT 10; |
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
SELECT DISTINCT o.option_id, v.value | |
FROM `eav_attribute` a | |
INNER JOIN `eav_attribute_option` o ON a.`attribute_id` = o.`attribute_id` | |
INNER JOIN `eav_attribute_option_value` v ON v.`option_id` = o.`option_id` | |
INNER JOIN `eav_entity_type` t ON t.`entity_type_id` = a.`entity_type_id` | |
INNER JOIN `catalog_product_entity_int` pi ON o.`option_id` = pi.`value` AND o.`attribute_id` = pi.`attribute_id` | |
INNER JOIN `catalog_product_website` pw ON pw.product_id = pi.entity_id | |
WHERE pi.`entity_id` IS NOT NULL | |
AND a.attribute_code = '<attribute code>' | |
AND t.`entity_type_code` = "catalog_product" |
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
/* | |
* Initialize magento. | |
*/ | |
require_once 'app/Mage.php'; | |
Mage::init(); | |
/* | |
* Add specific layout handles to our layout and then load them. | |
*/ | |
$layout = Mage::app()->getLayout(); |
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
Insider /etc/httpd/conf.d/fastcgi.conf: | |
FastCgiWrapper Off |
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
_super_products_sku,_super_attribute_code,_super_attribute_option,_super_attribute_price_corr | |
tshirt-S-red,shirt_size,S,5.0000 | |
tshirt-S-red,color,red,5.0000 | |
tshirt-S-black,shirt_size,S,5.0000 | |
tshirt-S-black,color,black,5.0000 | |
tshirt-L-green,shirt_size,L,5.0000 | |
tshirt-L-green,color,green,5.0000 |
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
# Generated by iptables-save v1.4.7 on Fri May 30 11:43:24 2014 | |
*filter | |
:INPUT ACCEPT [0:0] | |
:FORWARD ACCEPT [0:0] | |
:OUTPUT ACCEPT [4464:613754] | |
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT | |
-A INPUT -p icmp -j ACCEPT | |
-A INPUT -i lo -j ACCEPT | |
-A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT | |
-A INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT |