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 | |
wget http://uk1.php.net/distributions/php-5.4.15.tar.bz2 | |
apt-get update | |
apt-get upgrade -yq | |
apt-get -yq install bzip2 openssl libxml2 libxml2-dev gcc make autoconf htop sudo git dstat | |
tar xvjf php-5*.tar.bz2 | |
cd php-5* | |
cd ext/ | |
git clone git://github.com/krakjoe/pthreads.git | |
cd ../ |
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
public function SpawnWorker($task) | |
{ | |
for($i = 0; $i < $this->size; $i++) | |
{ | |
$this->workers[$i] = new Worker($i,$this->loader); | |
$this->workers[$i]->start(); | |
$this->workers[$i]->stack($task); | |
usleep(100); //Stops Crash | |
} | |
} |
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
public function present($nest = true) | |
{ | |
return array_map( | |
function ($model) use ($nest) { | |
return $this->createPresenter($model)->present($nest); | |
}, | |
$this->collection | |
); | |
} | |
Or |
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
Give you have the following classes | |
Member (entity) | |
MemeberRepository | |
RegisterMemberCommand (command request) | |
RegisterMemberCommandHandler (command handler) | |
MemeberWasRegistered (event) | |
Company (entity) | |
CompanyRepository |
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 | |
class one | |
{ | |
protected $property = [ | |
'test', | |
'test', | |
'test' | |
]; | |
} | |
class tw0 |
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 Illuminate\Foundation\Http; | |
use Illuminate\Http\Request; | |
use Illuminate\Routing\Route; | |
use Illuminate\Http\Response; | |
use Illuminate\Http\JsonResponse; | |
use Illuminate\Routing\Redirector; | |
use Illuminate\Container\Container; | |
use Illuminate\Validation\Validator; | |
use Illuminate\Http\Exception\HttpResponseException; |
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
/** | |
* Bootstrap the application services. | |
* | |
* @return void | |
*/ | |
public function boot() | |
{ | |
/** @var Factory $view */ | |
$view = $this->app->make('Illuminate\Contracts\View\Factory'); | |
$view->composer('dashboard.settings.me.details', SettingsMeDetails::class); |
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 KBC\Accounts; | |
use KBC\Accounts\Events\AccountWasDeleted; | |
use KBC\Accounts\Events\AccountWasOpened; | |
use KBC\Accounts\Events\MoneyWasWithdrawn; | |
use KBC\Accounts\Events\MoneyWasDeposited; | |
use KBC\Core\BaseModel; | |
final class Account extends BaseModel | |
{ |
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 Invoicing; | |
use Members/User; | |
interface InvoiceRepository { | |
public function getUsersInvoices(User $user) | |
} |
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 | |
$browser->visit('Login') | |
->tap( | |
function (Browser $browser) { | |
$points = $browser->resolver->find("#TotalCount")->getText(); | |
$this->mailer->send( | |
'mail', | |
['points' => $points], | |
function (Message $mailable) use ($browser, $points) { | |
$mailable->from('[email protected]', 'Pixelated Bot'); |
OlderNewer