Skip to content

Instantly share code, notes, and snippets.

Avatar

Steven Natera nodox

View GitHub Profile
@nodox
nodox / Buttons.js
Last active Jul 1, 2018
Building a stepper - buttons.js
View 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 / App.js
Created Jul 1, 2018
Building a stepper - app.js
View 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 / AppCombined.js
Last active Jul 1, 2018
Building a stepper with compound components
View AppCombined.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 = () => (
View SideNav.test.js
import React from 'react';
import SideNav from '../SideNav';
describe('<SideNav />', () => {
const testData = {
headline: 'Test Headline',
content: 'Yay, we have content!',
location: '/home',
displayMenu: false,
};
View tmux-cheatsheet.markdown

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@nodox
nodox / dockfile.md
Last active Aug 28, 2017
My Dev setup (Vim + Zsh)
View dockfile.md
@nodox
nodox / Dockerfile
Created Jul 16, 2017
Docker + Nvm + pm2
View Dockerfile
# 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
View smartcar
swagger: '2.0'
info:
title: RVI HTTP API Spec
version: '0.0.5'
schemes:
- http
- https
consumes:
- application/json
produces:
@nodox
nodox / video.jsx
Created May 8, 2017 — forked from mikechau/video.jsx
videojs react component
View video.jsx
var React = require('react');
var cx = require('classnames');
var vjs = require('video.js');
var _forEach = require('lodash/collection/forEach');
var _debounce = require('lodash/function/debounce');
var _defaults = require('lodash/object/defaults');
var DEFAULT_HEIGHT = 800;
var DEFAULT_WIDTH = 600;
var DEFAULT_ASPECT_RATIO = (9 / 16);