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
* { 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); } |
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 ArrayObject; | |
use OutOfBoundsException; | |
use SplObjectStorage; | |
class IdentityMap | |
{ | |
/** | |
* @var ArrayObject |
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\Util; | |
use ArrayAccess; | |
use Countable; | |
trait DecoratorTrait | |
{ | |
/** | |
* The object or array being decorated | |
* |
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/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 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 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
$_SERVER['HTTP_X_REQUESTED_WITH'] == 'xmlhttprequest' |
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 | |
echo '<pre>'; | |
for($i = 100;$i>=0;$i--){ | |
print $i; | |
if($i % 2 === 0) { | |
print " is even"; | |
if($i % 12 === 0) printf(" and is %d dozen",$i/12); | |
} | |
else print " is odd"; | |
print ".\n"; |
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
.email { | |
unicode-bidi: bidi-override; | |
direction: rtl; | |
text-align: left; | |
} |
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
UPDATE my_table | |
SET my_field = REPLACE(my_field, 'old-string', 'new-string') | |
WHERE my_field LIKE '%old-string%' |
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
# laravel new-app | |
alias laravel="git clone -o laravel -b develop https://github.com/laravel/laravel.git" | |
alias artisan="php artisan" | |
alias migrate="php artisan migrate" | |
alias serve="php artisan serve" | |
alias dump="php artisan dump" | |
alias t="phpunit" | |
# Generators Package |
OlderNewer