Skip to content

Instantly share code, notes, and snippets.

View pdechery's full-sized avatar

Pierre Dechery pdechery

View GitHub Profile
@pdechery
pdechery / localhost - permissions
Created June 27, 2016 18:26 — forked from rickbenetti/localhost - permissions
From http://stackoverflow.com/questions/18352682/correct-file-permissions-for-wordpress Just correct folder and files permissions for magento and wordpress to.
chown -R _www:_www * # Let apache be owner
sudo find . -type d -exec chmod 755 {} \; # rwxr-xr-x
sudo find . -type f -exec chmod 644 {} \; # rw-r--r--
@pdechery
pdechery / fix-wordpress-permissions.sh
Created June 27, 2016 18:20 — forked from Adirael/fix-wordpress-permissions.sh
Fix wordpress file permissions
#!/bin/bash
#
# This script configures WordPress file permissions based on recommendations
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions
#
# Author: Michael Conigliaro <mike [at] conigliaro [dot] org>
#
WP_OWNER=www-data # <-- wordpress owner
WP_GROUP=www-data # <-- wordpress group
WP_ROOT=$1 # <-- wordpress root directory
@pdechery
pdechery / loopLess.less
Last active May 31, 2016 14:48
LESS loop sobre array de cores
/*
Aplicar cores dinamicamente numa lista
a partir de um loop sobre um "array" de
elementos usando LESS
Referência -> http://lesscss.org/functions/#list-functions
*/
@pdechery
pdechery / main.js
Created March 23, 2016 21:53 — forked from prateekjadhwani/main.js
Difference between bind(), apply() and call()
var a = 10; // A Global Variable
function p(z) {
// a normal function that
// accepts a variable z as a parameter
console.log(this.a, z);
}
// normal call
// this.a is 10 because GLOBAL variable
// and z = 1
@pdechery
pdechery / teste_php.php
Last active February 16, 2016 13:56
Pegadinhas PHP
<?php
// func_get_args()
function foo() {
$arg = func_get_args();
echo $arg[0];