graphql
hero {
name
friends {
name
}
}
import binascii | |
import sqlite3 | |
import collections | |
import math | |
import re | |
RE_SPLIT = re.compile(r'[^A-Za-z0-9_]+') | |
def tokenize(s): | |
# this is super basic and should be replaced with a real tokenizer |
import { FSWatcher } from "chokidar"; | |
import { Project, ProjectOptions } from "ts-morph"; | |
import invariant from "invariant"; | |
interface TsMorphWatcherFsEvent { | |
type: "add" | "unlink" | "change"; | |
path: string; | |
} | |
type TsMorphWatcherEvent = TsMorphWatcherFsEvent | { type: "ready" }; |
import time | |
class Bucket(object): | |
def __init__(self, max_amount, refill_time, refill_amount): | |
self.max_amount = max_amount | |
self.refill_time = refill_time | |
self.refill_amount = refill_amount | |
self.reset() | |
def _refill_count(self): |
/** @jsx React.DOM */ | |
var MyRootComponent = React.createClass({ | |
getInitialState: function() { | |
return {perMinute: '-', perDay: '-'}; | |
}, | |
componentDidMount: function() { | |
var socket = io.connect(this.props.url); | |
socket.on('business.clickout', this.setState.bind(this)); | |
}, | |
render: function() { |
/** @jsx React.DOM */ | |
var MyComponent = React.createClass({ | |
getInitialState: function() { | |
// set up the initial state. used for "logical" initialization code | |
return {perMinute: '-', perDay: '-'}; | |
}, | |
componentDidMount: function() { | |
// fired only once, when the component is added to the DOM | |
// used for initialization code that has "side effects" i.e. i/o, jquery plugins, etc | |
var socket = io.connect(this.props.url); |
#!/bin/bash | |
set -euo pipefail | |
CONTAINER="$(pwd | sha256sum | awk '{print $1}')" | |
if docker inspect "$CONTAINER" 2> /dev/null > /dev/null; | |
then | |
docker start "$CONTAINER" -ai | |
else | |
docker run --name="$CONTAINER" -v $(pwd):/root -w /root -ti ubuntu bash | |
fi |
<html> | |
<head> | |
<title>Test</title> | |
<script src="http://code.jquery.com/jquery-1.9.1.js"></script> | |
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script> | |
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" /> | |
<script src="http://fb.me/react-0.5.1.js"></script> | |
<script src="http://fb.me/JSXTransformer-0.5.1.js"></script> | |
</head> |
hero {
name
friends {
name
}
}
I hereby claim:
To claim this, I am signing this object:
/** | |
* Copyright 2013 Facebook, Inc. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |