Skip to content

Instantly share code, notes, and snippets.

View jeffcarbs's full-sized avatar

Jeff Carbonella jeffcarbs

View GitHub Profile
@jeffcarbs
jeffcarbs / reproduction.rb
Last active September 29, 2019 06:13
Performance issues with FactoryBot traits
require "bundler/inline"
gemfile(true) do
source "https://rubygems.org"
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
gem "factory_bot", "~> 5.0"
end
require 'factory_bot'
require 'benchmark'
@jeffcarbs
jeffcarbs / KitchenSink.stories.js
Created November 1, 2016 17:03
React Storybook - Kitchen Sink
// This is using Semantic-UI-React for a grid system but the rendering can be handled however you want.
import { getStorybook, storiesOf } from '@kadira/storybook'
import { Grid, Header } from 'semantic-ui-react'
// Avoid infinite loop
const KITCHEN_SINK_TITLE = 'Kitchen Sink'
const renderStory = (story) => (
<Grid.Row key={story.name} style={{ marginBottom: '1rem' }}>