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 | |
function liveExecuteCommand($cmd) | |
{ | |
while (@ ob_end_flush()); // end all output buffers if any | |
$proc = popen("$cmd 2>&1 ; echo Exit status : $?", 'r'); | |
$live_output = ""; | |
$complete_output = ""; |
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 | |
namespace App\Casts; | |
use Illuminate\Contracts\Database\Eloquent\CastsAttributes; | |
class ReadableNumber implements CastsAttributes | |
{ | |
/** | |
* Prepare the given value for storage. |
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 | |
$source_dir = "_source"; | |
echo "<div>"; | |
// create source directory | |
mkdir($source_dir); | |
// get latest french WordPress file | |
$ch = curl_init(); |
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 | |
// This can be found in the Symfony\Component\HttpFoundation\Response class | |
const HTTP_CONTINUE = 100; | |
const HTTP_SWITCHING_PROTOCOLS = 101; | |
const HTTP_PROCESSING = 102; // RFC2518 | |
const HTTP_OK = 200; | |
const HTTP_CREATED = 201; | |
const HTTP_ACCEPTED = 202; |
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
# Backup your packages list | |
# Get a packages list | |
dpkg --get-selections > ~/Package.list | |
# Copy list of repositories | |
sudo cp /etc/apt/sources.list ~/sources.list | |
# Export repo keys | |
sudo apt-key exportall > ~/Repo.keys |