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 { |
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
<style type="text/css"> | |
.spinner { | |
display: block; | |
width: 15px; | |
height: 15px; | |
margin: 80px 80px; | |
position: relative; | |
border: 5px solid grey; | |
border-top-color: black; |
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
/* | |
|-------------------------------------------------------------------------- | |
| Languages | |
|-------------------------------------------------------------------------- | |
| | |
| List all valid languages | |
*/ | |
'languages' => array('en', 'de'), |
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
$imagine = new Imagine\Gd\Imagine(); | |
$pathPhoto = 'photo.jpg'; | |
$pathThumbnail = 'thumb.jpg'; | |
$watermarkText = 'My watermark text'; | |
// thumb config | |
$thumbQuality = 75; | |
$thumbSize = new \Imagine\Image\Box(800, 600); |
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
/** | |
* Password regex | |
* ^ # Bind the RegExp to the beginning of the string. | |
* (?=.{8,}) # Followed by 8 or more characters (min length) | |
* (?=.*\d) # At least one digit. | |
* (?=.*[a-z]) # At least one lower-case character. | |
* (?=.*[A-Z]) # At least one upper-case character. | |
* .*\z # Followed by any number of characters, before the end of the 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
jQuery.validator.addMethod("filesize_max", function(value, element, param) { | |
var isOptional = this.optional(element), | |
file; | |
if(isOptional) { | |
return isOptional; | |
} | |
if ($(element).attr("type") === "file") { | |
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
jQuery.validator.setDefaults({ | |
showErrors: function(errorMap, errorList) { | |
$.each(this.successList, function(index, value) { | |
$(value).parents('.form-group').find('.error-notice').remove(); | |
$(value).parents('.form-group.has-error').removeClass('has-error'); | |
}); | |
$.each(errorList, function(index, 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
<?php | |
namespace dkesberg\Facades; | |
use Illuminate\Support\Facades\Facade; | |
class CiconiaFacade extends Facade { | |
protected static function getFacadeAccessor() | |
{ |
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
Route::any("/showroutes", [ | |
"as" => "routes", | |
function() { | |
$routes = Route::getRoutes(); | |
echo '<pre>'; | |
print_r(array_keys($routes->all())); | |
echo '</pre>'; | |
exit; | |
} | |
]); |
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 <kesberg@gmail.com> | |
* @copyright (c) 2013, Daniel Kesberg | |
*/ | |
error_reporting(E_ALL); | |
ini_set('display_errors', false); | |
$parseTimeStart = microtime(); |
OlderNewer