This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* based on https://github.com/artsy/artsy.github.io/issues/495#issuecomment-509697859 as https://artsy.github.io/blog/2018/10/19/where-art-thou-my-error/ */ | |
type OfUnion<T extends { __typename: string }> = { | |
[P in T['__typename']]: Extract<T, { __typename: P }>; | |
}; | |
const dataByTypename = <T extends { __typename: string }>(data?: T): OfUnion<T> => { | |
const typedData = data | |
? { | |
[data.__typename]: data, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import url from 'url'; | |
import { get, includes, isNumber, omit } from 'lodash'; | |
import { bindActionCreators } from 'redux'; | |
import { matchPath } from 'react-router-dom'; | |
import { flushChunkNames } from 'react-universal-component/server'; | |
import flushChunks from 'webpack-flush-chunks'; | |
import BodyClassName from 'react-body-classname'; | |
import Helmet from 'react-helmet'; | |
import uuidv4 from 'uuid/v4'; | |
import createStore from 'store/create'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useState, useEffect } from 'react'; | |
import classnames from 'classnames'; | |
import { useSpring, useTransition, animated } from 'react-spring' | |
import { isAfter, subSeconds } from 'date-fns'; | |
import { sumBy, orderBy } from 'lodash'; | |
import tweetService from './services/tweetService'; | |
import './App.css'; | |
export default function App({ tweetStream }) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[alias] | |
alias = config --get-regexp alias | |
ec = config --global -e | |
st = status | |
co = checkout | |
cob = checkout -b | |
up = pull --rebase upstream master | |
pb = !git push --set-upstream origin "$(git rev-parse --abbrev-ref HEAD)" | |
db = !f() { git branch -d $1; git push origin :$1; }; f | |
cm = !git add -A && git commit -m |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"caniuse.enabled": false, | |
"css.autoInsertVendorPrefixes": false | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Your keymap | |
# | |
# Atom keymaps work similarly to style sheets. Just as style sheets use | |
# selectors to apply styles to elements, Atom keymaps use selectors to associate | |
# keystrokes with events in specific contexts. Unlike style sheets however, | |
# each selector can only be declared once. | |
# | |
# You can create a new keybinding in this file by typing "key" and then hitting | |
# tab. | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Your snippets | |
# | |
# Atom snippets allow you to enter a simple prefix in the editor and hit tab to | |
# expand the prefix into a larger code block with templated values. | |
# | |
# You can create a new snippet in this file by typing "snip" and then hitting | |
# tab. | |
# | |
# An example CoffeeScript snippet to expand log to console.log: | |
# |