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/sh | |
# Web backup script | |
# by Dan Miller | |
# http://www.danmiller.co.uk | |
### Begin Configuration ### | |
EMAIL="you@email.com" # Email address to send the backup report to. (sendmail must be installed) | |
WEBPATH="/data/www" # No trailing slash |
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 | |
# 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 |
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
tar -xzpvf mytarfile.tgz --exclude="._*" |
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
<FilesMatch "\.(txt|log|xml|css|js)$"> | |
Header set X-Robots-Tag "noindex" | |
</FilesMatch> |
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
//////// 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 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 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 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 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 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"> |
OlderNewer