If an instance of Bitnami (Wordpress, Prestashop) is timing out, verify if the services are running:
sudo service --status-all
You should see the bitnami service on:
[+] bitnami
<?php | |
function get_combinations($arrays) { | |
$result = [[]]; | |
foreach ($arrays as $property => $property_values) { | |
$tmp = []; | |
foreach ($result as $result_item) { | |
foreach ($property_values as $property_value) { | |
$tmp[] = array_merge($result_item, array($property => $property_value)); | |
} |
<?php | |
/** | |
* Break lines for each group of values | |
* in the SQL insert statements. | |
* | |
* It can be used also for simple strings. | |
* | |
* Usage script.php < IN > OUT | |
* |
<?php | |
/** | |
* This script does a full backup of a MySQL server | |
* it uses `mysqldump` to save: | |
* | |
* - full database: create & inserts | |
* - tables create statements | |
* - table inserts | |
* - database routines: functions & stored procedures |
<?php | |
# Nginx doesn't have PATH_INFO | |
if (!isset($_SERVER['PATH_INFO'])) { | |
$_SERVER['PATH_INFO'] = substr($_SERVER["ORIG_SCRIPT_FILENAME"], strlen($_SERVER["SCRIPT_FILENAME"])); | |
} | |
$request = substr($_SERVER['PATH_INFO'], 1); | |
$file = $request; | |
$fp = @fopen($file, 'rb'); |
<?php | |
try { | |
function _trim($str) { | |
return rtrim(trim($str, ' \r\t\n\0\x0B'), ' /'); | |
} | |
# paths to compare | |
$dir1 = isset($argv[1]) ? _trim($argv[1]) : null; |
<?php | |
function _report($start) { | |
$total_time = microtime( true ) - $start; | |
echo PHP_EOL; | |
echo 'Total time: ' . number_format($total_time, 6); | |
echo PHP_EOL; | |
echo PHP_EOL; | |
} |
<?php | |
/** | |
* Import PNG to SVG with <image> tag | |
* @see https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/SVG_Image_Tag | |
*/ | |
$ext = 'png'; | |
$mime = 'image/png'; | |
$files = glob('*.' . $ext); |
If an instance of Bitnami (Wordpress, Prestashop) is timing out, verify if the services are running:
sudo service --status-all
You should see the bitnami service on:
[+] bitnami
<?php | |
$file = 'file.xml'; | |
if(isset($_POST)) | |
{ | |
$url = filter_input(INPUT_POST, 'url', FILTER_VALIDATE_URL); | |
$template = <<<XML | |
<Response> |
#!/usr/bin/env sh | |
gsettings set org.compiz.core:/org/compiz/profiles/unity/plugins/core/ vsize $1 | |
gsettings set org.compiz.core:/org/compiz/profiles/unity/plugins/core/ hsize $2 |