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 | |
file_fix_directory(dirname(__FILE__)); | |
function file_fix_directory($dir, $nomask = array('.', '..')) { | |
if (is_dir($dir)) { | |
// Try to make each directory world writable. | |
if (@chmod($dir, 0755)) { | |
echo "<p>Cambio permessi directory a 0755: " . $dir . "</p>"; | |
} | |
} |
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 | |
if (strlen($property->pro_name) > 75) | |
{ | |
$propertyName = implode(" ", explode( "\n", wordwrap($property->pro_name, 75))).'...'; | |
} | |
else | |
{ | |
$propertyName = $property->pro_name; | |
} | |
?> |
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
if (document.URL.substr(-6) == 'secret') { | |
document.body.style.setProperty("background-image", "none", "important") | |
document.body.style.setProperty("background-color", "#10FF00", "important") | |
} |
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
; Maximum size of POST data that PHP will accept. | |
post_max_size = 256M | |
; Maximum allowed size for uploaded files. | |
upload_max_filesize = 256M | |
; Maximum execution time of each script, in seconds | |
max_execution_time = 600 | |
; Maximum amount of time each script may spend parsing request data |
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
HTMLDocument.prototype.ready = function () { | |
return new Promise(function(resolve, reject) { | |
if (document.readyState === 'complete') { | |
resolve(document); | |
} else { | |
document.addEventListener('DOMContentLoaded', function() { | |
resolve(document); | |
}); | |
} | |
}); |
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 map = Array.prototype.map; | |
var result = map.call("Hello World", function(x) { return x; }); |
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 | |
defined('_JEXEC') or die('Restricted access'); | |
define('DS', DIRECTORY_SEPARATOR); | |
// Use these variables for direct file access | |
// define('_JEXEC', 1); | |
// define('JPATH_BASE', realpath(dirname(__FILE__))); | |
require_once (JPATH_BASE.DS.'includes'.DS.'defines.php'); | |
require_once (JPATH_BASE.DS.'includes'.DS.'framework.php'); |
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 `sample_table` | |
SET city = CONCAT(UCASE(LEFT(city, 1)), | |
SUBSTRING(LCASE(city), 2)); |
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 () { | |
// pobieramy wszystkie formularze na stronie | |
var forms = document.querySelectorAll('form'); | |
// pobieramy wszystkie pola formularzy na stronie | |
var inputs = document.querySelectorAll('.form__content__input'); | |
var isFilledClass = 'is-filled'; | |
// konwertujemy obiekt typu HTML NodeList do obiektu typu tablicowego | |
forms = Array.prototype.slice.call(forms); | |
inputs = Array.prototype.slice.call(inputs); |
NewerOlder