Skip to content

Instantly share code, notes, and snippets.

View Nolwennig's full-sized avatar
🐘
Focusing

Nolwennig Nolwennig

🐘
Focusing
View GitHub Profile
@Nolwennig
Nolwennig / wp_post_href.sql
Last active February 27, 2019 01:12
Wordpress - find external links
SELECT guid, post_title, post_content
FROM `posts`
WHERE post_type = 'post'
AND post_content LIKE '%href%';
@Nolwennig
Nolwennig / docker-status.sh
Last active June 29, 2022 19:43
Docker ps: - run: 0 --all: 32 --lastest: CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
echo 'docker ps:';
echo '- run:' $((`docker ps | wc -l` -1));
echo '--all:' $((`docker ps -a | wc -l` -1));
echo '--lastest:' ;\docker ps -l;
@Nolwennig
Nolwennig / readme.sql.md
Created January 22, 2019 15:14
Cannot gather stats! Warning!stat(): stat failed for pub/media/catalog/product/i/m/image.jpg
echo 'Docker ps:';\
echo '- run:' $((`docker ps | wc -l` -1));\
echo '--all:' $((`docker ps -a | wc -l`));\
echo '--lastest:' ;\
docker ps -l;
mysql> desc tax_calculation;
+-------------------------+-------------+------+-----+---------+----------------+
| Field                   | Type        | Null | Key | Default | Extra          |
+-------------------------+-------------+------+-----+---------+----------------+
| tax_calculation_id      | int(11)     | NO   | PRI | NULL    | auto_increment |
| tax_calculation_rate.tax_calculation_rate_id | int(11)     | NO   | MUL | NULL    |                |
| tax_calculation_rule.tax_calculation_rule_id | int(11)     | NO   | MUL | NULL    |                |
| tax_class.class_id (customer_tax_class_id)   | smallint(6) | NO   | MUL | NULL    |                |
| tax_class.class_id (product_tax_class_id)    | smallint(6) | NO   | MUL | NULL    |                |
@Nolwennig
Nolwennig / tips.md
Last active December 11, 2018 08:59
Magento2 > adminhtml > product > view

Cannot gather stats! Warning!stat(): stat failed for /var/www/html/magento2/pub/media/catalog/product/i/m/image.jpg

Please run below sql code

SET @file = '/i/m/image.jpg';
START TRANSACTION;
DELETE FROM catalog_product_entity_media_gallery WHERE value = @file;

Test CheckBox

- [ ]

  • text

checked

@Nolwennig
Nolwennig / mysql_splitdump.sh
Created May 23, 2018 13:26 — forked from jasny/mysql_splitdump.sh
Split MySQL dump SQL file into one file per table or extract a single table
#!/bin/bash
####
# Split MySQL dump SQL file into one file per table
# based on http://blog.tty.nl/2011/12/28/splitting-a-database-dump
####
if [ $# -lt 1 ] ; then
echo "USAGE $0 DUMP_FILE [TABLE]"
exit
<!doctype html>
<html lang="fr">
<head>
<meta charset="utf-8">
<title>Titre de la page</title>
<link rel="stylesheet" href="style.css">
<script src="script.js"></script>
</head>
<body>
...
@Nolwennig
Nolwennig / Layout.php
Created April 24, 2018 07:37
magento2 layout logger
<?php
// app/code/LayoutLogger/PageXml/Model/Layout.php
namespace LayoutLogger\PageXml\Model;
use Magento\Framework\Event\Observer;
use Magento\Framework\Event\ObserverInterface;
class Layout implements ObserverInterface {
protected $_logger;