Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
👨‍💻

Zach Sherman zsherman

💭
👨‍💻
View GitHub Profile
View styled-system-example.js
<Box
p={3}
m={3}
mb={2}
bg="gray.1"
color="gray.4"
borderRadius={4}
style={{
fontFamily: 'menlo',
textTransform: 'uppercase',
View markdown-wrapper.js
import styled from 'styled-components'
const Wrapper = styled.div`
max-width: 100%;
color: ${props => props.theme.colors.text};
p {
font-size: 1rem;
line-height: 1.8;
margin-top: 0;
View loader.js
export default class ScriptLoader {
constructor (options) {
const { src, global, protocol = document.location.protocol } = options
this.src = src
this.global = global
this.protocol = protocol
this.isLoaded = false
}
loadScript () {
View smackdown.js
/**
*
* Markdown
*
*/
import React from 'react'
import Smackdown from 'react-smackdown'
import ruby from 'react-syntax-highlighter/dist/languages/hljs/ruby'
import javascript from 'react-syntax-highlighter/dist/languages/hljs/javascript'
View CustomCellMeasurerCache.js
class CustomCellMeasurerCache extends CellMeasurerCache {
constructor (props) {
super(props)
this._cellHeightEstimator = props.cellHeightEstimator
}
getHeight (rowIndex, columnIndex) {
const key = this._keyMapper(rowIndex, columnIndex)
return this._cellHeightCache.hasOwnProperty(key)
? Math.max(this._minHeight, this._cellHeightCache[key])
@zsherman
zsherman / sitemap.js
Created Aug 23, 2017
Simple script to generate a sitemap from contentful.
View sitemap.js
import fs from 'fs'
import { getPosts } from './api/posts'
function formatDate(date) {
var d = new Date(date),
month = '' + (d.getMonth() + 1),
day = '' + d.getDate(),
year = d.getFullYear();
if (month.length < 2) month = '0' + month;
View index.js
// ./pages/index.js
export default () => (
<div>Welcome to next.js!</div>
)
@zsherman
zsherman / victory-example.js
Last active Apr 21, 2017
Victory brush example
View victory-example.js
import React, { PureComponent, PropTypes } from 'react';
import {
VictoryChart,
VictoryVoronoiContainer,
VictoryBrushContainer,
VictoryArea,
VictoryScatter,
VictoryLine,
VictoryBar,
VictoryCandlestick,
View gist:5fcd868769cf392c4b62e98eefb206c1
Working on the endpoints, but I wanted to put together an issue for the front-end of what design considerations will need to go in here.
- Link to open billing panel for a specific organization
- Billing panel overview for an organization that lists the current plan, its rate, and description as well as payment methods (credit/debit cards) and billing email address
- Error display states
- Payment is overdue
- Card payment was declined
- Primary payment method has expired
- No payment method on account
- Generic payment processor error (for when we don't want to show the reason)
- Flow to add a new payment method
View gist:37a3952f514a2b802d80
bundle exec cap staging deploy branch=ls-web-checkout
-> Deploying origin/ls-web-checkout to staging
Affecting servers [adam-ec2-04.seatgeek.com, fortune-ec2-01.seatgeek.com, services-ec2-02.seatgeek.com, recon-ec2-03.seatgeek.com, 50.16.26.139, 54.242.167.166]
With rollback tag of: 2015.03.12-21.19.16-staging-acslater00
--> Starting deploy....................✔
--> Updating code......................✔
--> Bundling assets....................|*** [err :: 50.16.26.139] npm
*** [err :: 50.16.26.139]
*** [err :: 50.16.26.139] WARN
*** [err :: 50.16.26.139]