Skip to content

Instantly share code, notes, and snippets.

View SerafimArts's full-sized avatar
wazzup?

Kirill Nesmeyanov SerafimArts

wazzup?
View GitHub Profile
<?php
use Illuminate\Contracts\Support\Renderable;
use Illuminate\Support\Str;
/**
* Class Message
*/
class Message implements Renderable, \Countable, \IteratorAggregate
{
/**

ES5 Example

Vue 2.0-rc (native template)

new Vue({
    el: '#app',
    data: {
        variable1: 23,
        variable2: 42
@SerafimArts
SerafimArts / 1_source.php
Last active November 21, 2016 12:38
Yay! Example
<?php
@Some(a = 23, b = 42)
class TestClass
{
public function test($a)
{
}
}
@SerafimArts
SerafimArts / bug.php
Last active October 27, 2018 18:35
Real monkey patching
<style>input, pre { margin: 20px 50px; }</style>
<form action="/" method="POST">
<input type="text" name="some.any.ololo..." />
<input type="submit" />
</form>
<pre><?php var_dump($_POST); ?></pre>
@SerafimArts
SerafimArts / AppKernel.php
Last active April 24, 2017 09:32
Laravel Container for Symfony
<?php
/**
* Add this code into app/AppKernel.php
*/
class AppKernel extends Kernel
{
// ....
/**
* @return string
*/
@SerafimArts
SerafimArts / DoctrineCacheBridge.php
Created March 22, 2016 17:38
Laravel <=> Doctrine Cache adapter (bridge)
<?php
/**
* @author Serafim <nesk@xakep.ru>
* @date 22.03.2016 20:24
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
use Doctrine\Common\Cache\Cache;
<?php
namespace Serafim\Reactor;
/**
* Class FileReader
* @package Serafim\Reactor
*/
class FileReader implements Reader
{
/**
@SerafimArts
SerafimArts / HttpBus.php
Created March 1, 2016 18:57
Gitter api bus
<?php
/**
* This file is part of GitterAPI package.
*
* @author Serafim <nesk@xakep.ru>
* @date 01.03.2016 19:06
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
<?php
/**
* This file is part of API package.
*
* @author Serafim <nesk@xakep.ru>
* @date 24.02.2016 16:23
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
class Test
constructor: (a, b) ->
console.log(a, b);
method: ->
# method
@method: ->