This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package jsonstream | |
import ( | |
"encoding/json" | |
"fmt" | |
"io" | |
"net/http" | |
"sync" | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Symfony\Component\Form\FormInterface; | |
class FormTextTreeRenderer | |
{ | |
public function render(FormInterface $form) | |
{ | |
$lines[] = '.'; | |
$lines[] = $this->renderNode($form); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant::Config.run do |config| | |
config.vm.box = "precise64" | |
config.vm.box_url = "http://files.vagrantup.com/precise64.box" | |
config.vm.share_folder "v-root", "/vagrant", ".", :nfs => true | |
config.vm.network :hostonly, "192.168.50.4" | |
config.vm.forward_port 80, 8080 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
/* ... */ | |
"links": [ | |
{ | |
"rel": "reviews", | |
"href": "/books/{id}/reviews" | |
}, | |
{ | |
"rel": "add-review", | |
"href": "/books/{id}/reviews", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class ArrayWrapper | |
{ | |
private $array; | |
/** | |
* Constructor | |
* | |
* @param array $array |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Benchmark | |
{ | |
private $closure; | |
private $numTimes; | |
private $resultSet; | |
public function __construct(\Closure $closure, $numTimes = 1, $autorun = false) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* File locator that first look for a "filename.local.ext" when the name of the | |
* file to locate matches the "filename.customizable.ext" pattern, then it look | |
* for a "filename.ext" file. | |
*/ | |
class CustomizableFileLocator extends FileLocator | |
{ | |
/** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Test | |
{ | |
public function whatTheFuck() | |
{ | |
${'thi' . 's'} = 'tata'; | |
var_dump($this); | |
var_dump($this->getThis()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace MyVendor\MyBundleBundle\Test; | |
use Symfony\Bundle\FrameworkBundle\Client as BaseClient; | |
use Symfony\Component\BrowserKit\Cookie; | |
class Client extends BaseClient | |
{ | |
/** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class UserGroup extends BaseUserGroup | |
{ | |
/** | |
* Overwrites the parent getName to return a translated string | |
* | |
* @return translated name as string | |
*/ | |
public function getName() |