Skip to content

Instantly share code, notes, and snippets.

View xavxyz's full-sized avatar
🎋
growing flex

Xavier Cazalot xavxyz

🎋
growing flex
View GitHub Profile
@xavxyz
xavxyz / update.sh
Last active February 1, 2017 14:24
easy-update from Nova repo & your package
echo "// ------ 🔭 Updating Nova"
echo "// ------ Stashing your changes... (if any)"
git add .
git stash
# devel = Nova Apollo stable branch at the moment
git checkout devel
# origin = https://github.com/TelescopeJS/Telescope.git
git pull origin
echo "// ------ 🔭 Nova updated!"
echo "// ------ Applying your changes... (if any)"
@xavxyz
xavxyz / whats-nova.md
Created March 3, 2017 16:16
Nova/Vulcan presentation at Flip Flops camps
 ## Background

S 1. Telescope/Sidebar S 2. Discover Meteor S 3. React rewrite (Nova) + Xavier comes on board X 4. Apollo rewrite (Vulcan)

 ## What Is It?

Title ideas

The super powers of your own toolkit based on Apollo tools

Talk abstract

Apollo tools for React & Node environment give you ability to powerful create apps powered with a GraphQL data layer. In creating your own re-usable toolkit on top of these tools, it allows you to build great products even more simply.

Context

State of the art

// inspired by https://github.com/tmeasday/mongo-find-by-ids/blob/master/index.js
const findBy = async (collection, key) => values => {
try {
const docs = await collection.find({ [key]: { $in: values } }).fetch();
const keyMap = docs.reduce((map, doc) => ({
...map,
[doc.key]: doc,
}), {});
// Utils to get from raw to exploitable data
// extract two lists of issues & pull requests from a repository list
// note: this fn could return an object, but returning a two-dimensional array
// eases the data manipulation (see bottom of the file). The early implementation
// of this function was written with objects, see comment below
export const createLists = repositoriesList => repositoriesList.reduce(
(doubleList, repo) => ([
// index 0 = issues list
[...doubleList[0], { id: repo.id, count: repo.issues.totalCount }],
@xavxyz
xavxyz / Input.js
Created June 29, 2017 20:23
Exercise 13 @ Ticketmaster
import React from 'react';
import { StyleSheet } from 'react-native';
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import Autocomplete from 'react-native-autocomplete-select';
import { colors } from '../../lib/theme';
import { input as inputActions } from '../../store/actions';
const Input = ({
inputValue,
@xavxyz
xavxyz / storyshots-sc.test.js
Created July 20, 2017 08:41
exploring shallow rendering
import initStoryshots from '@storybook/addon-storyshots';
import { shallow } from 'enzyme';
import toJSON from 'enzyme-to-json';
import 'jest-styled-components';
import { ThemeProvider } from 'styled-components';
initStoryshots({
test: ({ story, context }) => {
const storyElement = story.render(context);
@xavxyz
xavxyz / easing.css
Created July 21, 2017 09:39 — forked from bendc/easing.css
Easing CSS variables
:root {
--ease-in-quad: cubic-bezier(.55, .085, .68, .53);
--ease-in-cubic: cubic-bezier(.550, .055, .675, .19);
--ease-in-quart: cubic-bezier(.895, .03, .685, .22);
--ease-in-quint: cubic-bezier(.755, .05, .855, .06);
--ease-in-expo: cubic-bezier(.95, .05, .795, .035);
--ease-in-circ: cubic-bezier(.6, .04, .98, .335);
--ease-out-quad: cubic-bezier(.25, .46, .45, .94);
--ease-out-cubic: cubic-bezier(.215, .61, .355, 1);
@xavxyz
xavxyz / app.js
Created July 26, 2017 14:56 — forked from Prtfw/app.js
import React from "react";
import Header from "./Header";
import Order from "./Order";
import Inventory from "./Inventory";
import Fish from "./Fish";
import samples from "../sample-fishes";
import base from "../base";
class App extends React.Component {
constructor() {
@xavxyz
xavxyz / animation-as-a-function-of-data.md
Last active October 20, 2017 15:52
GraphQL Summit 2017 - Call For Paper

Animation as a Function of Data by Xavier Cazalot

Abstract

Our design & development process is founded on our application's domain model. It rules the data involved in the UI we are building and it helps for providing great user experiences. What if animations were baked in the process as part of a whole? This is what this talk is about!


Description

Overview