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 Container | |
{ | |
/** @var Closure[] */ | |
private $factories = []; | |
/** @var array */ | |
private $components = []; |
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
pr () { | |
git fetch origin refs/pull/$1/head:refs/remotes/origin/pr/$1 --force | |
git checkout -b pr/$1 origin/pr/$1 | |
git rebase master | |
git checkout master | |
git merge pr/$1 --ff-only | |
} |
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
## | |
# No custom level tricks | |
# | |
# Total Score: 804 + 181 = 985 | |
# Your average grade for this tower is: S | |
# | |
# Level 1: S | |
# Level 2: A | |
# Level 3: S | |
# Level 4: S |
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
## | |
# No custom level tricks | |
# | |
# Total Score: 544 + 107 = 651 | |
# Your average grade for this tower is: S | |
# | |
# Level 1: S | |
# Level 2: S | |
# Level 3: S | |
# Level 4: S |
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 AcmeController implements ContainerAwareInterface | |
{ | |
use ContainerAwareTrait; | |
use RedirectTrait; | |
public function indexAction() | |
{ | |
return $this->redirect('some_route', [ |
In August 2007 a hacker found a way to expose the PHP source code on facebook.com. He retrieved two files and then emailed them to me, and I wrote about the issue:
http://techcrunch.com/2007/08/11/facebook-source-code-leaked/
It became a big deal:
http://www.techmeme.com/070812/p1#a070812p1
The two files are index.php (the homepage) and search.php (the search page)
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
@ChristinGorman gave this talk at JavaZone: https://vimeo.com/49484333 It's quite good, short, energetic, enthusiastic, | |
intelligent, and completely misses the point. | |
While it's true that the code she produces is much better than the original, and is quite easy to understand; it fails one | |
critical test. It's not polite. | |
Polite code is like a well written newspaper article. It allows you to bail out early. A well written article has a | |
headline, a synopsis, and a set of paragraphs that begin with the high level concepts and get more and more detailed as you | |
read through the article. At any point you can decide: "I get it! I don't need to read further." Indeed, this is how most | |
people read newspapers or magazines. The articles are polite, because they allow you to get out quickly. |