Skip to content

Instantly share code, notes, and snippets.

View lowsky's full-sized avatar
:electron:
#graphql #reactjs #webdevop

lowsky lowsky

:electron:
#graphql #reactjs #webdevop
View GitHub Profile
@AndrewIngram
AndrewIngram / injected-resolvers.js
Created June 9, 2016 10:27
Cleaner graphql-js types
import * as resolvers from './fooResolvers';
function injectResolvers(resolvers, fieldFunc) {
return function() {
const fields = fieldFunc();
return Object.keys(fields).reduce((previous, key) => {
const field = fields[key];
return {
@OlegIlyenko
OlegIlyenko / Event-stream based GraphQL subscriptions.md
Last active February 24, 2024 04:41
Event-stream based GraphQL subscriptions for real-time updates

In this gist I would like to describe an idea for GraphQL subscriptions. It was inspired by conversations about subscriptions in the GraphQL slack channel and different GH issues, like #89 and #411.

Conceptual Model

At the moment GraphQL allows 2 types of queries:

  • query
  • mutation

Reference implementation also adds the third type: subscription. It does not have any semantics yet, so here I would like to propose one possible semantics interpretation and the reasoning behind it.

#!/bin/bash -e
# This displays the log of the docker daemon in the boot2docker VM.
boot2docker ssh tail -f /var/log/docker.log
@wolframkriesing
wolframkriesing / agenda.md
Last active August 1, 2016 20:12
ES6 + React.js workshop

[Sign up for July 6+7th here][signup]
Trainer: [@WolframKriesing], uxebu
Location: Munich, Germany

Goal of the workshop

Create and deploy a web application integrating the latest features of the upcoming JavaScript version ECMAScript6 (ES6) and test-driven development (TDD) in your workflow from the beginning and deploying a real app.

  • deploy continuously
  • go small steps
  • iterate fast
@jdoconnor
jdoconnor / gist:32ef0314cecb80157c4e
Created September 26, 2014 21:38
Update mtimes based off commit time
#!/bin/bash -e
####
# based on https://gist.github.com/jeffery/1115504
# Helper script to update the Last modified timestamp of files in a Git SCM
# Projects working Copy
#
# When you clone a Git repository, it sets the timestamp of all the files to the
# time when you cloned the repository.
#
# This becomes a problem when you want the cloned repository, which is part of a
@addyosmani
addyosmani / README.md
Last active April 2, 2024 20:18 — forked from 140bytes/LICENSE.txt
108 byte CSS Layout Debugger

CSS Layout Debugger

A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.

One-line version to paste in your DevTools

Use $$ if your browser aliases it:

~ 108 byte version

@mattes
mattes / update.sh
Last active August 29, 2015 14:03
Update Docker and Boot2docker-CLI
# curl https://gist.githubusercontent.com/mattes/a83b887e0e79a461ce95/raw/update.sh | bash
boot2docker version
docker version
# update docker
(
cd /tmp
wget http://get.docker.io/builds/Darwin/x86_64/docker-latest.tgz
tar -xvf docker-latest.tgz
@mattes
mattes / boot2docker-install.sh
Last active August 29, 2015 14:02
boot2docker-cli mac osx install
# if boot2docker is already installed with brew
brew uninstall boot2docker
brew uninstall boot2docker-cli
# install go (which is always a good idea)
brew install go
# export $GOPATH ~/go # or whatever
cd $GOPATH && mkdir src && mkdir pkg && mkdir bin
cd $GOPATH
#!/bin/bash -x
REPO="${1}"
SHA1="${2}"
OPEN="${3}"
repofragment=$(cd "$REPO"; git remote -v | grep origin | grep push | sed -e 's/.*github\.com.\(.*\)\.git.*/\1/')
url="https://github.com/${repofragment}/commit/${SHA1}"
echo "${url}" | pbcopy
[ -z "${OPEN}" ] || open "$url"
@jeffmo
jeffmo / gist:054df782c05639da2adb
Last active January 11, 2024 06:05
ES Class Property Declarations