Skip to content

Instantly share code, notes, and snippets.

Dustin Wheeler mdwheele

Block or report user

Report or block mdwheele

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile


This is a benchmark for that attempts to approximate performance delta between master and feature/friend-classes-poc.

Both benchmarks execute a script that attempts access of a target property 100,000 times. We sample 100 executions of this script and average to compare.


make clean
mdwheele / .travis.yml
Created Jan 26, 2016
Example Travis CI Configuration for PHP
View .travis.yml
language: php
sudo: false
fast_finish: true
- php: 7.0
- php: 5.6
mdwheele / .gitmessage
Created Dec 8, 2015
Use this Git commit message template to write better commit messages.
View .gitmessage
Replace this line with imperative summary
An awesome description describing WHY this work over HOW/WHAT it does.
The diff attached to commit should describe implementation (HOW)
# [Ticket #12]
mdwheele / Cache.php
Last active Nov 17, 2015
Useful trick to stub stable WordPress functions for testing your plugin boundaries in isolation.
View Cache.php
namespace Vendor\Services;
use Closure;
class Cache
protected $prefix;
mdwheele / .gitmessage
Created Sep 21, 2015
A template for a reasonable git commit.
View .gitmessage
Replace this line with imperative summary
An awesome description describing WHY over HOW/WHAT
# [Ticket #12]
# 1. Summary should be under 50 characters. @-symbol above is a marker
# for that.
mdwheele /
Last active Aug 29, 2015
Ponderances on using media-type representation as a mechanism for partitioning use-cases on a resource under different contexts.

Please do not read any of this with an "absolute" tone. These are merely my thoughts on a problem based in my current understanding and some experience. To be honest, I would not be surprised if this is already being done by individuals more experienced than I at building REST APIs, but I think it is worth discussing as I have yet to find anything like this blogged about. I present this with utmost humility in order to foster discussion; not to create devolving argument.

Some Background

I believe that usage of media types in examples on the web demonstrating "how to build" RESTful APIs is too narrowly focused. In my experience, much of the discussion around them seems to be solely focused on their usage either in content-negotiation or applying versioning to an API.

*As an aside, versioning can be "controversial" itself as an "anti-pattern" of REST. I heard it argued that HATEOAS should be the answer to the problem that versioning works to solve. This is an aside and not the focus of this ponderanc

mdwheele /
Last active Jan 3, 2018
Discussing how to make DDD easier to learn.

Edit: A bit of context as more than expected are happening upon the gist.

This is in response to a conversation between a few engineers I consider experts in their respective fields:

  • Jeffrey Way (of Laracasts) as a technical educator aiming to investigate exposing newcomers to DDD in an easier-to-digest/grasp way.
  • Konstantine Kudryashov (Behat, phpSpec, Inviqa) as a BDD consultant
  • Mathias Verraes (, as a significant DDD resource and independent consultant.

Additional context can be sought reading backwards from The stream is a bit broken, but the general gist/context is there.

mdwheele /
Created Oct 22, 2014
Fix Yosemite Bluetooth Sound Issues
  1. Run the following in your terminal.
defaults write "Apple Bitpool Max (editable)" 80
defaults write "Apple Bitpool Min (editable)" 80
defaults write "Apple Initial Bitpool (editable)" 80
defaults write "Apple Initial Bitpool Min (editable)" 80
defaults write "Negotiated Bitpool" 80
defaults write "Negotiated Bitpool Max" 80
defaults write "Negotiated Bitpool Min" 80
mdwheele / php-friend.php
Created Aug 11, 2014
An example of how one might implement a pseudo-friend relationship between two PHP objects.
View php-friend.php
class SampleEntity
private $friend = 'SampleEntityPresenter';
protected $firstName;
protected $lastName;
public function __construct($firstName, $lastName)
You can’t perform that action at this time.