I hereby claim:
- I am crisu83 on github.
- I am crisu83 (https://keybase.io/crisu83) on keybase.
- I have a public key whose fingerprint is CDFF 120A EF75 054B 8C91 EA42 9FA1 2D05 9A4A 407B
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
<?php namespace App\Http\Controllers; | |
use Illuminate\Http\Request; | |
use App\Http\Controllers\Controller; | |
class UserController extends Controller { | |
/** | |
* Store a new user. | |
* |
<?php | |
class Status | |
{ | |
const PUBLISHED = 10; | |
const DRAFT = 20; | |
private $status; | |
public static function published() | |
{ |
<?php | |
namespace nord\yii\imagemanager\providers\cloudinary; | |
use Cloudinary; | |
use Cloudinary\Uploader; | |
use nord\yii\imagemanager\services\ProviderInterface; | |
use yii\base\Component; | |
class Provider extends Component implements ProviderInterface |
// this is an ingenius hack that allows us to run Phaser without a browser | |
// ... and yes, it took some time to figure out how to do this | |
var Canvas = require('canvas') | |
, jsdom = require('jsdom') | |
, document = jsdom.jsdom(null) | |
, window = document.parentWindow | |
, Phaser; | |
// expose a few things to all the modules |
/* | |
Open up the developer console in your browser, paste the script below, press enter and enjoy! | |
*/ | |
var anchors, i; | |
setInterval(function() { | |
anchors = document.getElementsByTagName('a'); | |
for (i = 0; i < anchors.length; i++) { | |
anchors[i].click(); | |
} |
$ grunt watch:styles | |
Running "watch:styls" (watch) task | |
Waiting...OK | |
>> File "less/main.less" changed. | |
Running "less/app" (less) task | |
File css/main.css created. | |
Running "watch:styles" (watch) task |
<?php | |
function checkAccess($roleName) | |
{ | |
if (Yii::app()->user->checkAccess('Developer') || Yii::app()->user->checkAccess('SuperAdmin')) { | |
// devs and sa always has access to all models. | |
return true; | |
} elseif (Yii::app()->user->checkAccess($roleName)) { | |
// user has access if he belongs to the same group | |
return $this->createGroupAccessCriteria(Yii::app()->user->id); |
<?php | |
/** | |
* @param string|array $content | |
* | |
* When passed as array: | |
* - heading: string|array | |
* - subtext: string | |
* | |
* @param array $options | |
* |
/* | |
* DOMParser HTML extension | |
* 2012-09-04 | |
* | |
* By Eli Grey, http://eligrey.com | |
* Public domain. | |
* NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. | |
*/ | |
/*! @source https://gist.github.com/1129031 */ |