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
#!/usr/bin/env bash | |
echo ">>> Starting Install Script" | |
# Update | |
sudo apt-get update | |
# Install MySQL without prompt | |
sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password password root' | |
sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password_again password root' |
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 | |
use Illuminate\Console\Command; | |
use Symfony\Component\Console\Formatter\OutputFormatterStyle; | |
use Symfony\Component\Console\Input\InputOption; | |
use Symfony\Component\Console\Input\InputArgument; | |
class RunTests extends Command | |
{ |
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 | |
// part of "Users" package | |
/* | |
* The drawback here is that the User class must be moved into the userland space so the developers can attach | |
* decorating packages to it. Maybe this could be set up automatically via a (laravel-specific) config var? | |
*/ | |
class 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
class MessageSchema extends EndpointSchema | |
{ | |
public function bridge () { | |
return [ | |
'message' => new Parameter([ | |
'get' => function($e) { | |
return $e->getMessage(); | |
} | |
'set' => function($i, $e) { | |
return $e->setMessage($i); |
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 CakeController { | |
public function createOrder() { | |
$cake = new Cake(); | |
$cake->isFor(Input::get('customer')); | |
$cake->addFlavor(Input::get('flavor')); | |
$cake->bake(); | |
$cake->save(); | |
return $cake; |
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 CakeService { | |
public function makeOrder($customer, $flavor) { | |
$cake = new Cake(); | |
$cake->isFor($customer); | |
$cake->addFlavor($flavor); | |
$cake->bake(); | |
$cake->save(); | |
return $cake; |
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 CakeController { | |
public function __construct (CakeService $cakeService) { | |
$this->cakeService = $cakeService; | |
} | |
public function createOrder() { | |
$customer = Input::get('customer'); | |
$flavor = Input::get('flavor'); | |
return $this->cakeService->makeOrder($customer, $flavor); |
OlderNewer