This gist is about:
- https://twitter.com/taylorotwell/status/600680897550098432
- https://twitter.com/Ocramius/status/600705252539691008
Mainly:
function
cannot (should not) be used when side-effects occur
[www] | |
ping.path = /ping |
This gist is about:
Mainly:
function
cannot (should not) be used when side-effects occur<?php namespace Vendor\Library; | |
use Another\Vendor\Library\ClassName; | |
abstract class ClassName extends AnotherClass implements Countable, Serializable | |
{ | |
const CONSTANTS = 'top'; | |
use someTrait, anotherTrait { | |
anotherTrait::traitMethod insteadof someTrait; |
# Install ZeroMQ + PHP bindings | |
apt-get install pkg-config | |
curl -L -O http://download.zeromq.org/zeromq-4.1.3.tar.gz | |
tar xzf zeromq-4.1.3.tar.gz | |
cd zeromq-4.1.3 | |
./configure --without-libsodium | |
make | |
make install |
Make sure these boxes are checked before submitting/approving the PR
########## Install NGINX ############## | |
# Install software-properties-common package to give us add-apt-repository package | |
sudo apt-get install -y software-properties-common | |
# Install latest nginx version from community maintained ppa | |
sudo add-apt-repository ppa:nginx/stable | |
# Update packages after adding ppa |
<?php | |
/** | |
* Redirect users to custom URL based on their role after login | |
* | |
* @param string $redirect | |
* @param object $user | |
* @return string | |
*/ | |
function wc_custom_user_redirect( $redirect, $user ) { | |
// Get the first of all the roles assigned to the user |
# see https://github.com/cmaessen/docker-php-sendmail for more information | |
FROM php:fpm | |
RUN apt-get update && apt-get install -q -y ssmtp mailutils && rm -rf /var/lib/apt/lists/* | |
RUN docker-php-ext-install mysql mysqli | |
RUN echo "hostname=localhost.localdomain" > /etc/ssmtp/ssmtp.conf | |
RUN echo "root=root@example.com" >> /etc/ssmtp/ssmtp.conf |