How To rsync Only Specific File Extensions

Author: , February 5th, 2017

rsync -avzn –progress –include=’*.png’ –include=’*/’ –exclude=’*’ /the/source/path/ user@theServer:/the/target/path/

How To Fix a “Corrupted index cache file” Error in Dovecot

Author: , June 17th, 2016

Jun 17 00:02:45 inbound dovecot: IMAP(yourName): Corrupted index cache file /home/yourName/Maildir/dovecot.index.cache: invalid record size service dovecot stop cd /home/yourName/Maildir/ rm dovecot.index* service dovecot start As always, YMMV. Proceed with caution.

How To Find the Template File Name per Page in WordPress using SQL

Author: , September 5th, 2015

1 SELECT DISTINCT `meta_value` FROM `wp_postmeta` WHERE `meta_key` LIKE ‘_wp_page_template’ SELECT DISTINCT `meta_value` FROM `wp_postmeta` WHERE `meta_key` LIKE ‘_wp_page_template’

How To Protect a Single File in Apache

Author: , June 30th, 2013

In order to protect a file, just replace the Directory directive with Files: 1 2 3 4 5 6 <Files wp-login.php>     AuthType Basic     AuthName "Protected Access"     AuthUserFile /var/www/yourname/.htpasswd     Require valid-user </Files> <Files wp-login.php> AuthType Basic AuthName “Protected Access” AuthUserFile /var/www/yourname/.htpasswd Require valid-user </Files>

How To Clear An HTML File Input Field

Author: , July 19th, 2012

An HTML file input can’t be cleared by normal means (i.e. setting the value to null or an empty string) because of browser security restrictions. In most browsers, setting a null value attribute either will have no effect or cause an error. Creating a new element that clones the old element and swap the two […]