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 a.row_id, a.sku, a.type_id | |
FROM `catalog_product_entity` AS a | |
LEFT JOIN `catalog_product_entity_media_gallery_value_to_entity` AS b | |
ON a.row_id = b.row_id | |
WHERE b.value_id IS NULL; |
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 | |
#### | |
# 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 |
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
# Find out tha start and end for each table data and definition | |
grep -n 'Table structure\|Dumping data for table' superatv_prod-FULL-20170221.sql | |
... | |
406:-- Table structure for table `avatax_log` | |
429:-- Dumping data for table `avatax_log` | |
1361:-- Table structure for table `avatax_queue` | |
... | |
sed '429,1361 d' dump.sql > cleandump.sql |
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 | |
#### | |
# Split MySQL dump SQL file into one file per table | |
# based on http://blog.tty.nl/2011/12/28/splitting-a-database-dump | |
#### | |
if [ $# -ne 1 ] ; then | |
echo "USAGE $0 DUMP_FILE" | |
fi |
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
Local | |
git branch --merged master | grep -v 'master$' | grep -v 'develop$' | xargs git branch -d | |
REMOTE! | |
git branch -r --merged origin/develop | grep -v master | grep -v develop | sed -e 's/\// :/' | xargs -n2 git push |
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
# This is an annotated subset of the Nginx configuration from our Magento production platform @ www.hypernode.com | |
# See https://www.byte.nl/blog/magento-cacheleak-issue | |
user app; | |
worker_processes 4; | |
pid /var/run/nginx.pid; | |
events { | |
worker_connections 768; | |
} |
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
diff -qr dir1 dir2 |
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
<?php | |
/** | |
* Create New Admin User | |
* | |
* Uncomment the 3 define lines and fill out the information | |
*/ | |
//define('USERNAME','admin'); | |
//define('EMAIL','[email protected]'); | |
//define('PASSWORD','TyLf%Dax7wD5'); |
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
sudo mysql --silent --skip-column-names --execute "select concat('\'',User,'\'@\'',Host,'\'') as User from mysql.user" | sort | \ | |
while read u | |
do echo "-- $u"; sudo mysql --silent --skip-column-names --execute "show grants for $u" | sed 's/$/;/' | |
done |
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
find "./app" -name '*.xml' -exec xmllint --noout {} + |
NewerOlder