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 | |
pushd "$( dirname $0 )/.." > /dev/null | |
BASEPATH=$( pwd -P ) | |
COMPOSER=$( which composer || which composer.phar || echo "$BASEPATH/scripts/composer.phar" ) | |
if [ ! -x $COMPOSER ]; then | |
curl -sS 'https://getcomposer.org/installer' | php -- --install-dir="$BASEPATH/scripts"; | |
COMPOSER="php $BASEPATH/scripts/composer.phar --dev"; |
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
FROM hub.docker.grupawp.pl/powercontent/pc-nginx-php:latest | |
MAINTAINER Marcin Kurzyna <marcin.kurzyna@nextwebventures.com> | |
ENV PHANTOMJS_VERSION 2.1.1 | |
ADD etc /etc | |
ADD . /data | |
RUN apt-get install -y ssmtp heirloom-mailx bzip2 libfreetype6 libfontconfig ttf-mscorefonts-installer |
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 CQRSBlog\BlogEngine\Infrastructure\Persistence\EventStore as EventStore; | |
use CQRSBlog\BlogEngine\Infrastructure\Persistence\Redis as Redis; | |
use CQRSBlog\BlogEngine\Infrastructure\Persistence\MongoDb as MongoDb; |
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 store(Request $request) | |
{ | |
$this->validate($request, [ | |
'name' => 'required', | |
]); | |
$request->user()->projects()->create([ | |
'name' => strip_tags($request->input('name')), | |
]); |
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
@extends('layouts.app') | |
@section('content') | |
<div class="container"> | |
<div class="col-sm-offset-2 col-sm-8"> | |
<div class="panel panel-default"> | |
<div class="panel-heading"> | |
New Task | |
</div> |
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
@extends('layouts.app') | |
@section('content') | |
<div class="container"> | |
<div class="col-sm-offset-2 col-sm-8"> | |
<div class="panel panel-default"> | |
<div class="panel-heading"> | |
New Task | |
</div> |
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
double divide(double dividend, double divisor) | |
in{ | |
assert(divisor != 0); | |
} | |
out (result){ | |
assert(result < 10); | |
} | |
body{ | |
return dividend/divisor; | |
} |
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 DesignPatterns\Creational\Builder; | |
use DesignPatterns\Creational\Builder\Parts\Vehicle; | |
interface BuilderInterface | |
{ | |
public function createVehicle(); |
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 CarBuilder implements BuilderInterface | |
{ | |
/** | |
* @var Parts\Car | |
*/ | |
private $car; | |
public function addDoors() |
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 WP; | |
use DateTime; | |
interface DateFormatterInterface | |
{ | |
public function set(DateTime $newDate) : DateTime; | |
public function transformTo(FormatInterface $newFormat) : string; |