Skip to content

Instantly share code, notes, and snippets.

Avatar

Max Albrecht eins78

View GitHub Profile
@eins78
eins78 / tutorial.md
Created Aug 4, 2018 — forked from swalkinshaw/tutorial.md
Designing a GraphQL API
View tutorial.md

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
eins78 / about-doctor-stats-plugin.md
Last active Feb 26, 2017
doctor stats plugin. install it on <professor.amiacyb.org> then click the "נקודות" box.
View about-doctor-stats-plugin.md

doctor stats plugin.

install it on http://professor.amiacyb.org 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>
<html>
<head>
<meta charset="UTF-8" />
<title>Hello React!</title>
<script src="https://unpkg.com/react@15.3.1/dist/react.min.js"></script>
<script src="https://unpkg.com/react-dom@15.3.1/dist/react-dom.min.js"></script>
</head>
<body>
<div id="root"></div>
@eins78
eins78 / README.md
Created Nov 18, 2015 — forked from mbostock/.block
Radial Reingold–Tilford Tree
View README.md

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
eins78 / wtf.rb
Created Sep 14, 2015
rails controller instance var is cached if initialy assigned to const
View wtf.rb
class FooController < ApplicationController
KONST = {
foo: { bar: 'baz' },
}
def show
@konst = KONST
end
@eins78
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: this.props.items.map(function(item, index){
@eins78
eins78 / rails_error_classes.yaml
Created May 11, 2015
rails_error_classes.yaml
View rails_error_classes.yaml
# class StandardError
# def descendants
# ObjectSpace.each_object(::Class).select {|klass| klass < self }
# end
# end
# puts (StandardError.descendants.map(&:to_s).sort.group_by {|s|s.split('::')[0]}).to_yaml
# output for <https://github.com/Madek/madek-webapp>:
---
@eins78
eins78 / for_want_of_a_nail.md
Last active Aug 29, 2015
For Want of a Nail
View for_want_of_a_nail.md

"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.

You can’t perform that action at this time.