Skip to content

Instantly share code, notes, and snippets.


Max Albrecht eins78

  • ZHdK Zurich University of the Arts
  • Zurich
View GitHub Profile
eins78 /
Created Aug 4, 2018 — forked from swalkinshaw/
Designing a GraphQL API

Tutorial: Designing a GraphQL API

This tutorial was created by Shopify for internal purposes. We've created a public version of it since we think it's useful to anyone creating a GraphQL API.

It's based on lessons learned from creating and evolving production schemas at Shopify over almost 3 years. The tutorial has evolved and will continue to change in the future so nothing is set in stone.

eins78 /
Last active Feb 26, 2017
doctor stats plugin. install it on <> then click the "נקודות" box.

doctor stats plugin.

install it on then click the "נקודות" box.

install with bookmarklet here

or paste the JS code in the browser console, use a "userscripts" or "greasmonkey" browser extension, etc.

if installation was successful, the "נקודות" box will show a "?" pointer icon on mouse hover.

View react-hello.html
<!DOCTYPE html>
<meta charset="UTF-8" />
<title>Hello React!</title>
<script src=""></script>
<script src=""></script>
<div id="root"></div>
eins78 /
Created Nov 18, 2015 — forked from mbostock/.block
Radial Reingold–Tilford Tree

The tree layout implements the Reingold-Tilford algorithm for efficient, tidy arrangement of layered nodes. The depth of nodes is computed by distance from the root, leading to a ragged appearance. Cartesian orientations are also supported. Implementation based on work by Jeff Heer and Jason Davies using Buchheim et al.'s linear-time variant of the Reingold-Tilford algorithm. Data shows the Flare class hierarchy, also courtesy Jeff Heer.

Compare to this Cartesian layout.

eins78 / wtf.rb
Created Sep 14, 2015
rails controller instance var is cached if initialy assigned to const
View wtf.rb
class FooController < ApplicationController
foo: { bar: 'baz' },
def show
@konst = KONST
eins78 / index.js
Last active Sep 11, 2015
requirebin sketch
View index.js
React = require('react')
curry = require('lodash/function/curry')
var List = React.createClass({
// this component expects a 'items' prop containing an array of strings
// we want to track here how often what was clicked
getInitialState: function(){
return {
items:, index){
eins78 / rails_error_classes.yaml
Created May 11, 2015
View rails_error_classes.yaml
# class StandardError
# def descendants
# ObjectSpace.each_object(::Class).select {|klass| klass < self }
# end
# end
# puts ( {|s|s.split('::')[0]}).to_yaml
# output for <>:
eins78 /
Last active Aug 29, 2015
For Want of a Nail

"For Want of a Nail"

Info on Wikipedia

Original Poem:

For want of a nail the shoe was lost.
For want of a shoe the horse was lost.
For want of a horse the rider was lost.
For want of a rider the message was lost.