Skip to content

Instantly share code, notes, and snippets.

View XeeD's full-sized avatar

Lukáš Voda XeeD

View GitHub Profile
[1] pry(#<RSpec::Core::ExampleGroup::Nested_1::Nested_2>)> create(:line_item)
(0.1ms) SAVEPOINT active_record_1
SQL (0.5ms) INSERT INTO "spree_users" ("authentication_token", "created_at", "email", "login", "updated_at") VALUES (?, ?, ?, ?, ?) [["authentication_token", "xxxx14028747076021xxxxxxxxxxxxx"], ["created_at", "2014-06-15 23:25:07.770910"], ["email", "marcus@beattyschaden.info"], ["login", "marcus@beattyschaden.info"], ["updated_at", "2014-06-15 23:25:07.770910"]]
(0.1ms) RELEASE SAVEPOINT active_record_1
Spree::Country Load (0.2ms) SELECT "spree_countries".* FROM "spree_countries" WHERE "spree_countries"."numcode" = 840 LIMIT 1
(0.1ms) SAVEPOINT active_record_1
SQL (1.0ms) INSERT INTO "spree_countries" ("iso", "iso3", "iso_name", "name", "numcode", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["iso", "US"], ["iso3", "USA"], ["iso_name", "UNITED STATES"], ["name", "United States of America"], ["numcode", 840], ["updated_at", "2014-06-15 23:25:07.843809"]]
(0.1ms) RELEASE SAVE
@XeeD
XeeD / .gitconfig
Last active February 9, 2018 14:19
[color]
ui = auto
[core]
editor = vim
autocrlf = false
whitespace = space-before-tab,cr-at-eol
excludesfile = ~/.gitignore_global
trustctime = false
mergeoptions = --no-edit
[alias]

Folder Structure

Please note

While this gist has been shared and followed for years, I regret not giving more background. It was originally a gist for the engineering org I was in, not a "general suggestion" for any React app.

Typically I avoid folders altogether. Heck, I even avoid new files. If I can build an app with one 2000 line file I will. New files and folders are a pain.

2015-01-29 Unofficial Relay FAQ

Compilation of questions and answers about Relay from React.js Conf.

Disclaimer: I work on Relay at Facebook. Relay is a complex system on which we're iterating aggressively. I'll do my best here to provide accurate, useful answers, but the details are subject to change. I may also be wrong. Feedback and additional questions are welcome.

What is Relay?

Relay is a new framework from Facebook that provides data-fetching functionality for React applications. It was announced at React.js Conf (January 2015).

@steida
steida / gist:9d80c9858d1bc31741d1
Last active August 29, 2015 14:19
Loading Pure component
import PureComponent from './purecomponent.react'
import React from 'react'
import classnames from 'classnames'
import {msg} from '../intl/store'
require('./loading.styl')
export default class Loading extends PureComponent {
constructor(props) {
@XeeD
XeeD / JavaScript.md
Last active March 9, 2016 06:07
JavaScript stack resources
@steida
steida / gist:570d007c94a25fa68443
Last active October 10, 2015 18:05
listenFirebase higher order component
import Component from './component.react';
import React from 'react';
import {firebase, onFirebaseError} from '../firebase';
import {firebaseCursor} from '../state';
// This is super handy for monitoring listened refs.
function addListenedRef(ref) {
firebaseCursor(firebase => firebase
.update('listenedRefs', listenedRefs => listenedRefs
// But unfortunately querystring is not part of serialization. Kato from
@gigiigig
gigiigig / auxpattern.scala
Last active November 3, 2025 12:17
Aux Pattern
import shapeless._
import scalaz._
import Scalaz._
object console extends App {
trait Foo[A] {
type B
def value: B
@Jonty
Jonty / .gitconfig
Last active January 11, 2018 11:55
A git alias to rebase all commits added on the current branch
[alias]
rebase-branch = !git rebase -i --autosquash $(git merge-base --fork-point origin/master HEAD)

React is the new Lego - how we deal with a lot of components

Lightning talk proposal for ReactiveConf 2016

BlueKit usage

At Blueberry, we've been frustrated with maintaining and getting oriented in our React components and their props. That's why we made a tool for automatically generating a component library from a project's components.

We named it BlueKit and released it as open-source.