Skip to content

Instantly share code, notes, and snippets.

View KyleAMathews's full-sized avatar

Kyle Mathews KyleAMathews

View GitHub Profile
import React from 'react'
import Relay from 'react-relay'
import _ from 'underscore'
import {Navigation} from 'react-router'
import SaveMixin from '../mixins/save'
import CreatePostMutation from '../mutations/CreatePost'
const PostCreate = React.createClass({
displayName: 'NewPost',
import Relay from 'react-relay'
export default class CreatePostMutation extends Relay.Mutation {
static fragments = {
viewer: () => Relay.QL`
fragment on User {
id
allPosts(first:10) {
edges {
node {
import Relay from 'react-relay'
export default class ClickButtonMutation extends Relay.Mutation {
static fragments = {
viewer: () => Relay.QL`
fragment on User {
id
buttonClicked
}
`,
import React from 'react'
import ReactDOM from 'react-dom'
import { Router, Route, Link } from 'react-router';
import { history } from 'react-router/lib/HashHistory';
import ReactRouterRelay from 'react-router-relay'
import Relay from 'relay'
// Route components
import { App } from './components/app'
import PostsIndex from './components/posts_index'
config = require 'config'
redis = require 'redis'
mysql = require 'mysql'
request = require 'request'
assign = require 'object-assign'
_ = require 'underscore'
graphql = require('../utils/graphql')
# Listen to Kafka for new pageOpens, pageCreates
@KyleAMathews
KyleAMathews / lambda.md
Last active May 13, 2022 00:49
Using Kafka and a Samza-like node.js architecture

Disclaimer

I'm still very new to Kafka, eventsourcing, stream processing, etc. I'm in the middle of building my first production system with this stuff and am writing this at the request of a few folks on Twitter. So if you do have experience, please do me and anyone else reading this a favor by pointing out things I get wrong :)

Inspirations

Mu: making programs easier to understand in the large

Imagine a world where you can:

a) think of a tiny improvement to a program you use, clone its sources, orient yourself on its organization and make your tiny improvement, all in a single afternoon.

b) Record your program as it runs, and easily convert arbitrary logs of runs into reproducible automatic tests.

@KyleAMathews
KyleAMathews / gist:e9e636125a71266d3aeb
Created November 13, 2014 07:26
Atlassian's route table
ROUTES = Routes({
location: "history"
}, Route({
handler: Application
}, Route({
name: "not-found",
path: prefixedPath("/404"),
handler: NotFound
}), Route({
name: "home",
#!/bin/bash
# Start DBs
echo "Create test instances of Rethinkdb and Influxdb:"
number=$RANDOM
rethinkdb=`docker run -d --name rethinkdb-$number dockerfile/rethinkdb`
influxdb=`docker run -d --name influxdb-$number tutum/influxdb`
echo "Success!"
echo ""

Keybase proof

I hereby claim:

  • I am kyleamathews on github.
  • I am kylemathews (https://keybase.io/kylemathews) on keybase.
  • I have a public key whose fingerprint is E9DF 89EA 4B79 8E29 0240 1598 BF26 FBE1 9DD1 0A8E

To claim this, I am signing this object: