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 Condition | |
{ | |
protected $field; | |
protected $comparator; | |
protected $value; | |
const EQUALS = '='; | |
const GREATER_THAN = '>'; | |
const LESS_THAN = '<'; |
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
{ | |
"vars": { | |
"@gray-darker": "lighten(#000, 13.5%)", | |
"@gray-dark": "lighten(#000, 20%)", | |
"@gray": "lighten(#000, 33.5%)", | |
"@gray-light": "lighten(#000, 46.7%)", | |
"@gray-lighter": "lighten(#000, 93.5%)", | |
"@brand-primary": "#c00", | |
"@brand-success": "#5cb85c", | |
"@brand-info": "#5bc0de", |
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 | |
trait ValidatorTrait { | |
protected $validator; | |
public function isValid() | |
{ | |
return $this->getValidator()->passes(); | |
} |
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
(function ($) { | |
$.fn.confirmUnload = function (options) { | |
var settings = $.extend({ | |
message: 'You have unsaved changes.' | |
}, options); | |
return this.filter('form').each(function () { | |
var form = $(this); | |
var dataOnLoad = form.serialize(); |
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 | |
// Definition | |
Validator::extend('hash_matches', function ($attribute, $value, $parameters) { | |
return Hash::check($value, $parameters[0]); | |
}); | |
// Usage | |
'old_password' => 'required|hash_matches:'.$old_password, |
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
{ | |
"analytics": false, | |
"directory": "vendor/bower_components", | |
"interactive": false | |
} |
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 return preg_match('/^UA-\d+-\d+$/', $test); |
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 App\Http\Middleware; | |
use Closure; | |
use Illuminate\Http\Request; | |
class Administrator | |
{ | |
/** |
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 | |
// include both our template library and the Toro framework | |
require_once('lib/php-template.php'); | |
require_once('lib/toro.php'); | |
// set our template directory and a new instance | |
$tpl_path = dirname(__FILE__) . '/templates/'; | |
$tpl = new Template($tpl_path); |
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
import flash.net.NetConnection; | |
import flash.net.NetStream; | |
import flash.media.Video; | |
import flash.events.MouseEvent; | |
var myVideo:NetConnection = new NetConnection(); | |
myVideo.connect(null); | |
var newStream:NetStream = new NetStream(myVideo); |
OlderNewer