Skip to content

Instantly share code, notes, and snippets.

View DragonBe's full-sized avatar
:octocat:
The next step…

M van Dam DragonBe

:octocat:
The next step…
View GitHub Profile
./vendor/bin/phpunit
PHPUnit 4.8.27 by Sebastian Bergmann and contributors.
............................................................. 61 / 1623 ( 3%)
............................................................. 122 / 1623 ( 7%)
............................................................. 183 / 1623 ( 11%)
............................................................. 244 / 1623 ( 15%)
............................................................. 305 / 1623 ( 18%)
............................................................. 366 / 1623 ( 22%)
............................................................. 427 / 1623 ( 26%)
@DragonBe
DragonBe / elephpone.php
Last active March 21, 2016 08:03
Little project for calling the PHP community and hear a nice quote from a respected community member
<?php
$community = array (
'http://blob.phpdev.nu/elephpone/michelangelo_vandam.mp3',
'http://blob.phpdev.nu/elephpone/tessa_mero.mp3',
'http://blob.phpdev.nu/elephpone/khayrattee_wasseem.mp3',
'http://blob.phpdev.nu/elephpone/cal_evans.mp3',
'http://blob.phpdev.nu/elephpone/thijs_feryn.mp3',
'http://blob.phpdev.nu/elephpone/gabriel_somoza.mp3',
'http://blob.phpdev.nu/elephpone/beth_tucker_long.mp3',
);
@DragonBe
DragonBe / microblog.md
Created April 22, 2015 15:52
Assignment: Microblog

Microblog

The first assignment is to create a microblog application.

You can use Silex if you want, but it's not a requirement.

Objectives

  • Display the latest 5 articles on the homepage
  • Create an authentication section where someone can
@DragonBe
DragonBe / The Continuous PHP Pipeline - Appendix.md
Created December 4, 2015 09:24
An overview of links to all services mentioned in my presentation "The Continuous PHP Pipeline"
Verifying that +dragonbe is my blockchain ID. https://onename.com/dragonbe
@DragonBe
DragonBe / get_object_vars.php
Last active December 29, 2015 02:09
Change in the way get_object_vars behaves in PHP 5.4 and PHP 5.5
<?php
abstract class AbstractModel {
public function toArray($includeProtected = false)
{
if ($includeProtected == true) {
return get_object_vars($this);
}
// Wrapping this object in a closure changes the lexical scope, which
// allows us to easily return only public properties.
@DragonBe
DragonBe / NikTest.php
Created November 22, 2013 10:39
Accessing protected and private properties
<?php
class Nik
{
public $name;
protected $_function;
private $_age;
private function _getProperties()
@DragonBe
DragonBe / GoogleTracker.php
Created March 28, 2013 16:53
Example view helper for rendering the google analytics script
<?php
class In2it_View_Helper_GoogleTracker extends Zend_View_Helper_Abstract
{
public $view;
public function setView(Zend_View_Interface $view)
{
return parent::setView($view);
}
@DragonBe
DragonBe / listCDNEndpoints.php
Created November 6, 2012 02:44
My trial to access CDN API of Windows Azure
public function listCdnEndpoints()
{
$context = new HttpCallContext();
$context->setMethod(Resources::HTTP_GET);
$context->setPath($this->_getCdnEndpointsPath());
$context->addStatusCode(Resources::STATUS_OK);
// echo '<pre>' . var_export($context,1) . '</pre>';die;
$response = $this->sendContext($context);
@DragonBe
DragonBe / install.stout
Created October 8, 2012 12:22
Output of composer installation of ZF2
phpbook:zf2demo dragonbe$ php composer.phar install --dev
Loading composer repositories with package information
Installing dependencies
- Installing zendframework/zendframework (2.0.2)
Downloading: 100%
Loading composer repositories with package information
Installing dev dependencies
Nothing to install or update
zendframework/zendframework suggests installing doctrine/common (Doctrine\Common >=2.1 for annotation features)