Instantly share code, notes, and snippets.


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.

View index.html
<!doctype html>
<style class="cp-pen-styles">#featureAnimation,#featureBox{background-color:#fff;overflow:hidden;line-height:normal;font-size:80%;z-index:1000;}#featureAnimation{position:fixed;visibility:hidden;}#featureBox{position:absolute;}.star{position:absolute;background-color:#161616;display:none;z-index:1001;}.dot{position:absolute;background-color:#91e600;}.page-box{opacity:0;}</style>
<script type="text/javascript" src=""></script>
<script src=''></script></head>
<body id="home" class="fixed-header">
<div id="featureBox"></div><div class="feature" id="featureAnimation"><div id="featureBackground" style="pointer-events:none;"></div></div>
<script type="text/javascript">
/* verge 1.9.1+201402130803 | | * MIT License 2013 Ryan Van Etten | Script to fetch viewport dimensions */

What I Wish I'd Known About Equity Before Joining A Unicorn

Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.

This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would


React "Hello World" Examples

Below are a small collection of React examples to get anyone started using React. They progress from simpler to more complex/full featured.

They will hopefully get you over the initial learning curve of the hard parts of React (JSX, props vs. state, lifecycle events, etc).


You will want to create an index.html file and copy/paste the contents of 1-base.html and then create a scripts.js file and copy/paste the contents of one of the examples into it.


Conway's Game of Life

This is a pure Javascript implementation of Conway's Game of life. Currently, this is an implementation of Blinker Pattern. In future, this implementation may be improved and new patterns might be added.

Comments and Feedback are welcome.

View Einstein.pdf
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

India Census - 2011

India Census 2011 is the latest comprehensive census of India taken at the time of this writing. The source for this census is Hover over the states to see the statistics in the popup and the two graphs on the right.


Moon Phase Visualizer

Moon phase visualizer is a simple demo to understand how Moon's phases (and eclipses) occur.

Moon Phase Visualizer Demo Link

Github Page

Moon Phase Visualizer is created using d3.js. There is a short introduction to d3.js using Moon Phase Visualizer.


If the dvd is mounted it is available via /dev/dvd

Run the following in terminal

sudo dd if=/dev/dvd of=/your/path/file_name.iso

Here, if denotes input file, of is output file. dd stands for device dump.