Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
{ | |
"require": { | |
"lncd/oauth2-facebook": "*", | |
"slim/slim": "2.*" | |
}, | |
"minimum-stability": "dev" | |
} |
#!/usr/bin/env bash | |
for config in `find . -type f -name .vagrant` | |
do | |
uuid=`cat "$config" | php -r 'echo json_decode(fgets(STDIN))->active->default;'` | |
if VBoxManage showvminfo $uuid > /dev/null 2>&1; then | |
if VBoxManage showvminfo $uuid --machinereadable | egrep -q 'VMState="running|paused|stuck"'; then | |
VBoxManage controlvm $uuid poweroff | |
fi | |
VBoxManage unregistervm $uuid --delete | |
rm -f "$config" |
@servers([ 'remote' => 'server.example.com', ]) | |
@setup | |
if ( ! isset($repo) ) | |
{ | |
throw new Exception('--repo must be specified'); | |
} | |
if ( ! isset($base_dir) ) | |
{ |
<?php namespace App\Console\Commands; | |
use Illuminate\Console\Command; | |
use Illuminate\Support\Str; | |
class MakeAll extends Command | |
{ | |
/** | |
* The name and signature of the console command. | |
* |
<?php | |
$file = fopen('php://output', 'w'); | |
fputcsv($file, ['ID', 'NAME', 'AGE']); | |
for ($index = 0; $index < 21_000_000; $index++) { | |
fputcsv($file, [$index + 1, bin2hex(random_bytes(20)), random_int(18, 65)]); | |
} |