Select component in inspector and dump (in FF for example):
inspect(require('ko').contextFor($0));
inspect(require('ko').dataFor($0));
Get component from registry:
require('uiRegistry').get('componenet.name.in.layout')
| <?php | |
| /** | |
| * Fast direct PHP port of https://github.com/github/version_sorter | |
| * Not really tested | |
| */ | |
| class Strchunk | |
| { | |
| /** | |
| * @var int |
| DROP PROCEDURE IF EXISTS ClearCoreUrlTable; | |
| DELIMITER $$ | |
| CREATE PROCEDURE `ClearCoreUrlTable`() | |
| BEGIN | |
| SET @delete_counter = 0; | |
| SET @table_name = 'core_url_rewrite'; | |
| SET @total_records = (SELECT count(*) FROM core_url_rewrite WHERE product_id is not null and category_id is not null); | |
| WHILE @delete_counter < @total_records DO | |
| SET @varSQL = CONCAT('DELETE FROM ', @table_name,' WHERE category_id IS NOT NULL and product_id IS NOT NULL AND is_system=0 LIMIT 500;'); |
| #!/bin/bash | |
| ### | |
| # Script for switching PHP versions | |
| # Ivan Weiler | |
| # | |
| # Reference: | |
| # http://robosparrow.github.io/2016/12/10/php-5-on-ubuntu16.html | |
| # https://labbots.com/bash-script-to-switch-php-versions-in-ubuntu/ | |
| ### |
Select component in inspector and dump (in FF for example):
inspect(require('ko').contextFor($0));
inspect(require('ko').dataFor($0));
Get component from registry:
require('uiRegistry').get('componenet.name.in.layout')
https://app.swaggerhub.com/apis/DeRain/sylius-shop_api/1.0.0#/
Za sve koji testiraju na lokalnom Syliusu, da ovi APIji rade potrebno je u Sylius dodatno instalirati i konfiguirati SyliusShopApiPlugin:
https://github.com/Sylius/SyliusShopApiPlugin
http://sylius.loc/shop-api/taxon-products-by-slug/books?channel=US_WEB
GET
http://magento2.inchoo4u.net/swagger
http://magento2.inchoo4u.net/rest/V1/
/products?searchCriteria[page_size]=20
GET
| <VirtualHost *:80> # Or whatever VHost you're using | |
| # Your other rules | |
| RewriteEngine on | |
| RewriteCond %{REQUEST_METHOD} OPTIONS | |
| RewriteRule ^(.*)$ "index.html" [R=200,E=API:1,PT] | |
| # This rewrite rule forces any OPTIONS request to return as a valid response. | |
| # It sets the API environment variable for use below. | |
| # | |
| # You can try to put a placeholder file here for the response (index.html) | |
| # Otherwise it'll look like an error page, but it'll return with a 200 response code. |
| <?xml version="1.0"?> | |
| <!-- | |
| /** | |
| * Log Db Queries | |
| * Copy to /app/etc/local.di.xml (di.xml glob follows {*di.xml, */*di.xml} pattern) | |
| */ | |
| --> | |
| <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd"> | |
| <preference for="Magento\Framework\DB\LoggerInterface" type="Magento\Framework\DB\Logger\File"/> | |
| <type name="Magento\Framework\DB\Logger\File"> |
| \Magento\Framework\App\ObjectManager::getInstance() | |
| ->get('\Psr\Log\LoggerInterface') | |
| ->debug(print_r($a, true)); | |
| //var/log/debug.log |
| php -d xdebug.remote_autostart=1 bin/magento | |
| xdebug.ini | |
| xdebug.remote_enable = 1 | |
| xdebug.remote_autostart = 0 | |
| xdebug.max_nesting_level = 500 | |
| #default formating | |
| xdebug.overload_var_dump = 0 |