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
@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 / 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.
Verifying that +dragonbe is my blockchain ID. https://onename.com/dragonbe
@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"
@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 / 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',
);
./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 / automate_cloud_deployments_with_azure_cli.md
Last active November 8, 2016 19:01
A step-by-step instruction how to deploy an application onto Microsoft Azure using the CLI SDK.

Verloren maandag bestelling

Image Label Description Price
dubbel worstenbrood Dubbel Worstenbrood Two beef/pork sausages wrapped in a very tasty puff pastry. 3.90
enkel worstenbrood Enkel Worstenbrood A single beef/pork sausage wrapped in a very tasty puff pastry. 2.55
appelbol Appelbol An sweetened apple wrapped in a very tasty puff pastry. 2.55
@DragonBe
DragonBe / cache.global.php
Created February 2, 2017 19:32
Zend Framework configuration for Redis cache
<?php
return [
'caches' => [
'cache_longterm' => [
'adapter' => \Zend\Cache\Storage\Adapter\Redis::class,
'options' => [
'server' => [
'host' => getenv('APP_REDIS_HOST'),
'port' => getenv('APP_REDIS_PORT'),