Skip to content

Instantly share code, notes, and snippets.

View patomarques's full-sized avatar

Pato Marques patomarques

View GitHub Profile
## wordpress permissions
## When you setup WP you (the webserver) may need write access to the files. So the access rights may need to be loose.
chown www-data:www-data -R * # Let Apache be owner
find . -type d -exec chmod 755 {} \; # Change directory permissions rwxr-xr-x
find . -type f -exec chmod 644 {} \; # Change file permissions rw-r--r--
After the setup you should tighten the access rights, according to Hardening WordPress all files except for wp-content should be writable by your user account only. wp-content must be writable by www-data too.
sudo chown -R www-data:www-data /var/www/html/{project_directory}
sudo chmod -R g+rw /var/www/html/{project_directory}
{
// Define o tema do VSCode
"workbench.colorTheme": "Dracula",
// Configura tamanho e família da fonte
"editor.fontSize": 18,
"editor.lineHeight": 24,
"editor.fontFamily": "Fira Code",
"editor.fontLigatures": true,
@patomarques
patomarques / clientes.php
Last active October 6, 2016 19:53
wp eloquent paginator
use Illuminate\Pagination\Paginator;
Paginator::currentPageResolver(function ($pageName = 'pagina'){
return $_GET['pagina'];
});
$clientes = Clientes::orderBy('id_cliente', 'DESC')->paginate(5);
$clientes->setPath('admin.php');
$clientes->setPageName('pagina');
//Paginator