Skip to content

Instantly share code, notes, and snippets.

View bookercodes's full-sized avatar

Alex Booker bookercodes

View GitHub Profile
import * as React from 'react'
import { Formik } from 'formik'
import Yup from 'yup'
import {
Form,
FormGroup,
Col,
ControlLabel,
FormControl,
HelpBlock,
const isGreaterThan = a => b => b.length > a
const isWistiaLink = text =>
/https:\/\/pusher-1.wistia.com\/medias\/\w{10}$/.test(text)
const isMeetupLink = text =>
/https:\/\/www.meetup.com\/.+\/events\/\d+\/?$/.test(text)
const notEmpty = b => b !== ''
const isFullName = text => /[A-Za-z]+\s[A-Za-z]+$/g.test(text)
const validationRules = {
title: [[notEmpty, 'Whops 😳! You need to enter a title']],
wistiaUrl: [
import React from 'react'
import revalidation from 'revalidation'
const renderError = errors => {
if (errors && errors.length > 0) {
return <p>{errors[0]}</p>
}
}
const SimpleForm = ({
import fetch from "isomorphic-unfetch";
const Talk = ({ title, views }) => (
<div>
<h1>{title}</h1>
<h2>Views: {views}</h2>
</div>
);
class Index extends React.Component {
<script src="https://fast.wistia.com/embed/medias/ykbz757hkx.jsonp" async></script><script src="https://fast.wistia.com/assets/external/E-v1.js" async></script><div class="wistia_embed wistia_async_ykbz757hkx" style="height:360px;width:640px">&nbsp;</div>
<script src="//fast.wistia.com/embed/medias/2wa27t0v6p.jsonp" async></script><script src="//fast.wistia.com/assets/external/E-v1.js" async></script><div class="wistia_embed wistia_async_2wa27t0v6p" style="height:360px;width:640px">&nbsp;</div>
1
00:00,000 --> 00:00,000
[music]
2
00:00,000 --> 01:19,000
[00:00]
3
00:00,000 --> 00:24,000
# Editor
'atom-text-editor:not([mini])':
'ctrl-i': 'cursor-history:next'
'ctrl-o': 'cursor-history:prev'
# Normal node key-bindings
'atom-text-editor.vim-mode-plus.normal-mode':
'ctrl-j': 'window:focus-pane-below'
'ctrl-k': 'window:focus-pane-above'
'ctrl-h': 'window:focus-pane-on-left'
touch .hushlogin
brew install antigen
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.32.1/install.sh | bash
#!/usr/bin/env node
require('dotenv').config()
const db = require('sequelize-context')
const axios = require('axios')
db
.connect(
'./db/models/*.js',
process.env.DB_SCHEMA,