Skip to content

Instantly share code, notes, and snippets.

View ahocquard's full-sized avatar
🚁

Alexandre Hocquard ahocquard

🚁
View GitHub Profile
SELECT
table_schema as `Database`,
table_name AS `Table`,
round(((data_length + index_length) / 1024 / 1024), 2) `Size in MB`
FROM information_schema.TABLES
WHERE table_schema = 'akeneo_pim'
ORDER BY (data_length + index_length) DESC limit 10;
@ahocquard
ahocquard / categorize_product_api.php
Created March 27, 2019 15:14
Categorize randomly products in the API
<?php
use Akeneo\Pim\ApiClient\AkeneoPimClientBuilder;
require __DIR__.'/vendor/autoload.php';
$clientBuilder = new AkeneoPimClientBuilder('http://localhost:8082');
$client = $clientBuilder->buildAuthenticatedByPassword(
'1_1ayksjx0jl8kgssgg8404cgco0o00g000g0ksg8sk0sc08ggk8',
'19rkc52hueqs0sg40kkgwco4c4kgwck4ocowokwc08cc8sosc8',
@ahocquard
ahocquard / gist:e24346317511c359213bb79ba42652c2
Last active September 25, 2018 15:41
array merge performance: loop vs variadic
<?php
class ScalarValue
{
/** @var string */
protected $data;
protected $channel;
protected $locale;
protected $attribute;