Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
<?php | |
namespace Vendor\TestBundle\Entity; | |
use Doctrine\ORM\Mapping as ORM; | |
use Doctrine\Common\Collections\ArrayCollection; | |
/** | |
* Gneral class for all entities. | |
*/ |
#! /usr/bin/env bash | |
### | |
# | |
# install_mysql.sh | |
# | |
# This script assumes your Vagrantfile has been configured to map the root of | |
# your application to /vagrant and that your web root is the "public" folder | |
# (Laravel standard). Standard and error output is sent to | |
# /vagrant/vm_build.log during provisioning. |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
###PHPUnit logfile XLST template
This fileset provides an easy way to view the PHPUnit XML (JUnit) logfiles in a human readable manner using a web browser.
Use this either in combination with the accompanying html file or add the following tag straight
after the xml opening tag of the logfile:
<?xml-stylesheet type="text/xsl" href="phpunit.xslt"?>
The thresholds used for the colour-coding and whether or not to show detail for successfull tests can be changed by adjusting the variables at the top of the xslt file.
package main | |
// Here's a simple example to show how to properly terminate multiple go routines by using a context. | |
// Thanks to the WaitGroup we'll be able to end all go routines gracefully before the main function ends. | |
import ( | |
"context" | |
"fmt" | |
"math/rand" | |
"os" |
package main | |
import ( | |
"runtime" | |
"fmt" | |
"time" | |
) | |
func main() { | |
// Print our starting memory usage (should be around 0mb) |