Skip to content

Instantly share code, notes, and snippets.

View ihorkatkov's full-sized avatar

Ihor Katkov ihorkatkov

View GitHub Profile
@tystr
tystr / DoctrineFormHandler.php
Last active March 27, 2016 22:26
Doctrine Symfony2 Form Handler
<?php
namespace Form\Handler;
use Symfony\Component\Form\Form;
use Symfony\Component\HttpFoundation\Request;
use Doctrine\Common\Persistence\ObjectManager;
use Form\Handler\FormHandlerInterface;
/**
@pjdietz
pjdietz / cloudSettings
Last active June 18, 2020 22:29
Testing Protected Method of Abstract Class with PHPUnit
{"lastUpload":"2020-06-18T22:29:09.889Z","extensionVersion":"v3.4.3"}
@idibidiart
idibidiart / GraphQL-Architecture.md
Last active September 16, 2023 18:36
Building an Agile, Maintainable Architecture with GraphQL

Building a Maintainable, Agile Architecture for Realtime, Transactional Apps

A maintainable application architecture requires that the UI only contain the rendering logic and execute queries and mutations against the underlying data model on the server. A maintainable architecture must not contain any logic for composing "app state" on the client as that would necessarily embed business logic in the client. App state should be persisted to the database and the client projection of it should be composed in the mid tier, and refreshed as mutations occur on the server (and after network interruption) for a highly interactive, realtime UX.

With GraphQL we are able to define an easy-to-change application-level data schema on the server that captures the types and relationships in our data, and wiring it to data sources via resolvers that leverage our db's own query language (or data-oriented, uniform service APIs) to resolve client-specified "queries" and "mutations" against the schema.

We use GraphQL to dyn

@int128
int128 / README.md
Last active December 18, 2024 08:48
Watching build mode on Create React App

Create React App does not provide watching build mode oficially (#1070).

This script provides watching build mode for an external tool such as Chrome Extensions or Firebase app.

How to Use

Create a React app.

Put the script into scripts/watch.js.

@gpad
gpad / .iex.exs
Last active August 25, 2020 07:57
My .iex.extension. In your app dir you can do: `GPad.start_app :timex` and if you have :timex in your deps it will be launched.
defmodule GPad do
def get_base() do
try do
get_base(System.get_env("MIX_ENV")) |> Path.join("lib")
catch
e -> IO.puts("Error: #{inspect(e)}")
end
end
def get_base(nil) do
@lorenzosinisi
lorenzosinisi / .vimrc
Created December 19, 2017 09:26
Vimrc config for Elixir
"""""""""""""""""""""""""""""""""""""
" Lorenzo Sinisi Vimrc configuration
"""""""""""""""""""""""""""""""""""""
set nocompatible
syntax on
set nowrap
set ignorecase
set smartcase
set encoding=utf8
set mouse=nicr
@szobov
szobov / .gitlab-ci.yaml
Created April 23, 2018 08:44
gitlab-ci.yaml elixir deploy
stages:
- init
- test
- deploy
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- deps/
- _build/