- When Chris Collins throws exceptions, it’s across the room.
- All arrays Chris Collins declares are of infinite size, because Chris Collins knows no bounds.
- Chris Collins doesn’t have disk latency because the hard drive knows to hurry the hell up.
- Chris Collins writes code that optimizes itself.
- Chris Collins can’t test for equality because he has no equal.
- Chris Collins doesn’t need garbage collection because he doesn’t call .Dispose(), he calls .DropKick().
- Chris Collins’s first program was kill -9.
- Chris Collins burst the dot com bubble.
- All browsers support the hex definitions #chris and #collins for the colors black and blue.
- MySpace actually isn’t your space, it’s Chris’s (he just lets you use it).
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
echo "Remove vendor folder" | |
rm -rf ./vendor/* | |
echo "Get all vendors again but with the .git folder | |
composer install --prefer-source | |
echo "Find a list of all repositories Tobias Nyholm has contributed to | |
find . -name .git -type d -prune -exec bash -c "cd '{}' && git shortlog -snc | grep 'Tobias Nyholm' > /dev/null && echo '{}' " \; |
- Is it popular? (is it known by the community, does it have a large number of stars on github, large number of downloads etc.)
- Is it of sufficient quality? (is it well tested etc.)
- Is it well documented?
- Are there multiple active maintainers?
- How will you manage the dependency should it fall in to abandonment?
- Can you easily write a wrapper for the dependency? (ports and adapters and all that jazz)
- Is it quicker to write the functionality than it would be to write a wrapper? (if so, consider rolling your own?)
- Does it have a small footprint? (i.e. doesn't bring in loads of other dependencies itself)
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 | |
// Get legacy gaufrette adapter | |
$legacyGaufretteAdapter = $legacyService->getFilesystem(); | |
// Create a flysystem adapter | |
$flysystemAdapter = new GaufretteAdapter($legacyGaufretteAdapter); | |
// Create your filesystem | |
$fileSystem = new Filesystem($flysystemAdapter); |
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
if(window.SNUGGLE) { SNUGGLE.snug(); } | |
window.SNUGGLE || (function(window){ | |
window.SNUGGLE = { | |
snug: function(){ | |
var viewportWidth = document.documentElement.clientWidth, | |
viewportHeight = document.documentElement.clientHeight; | |
var body = document.getElementsByTagName('body'); |
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
#mcvities_snuggletWrapper { | |
position:fixed; | |
bottom:0; | |
width:100%; | |
height:1px; | |
pointer-events:none; | |
z-index: 2147483640; | |
} | |
#mcvities_snuggletWrapper.down { |
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
status=$(curl -L -s -o /dev/null -w "%{http_code}" "http://url/to/check"); | |
if [ "200" == "${status}" ]; then say -v "Good News" "ALL DONE YO!"; elif [ "502" == "${status}" ]; then say -v Whisper "Still Fucked"; else say -v "Bad News" "Not yet"; fi; |
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 | |
//... | |
if (PermissionFacade::isGranted(‘add_content’)) { | |
echo ‘<button>Add content</button>’; | |
} |
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 PermissionFacade | |
{ | |
/** | |
* Global static helper for using isGranted from legacy codebase. | |
* @param $attributes | |
* @param null $object | |
* @return bool|void | |
*/ |
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 PermissionVoter implements VoterInterface | |
{ | |
//... | |
/** | |
* {@inheritdoc} | |
*/ | |
public function vote(TokenInterface $token, $object, array $attributes) |