Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View nodox's full-sized avatar

Steven Natera nodox

View GitHub Profile
@nodox
nodox / Buttons.js
Last active July 1, 2018 21:25
Building a stepper - buttons.js
import React from "react";
class Next extends React.Component {
render() {
const { isActive } = this.props;
if (isActive === false) return null;
return (
<button onClick={() => this.props.goToNextStep()}>
@nodox
nodox / AppCombined.js
Last active July 1, 2018 21:08
Building a stepper with compound components
import React from "react";
import { render } from "react-dom";
import { StepList } from "./StepList";
import { Step } from "./Step";
const PageTwo = () => (
<h2>We have a second page.</h2>
)
const PageThree = () => (
@nodox
nodox / StepList.js
Created July 1, 2018 20:58
Building a stepp - steplist.js
import React from "react";
class StepList extends React.Component {
constructor(props) {
super(props);
this.state = {
currentStep: 0,
totalSteps: this.props.children.length - 1,
};
@nodox
nodox / App.js
Created July 1, 2018 20:56
Building a stepper - app.js
import React from "react";
import { render } from "react-dom";
import { StepList } from "./StepList";
import { Step } from "./Step";
const PageTwo = () => (
<h2>We have a second page.</h2>
)
const PageThree = () => (
@nodox
nodox / SideNav.test.js
Created January 14, 2018 22:56
Example test
import React from 'react';
import SideNav from '../SideNav';
describe('<SideNav />', () => {
const testData = {
headline: 'Test Headline',
content: 'Yay, we have content!',
location: '/home',
displayMenu: false,
};
@nodox
nodox / tmux-cheatsheet.markdown
Created September 27, 2017 21:10 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@nodox
nodox / dockfile.md
Last active August 28, 2017 21:46
My Dev setup (Vim + Zsh)
@nodox
nodox / Dockerfile
Created July 16, 2017 18:57
Docker + Nvm + pm2
# Dockerfile
# using debian:jessie for it's smaller size over ubuntu
# FROM debian:jessie
FROM ubuntu:xenial
# Replace shell with bash so we can source files
RUN rm /bin/sh && ln -s /bin/bash /bin/sh
# Set environment variables
ENV appDir /var/www/app/current
swagger: '2.0'
info:
title: RVI HTTP API Spec
version: '0.0.5'
schemes:
- http
- https
consumes:
- application/json
produces: