Skip to content

Instantly share code, notes, and snippets.

View event15's full-sized avatar

Marek Woś event15

View GitHub Profile
#!/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";
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
<?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;
public function store(Request $request)
{
$this->validate($request, [
'name' => 'required',
]);
$request->user()->projects()->create([
'name' => strip_tags($request->input('name')),
]);
@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>
@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>
double divide(double dividend, double divisor)
in{
assert(divisor != 0);
}
out (result){
assert(result < 10);
}
body{
return dividend/divisor;
}
<?php
namespace DesignPatterns\Creational\Builder;
use DesignPatterns\Creational\Builder\Parts\Vehicle;
interface BuilderInterface
{
public function createVehicle();
<?php
class CarBuilder implements BuilderInterface
{
/**
* @var Parts\Car
*/
private $car;
public function addDoors()
<?php
namespace WP;
use DateTime;
interface DateFormatterInterface
{
public function set(DateTime $newDate) : DateTime;
public function transformTo(FormatInterface $newFormat) : string;