Skip to content

Instantly share code, notes, and snippets.

View eugene1g's full-sized avatar
💬
Several people are typing...

Eugene eugene1g

💬
Several people are typing...
View GitHub Profile
@eugene1g
eugene1g / graphiql-latest.html
Created September 19, 2016 21:50
Using the latest GraphiQL through unpkg.com with Apollo Server
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>GraphiQL</title>
<meta name="robots" content="noindex" />
<style>
html, body {
height: 100%;
margin: 0;
@eugene1g
eugene1g / Makefile
Created March 5, 2015 03:49
Our webpack setup
front-server:
webpack-dev-server --config _dev/webpack/devserver.config.js --colors --port 9020 --hot
front-build:
webpack --config _dev/webpack/production-config.js
@eugene1g
eugene1g / AutogrowingTextarea.js
Last active January 12, 2017 02:29
React component for auto-expanding textareas
"use strict";
import React, {Component} from 'react';
import calcContentHeight from './dom-textarea-measure';
class AutogrowingTextarea extends Component {
constructor(props) {
this.props = props;
this.state = {};
this.textareaProps = sanitizeChildProps(props);
@eugene1g
eugene1g / ORMExpression.php
Created March 25, 2014 22:45
Doctrine2 - creating an expression to sanitize parameters to the LIKE clause
<?php
namespace Foo\Core\Doctrine;
use Doctrine\ORM\Query\Expr as DoctrineExpr;
/**
* Contains custom ORM expressions for comparisons, regexps, case-insensitive matches etc
* Used instead of the regular Query\Expr() class http://docs.doctrine-project.org/en/2.0.x/reference/query-builder.html#the-expr-class
*/
@eugene1g
eugene1g / gist:9519953
Created March 13, 2014 01:00
Symfony2 container - passing an array of services
serviceA:
class: Amazing\Class
arguments: [[@serviceB, @serviceC]]