This file contains 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 | |
return array ( | |
'birth_year' => '19BBY', | |
'created' => '2014-12-09T13:50:51.644000Z', | |
'edited' => '2014-12-20T21:17:56.891000Z', | |
'eye_color' => 'blue', | |
'films' => | |
array ( | |
0 => 'http://swapi.co/api/films/2/', |
This file contains 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
# Actually this is needed because on boot2docker it's not posible to write to a | |
# data volume or to a data-only volume container if the user who tryes to write does | |
# not have root permissions. This lines, should remain here until it does get fixed | |
# on boot2docker. | |
RUN useradd -m -u 1000 symfony | |
RUN echo "symfony ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/symfony | |
RUN chmod 0440 /etc/sudoers.d/symfony |
This file contains 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 | |
// Votes are anonymous | |
abstract class Vote | |
{ | |
abstract public function politicalParty(); | |
} | |
/** |
This file contains 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 Chinook\Store\Domain | |
{ | |
interface ArtistRepository | |
{ | |
public function findAll(); | |
} | |
} |
This file contains 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 Vendor\Context\DomainModel; | |
class Order | |
{ | |
// ... | |
public function process() | |
{ |
This file contains 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
#!/bin/sh | |
ramfs_size_mb=150 | |
mount_point=~/var/tmp | |
mkramdisk() { | |
ramfs_size_sectors=$((${ramfs_size_mb}*1024*1024/512)) | |
ramdisk_dev=`hdid -nomount ram://${ramfs_size_sectors}` | |
newfs_hfs -v 'ram disk' ${ramdisk_dev} | |
mkdir -p ${mount_point} | |
mount -o noatime -t hfs ${ramdisk_dev} ${mount_point} |
This file contains 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 Doctrine\Common\Collections\Collection; | |
use Doctrine\ORM\EntityRepository; | |
class ProductRepository extends EntityRepository | |
{ | |
public function findByAGivenASetOfUsersToSearchAndStatus(Collection $usersToSearch, $status) | |
{ | |
$targetUserIds = $usersToSearch |
This file contains 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
$ git push --mirror [email protected]:atrapalo/framework.git | |
Counting objects: 812698, done. | |
Delta compression using up to 4 threads. | |
Compressing objects: 100% (154287/154287), done. | |
remote: error: object bca5308fa04b1d43e47de77fc264a770ba9d2522:invalid author/committer line - bad email | |
remote: fatal: Error in object | |
Writing objects: 100% (812698/812698), 151.07 MiB | 100.00 KiB/s, done. | |
Total 812698 (delta 648291), reused 812698 (delta 648291) | |
error: unpack failed: index-pack abnormal exit | |
To [email protected]:atrapalo/framework.git |
This file contains 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 Source | |
{ | |
public const UNKNOWN = 1; | |
// Me la invento :) | |
public const ADWORDS = 2; | |
private $source; | |
This file contains 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 Acme\DemoBundle\Entity; | |
use Doctrine\ORM\Mapping as ORM; | |
/** | |
* Country | |
* | |
* @ORM\Table(name="country") |
NewerOlder