Skip to content

Instantly share code, notes, and snippets.

wazzup?

Kirill Nesmeyanov SerafimArts

wazzup?
Block or report user

Report or block SerafimArts

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@SerafimArts
SerafimArts / introspection.schema.json
Created Nov 16, 2019
A GraphQL introspection JSON Schema
View introspection.schema.json
{
"$id": "graphql/introspection",
"description": "A JSON Schema for checking GraphQL introspection",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"__schema": {
"type": "object",
@SerafimArts
SerafimArts / Lexer.php
Last active Jan 15, 2019
PHP Language lexer
View Lexer.php
<?php
/**
* Exec "composer require railt/lexer ~1.2"
*/
declare(strict_types=1);
namespace Example;
use Railt\Io\Readable;
use Railt\Lexer\Definition\TokenDefinition;
View Pool.php
<?php
declare(strict_types=1);
class Pool
{
/**
* @var \Generator[]|array[]
*/
private $iterators = [];
@SerafimArts
SerafimArts / Collection.js
Last active Feb 20, 2018
High Order Messaging in JS
View Collection.js
export default class Collection<T> {
/**
* The items contained in the collection.
*/
_items: Iterable<T>;
/**
* Create a new collection.
*
* @param items
View test.php
<?php
function This an EPIC test for the King()
{
return __FUNCTION__ . ' says ' . 42;
}
echo This an EPIC test for the King();
View index.graphqls
#
# file ~/schema/index.graphqls
#
schema {
query: Query
}
type Query {
user: User
@SerafimArts
SerafimArts / example.graphqls
Created Jul 21, 2017
GraphQL IDL reader based on Yay PHP
View example.graphqls
type Story implements Test {
id: ID! @test(some: "any")
text: String!
isPublished: Boolean
author: Author!
comments: [Comment!]!
}
type Author {
id: ID!
View with-docblock.php
<?php
/**
* This file is part of laravel.su package.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
declare(strict_types=1);
@SerafimArts
SerafimArts / Annotation.js
Last active Jan 13, 2020
JavaScript Annotations example
View Annotation.js
import Reader from './Reader';
import Target from './Target';
/**
* This is default annotation property for automatic type casting:
* <code>
* @Annotation({ some: any })
* // => will be casts "as is" {some: any}
*
* @Annotation("any")
View Message.php
<?php declare(strict_types = 1);
/**
* This file is part of MessageComponent package.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Serafim\MessageComponent;
use Illuminate\Contracts\Support\Renderable;
You can’t perform that action at this time.