Skip to content

Instantly share code, notes, and snippets.

View amcooper's full-sized avatar
🐖
🐖

Adam Cooper amcooper

🐖
🐖
View GitHub Profile
@amcooper
amcooper / App.js
Last active August 2, 2017 00:29
Vigilant snippet no. 2
import React, { Component } from 'react';
import './App.css';
import seedTweets from './seeds.js';
class Tweet extends Component {
render() {
return(
<div className="tweet">
<p className="tweetText">{ this.props.text }</p>
<p className="tweetMetadata">
@amcooper
amcooper / App.js
Last active November 16, 2017 21:25
react-stalker
import React, { Component } from 'react';
import './App.css';
import config from './config.js';
class Form extends Component {
constructor(props) {
super(props);
this.state = {
celebrity: '',
stalker: '',

Knex - Express - CRUD

Practicing Relationships

Quickly Setup Your Project

Let's quickly review creating a new project utilizing todos.

  • Init a new Project

@amcooper
amcooper / keybase.md
Created August 14, 2018 19:24
keybase.md

Keybase proof

I hereby claim:

  • I am amcooper on github.
  • I am amcooper (https://keybase.io/amcooper) on keybase.
  • I have a public key ASCoyzf-i3fIIrA10e4mnJrLC87i4yUHAvj34gz7uZcLdgo

To claim this, I am signing this object:

@amcooper
amcooper / generateComponentTests.js
Created January 15, 2019 19:20
Janky component test generation script
/**
*
* A quick, janky script to generate & colocate Storyshots. Just saving this in case all hell.
*
*/
const fs = require("fs");
const path = require("path");
const elementsDir = path.join(__dirname, "..", "src", "components", "elements");
const modulesDir = path.join(__dirname, "..", "src", "components", "modules");
@amcooper
amcooper / 01_Article.jsx
Last active February 20, 2019 20:38
Troubled Relay container subtree
// Article.jsx
import React from "react";
import { createFragmentContainer, graphql } from "react-relay";
import CommentList from "./CommentList.jsx";
class Article extends React.Component {
render() {
return (