This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class VehicleResolver extends AbstractResolver | |
{ | |
public function resolveFoo() | |
{ | |
return 'foo'; | |
} | |
public function resolveType($rootValue, $contextValues, $info) | |
{ | |
if ($rootValue instanceof Airplane) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import { reveal, revealContext, revealOpen } from './reveal'; | |
const Open = revealOpen({ name: 'example' })( | |
({ openReveal }) => ( | |
<a onClick={() => openReveal({ a: 10 }}>Open me!</a> | |
) | |
); | |
const Modal = reveal({ name: 'example' })( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* This gist was inspired by the video course titled "Building React Applications with Idiomatic Redux" | |
* available on Egghead.io by the creator of Redux, Dan Abramov. | |
* | |
* The purpose of this gist is to demonstrate general purpose reducers that can be used via Redux's combineReducers | |
* to compose more complex reducers and therefore maximize code reuse. | |
* | |
* Feedback is more than welcome! | |
* | |
* @author Christoffer Niska <christofferniska@gmail.com> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yarn run v0.19.1 | |
$ flow; test $? -eq 0 -o $? -eq 2 | |
The flow server's version didn't match the client's, so it exited. | |
Going to launch a new one. | |
Launching Flow server for /Users/juuso/projects/poc | |
Spawned flow server (pid=15149) | |
Logs will go to /private/tmp/flow/zSUserszSjuusozSprojectszSpoc.log | |
src/hello/saga.js:13 | |
13: fork(function* () { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import isArray from 'lodash/isArray'; | |
import isFunction from 'lodash/isFunction'; | |
import isString from 'lodash/isString'; | |
import { takeLatest } from 'redux-saga'; | |
import { call, fork, put } from 'redux-saga/effects'; | |
import { arrayOf, Schema } from 'normalizr'; | |
import { callApi } from '../../api/helper'; | |
import { normalizeEntityResponse } from '../../common/helper'; | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*eslint no-unused-vars: 0*/ | |
import { fromJS, Map } from 'immutable'; | |
import { createReducer } from '../helpers/store'; | |
import { AuthActionTypes } from '../actions/auth'; | |
import { | |
setSession, | |
setUser, | |
getSession, | |
getIsAuthenticated, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Group } from 'phaser'; | |
/** | |
* Renders the given display objects using the given render session. | |
* @param {Array} displayObjects | |
* @param {Object} renderSession | |
*/ | |
function renderDisplayObjects(displayObjects, renderSession) { | |
for (let i = 0; i < displayObjects.length; i++) { | |
displayObjects[i]._renderWebGL(renderSession); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*! | |
Usage: | |
// define a base class called 'A' | |
// inheriting 'null' will inherit an empty constructor, | |
// this is convenient because you can define all your classes using the inherit method. | |
// protip: use upper case for classes, lower case for instances | |
var A = inherit(null, { | |
doSomething: function() {} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* TbJqueryFileUpload class file. | |
* @author Christoffer Niska <christoffer.niska@gmail.com> | |
* @copyright Copyright © Christoffer Niska 2013- | |
* @license http://www.opensource.org/licenses/bsd-license.php New BSD License | |
* @package yiistrap-widgets.widgets | |
*/ | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
query: 'http://tympanus.net/codrops/?s={{term}}', | |
translate: 'parseHTML(response)', | |
icon:{ | |
selector: '.ct-row > article > .ct-latest-thumb', | |
expression: 'app.url|icons' | |
}, | |
name:{ | |
selector: '.ct-row > article > h3 > a', |