Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

<?php
/**
* It is initializable'
*/
function ($calculator)
{
$calculator->shouldHaveType('StringCalculator');
};
<?php
return
[
'It is initializable' => function ($calculator)
{
$calculator->shouldHaveType('StringCalculator');
},
'It requires string input' => function ($calculator)
<?php
return
[
'It is initializable' => function ()
{
$this->shouldHaveType('StringCalculator');
},
'It requires string input' => function ()
<?php
// tak jest
$this->add('')->shouldReturn(0);
$this->shouldThrow('Exception')->during('add', [null]);
// a mogłoby być tak
$this->add('')->shouldReturn(0);
$this->add(null)->shouldThrow('Exception');
<?php
// [...]
var_dump(class_exists('Hipchat\Hipchat', true)); // false
// it should detect that the class exists…
@MacDada
MacDada / Backup.php
Last active August 29, 2015 14:02
Backup
<?php
class Backup
{
// tworzy backup
public function __construct($configOption1, $configOption2, Entity $entity);
// usuwa backup
public function __destruct();
@MacDada
MacDada / BackupFactory.php
Created June 17, 2014 23:12
BackupFactory
<?php
class BackupFactory
{
public function __construct($configOption1, $configOption2);
public function create(Entity $entity)
{
return new Backup($configOption1, $configOption2, $entity);
}
<?php
class BackupManager
{
public function __construct($configOption1, $configOption2);
public function create(Entity $entity);
public function restore(Entity $entity);
@MacDada
MacDada / gist:1b27a29e23e409b7f299
Last active August 29, 2015 14:05
Mac – co warto mieć, co warto wiedzieć?

Mac – co warto mieć, co warto wiedzieć?

Skąd brać programy?

App Store

Założyć konto, poszukać sobie darmowych/płatnych programów (featured, top charts, wg kategorii).

Plusy:

  • wygodnie,
<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.0">
<head>
<title>Dawid subscriptions in feedly Cloud</title>
</head>
<body>
<outline text="Symfony" title="Symfony">
<outline type="rss" text="Webb-On-The-Webb.com" title="Webb-On-The-Webb.com" xmlUrl="http://webb-on-the-web.com/?feed=rss2"/>
<outline type="rss" text="Richard Miller" title="Richard Miller" xmlUrl="http://richardmiller.co.uk/feed/atom/" htmlUrl="http://richardmiller.co.uk"/>