This file contains hidden or 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
#https://stackoverflow.com/a/26384329/4970584 | |
#for a quick solution | |
mysqldump --skip-comments --skip-extended-insert -d --no-data -u root -p dbName1 | sed 's/ AUTO_INCREMENT=[0-9]*\b//'>file1.sql | |
mysqldump --skip-comments --skip-extended-insert -d --no-data -u root -p dbName2 | sed 's/ AUTO_INCREMENT=[0-9]*\b//'>file2.sql | |
diff file1.sql file2.sql | |
#for a more complex solution use https://github.com/dlevsha/compalex |
This file contains hidden or 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
<!--[if (gte mso 9)|(IE)]> | |
<center> | |
<table> | |
<tr> | |
<td width="600"> | |
<![endif]--> | |
<div style="max-width: 600px; margin: 0 auto;"> | |
<p>This text will be centered and constrained to 600 pixels even on Outlook which does not support max-width CSS</p> | |
</div> | |
<!--[if mso]> |
This file contains hidden or 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
<!--[if (gte mso 9)|(IE)]> | |
<center style=" background-color:red"> | |
<table> | |
<tr> | |
<td width="280"> | |
<![endif]--> | |
<div style="max-width:180px; margin:0 auto; background-color:blue"> | |
<p>this will create a 280px on outlook/IE and a 180px on the other</p> | |
</div> | |
<!--[if (gte mso 9)|(IE)]> |
This file contains hidden or 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
#to find your virtual hosts location on apache On (CentOS,Fedora, RHEL) | |
#1 - Find the httpd location | |
find / -name "httpd" | |
#2 - Dump the hosts | |
httpd -S | |
#(-S stands for: "synonym for -t -D DUMP_VHOSTS -D DUMP_RUN_CFG" ) |
This file contains hidden or 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
<IfModule mod_rewrite.c> | |
#redirect local folder to remote folder on a different server | |
RedirectMatch "^/[local-folder-name]/(.*)" "https://[remote-domain]/[remote-folder-name]/$1" | |
</IfModule> |
This file contains hidden or 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 php versions installer | |
locate bin/php |
This file contains hidden or 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
Options Indexes FollowSymLinks MultiViews | |
AllowOverride All | |
Order allow,deny | |
allow from all |
This file contains hidden or 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
Source | |
https://virtualboxes.org/doc/installing-guest-additions-on-debian/ | |
Login as root; | |
Update your APT database with apt-get update; | |
Install the latest security updates with apt-get upgrade; | |
Install required packages with apt-get install build-essential module-assistant; | |
Configure your system for building kernel modules by running m-a prepare; | |
Click on Install Guest Additions… from the Devices menu, then run mount /media/cdrom. | |
Run sh /media/cdrom/VBoxLinuxAdditions.run, and follow the instructions on screen. |
This file contains hidden or 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 | |
/** | |
* I faced a strange issue while migrating a magento 2.3 from a server to another. | |
* some of the product images where in a uppercase folder on the server and on a lowercase on the db | |
* the fix was to create links... | |
*/ | |
//get the folders list from [magento root]/apps/magento/htdocs/pub/media/catalog/product | |
$folders = ["A","B","C","d","e","f","G","h","i","J","k","l","M","n","o","P","r","s","T","u","V","w","y"]; | |
foreach( $folders as $folder ) |
OlderNewer