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
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-- |
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 | |
# | |
# 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 |
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
/* | |
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 | |
*/ |
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
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 |
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
<?php | |
// func_get_args() | |
function foo() { | |
$arg = func_get_args(); | |
echo $arg[0]; |