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
CPF: "\d{3}.\d{3}.\d{3}-\d{2}" | |
CNPJ: "\d{2}.\d{3}.\d{3}\/\d{4}-\d{2}" | |
Telefone: "\([0-9]{2}\)[\s][0-9]{4}-[0-9]{4}" | |
Celular: "\([0-9]{2}\) [0-9]{4,6}-[0-9]{3,4}$" | |
Test: | |
CPF: http://bit.ly/2h7DnvF | |
CNPJ: http://bit.ly/2jv9xlU | |
Telefone: https://bit.ly/2LtZSoU | |
Celular: https://bit.ly/2mtjnDq |
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
mysql -uuser -ppassword --default-character-set=utf8 dbname < outputfille |
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
UPDATE wp_options SET option_value = replace(option_value, 'http://www.oldurl', 'http://www.newurl') WHERE option_name = 'home' OR option_name = 'siteurl'; | |
UPDATE wp_posts SET guid = replace(guid, 'http://www.oldurl','http://www.newurl'); | |
UPDATE wp_posts SET post_content = replace(post_content, 'http://www.oldurl', 'http://www.newurl'); | |
UPDATE wp_postmeta SET meta_value = replace(meta_value,'http://www.oldurl','http://www.newurl'); |
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
## LINUX APACHE2 | |
<VirtualHost *:80> | |
DocumentRoot /var/www/site.host.gd/public_html | |
ServerName site.host.gd | |
ErrorLog /var/www/site.host.gd/error.log | |
CustomLog /var/www/site.host.gd/access.log combined | |
ServerAlias www.site.host.gd | |
<Directory "/var/www/site.host.gd/public_html"> | |
allow from all | |
AllowOverride All |
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
# Set Header | |
<IfModule mod_headers.c> | |
Header set X-XSS-Protection "1; mode=block" | |
Header always append X-Frame-Options SAMEORIGIN | |
Header set X-Content-Type-Options nosniff | |
</IfModule> | |
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
# secure .htaccess file | |
<Files .htaccess> | |
Order allow,deny | |
Deny from all | |
</Files> | |
# Exclude the file upload and WP CRON scripts from authentication | |
<FilesMatch "(async-upload\.php|wp-cron\.php|xmlrpc\.php)$"> | |
Satisfy Any |
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
$months = array( | |
'pt-br' => array( | |
'1' => 'Janeiro', | |
'2' => 'Fevereiro', | |
'3' => 'Março', | |
'4' => 'Abril', | |
'5' => 'Maio', | |
'6' => 'Junho', | |
'7' => 'Julho', | |
'8' => 'Agosto', |
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
function _get_youtube_id($url) | |
{ | |
$video_id = false; | |
$url = parse_url($url); | |
if (strcasecmp($url['host'], 'youtu.be') === 0) | |
{ | |
#### (dontcare)://youtu.be/<video id> | |
$video_id = substr($url['path'], 1); | |
} | |
elseif (strcasecmp($url['host'], 'www.youtube.com') === 0) |
OlderNewer