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 | |
/* app/validators.php */ | |
Validator::extend('alpha_spaces', function($attribute, $value) | |
{ | |
return preg_match('/^[\pL\s]+$/u', $value); | |
}); | |
/* |
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
.top-bar { | |
background: none; | |
} | |
.top-bar-section ul { | |
background: none; | |
} | |
.top-bar-section ul li>a, | |
.top-bar-section ul li:hover>a, | |
.top-bar-section li:not(.has-form) a:not(.button) | |
.top-bar-section li:not(.has-form) a:not(.button):hover { |
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\MyBundle\Service; | |
use Symfony\Component\HttpFoundation\File\File; | |
use Imagine\Image\ImagineInterface; | |
use Imagine\Image\BoxInterface; | |
use Imagine\Image\Point; | |
use Imagine\Image\Box; | |
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 | |
/** | |
* @author Daniel Kesberg <dkesberg@gmail.com> | |
* @copyright (c) 2014, Daniel Kesberg | |
*/ | |
class ItemController extends BaseController | |
{ | |
public function download(Item $item) | |
{ |
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 Illuminate\Translation\Translator; | |
use Illuminate\Filesystem\Filesystem; | |
use Illuminate\Translation\FileLoader; | |
$app->languages = ['en', 'de']; | |
$app->hook('slim.before', function() use ($app) { | |
$env = $app->environment(); |
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
.grid { margin:1em auto; border-collapse:collapse } | |
.grid td { | |
cursor:pointer; | |
width:30px; height:30px; | |
border:1px solid #ccc; | |
text-align:center; | |
font-family:sans-serif; font-size:13px | |
} | |
.grid td.clicked { | |
background-color:yellow; |
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
# Compiled source # | |
################### | |
*.com | |
*.class | |
*.dll | |
*.exe | |
*.o | |
*.so | |
# Packages # |
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
// Based on http://www.elmastudio.de/programmierung/css/css-tipp-eingebettete-videos-fur-responsive-webdesigns-optimieren/ | |
.elastic-video { | |
position: relative; | |
padding-bottom: 55%; | |
padding-top: 15px; | |
height: 0; | |
overflow: hidden; | |
} | |
.elastic-video iframe { |
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 | |
function slice_equal($source, $columns) { | |
$count = count($source); | |
$perColumn = floor($count / $columns); | |
$overflow = $count % $columns; | |
// set start values | |
$sliceOffset = 0; |
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
// router.php | |
Route::group(array('prefix' => 'api/v1'), function() | |
{ | |
Route::resource('tweets', 'ApiController'); | |
} | |
// RestController | |
class RestController extends BaseController { |
OlderNewer