Skip to content

Instantly share code, notes, and snippets.

View zsherman's full-sized avatar
💭
👨‍💻

Zach Sherman zsherman

💭
👨‍💻
View GitHub Profile
<Box
p={3}
m={3}
mb={2}
bg="gray.1"
color="gray.4"
borderRadius={4}
style={{
fontFamily: 'menlo',
textTransform: 'uppercase',
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;
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 () {
/**
*
* 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'
@zsherman
zsherman / CustomCellMeasurerCache.js
Created January 16, 2018 23:31
Custom CellMeasurerCache
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 August 23, 2017 22:11
Simple script to generate a sitemap from contentful.
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;
// ./pages/index.js
export default () => (
<div>Welcome to next.js!</div>
)
@zsherman
zsherman / victory-example.js
Last active April 21, 2017 16:17
Victory brush example
import React, { PureComponent, PropTypes } from 'react';
import {
VictoryChart,
VictoryVoronoiContainer,
VictoryBrushContainer,
VictoryArea,
VictoryScatter,
VictoryLine,
VictoryBar,
VictoryCandlestick,
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
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]