Skip to content

Instantly share code, notes, and snippets.

View peinwag's full-sized avatar
:octocat:

Patrick Einwag peinwag

:octocat:
View GitHub Profile
@peinwag
peinwag / ubuntu-php-development-environment.md
Created November 3, 2012 12:54 — forked from DaRaFF/ubuntu-php-development-environment.md
Ubuntu php development environment

#Introduction If you're a php developer on ubuntu, there comes the time where you have to install/reinstall your system. I did it already a few times and i decided to write down the steps for a typical web developer stack with php. This is for a developer machine and not for live environment!

I hope it's a help also for you!

#Installation stack

@peinwag
peinwag / StringCalculatorTest.php
Last active December 23, 2015 15:59
tdd session phpunconference2013
<?php
class StringCalculator
{
public function add($numbers)
{
$separators = array(',', "\n");
$matches = null;
preg_match_all("~^\[(.)\]*~", $numbers, $matches);
if(isset($matches[1][0]) && $matches[1][0] != null) {