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 Vehikl\Feature\Tests; | |
use PHPUnit\Framework\TestCase; | |
class FeatureToggleTest extends TestCase | |
{ | |
public function test_it_executes_the_on_method_when_the_feature_is_on() |
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
openssl rsa -in ~/.ssh/id_rsa -outform pem > id_rsa.pem |
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 | |
Collection::macro('diffRecursive', function ($comparate) { | |
return $this->map(function ($item, $key) use ($comparate) { | |
$comparate = $this->getArrayableItems($comparate); | |
if (! isset($comparate[$key])) { | |
return $item; | |
} | |
if (Arr::accessible($item)) { | |
$item = $this->getArrayableItems($item); |
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 MimeTypeException extends Exception | |
{ | |
const SUPPORTED_MIME_TYPES = ['image/gif', 'image/jpeg', 'impage/png']; | |
public static function isOfSupportedMimeType($mimeType) | |
{ | |
if (!in_array($mimeType, SUPPORTED_MIME_TYPES)) { | |
throw new static( |
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
VBoxManage modifyvm "VM name" --natdnshostresolver1 on |
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
#%RAML 0.8 | |
title: devldn | |
version: v1 | |
baseUri: https://devldn.dev | |
mediaType: application/json | |
resourceTypes: | |
- readOnlyCollection: | |
description: Collection of available <<resourcePathName>>. | |
get: |
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
#!/bin/bash | |
git diff --cached --name-only | while read FILE; do | |
if [[ "$FILE" =~ ^.+(php|inc|module|install|test)$ ]]; then | |
# Courtesy of swytsh from the comments below. | |
if [[ -f $FILE ]]; then | |
php -l "$FILE" 1> /dev/null | |
if [ $? -ne 0 ]; then | |
echo -e "\e[1;31m\tAborting commit due to files with syntax errors" >&2 | |
exit 1 |
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 Acme\Util; | |
use ArrayAccess; | |
use Countable; | |
trait DecoratorTrait | |
{ | |
/** | |
* The object or array being decorated | |
* |
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 ArrayObject; | |
use OutOfBoundsException; | |
use SplObjectStorage; | |
class IdentityMap | |
{ | |
/** | |
* @var ArrayObject |
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
* { background-color: rgba(255,0,0,.2); } | |
* * { background-color: rgba(0,255,0,.2); } | |
* * * { background-color: rgba(0,0,255,.2); } | |
* * * * { background-color: rgba(255,0,255,.2); } | |
* * * * * { background-color: rgba(0,255,255,.2); } | |
* * * * * * { background-color: rgba(255,255,0,.2); } |
NewerOlder