These learning resources primarily focus on Test Driven Development (TDD).
- There is an emphasis on learning using PHP, Laravel and PHPUnit.
- All these resources are free (at the time of writing)
Head over to http://play-with-docker.com/ and start a new session. Add one host to start with.
# docker swarm init # use --advertise-addr here and pick the 10.x IP address range
# git clone https://github.com/alexellis/faas
# cd faas
# ./deploy_stack.sh
<?php | |
// This is what you might have right now | |
Route::get('users/{id}', 'UserController@getProfile')->where('id', '[\d+]+'); | |
Route::get('products/{id}', 'ProductController@getProfile')->where('id', '[\d+]+'); | |
Route::get('articles/{slug}', 'ArticleController@getFull')->where('slug', '[a-z0-9-]+'); | |
Route::get('faq/{slug}', 'FaqController@getQuestion')->where('slug', '[a-z0-9-]+'); | |
// and many more, now imagine you'll have to change the rule | |
// Instead, you could have a handy list of patterns and reuse them everywhere: |
<?php | |
use Illuminate\Console\Command; | |
use Symfony\Component\Console\Input\InputOption; | |
use Symfony\Component\Console\Input\InputArgument; | |
class ClearBeanstalkdQueueCommand extends Command { | |
/** |
server { | |
listen 80; | |
server_name *.foo.example.com; | |
# We need this to resolve the host, because it's a wildcard. | |
# This is google's DNS server. | |
resolver 8.8.8.8; | |
include /etc/nginx/includes/proxy.conf; |
javascript:(function(){for(var elements=document.getElementsByClassName("blob-code-inner"),i=0;i<elements.length;i++)(elements[i].parentNode.classList.contains("blob-code-addition")||elements[i].parentNode.classList.contains("blob-code-deletion"))&&(elements[i].innerHTML=elements[i].innerHTML.substring(1));})(); |
@jakearchibald done a bit of research around this:
###Loading a page with Content-Length < actual content length
###Loading a page with Content-Length > actual content length
<?php | |
date_default_timezone_set("UTC"); | |
class ShopifyMultipass { | |
private $encryption_key; | |
private $signature_key; | |
public function __construct($multipass_secret) { | |
// Use the Multipass secret to derive two cryptographic keys, | |
// one for encryption, one for signing |
#! /usr/bin/env bash | |
# Variables | |
APPENV=local | |
DBHOST=localhost | |
DBNAME=dbname | |
DBUSER=dbuser | |
DBPASSWD=test123 | |
echo -e "\n--- Mkay, installing now... ---\n" |