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 | |
| /* | |
| Plugin Name: Disable Automatic Image Crop | |
| Author: Wordpress Community | |
| Description: wpse124009 - http://wordpress.stackexchange.com/questions/124009/why-wordpress-automatic-cropping-all-my-images and https://developer.wordpress.org/reference/functions/remove_image_size/ | |
| */ | |
| add_action( 'init', 'czc_disable_extra_image_sizes' ); | |
| add_filter( 'image_resize_dimensions', 'czc_disable_crop', 10, 6 ); |
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
| Для Safari (iPhone / IPod / IPad) и Android браузера | |
| <meta name="format-detection" content="telephone=no"> |
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
| <div class="map-iframe-container"> | |
| <h3>First Map</h3> | |
| <iframe class="map-iframe" | |
| frameborder="0" style="border:0; width: 100%; height: 100%" | |
| src="https://www.google.com/maps/embed/v1/place?key=%GOOGLE_API_KEY%&q=%LOCATION%" allowfullscreen> | |
| </iframe> | |
| </div> | |
| <div class="map-iframe-container"> | |
| <h3>Second Map</h3> |
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 be placed in | |
| # /wp-content/.htaccess | |
| <FilesMatch "\.(log|txt)$"> | |
| Order Allow,Deny | |
| Deny from all | |
| </FilesMatch> |
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
| #!/bin/bash | |
| CURRENT_DATE=$(date +'%Y-%m-%d') | |
| MYSQL_USER="mysql_user" | |
| MYSQL=/usr/bin/mysql | |
| MYSQL_PASSWORD="mysql_user_pass" | |
| MYSQLDUMP=/usr/bin/mysqldump | |
| BACKUP_DIR=/DATA/backup/$CURRENT_DATE | |
| SITES_DIR=/www |
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
| #!/bin/sh | |
| RANDNUMBER=`shuf -i1-10000 -n1` | |
| # echo "RANDNUMBER $RANDNUMBER" | |
| cd /mnt/bak | |
| # backup files | |
| echo "backup files..." | |
| cp -r /www/web/brch/public_html /root/bak/public_html_`date +"%Y-%m-%d"`_$RANDNUMBER |
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
| //////// WordPress Get Custom Field | |
| <?php echo get_post_meta($post->ID, 'year', true); ?> | |
| /////// WordPress query_posts | |
| <?php if ( have_posts() ) : query_posts('p=1'); | |
| while (have_posts()) : the_post(); ?> | |
| <?php the_title(); ?> | |
| <?php the_content(); ?> | |
| <?php the_post_thumbnail(array(100, 100)); ?> |
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
| <FilesMatch "\.(txt|log|xml|css|js)$"> | |
| Header set X-Robots-Tag "noindex" | |
| </FilesMatch> |
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
| tar -xzpvf mytarfile.tgz --exclude="._*" |
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
| #!/bin/bash | |
| # rsync backup, see www.linux.com/learn/tutorials/284789-writing-a-simple-bash-script- | |
| SOURCEDIR1=/home/user | |
| DESTDIR1=user@hostname:/path/to/folder | |
| rsync -az --progress --exclude='*.bak' --rsh 'ssh ' $SOURCEDIR1 $DESTDIR1 |
NewerOlder