Skip to content

Instantly share code, notes, and snippets.

View vanchelo's full-sized avatar
💭
Life is good

Brezhniev Ivan vanchelo

💭
Life is good
View GitHub Profile
<?php
register_shutdown_function(function () {
$error = error_get_last();
if ($error['type'] === E_ERROR) {
var_dump($error);
}
});
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">
var r = /(\{\{user.(.*?)\}\})/gi
<?php
use Illuminate\Support\Facades\Facade;
class Title extends Facade
{
protected static function getFacadeAccessor()
{
return 'title';
}
<?php namespace App\Providers;
use Illuminate\Foundation\AliasLoader;
use Illuminate\Support\ServiceProvider;
class AppServiceProvider extends ServiceProvider
{
/**
* Register any application services.
*
<?php namespace Backend\Auth;
use Illuminate\Auth\AuthManager as BaseAuthManager;
use Illuminate\Auth\EloquentUserProvider;
class AuthManager extends BaseAuthManager
{
/**
* Create an instance of the Eloquent driver.
<?php
// routes.php
Route::any('{controller}.{action}', function ($controller, $action)
{
try
{
$controller = app(studly_case($controller) . 'Controller');

SSL upgrades on rubygems.org and RubyInstaller versions

UPDATE 2014-12-21: RubyGems 1.8.30, 2.0.15 and 2.2.3 have been released. It requires manual installation, please see instructions below.


Hello,

If you reached this page, means you've hit this SSL error when trying to

<?php
<<<CONFIG
packages:
- "lavoiesl/php-benchmark: dev-master"
CONFIG;
/**
* run command "melody run https://gist.githubusercontent.com/vanchelo/4e6476b52fa6fc665b0b/raw/f965054e77d7c431fdfb25ad096e378a3fb1a52f/speedtest.php -vvv"
*/
<?php
/**
* Класс для работы с деревом
* @author Sam, special for www.freehabr.ru
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
@vanchelo
vanchelo / Post.php
Last active January 20, 2021 09:01
Laravel Global Scopes
<?php
use Illuminate\Database\Eloquent\Model;
class Post extends Model
{
use SelectableTrait;
protected $selectable = [
'id', 'title', 'created_at'