find /var/www/PATH/OF/FILE_or_DIR/ -type f -exec chmod -R 644 {} ;
find /var/www/PATH/OF/FILE_or_DIR/ -type d -exec chmod -R 755 {} ;
PERMISSOES WORDPRESS chmod -R 755 wp-content
chmod -R 755 wp-admin
chmod -R 755 wp-includes
<?php | |
function getBrowser() | |
{ | |
$u_agent = $_SERVER['HTTP_USER_AGENT']; | |
$bname = 'Unknown'; | |
$platform = 'Unknown'; | |
$version= ""; | |
//First get the platform? |
<?php | |
$msg .= "---Informações de usuários--- \n"."<br>"; //Título | |
$msg .= "Data/hora : ".date('d/m/Y H:i:s')."\n"."<br>"; //IP do remetente | |
$msg .= "IP do usuário : ".$_SERVER["REMOTE_ADDR"]."\n"."<br>"; //IP do remetente | |
$msg .= "userAgent : ".$browser['userAgent']."\n"."<br>"; //User Agent | |
$msg .= "name : ".$browser['name']."\n"."<br>"; //User Agent | |
$msg .= "version : ".$browser['version']."\n"."<br>"; //User Agent | |
$msg .= "platform : ".$browser['platform']."\n"."<br>"; //User Agent | |
$msg .= "pattern : ".$browser['pattern']."\n"."<br>"; //User Agent | |
$msg .= "Envio apartir de : ".$_SERVER["HTTP_REFERER"]."<br>"; //Referências |
SELECT TABLE_NAME AS "Table", | |
round(((data_length + index_length) / 1024 / 1024), 2) AS Size_in_MB | |
FROM information_schema.TABLES | |
WHERE table_schema = 'my_db_name' | |
ORDER BY Size_in_MB DESC |
console.log( | |
'hash' + location.hash + ' === ' | |
+ 'host' + location.host + ' === ' | |
+ 'hostname' + location.hostname + ' === ' | |
+ 'href' + location.href + ' === ' | |
+ 'origin' + location.origin + ' === ' | |
+ 'pathname' + location.pathname + ' === ' | |
+ 'port' + location.port + ' === ' | |
+ 'protocol' + location.protocol + ' === ' | |
+ 'search' + location.search); |
find /var/www/PATH/OF/FILE_or_DIR/ -type f -exec chmod -R 644 {} ;
find /var/www/PATH/OF/FILE_or_DIR/ -type d -exec chmod -R 755 {} ;
PERMISSOES WORDPRESS chmod -R 755 wp-content
chmod -R 755 wp-admin
chmod -R 755 wp-includes
<VirtualHost *:80> | |
ServerAdmin webmaster@localhost | |
ServerName domain.dev | |
ServerAlias www.domain.dev | |
DocumentRoot /var/www/path/of/domain | |
ErrorLog ${APACHE_LOG_DIR}/error.log | |
CustomLog ${APACHE_LOG_DIR}/access.log combined | |
<Directory /var/www/path/of/domain> | |
Options FollowSymLinks | |
AllowOverride All |
#301 Redirects for .htaccess | |
#Redirect a single page: | |
Redirect 301 /pagename.php http://www.domain.com/pagename.html | |
#Redirect an entire site: | |
Redirect 301 / http://www.domain.com/ | |
#Redirect an entire site to a sub folder | |
Redirect 301 / http://www.domain.com/subfolder/ |
#Deploy Heroku - Laravel 5.1 Tive alguns problemas ao tentar fazer o deploy ao Heroku, para mais detalhes vejam esse post Deployment broken when upgrading to Laravel 5.1.
Caso você esteja criando um projeto do zero utilize via Laravel Installer:
laravel new nome_app
<?php | |
if (!function_exists('geocodeService')) { | |
function geocodeService($endereco) | |
{ | |
$endereco = str_replace (" ", "+", urlencode($endereco)); | |
$details_url = "http://maps.googleapis.com/maps/api/geocode/json?address=".$endereco; | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_URL, $details_url); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); |
#!/bin/bash | |
# | |
#RUN: find ../uploads/videos/ -iname "*.mp4" -exec ./ffmpeg.sh {} ";" | |
dir_atual=$(dirname $1) | |
filename=$(basename $1) | |
extension=${filename##*.} | |
filename=${filename%.*} |