Skip to content

Instantly share code, notes, and snippets.

View amine-y's full-sized avatar
πŸ“ˆ
Being awesome as always

Amine Yaakoubi amine-y

πŸ“ˆ
Being awesome as always
View GitHub Profile
@amine-y
amine-y / q
Created October 5, 2020 21:14
{
"from": 0,
"size": 10,
"sort": [
{
"_score": {
"order": "desc"
}
}
],
@amine-y
amine-y / b
Created September 29, 2020 10:51
──────→ No problems found.
─────→ Checking "video.png".
──────→ No problems found.
─────→ Checking "playlist-audio.png".
──────→ No problems found.
─────→ Checking "dashicon-edit.png".
──────→ No problems found.
─────→ Checking "more.png".
──────→ No problems found.
─────→ Checking "pagebreak-2x.png".
<?php
// Does not support flag GLOB_BRACE
function rsearch($folder, $pattern_array) {
$return = array();
$iti = new RecursiveDirectoryIterator($folder);
foreach(new RecursiveIteratorIterator($iti) as $file){
if (in_array(strtolower(array_pop(explode('.', $file))), $pattern_array)){
$return[] = $file;
}
@amine-y
amine-y / clean.sh
Last active October 19, 2020 13:45
#!/usr/bin/env bash
echo "Cleaning"
rm -rf app/code/Axelites/MgtVarnish
rm -rf app/code/Mgt
rm -rf var/cache/*
rm -rf var/view_preprocessed/*
rm -rf var/page_cache/*